diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-02-23 00:29:38 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-02-23 00:29:38 +0000 |
commit | 5fc5c31541fee07f2b1fbc4e501e52d4c0052c3f (patch) | |
tree | ee5240c3d0ef8221ebbb776aebf90c34233dc321 /media-libs/svgalib | |
parent | Remove arm keywords (Manifest recommit) (diff) | |
download | gentoo-2-5fc5c31541fee07f2b1fbc4e501e52d4c0052c3f.tar.gz gentoo-2-5fc5c31541fee07f2b1fbc4e501e52d4c0052c3f.tar.bz2 gentoo-2-5fc5c31541fee07f2b1fbc4e501e52d4c0052c3f.zip |
Add a better fix for previous issue. Cleanup svgalib-1.9.18-linux2.6.patch.
Diffstat (limited to 'media-libs/svgalib')
-rw-r--r-- | media-libs/svgalib/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.18-gentoo.patch | 2 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.18-linux2.6.patch | 267 | ||||
-rw-r--r-- | media-libs/svgalib/svgalib-1.9.18.ebuild | 4 |
4 files changed, 22 insertions, 257 deletions
diff --git a/media-libs/svgalib/ChangeLog b/media-libs/svgalib/ChangeLog index 5a1181af7928..96f361ee161b 100644 --- a/media-libs/svgalib/ChangeLog +++ b/media-libs/svgalib/ChangeLog @@ -1,6 +1,10 @@ # 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.27 2004/02/22 22:16:03 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.28 2004/02/23 00:29:38 azarah Exp $ + + 23 Feb 2004; Martin Schlemmer <azarah@gentoo.org> svgalib-1.9.18.ebuild, + files/svgalib-1.9.18-gentoo.patch, files/svgalib-1.9.18-linux2.6.patch: + Add a better fix for previous issue. Cleanup svgalib-1.9.18-linux2.6.patch. 23 Feb 2004; Martin Schlemmer <azarah@gentoo.org> files/svgalib-1.9.18-gentoo.patch: diff --git a/media-libs/svgalib/files/svgalib-1.9.18-gentoo.patch b/media-libs/svgalib/files/svgalib-1.9.18-gentoo.patch index 45d261d1df1d..859144307d24 100644 --- a/media-libs/svgalib/files/svgalib-1.9.18-gentoo.patch +++ b/media-libs/svgalib/files/svgalib-1.9.18-gentoo.patch @@ -93,7 +93,7 @@ # Comment this out if you use devfs only and don't want to make svga nodes -INSTALLDEV = installdev -+INSTALLDEV = installmodule ++#INSTALLDEV = installdev # # Comment out any driver that you don't want included in the library. diff --git a/media-libs/svgalib/files/svgalib-1.9.18-linux2.6.patch b/media-libs/svgalib/files/svgalib-1.9.18-linux2.6.patch index 4bde429b23fe..66bd65354ba2 100644 --- a/media-libs/svgalib/files/svgalib-1.9.18-linux2.6.patch +++ b/media-libs/svgalib/files/svgalib-1.9.18-linux2.6.patch @@ -1,6 +1,6 @@ -diff -urpN svgalib-1.9.18/kernel/svgalib_helper/Makefile svgalib-1.9.18/kernel/svgalib_helper/Makefile ---- svgalib-1.9.18/kernel/svgalib_helper/Makefile 2004-02-22 20:52:42.000000000 +0200 -+++ svgalib-1.9.18/kernel/svgalib_helper/Makefile 2004-02-22 23:19:39.617023080 +0200 +diff -urpN svgalib-1.9.18/kernel/svgalib_helper/Makefile svgalib-1.9.18.new/kernel/svgalib_helper/Makefile +--- svgalib-1.9.18/kernel/svgalib_helper/Makefile 2004-02-23 00:47:43.616320424 +0200 ++++ svgalib-1.9.18.new/kernel/svgalib_helper/Makefile 2004-02-23 00:47:58.475061552 +0200 @@ -13,15 +13,32 @@ EXTRA_CFLAGS := -DSVGALIB_HELPER_MAJOR=$ ifeq ($(PATCHLEVEL),4) @@ -35,16 +35,16 @@ diff -urpN svgalib-1.9.18/kernel/svgalib_helper/Makefile svgalib-1.9.18/kernel/s default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules -@@ -41,4 +58,4 @@ install: modules_install +@@ -49,4 +66,4 @@ install: modules_install modules_install: $(TARGET).o mkdir -p $(TOPDIR)/lib/modules/$(VER)/kernel/misc - install -m 0644 -c $(TARGET).o $(TOPDIR)/lib/modules/$(VER)/kernel/misc + install -m 0644 -c $(TARGET).$(OBJEXT) $(TOPDIR)/lib/modules/$(VER)/kernel/misc -diff -urpN svgalib-1.9.18/kernel/svgalib_helper/kernel26compat.h svgalib-1.9.18/kernel/svgalib_helper/kernel26compat.h ---- svgalib-1.9.18/kernel/svgalib_helper/kernel26compat.h 2004-02-22 20:52:42.000000000 +0200 -+++ svgalib-1.9.18/kernel/svgalib_helper/kernel26compat.h 2004-02-22 22:55:13.813859032 +0200 -@@ -43,11 +43,41 @@ static inline int devfs_unregister_chrde +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 +@@ -43,9 +43,36 @@ static inline int devfs_unregister_chrde } #endif @@ -77,19 +77,15 @@ diff -urpN svgalib-1.9.18/kernel/svgalib_helper/kernel26compat.h svgalib-1.9.18/ + /* Our main.c really do not like MINOR from 2.6 kernels ... */ - #if (defined MINOR) && (!defined KERNEL_2_6) +-#if (defined MINOR) && (!defined KERNEL_2_6) ++#if (defined MINOR) # define my_minor(x) MINOR(x) #else -+# ifndef minor -+# define minor(x) MINOR(x) -+# endif # define my_minor(x) minor(x) - #endif - -diff -urpN svgalib-1.9.18/kernel/svgalib_helper/main.c svgalib-1.9.18/kernel/svgalib_helper/main.c ---- svgalib-1.9.18/kernel/svgalib_helper/main.c 2004-02-22 23:01:50.113612312 +0200 -+++ svgalib-1.9.18/kernel/svgalib_helper/main.c 2004-02-22 22:59:25.451604280 +0200 -@@ -53,15 +53,19 @@ static int irqs[MAX_NR_DEVICES]; +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 @@ -100,241 +96,6 @@ diff -urpN svgalib-1.9.18/kernel/svgalib_helper/main.c svgalib-1.9.18/kernel/svg static int check_io_range(int port, int device) { return 1; } - --static struct pci_dev *get_pci_dev(int pcipos, int minor) { -+static struct pci_dev *get_pci_dev(int pcipos, int _minor) { - -- if(minor>=num_devices) return NULL; -- if(minor>0) { -- return sh_pci_devs[minor]->dev; -+ if(_minor>=num_devices) return NULL; -+ if(_minor>0) { -+ return sh_pci_devs[_minor]->dev; - } else { - if(pcipos>0 && pcipos<num_devices) - return sh_pci_devs[pcipos]->dev; -@@ -70,11 +74,11 @@ static struct pci_dev *get_pci_dev(int p - - } - --static int get_dev(int pcipos, int minor) { -+static int get_dev(int pcipos, int _minor) { - -- if(minor>=num_devices) return 0; -- if(minor>0) { -- return minor; -+ if(_minor>=num_devices) return 0; -+ if(_minor>0) { -+ return _minor; - } else { - if(pcipos>=num_devices || pcipos<1) return 0; - return pcipos; -@@ -111,7 +115,7 @@ static int svgalib_helper_ioctl( struct - - io_t iov; - pcic_t pciv; -- int minor = my_minor(inode->i_rdev); -+ int _minor = my_minor(inode->i_rdev); - struct pci_dev *pdev; - io_string_t iostr; - int i=0, ret; -@@ -134,7 +138,7 @@ static int svgalib_helper_ioctl( struct - if (iostr.length>4096) return -EINVAL; - if ( (outb_str = kmalloc(iostr.length, GFP_KERNEL )) == NULL ) return -ENOMEM; - copy_from_user(outb_str,iostr.string,iostr.length); -- if(check_io_range(iostr.port,minor)) { -+ if(check_io_range(iostr.port,_minor)) { - for(i=0; i<iostr.length; i++) outb(outb_str[i], iostr.port); - } else ret = -EPERM; - kfree (outb_str); -@@ -142,28 +146,28 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_OUTB): - copy_from_user(&iov,(char *)arg,sizeof(iov)); -- if(check_io_range(iov.port,minor)) -+ if(check_io_range(iov.port,_minor)) - outb(iov.val,iov.port); - else ret = -EPERM; - break; - - case _IOC_NR(SVGAHELPER_OUTW): - copy_from_user(&iov,(char *)arg,sizeof(iov)); -- if(check_io_range(iov.port,minor)) -+ if(check_io_range(iov.port,_minor)) - outw(iov.val,iov.port); - else ret = -EPERM; - break; - - case _IOC_NR(SVGAHELPER_OUTL): - copy_from_user(&iov,(char *)arg,sizeof(iov)); -- if(check_io_range(iov.port,minor)) -+ if(check_io_range(iov.port,_minor)) - outl(iov.val,iov.port); - else ret = -EPERM; - break; - - case _IOC_NR(SVGAHELPER_INB): - copy_from_user(&iov,(char *)arg,sizeof(iov)); -- if(check_io_range(iov.port,minor)) -+ if(check_io_range(iov.port,_minor)) - iov.val=inb(iov.port); - else ret = -EPERM; - copy_to_user((char *)arg,&iov,sizeof(iov)); -@@ -171,7 +175,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_INW): - copy_from_user(&iov,(char *)arg,sizeof(iov)); -- if(check_io_range(iov.port,minor)) -+ if(check_io_range(iov.port,_minor)) - iov.val=inw(iov.port); - else ret = -EPERM; - copy_to_user((char *)arg,&iov,sizeof(iov)); -@@ -179,7 +183,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_INL): - copy_from_user(&iov,(char *)arg,sizeof(iov)); -- if(check_io_range(iov.port,minor)) -+ if(check_io_range(iov.port,_minor)) - iov.val=inl(iov.port); - else ret = -EPERM; - copy_to_user((char *)arg,&iov,sizeof(iov)); -@@ -220,7 +224,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_PCIINB): - copy_from_user(&pciv,(char *)arg,sizeof(pciv)); -- pdev = get_pci_dev(pciv.pcipos, minor); -+ pdev = get_pci_dev(pciv.pcipos, _minor); - if(!pdev) return -EINVAL; - pci_read_config_byte(pdev, pciv.address, &pb); - pciv.val=pb; -@@ -229,7 +233,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_PCIINW): - copy_from_user(&pciv,(char *)arg,sizeof(pciv)); -- pdev = get_pci_dev(pciv.pcipos, minor); -+ pdev = get_pci_dev(pciv.pcipos, _minor); - if(!pdev) return -EINVAL; - pci_read_config_word(pdev, pciv.address, &pw); - pciv.val=pw; -@@ -238,7 +242,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_PCIINL): - copy_from_user(&pciv,(char *)arg,sizeof(pciv)); -- pdev = get_pci_dev(pciv.pcipos, minor); -+ pdev = get_pci_dev(pciv.pcipos, _minor); - if(!pdev) return -EINVAL; - pci_read_config_dword(pdev, pciv.address, &pl); - pciv.val=pl; -@@ -247,7 +251,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_PCIAPLEN): - copy_from_user(&pciv,(char *)arg,sizeof(pciv)); -- i = get_dev(pciv.pcipos, minor); -+ i = get_dev(pciv.pcipos, _minor); - if((i==0) | (pciv.address>5)) return -EINVAL; - pciv.val=sh_pci_devs[i]->len[pciv.address]; - copy_to_user((char *)arg,&pciv,sizeof(pciv)); -@@ -255,7 +259,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_PCIOUTB): - copy_from_user(&pciv,(char *)arg,sizeof(pciv)); -- pdev = get_pci_dev(pciv.pcipos, minor); -+ pdev = get_pci_dev(pciv.pcipos, _minor); - if(!pdev) return -EINVAL; - pb=pciv.val; - pci_write_config_byte(pdev, pciv.address, pb); -@@ -263,7 +267,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_PCIOUTW): - copy_from_user(&pciv,(char *)arg,sizeof(pciv)); -- pdev = get_pci_dev(pciv.pcipos, minor); -+ pdev = get_pci_dev(pciv.pcipos, _minor); - if(!pdev) return -EINVAL; - pw=pciv.val; - pci_write_config_word(pdev, pciv.address, pw); -@@ -271,7 +275,7 @@ static int svgalib_helper_ioctl( struct - - case _IOC_NR(SVGAHELPER_PCIOUTL): - copy_from_user(&pciv,(char *)arg,sizeof(pciv)); -- pdev = get_pci_dev(pciv.pcipos, minor); -+ pdev = get_pci_dev(pciv.pcipos, _minor); - if(!pdev) return -EINVAL; - pl=pciv.val; - pci_write_config_dword(pdev, pciv.address, pl); -@@ -292,17 +296,17 @@ static int svgalib_helper_ioctl( struct - case _IOC_NR(SVGAHELPER_WAITRETRACE): - - /* Workaround for nvidia cards, which are not vga compatible */ --// if(!minor && num_devices==2) minor=1; -+// if(!_minor && num_devices==2) _minor=1; - -- if(minor) { -- i=sh_pci_devs[minor]->dev->irq; -- dev_id = sh_pci_devs[minor]; -+ if(_minor) { -+ i=sh_pci_devs[_minor]->dev->irq; -+ dev_id = sh_pci_devs[_minor]; - if(i==0 || i==-1 || i==255) return -EINVAL; - } else dev_id = sdev_id; - - vsync=1; - -- if(minor) { -+ if(_minor) { - request_irq(i, vsync_interrupt, SA_SHIRQ, "svgalib_helper", dev_id); - } else { - i=0; -@@ -310,16 +314,16 @@ static int svgalib_helper_ioctl( struct - request_irq(irqs[i++], vsync_interrupt, SA_SHIRQ, "svgalib_helper", dev_id); - } - -- if(minor) { -- sh_pci_devs[minor]->enable_vsync(sh_pci_devs[minor]); -+ if(_minor) { -+ sh_pci_devs[_minor]->enable_vsync(sh_pci_devs[_minor]); - } else { -- vga_enable_vsync(sh_pci_devs[minor]); -+ vga_enable_vsync(sh_pci_devs[_minor]); - } - - interruptible_sleep_on(&vsync_wait); - -- if(minor) { -- if(vsync) sh_pci_devs[minor]->ack_vsync(dev_id); -+ if(_minor) { -+ if(vsync) sh_pci_devs[_minor]->ack_vsync(dev_id); - free_irq(i, dev_id); - } else { - i=0; -@@ -354,9 +358,9 @@ static int svgalib_helper_ioctl( struct - - static int svgalib_helper_open( struct inode *inode, struct file * filp) { - -- int minor = my_minor(inode->i_rdev); -+ int _minor = my_minor(inode->i_rdev); - -- if(minor>=num_devices) return -ENODEV; -+ if(_minor>=num_devices) return -ENODEV; - - #ifndef KERNEL_2_6 - MOD_INC_USE_COUNT; -@@ -470,14 +474,14 @@ int check_mem(int card, unsigned long st - static int svgalib_helper_mmap(struct file *filp, struct vm_area_struct *vma) { - unsigned long start=vma->vm_start; - unsigned long end=vma->vm_end; -- unsigned long minor = my_minor(filp->f_dentry->d_inode->i_rdev); -+ unsigned long _minor = my_minor(filp->f_dentry->d_inode->i_rdev); - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0) - unsigned long ofs=vma->vm_pgoff*PAGE_SIZE; - #else - unsigned long ofs=vma->vm_offset; - #endif - -- if(check_mem(minor, ofs, end-start)) return -EPERM; -+ if(check_mem(_minor, ofs, end-start)) return -EPERM; - if(remap_cache(vma, ofs)) return -EAGAIN; - return 0; - } @@ -502,6 +506,7 @@ int init_module(void) { int result, i, j; diff --git a/media-libs/svgalib/svgalib-1.9.18.ebuild b/media-libs/svgalib/svgalib-1.9.18.ebuild index 30986b624e12..81ce51ca09c6 100644 --- a/media-libs/svgalib/svgalib-1.9.18.ebuild +++ b/media-libs/svgalib/svgalib-1.9.18.ebuild @@ -1,6 +1,6 @@ # 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.ebuild,v 1.1 2004/02/22 21:48:55 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.18.ebuild,v 1.2 2004/02/23 00:29:38 azarah Exp $ inherit eutils @@ -81,7 +81,7 @@ src_install() { dodir /etc/svgalib /usr/{include,lib,bin,share/man} make TOPDIR=${D} OPTIMIZE="${CFLAGS}" \ - INCLUDEDIR="/usr/src/linux/include" install \ + INCLUDEDIR="/usr/src/linux/include" install installmodule \ || die "Failed to install svgalib!" insinto /usr/include |