diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-02-24 20:16:42 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-02-24 20:16:42 +0000 |
commit | c4b904bcc40b7ea92dba6c9f6825034062399aba (patch) | |
tree | 74444780903315d64e7dbceff23418376f540982 /media-libs | |
parent | Added initscript for use on livecds. (Manifest recommit) (diff) | |
download | gentoo-2-c4b904bcc40b7ea92dba6c9f6825034062399aba.tar.gz gentoo-2-c4b904bcc40b7ea92dba6c9f6825034062399aba.tar.bz2 gentoo-2-c4b904bcc40b7ea92dba6c9f6825034062399aba.zip |
Some first time build fixes (cannot find libvga.so and libvgagl.so when
building threeDKit and demos). Hopefully fix module issues (bug #42522
among others ...).
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/svgalib/ChangeLog | 10 | ||||
-rw-r--r-- | media-libs/svgalib/Manifest | 24 | ||||
-rw-r--r-- | media-libs/svgalib/files/digest-svgalib-1.9.18-r1 | 1 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.18-linux2.6-v2.patch | 240 | ||||
-rw-r--r-- | media-libs/svgalib/svgalib-1.9.18-r1.ebuild | 144 |
5 files changed, 407 insertions, 12 deletions
diff --git a/media-libs/svgalib/ChangeLog b/media-libs/svgalib/ChangeLog index 8a759404ebde..8a5adc45eae5 100644 --- a/media-libs/svgalib/ChangeLog +++ b/media-libs/svgalib/ChangeLog @@ -1,9 +1,15 @@ # ChangeLog for media-libs/svgalib # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.32 2004/02/24 06:28:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.33 2004/02/24 20:16:42 azarah Exp $ + + 24 Feb 2004; Martin Schlemmer <azarah@gentoo.org> svgalib-1.9.18.ebuild: + Some first time build fixes (cannot find libvga.so and libvgagl.so when + building threeDKit and demos). Hopefully fix module issues (bug #42522 + among others ...). 24 Feb 2004; Mike Frysinger <vapier@gentoo.org> : - Until linux 2.6 module building is sorted out, we disable the kernel module #42522. + Until linux 2.6 module building is sorted out, we disable the kernel module, + bug #42522. 23 Feb 2004; <plasmaroo@gentoo.org> files/svgalib-1.9.17-linux2.6.patch, files/svgalib-1.9.18-linux2.6.patch: diff --git a/media-libs/svgalib/Manifest b/media-libs/svgalib/Manifest index 609b05091c72..e5312ce0a0af 100644 --- a/media-libs/svgalib/Manifest +++ b/media-libs/svgalib/Manifest @@ -1,17 +1,21 @@ -MD5 972b9871cd88ab7121c90e6362203052 ChangeLog 5502 +MD5 66becf949ecf6115cdcffb5fe405db95 ChangeLog 5754 +MD5 66d440e293bad7de59d9e5e8ef55c471 svgalib-1.9.18-r1.ebuild 3978 MD5 b3845e961f29a0e3754831e90ff5e798 svgalib-1.4.3-r4.ebuild 2566 -MD5 407955af055c9566d98c5154b69aef83 svgalib-1.9.18.ebuild 3447 MD5 7aae39539c1f87ab37a6d216f9f9be87 svgalib-1.9.17-r3.ebuild 3180 -MD5 0209cd9462a2c845466526a2a4017104 files/svgalib-1.9.18-gentoo.patch 3622 -MD5 0d7d045fc55ccf3f4a26bc54286a3b8a files/digest-svgalib-1.9.18 66 -MD5 c4b69ccaea188c0ee4b32111b769ae6d files/svgalib-1.4.3-userpriv.patch 1267 +MD5 407955af055c9566d98c5154b69aef83 svgalib-1.9.18.ebuild 3447 +MD5 6a4fd54b74c5522c7b4fe118a5b64cf6 .svgalib-1.9.18-r1.ebuild.swp 16384 +MD5 08beaed909b549304425870873b67c19 files/svgalib-1.9.18-gcc33.patch 426 +MD5 84638d1958dd8a0851602dc50dad3998 files/svgalib-1.9.18-linux2.6.patch 7981 MD5 19b74fedfd6953bd3537a803abecc4d3 files/svgalib-1.4.3-gentoo.diff 10364 -MD5 72bba0fb5841145da689fda817c7e2d9 files/svgalib-1.4.3-gcc3.patch 303 +MD5 c6ccf439f748f710447c61fe41801a3c files/svgalib-1.9.18-linux2.6-v2.patch 7842 +MD5 0d7d045fc55ccf3f4a26bc54286a3b8a files/digest-svgalib-1.9.18 66 +MD5 2857566febd76fb43d15893931255d32 files/svgalib-1.9.17-linux2.6.patch 38521 MD5 3538c97a42a76d7c1b210319171d3daa files/svgalib-1.4.3-linux2.6.patch 195 +MD5 0d7d045fc55ccf3f4a26bc54286a3b8a files/digest-svgalib-1.9.18-r1 66 +MD5 0209cd9462a2c845466526a2a4017104 files/svgalib-1.9.18-gentoo.patch 3622 MD5 e4ead3e3192f5a945ff177331122d7ae files/digest-svgalib-1.9.17-r3 66 -MD5 84638d1958dd8a0851602dc50dad3998 files/svgalib-1.9.18-linux2.6.patch 7981 +MD5 c2977469108170b5851b7706829ad646 files/svgalib-1.9.17-gentoo.patch 11536 +MD5 c4b69ccaea188c0ee4b32111b769ae6d files/svgalib-1.4.3-userpriv.patch 1267 MD5 9e8f47b421194ae42b3ff7e3a8ba8aed files/svgalib-1.9.17-modversions_h.patch 2414 -MD5 08beaed909b549304425870873b67c19 files/svgalib-1.9.18-gcc33.patch 426 MD5 ae00198d9110c4de5bc6dd4d6424ab26 files/digest-svgalib-1.4.3-r4 132 -MD5 2857566febd76fb43d15893931255d32 files/svgalib-1.9.17-linux2.6.patch 38521 -MD5 c2977469108170b5851b7706829ad646 files/svgalib-1.9.17-gentoo.patch 11536 +MD5 72bba0fb5841145da689fda817c7e2d9 files/svgalib-1.4.3-gcc3.patch 303 diff --git a/media-libs/svgalib/files/digest-svgalib-1.9.18-r1 b/media-libs/svgalib/files/digest-svgalib-1.9.18-r1 new file mode 100644 index 000000000000..0c2fdc8d9e53 --- /dev/null +++ b/media-libs/svgalib/files/digest-svgalib-1.9.18-r1 @@ -0,0 +1 @@ +MD5 5a1dc3dbf3182fb560959678dfba6181 svgalib-1.9.18.tar.gz 933786 diff --git a/media-libs/svgalib/files/svgalib-1.9.18-linux2.6-v2.patch b/media-libs/svgalib/files/svgalib-1.9.18-linux2.6-v2.patch new file mode 100644 index 000000000000..31bc3cb60a91 --- /dev/null +++ b/media-libs/svgalib/files/svgalib-1.9.18-linux2.6-v2.patch @@ -0,0 +1,240 @@ +diff -urpwN svgalib-1.9.18/kernel/svgalib_helper/Makefile.alt svgalib-1.9.18.kernel2.6/kernel/svgalib_helper/Makefile.alt +--- svgalib-1.9.18/kernel/svgalib_helper/Makefile.alt 2002-10-28 18:25:47.000000000 +0200 ++++ svgalib-1.9.18.kernel2.6/kernel/svgalib_helper/Makefile.alt 2003-08-03 14:34:40.000000000 +0200 +@@ -37,7 +37,7 @@ + CFLAGS += -DSVGALIB_HELPER_MAJOR=$(SVGALIB_HELPER_MAJOR) + + ifeq (1,$(findstring 1,$(MODVER))) +- CFLAGS += -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h ++ CFLAGS += -DMODVERSIONS -DCONFIG_MODVERSIONS=1 + endif + + TARGET = svgalib_helper +@@ -50,7 +50,8 @@ + endif + endif + +-all: .depend $(OBJS) ++modules: $(OBJS) ++all: .depend modules + + $(TARGET).o: $(SRC:.c=.o) + $(LD) -r $^ -o $@ +@@ -61,8 +62,8 @@ + install: device modules_install + + modules_install: $(OBJS) +- mkdir -p /lib/modules/$(VER)/kernel/misc +- install -m 0644 -c $(OBJS) /lib/modules/$(VER)/kernel/misc ++ mkdir -p $(TOPDIR)/lib/modules/$(VER)/kernel/misc ++ install -m 0644 -c $(OBJS) $(TOPDIR)/lib/modules/$(VER)/kernel/misc + + device: + rm -f /dev/svgalib_helper* /dev/svga_helper* /dev/svga /dev/svga? +diff -urpN svgalib-1.9.18/kernel/svgalib_helper/kernel26compat.h svgalib-1.9.18.new/kernel/svgalib_helper/kernel26compat.h +--- svgalib-1.9.18/kernel/svgalib_helper/kernel26compat.h 2003-10-04 15:42:01.000000000 +0200 ++++ svgalib-1.9.18.new/kernel/svgalib_helper/kernel26compat.h 2004-02-23 00:41:03.176196576 +0200 +@@ -9,9 +12,11 @@ + + # define my_io_remap_page_range(vma, start, ofs, len, prot) io_remap_page_range(start,ofs,len,prot) + ++# ifndef IRQ_NONE + typedef void irqreturn_t; +-# define IRQ_NONE +-# define IRQ_HANDLED ++# define IRQ_NONE ++# define IRQ_HANDLED ++# endif + + #else /* Kernel 2.6 */ + +@@ -43,9 +43,36 @@ static inline int devfs_unregister_chrde + } + #endif + ++#if defined(KERNEL_2_6) && !defined(CONFIG_DEVFS_FS) ++# define SLH_SYSFS_REGISTER \ ++ svgalib_helper_class = class_simple_create(THIS_MODULE, "svgalib_helper"); ++ ++# define SLH_SYSFS_ADD_CONTROL \ ++ class_simple_device_add(svgalib_helper_class, \ ++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \ ++ NULL, "svga"); ++ ++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \ ++ class_simple_device_add(svgalib_helper_class, \ ++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ ++ &sh_pci_devs[_minor]->dev->dev, _name); ++ ++# define SLH_SYSFS_REMOVE_DEVICE(i) \ ++ class_simple_device_remove(MKDEV(SVGALIB_HELPER_MAJOR, i)); ++ ++# define SLH_SYSFS_UNREGISTER \ ++ class_simple_destroy(svgalib_helper_class); ++#else ++# define SLH_SYSFS_REGISTER ++# define SLH_SYSFS_ADD_CONTROL ++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) ++# define SLH_SYSFS_REMOVE_DEVICE(i) ++# define SLH_SYSFS_UNREGISTER ++#endif ++ + + /* Our main.c really do not like MINOR from 2.6 kernels ... */ +-#if (defined MINOR) && (!defined KERNEL_2_6) ++#if (defined MINOR) + # define my_minor(x) MINOR(x) + #else + # define my_minor(x) minor(x) +diff -urpN svgalib-1.9.18/kernel/svgalib_helper/main.c svgalib-1.9.18.new/kernel/svgalib_helper/main.c +--- svgalib-1.9.18/kernel/svgalib_helper/main.c 2003-10-04 12:34:20.000000000 +0200 ++++ svgalib-1.9.18.new/kernel/svgalib_helper/main.c 2004-02-23 00:42:25.490682872 +0200 +@@ -53,6 +53,10 @@ static int irqs[MAX_NR_DEVICES]; + static devfs_handle_t devfs_handle; + #endif + ++#if defined(KERNEL_2_6) && !defined(CONFIG_DEVFS_FS) ++struct class_simple *svgalib_helper_class; ++#endif ++ + static int check_io_range(int port, int device) { + return 1; + } +@@ -502,6 +506,7 @@ int init_module(void) + { + int result, i, j; + struct pci_dev *dev=NULL; ++ char name[255]; + #ifdef CONFIG_DEVFS_FS + # ifndef KERNEL_2_6 + devfs_handle_t slave_handle; +@@ -513,9 +518,9 @@ int init_module(void) + + printk(KERN_INFO "svgalib_helper: Initializing, version %s\n", versionstr); + +- result = devfs_register_chrdev(SVGALIB_HELPER_MAJOR, "svgalib_helper", &svgalib_helper_fops); ++ result = devfs_register_chrdev(SVGALIB_HELPER_MAJOR, "svgalib_helper", &svgalib_helper_fops); + +- if (result < 0) { ++ if (result < 0) { + printk(KERN_WARNING "svgalib_helper: can't get major %d\n",SVGALIB_HELPER_MAJOR); + return result; + } +@@ -523,7 +528,7 @@ int init_module(void) + if((sh_pci_devs[0]=kmalloc(sizeof(struct sh_pci_device),GFP_KERNEL))==NULL) { + goto nomem_error; + } +- ++ + memset(sh_pci_devs[0],0,sizeof(struct sh_pci_device)); + num_devices=1; + for(i=1;i<MAX_NR_DEVICES;i++) sh_pci_devs[i]=NULL; +@@ -537,19 +542,22 @@ int init_module(void) + devfs_mk_symlink( NULL, "svga", 0, "svga_helper/0", &slave_handle, NULL ); + devfs_auto_unregister( devfs_handle, slave_handle ); + # else +- devfs_mk_dir ("svga_helper"); +- for (i = 0; i < 8; i++) { +- devfs_mk_cdev(MKDEV(SVGALIB_HELPER_MAJOR, i), +- S_IFCHR | S_IRUGO | S_IRWXU, "svga_helper/%d", i); +- } +- devfs_mk_symlink("svga", "svga_helper/0"); ++ devfs_mk_dir ("svga_helper"); ++ for (i = 0; i < 8; i++) { ++ devfs_mk_cdev(MKDEV(SVGALIB_HELPER_MAJOR, i), ++ S_IFCHR | S_IRUGO | S_IRWXU, "svga_helper/%d", i); ++ } ++ devfs_mk_symlink("svga", "svga_helper/0"); + # endif + #endif /* devfsd support */ + ++ SLH_SYSFS_REGISTER; ++ SLH_SYSFS_ADD_CONTROL; ++ + if(pci_present()) { + while((dev= all_devices ? +- pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev) : +- pci_find_class(PCI_CLASS_DISPLAY_VGA<<8,dev)) && ++ pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev) : ++ pci_find_class(PCI_CLASS_DISPLAY_VGA<<8,dev)) && + (num_devices<=MAX_NR_DEVICES)) { + if((sh_pci_devs[num_devices]=kmalloc(sizeof(struct sh_pci_device),GFP_KERNEL))==NULL) { + goto nomem_error; +@@ -581,6 +589,10 @@ int init_module(void) + } + } + vga_init_vsync(sh_pci_devs[num_devices]); ++ ++ sprintf(name, "svga%d", num_devices); ++ SLH_SYSFS_ADD_DEVICE(name, num_devices); ++ + num_devices++; + } + } +@@ -600,39 +612,51 @@ int init_module(void) + init_waitqueue_head(&vsync_wait); + + #ifndef KERNEL_2_6 +- EXPORT_NO_SYMBOLS; ++ EXPORT_NO_SYMBOLS; + #endif +- ++ + return 0; /* succeed */ + + nomem_error: +- for(i=0;i<MAX_NR_DEVICES;i++) +- if(sh_pci_devs[i])kfree(sh_pci_devs[i]); ++ for(i=0;i<MAX_NR_DEVICES;i++) { ++ if(sh_pci_devs[i]) { ++ SLH_SYSFS_REMOVE_DEVICE(i); ++ kfree(sh_pci_devs[i]); ++ } ++ } ++ ++ SLH_SYSFS_REMOVE_DEVICE(0); ++ SLH_SYSFS_UNREGISTER; ++ ++ devfs_unregister_chrdev(SVGALIB_HELPER_MAJOR, "svgalib_helper"); + +- devfs_unregister_chrdev(SVGALIB_HELPER_MAJOR, "svgalib_helper"); +- +- return result; ++ return result; + } + + void cleanup_module(void) + { + int i; +- for(i=0;i<MAX_NR_DEVICES;i++) ++ for(i=0;i<MAX_NR_DEVICES;i++) { + if(sh_pci_devs[i]) { ++ SLH_SYSFS_REMOVE_DEVICE(i); + kfree(sh_pci_devs[i]); + } ++ } ++ ++ SLH_SYSFS_REMOVE_DEVICE(0); ++ SLH_SYSFS_UNREGISTER; + + #ifdef CONFIG_DEVFS_FS + # ifndef KERNEL_2_6 +- devfs_unregister(devfs_handle); ++ devfs_unregister(devfs_handle); + # else +- for (i = 0; i < 8; i++) +- devfs_remove("svga_helper/%d", i); +- devfs_remove("svga_helper"); +- devfs_remove("svga"); +-# endif ++ for (i = 0; i < 8; i++) ++ devfs_remove("svga_helper/%d", i); ++ devfs_remove("svga_helper"); ++ devfs_remove("svga"); ++# endif + #endif +- ++ + devfs_unregister_chrdev(SVGALIB_HELPER_MAJOR, "svgalib_helper"); + + } diff --git a/media-libs/svgalib/svgalib-1.9.18-r1.ebuild b/media-libs/svgalib/svgalib-1.9.18-r1.ebuild new file mode 100644 index 000000000000..cfa25bc18053 --- /dev/null +++ b/media-libs/svgalib/svgalib-1.9.18-r1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.18-r1.ebuild,v 1.1 2004/02/24 20:16:42 azarah Exp $ + +inherit eutils + +DESCRIPTION="A library for running svga graphics on the console" +HOMEPAGE="http://www.svgalib.org/" +SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="-* ~x86" +IUSE="build" + +DEPEND="virtual/glibc" + +pkg_setup() { + use build || check_KV +} + +src_unpack() { + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/${P}-gentoo.patch + + # Fix a small gcc33 issue + epatch ${FILESDIR}/${P}-gcc33.patch + + # Get it to work with kernel 2.6 + epatch ${FILESDIR}/${P}-linux2.6-v2.patch + + # Disable kernel module support while building stages #38403 + #use build && + sed -i 's:installmodule ::' Makefile + # for now we dont build the module at all #42522 +} + +src_compile() { + # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml or #gentoo-hardened/irc.freenode + has_version "sys-devel/hardened-gcc" && CC="${CC} -yet_exec" + + # First build static + make OPTIMIZE="${CFLAGS}" static \ + || die "Failed to build static libraries!" + # Have to remove for shared to build ... + rm -f src/svgalib_helper.h + # Then build shared ... + make OPTIMIZE="${CFLAGS}" shared \ + || die "Failed to build shared libraries!" + # Missing in some cases ... + ln -s libvga.so.${PV} sharedlib/libvga.so + # Build lrmi and tools ... + make OPTIMIZE="${CFLAGS}" LDFLAGS="-L../sharedlib" \ + textutils lrmi utils \ + || die "Failed to build libraries and utils!" + # Build the gl stuff tpp + make OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!" + make OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \ + || die "Failed to build libvgagl.so.${PV}!" + # Missing in some cases ... + ln -s libvgagl.so.${PV} sharedlib/libvgagl.so + rm -f src/svgalib_helper.h + make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \ + || die "Failed to build libvga.so.${PV}!" + cp -a src/libvga.so.${PV} sharedlib/ + # Build threeDKit ... + make OPTIMIZE="${CFLAFS}" LDFLAGS='-L../sharedlib' \ + -C threeDKit lib3dkit.a || die "Failed to build threeDKit!" + # Build demo's ... + make OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS='-L../sharedlib' \ + demoprogs || die "Failed to build demoprogs!" + + if ! use build + then + cd ${S}/kernel/svgalib_helper + env -u ARCH \ + make -f Makefile.alt INCLUDEDIR="/usr/src/linux/include" \ + clean modules || die "Failed to build kernel module!" + cd ${S} + fi + + cp Makefile Makefile.orig + sed -e 's/\(install: $(INSTALLAOUTLIB) \)installheaders \(.*\)/\1\2/g' \ + Makefile.orig > Makefile +} + +src_install() { + local x= + + dodir /etc/svgalib /usr/{include,lib,bin,share/man} + + make TOPDIR=${D} OPTIMIZE="${CFLAGS}" \ + install || die "Failed to install svgalib!" + if ! use build + then + cd ${S}/kernel/svgalib_helper + env -u ARCH \ + make -f Makefile.alt TOPDIR=${D} \ + INCLUDEDIR="/usr/src/linux/include" \ + modules_install || die "Failed to install svgalib module!" + cd ${S} + fi + + insinto /usr/include + doins gl/vgagl.h + dolib.a staticlib/libvga.a + dolib.a gl/libvgagl.a + dolib.a threeDKit/lib3dkit.a + dolib.so gl/libvgagl.so.${PV} + dosym libvgagl.so.${PV} /usr/lib/libvgagl.so + preplib + + insinto /usr/include + doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h + doins src/keyboard/vgakeyboard.h + + dodir /etc/modules.d + echo "probeall /dev/svga svgalib_helper" > ${D}/etc/modules.d/svgalib + + exeinto /usr/lib/svgalib/demos + for x in ${S}/demos/* + do + [ -x "${x}" ] && doexe ${x} + done + + cd ${S}/threeDKit + exeinto /usr/lib/svgalib/theeDKit + local THREED_PROGS="plane wrapdemo" + doexe ${THREED_PROGS} + + cd ${S} + dodoc 0-README LICENSE + cd ${S}/doc + dodoc CHANGES DESIGN TODO + docinto txt + dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm +} + +pkg_postinst() { + [ "${ROOT}" = "/" ] && /sbin/modules-update &> /dev/null + einfo "When upgrading your kernel you'll need to rebuild the kernel module." +} |