diff options
author | Brandon Hale <tseng@gentoo.org> | 2004-01-31 14:02:07 +0000 |
---|---|---|
committer | Brandon Hale <tseng@gentoo.org> | 2004-01-31 14:02:07 +0000 |
commit | 00a9985e226f197b4acec57df1eb9c416ee7556e (patch) | |
tree | bd6e5b69114ee0bf0224001ecc3bd1c7c4313ff5 /media-gfx | |
parent | new 2.1.1 ebuild and misc. fixes (diff) | |
download | gentoo-2-00a9985e226f197b4acec57df1eb9c416ee7556e.tar.gz gentoo-2-00a9985e226f197b4acec57df1eb9c416ee7556e.tar.bz2 gentoo-2-00a9985e226f197b4acec57df1eb9c416ee7556e.zip |
Apply patch from Gimp cvs to allow for PIC-safe building. (http://bugs.gnome.org/show_bug.cgi?id=132999)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/gimp/ChangeLog | 7 | ||||
-rw-r--r-- | media-gfx/gimp/files/gimp-2.0_pre2-cpuaccel-pic.patch | 103 | ||||
-rw-r--r-- | media-gfx/gimp/gimp-2.0_pre2.ebuild | 3 |
3 files changed, 111 insertions, 2 deletions
diff --git a/media-gfx/gimp/ChangeLog b/media-gfx/gimp/ChangeLog index f1adb1384712..a88012261ff7 100644 --- a/media-gfx/gimp/ChangeLog +++ b/media-gfx/gimp/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-gfx/gimp # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/ChangeLog,v 1.66 2004/01/21 13:53:13 foser Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/ChangeLog,v 1.67 2004/01/31 14:02:07 tseng Exp $ + + 31 Jan 2004; Brandon Hale <tseng@gentoo.org> gimp-2.0_pre2.ebuild, + files/gimp-2.0_pre2-cpuaccel-pic.patch: + Apply patch from Gimp CVS to allow for PIC-safe building. + (http://bugs.gnome.org/show_bug.cgi?id=132999) *gimp-2.0_pre2 (21 Jan 2004) diff --git a/media-gfx/gimp/files/gimp-2.0_pre2-cpuaccel-pic.patch b/media-gfx/gimp/files/gimp-2.0_pre2-cpuaccel-pic.patch new file mode 100644 index 000000000000..3aa96bd839ed --- /dev/null +++ b/media-gfx/gimp/files/gimp-2.0_pre2-cpuaccel-pic.patch @@ -0,0 +1,103 @@ +--- gimp-2.0pre2/app/base/cpu-accel.c 2003-09-07 15:56:51.000000000 -0400 ++++ gimp-cvs/app/base/cpu-accel.c 2004-01-31 04:01:34.000000000 -0500 +@@ -40,11 +40,6 @@ + + #ifdef ARCH_X86 + +-#if GLIB_SIZEOF_LONG == 8 +-#define ARCH_X86_64 1 +-#endif +- +- + typedef enum + { + ARCH_X86_VENDOR_NONE, +@@ -78,14 +73,25 @@ + ARCH_X86_CYRIX_FEATURE_MMXEXT = 1 << 24 + }; + +-/* FIXME: This should save off ebx/rbx if compiled for PIC */ +-#define cpuid(op,eax,ebx,ecx,edx) \ +- asm ("cpuid\n\t" \ +- : "=a" (eax), \ +- "=b" (ebx), \ +- "=c" (ecx), \ +- "=d" (edx) \ +- : "0" (op)) ++#if !defined(ARCH_X86_64) && defined(PIC) ++#define cpuid(op,eax,ebx,ecx,edx) \ ++ __asm__ ("movl %%ebx, %%esi\n\t" \ ++ "cpuid\n\t" \ ++ "xchgl %%ebx,%%esi" \ ++ : "=a" (eax), \ ++ "=S" (ebx), \ ++ "=c" (ecx), \ ++ "=d" (edx) \ ++ : "0" (op)) ++#else ++#define cpuid(op,eax,ebx,ecx,edx) \ ++ __asm__ ("cpuid" \ ++ : "=a" (eax), \ ++ "=b" (ebx), \ ++ "=c" (ecx), \ ++ "=d" (edx) \ ++ : "0" (op)) ++#endif + + + static X86Vendor +@@ -96,22 +102,22 @@ + + #ifndef ARCH_X86_64 + /* Only need to check this on ia32 */ +- asm ("pushfl\n\t" +- "pushfl\n\t" +- "popl %0\n\t" +- "movl %0,%1\n\t" +- "xorl $0x200000,%0\n\t" +- "push %0\n\t" +- "popfl\n\t" +- "pushfl\n\t" +- "popl %0\n\t" +- "popfl\n\t" +- : "=a" (eax), +- "=b" (ebx) +- : +- : "cc"); ++ __asm__ ("pushfl\n\t" ++ "pushfl\n\t" ++ "popl %0\n\t" ++ "movl %0,%1\n\t" ++ "xorl $0x200000,%0\n\t" ++ "pushl %0\n\t" ++ "popfl\n\t" ++ "pushfl\n\t" ++ "popl %0\n\t" ++ "popfl" ++ : "=a" (eax), ++ "=c" (ecx) ++ : ++ : "cc"); + +- if (eax == ebx) ++ if (eax == ecx) + return ARCH_X86_VENDOR_NONE; + #endif + +@@ -385,7 +391,6 @@ + accel = arch_accel (); + + #ifdef USE_SSE +- + /* test OS support for SSE */ + if (accel & CPU_ACCEL_X86_SSE) + { +@@ -396,7 +401,7 @@ + else + { + signal (SIGILL, sigill_handler); +- __asm __volatile ("xorps %xmm0, %xmm0"); ++ __asm__ __volatile__ ("xorps %xmm0, %xmm0"); + signal (SIGILL, SIG_DFL); + } + } diff --git a/media-gfx/gimp/gimp-2.0_pre2.ebuild b/media-gfx/gimp/gimp-2.0_pre2.ebuild index beda506a98e7..db8289bb20d6 100644 --- a/media-gfx/gimp/gimp-2.0_pre2.ebuild +++ b/media-gfx/gimp/gimp-2.0_pre2.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-gfx/gimp/gimp-2.0_pre2.ebuild,v 1.1 2004/01/21 13:53:13 foser Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/gimp-2.0_pre2.ebuild,v 1.2 2004/01/31 14:02:07 tseng Exp $ inherit debug flag-o-matic libtool @@ -57,6 +57,7 @@ src_unpack() { cd ${S} # fix gimp-remote behavior epatch ${FILESDIR}/${P}-remote_new_behaviour.patch + epatch ${FILESDIR}/${P}-cpuaccel-pic.patch } |