summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2012-03-03 12:36:12 +0000
committerPacho Ramos <pacho@gentoo.org>2012-03-03 12:36:12 +0000
commit8533edbc92420d360cd6760c990ca4d741e3f376 (patch)
treed401474a95606f471aefe6513454fa2196b38a70 /media-libs/svgalib/files
parentRevert header placement (diff)
downloadgentoo-2-8533edbc92420d360cd6760c990ca4d741e3f376.tar.gz
gentoo-2-8533edbc92420d360cd6760c990ca4d741e3f376.tar.bz2
gentoo-2-8533edbc92420d360cd6760c990ca4d741e3f376.zip
Respect LDFLAGS (bug #339873 by Andrew Savchenko), install svgalib_helper.h (bug #341393 by Andrew Savchenko), fix build with recent kernels (bug #344663 by Rene Hertell), fix segfault (bug #402831 by O.Sezer).
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/svgalib/files')
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-build2.patch14
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch17
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch32
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.25-segfault.patch11
4 files changed, 74 insertions, 0 deletions
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-build2.patch b/media-libs/svgalib/files/svgalib-1.9.25-build2.patch
new file mode 100644
index 000000000000..a367363f044a
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-build2.patch
@@ -0,0 +1,14 @@
+--- svgalib-1.9.21/Makefile.makefiles 2005-03-18 14:49:10.000000000 +0100
++++ svgalib-1.9.21/Makefile 2005-07-08 21:16:12.000000000 +0200
+@@ -152,8 +126,10 @@
+ @echo "savetextmode: Script that saves textmode information used by 'textmode'."
+ @$(INSTALL_SCRIPT) utils/savetextmode $(bindir)
+ ifeq ($(LRMI),lrmi)
+- @echo "mode3: Restore textmode by setting VESA mode 3."
++ @echo "mode3: Restore textmode by setting VESA mode 3."
+ @$(INSTALL_PROGRAM) lrmi-0.6m/mode3 $(bindir)
++ @echo "vga_reset: Restore textmode by resetting graphic board."
++ @cp lrmi-0.6m/vga_reset $(bindir)
+ endif
+ @echo "Installing keymap utilities in $(bindir):"
+ @echo "svgakeymap: Perl script that generates scancode conversion maps."
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch b/media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch
new file mode 100644
index 000000000000..ab0e1c9ef7b3
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch
@@ -0,0 +1,17 @@
+#DPATCHLEVEL=1
+--- svgalib-1.4.3.orig/src/Makefile
++++ svgalib-1.4.3/src/Makefile
+@@ -471,9 +471,11 @@
+ vga.o: vga.c
+ $(CC) $(CFLAGS) $(VGA_DEFINES) -c -o $@ $<
+
+-#lrmi must NOT be compiled as -fPIC
++# XXX: Upstream used this so it may break, disabled to close an RC
++# lrmi must NOT be compiled as -fPIC
+ lrmi.o: lrmi.c
+- $(CC) $(CFLAGS:-fPIC=) -c -o $@ $<
++ $(CC) $(CFLAGS) -c -o $@ $<
++# $(CC) $(CFLAGS:-fPIC=) -c -o $@ $<
+
+ $(RAMDAC): %.o: %.c
+ $(CC) $(CFLAGS) $(RAMDAC_DEFINES) -c -o $@ $<
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch
new file mode 100644
index 000000000000..ad8d94cb8702
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch
@@ -0,0 +1,32 @@
+--- svgalib-1.9.25.orig/kernel/svgalib_helper/main.c
++++ svgalib-1.9.25/kernel/svgalib_helper/main.c
+@@ -162,10 +162,16 @@ static void task_startad(void *data) {
+ get_user(pciv.address, &user_pciv->address); \
+ get_user(pciv.val, &user_pciv->val);
+ #define PUT_PCIV \
+- put_user(pciv.val, &user_pciv->val);
++ put_user(pciv.val, &user_pciv->val);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+ static int svgalib_helper_ioctl( struct inode *inode, struct file *filp,
+ unsigned int cmd, unsigned long arg) {
++#else
++static int svgalib_helper_ioctl(struct file *filp,
++ unsigned int cmd, unsigned long arg) {
++ struct inode *inode=filp->f_dentry->d_inode;
++#endif
+
+ io_t iov, *user_iov=(io_t *)arg;
+ pcic_t pciv, *user_pciv=(pcic_t *)arg;
+ int minor = my_minor(inode->i_rdev);
+@@ -595,7 +601,11 @@ struct file_operations svgalib_helper_fo
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
+ .owner = THIS_MODULE,
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+ .ioctl = svgalib_helper_ioctl,
++#else
++ .unlocked_ioctl = svgalib_helper_ioctl,
++#endif
+ .mmap = svgalib_helper_mmap,
+ .open = svgalib_helper_open,
+ .release = svgalib_helper_release,
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch b/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch
new file mode 100644
index 000000000000..da7c1c21c646
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch
@@ -0,0 +1,11 @@
+--- svgalib-1.9.25/src/vgamodesel.c~
++++ svgalib-1.9.25/src/vgamodesel.c
+@@ -35,7 +35,7 @@ int __svgalib_name2number(char *m)
+ int vga_getmodenumber(char *m)
+ {
+ int i;
+- char s[3];
++ char s[8];
+
+ __svgalib_getchipset(); /* Do initialisation first */
+ i = __svgalib_name2number(m);