summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-10-04 23:22:02 +0000
committerMike Frysinger <vapier@gentoo.org>2005-10-04 23:22:02 +0000
commit3ddc1dad1cb2741d8b94e882f60c5c949787e6c7 (patch)
tree31787c891846f6f4b7aad46d2a99ec76bdb33335 /media-libs/smpeg
parentRedo some library options and merge Darwin support #74101. (diff)
downloadhistorical-3ddc1dad1cb2741d8b94e882f60c5c949787e6c7.tar.gz
historical-3ddc1dad1cb2741d8b94e882f60c5c949787e6c7.tar.bz2
historical-3ddc1dad1cb2741d8b94e882f60c5c949787e6c7.zip
Fix TEXTRELs in mmx asm code with the help of the PaX team.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'media-libs/smpeg')
-rw-r--r--media-libs/smpeg/ChangeLog8
-rw-r--r--media-libs/smpeg/Manifest10
-rw-r--r--media-libs/smpeg/files/digest-smpeg-0.4.4-r71
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-PIC.patch308
-rw-r--r--media-libs/smpeg/smpeg-0.4.4-r7.ebuild55
5 files changed, 381 insertions, 1 deletions
diff --git a/media-libs/smpeg/ChangeLog b/media-libs/smpeg/ChangeLog
index 4d71ea0ad7a1..6693b6026986 100644
--- a/media-libs/smpeg/ChangeLog
+++ b/media-libs/smpeg/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-libs/smpeg
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/smpeg/ChangeLog,v 1.23 2005/09/30 18:48:47 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/smpeg/ChangeLog,v 1.24 2005/10/04 23:22:02 vapier Exp $
+
+*smpeg-0.4.4-r7 (04 Oct 2005)
+
+ 04 Oct 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/smpeg-0.4.4-PIC.patch, +smpeg-0.4.4-r7.ebuild:
+ Fix TEXTRELs in mmx asm code with the help of the PaX team.
30 Sep 2005; Fabian Groffen <grobian@gentoo.org> smpeg-0.4.4-r6.ebuild:
Marking ~ppc-macos (bug #105582)
diff --git a/media-libs/smpeg/Manifest b/media-libs/smpeg/Manifest
index 4fa1bcb87ca3..47cd24bbc616 100644
--- a/media-libs/smpeg/Manifest
+++ b/media-libs/smpeg/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 b06aefcfd7c56746451214c6a0c6bf8b smpeg-0.4.4-r6.ebuild 1530
MD5 7300a7b361fa9f48e37722c6952bd432 metadata.xml 158
MD5 f1c8e584bb7d656cfa3c82459f7b2667 smpeg-0.4.4-r7.ebuild 1575
@@ -8,3 +11,10 @@ MD5 f70fffdbc4af6ca684817ede925c6087 files/smpeg-0.4.4-config.patch 472
MD5 3ab2c17a1fa8a3c293ec83d7f4d45515 files/smpeg-0.4.4-PIC.patch 9472
MD5 dcc2db7c8aa509096fc557b99bd35490 files/smpeg-0.4.4-m4.patch 233
MD5 7d1d2f2e55e8d98f7d62dcbb680cec7d files/smpeg-0.4.4-gnu-stack.patch 955
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDQw7xgIKl8Uu19MoRAl3zAJ93RwsmZPdxdqo6vNUYFRK8Lt5TZQCfYIr+
+tbKXuoSJcpP+YxLH/pRUHwo=
+=XDh5
+-----END PGP SIGNATURE-----
diff --git a/media-libs/smpeg/files/digest-smpeg-0.4.4-r7 b/media-libs/smpeg/files/digest-smpeg-0.4.4-r7
new file mode 100644
index 000000000000..9aa5597db6c8
--- /dev/null
+++ b/media-libs/smpeg/files/digest-smpeg-0.4.4-r7
@@ -0,0 +1 @@
+MD5 59c76ac704088ef5539210190c4e1fe3 smpeg-0.4.4.tar.gz 315054
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-PIC.patch b/media-libs/smpeg/files/smpeg-0.4.4-PIC.patch
new file mode 100644
index 000000000000..88663011713b
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-PIC.patch
@@ -0,0 +1,308 @@
+Fix PIC issues in mmx routines
+
+--- video/mmxflags_asm.S
++++ video/mmxflags_asm.S
+@@ -1,11 +1,6 @@
+
+ #if defined(i386) && defined(USE_MMX)
+
+-.data
+- .align 16
+- .type flags,@object
+-flags: .long 0
+-
+ .text
+ .align 4
+ .globl cpu_flags
+@@ -40,16 +35,13 @@ cpu_flags:
+ xorl %ecx,%eax
+ je cpu_flags.L1
+
+- pusha
++ pushl %ebx
+
+ movl $1,%eax
+ cpuid
++ movl %edx,%eax
+
+- movl %edx,flags
+-
+- popa
+-
+- movl flags,%eax
++ popl %ebx
+
+ cpu_flags.L1:
+ ret
+--- video/mmxidct_asm.S
++++ video/mmxidct_asm.S
+@@ -31,11 +31,6 @@ preSC: .short 16384,22725,21407,19266,
+ x0005000200010001:
+ .long 0x00010001,0x00050002
+ .align 8
+- .type x0040000000000000,@object
+- .size x0040000000000000,8
+-x0040000000000000:
+- .long 0, 0x00400000
+- .align 8
+ .type x5a825a825a825a82,@object
+ .size x5a825a825a825a82,8
+ x5a825a825a825a82:
+@@ -80,8 +75,21 @@ scratch7:
+ x0:
+ .long 0,0
+ .align 8
++
+ .text
+ .align 4
++
++#ifdef __PIC__
++# undef __i686 /* gcc define gets in our way */
++# define MUNG(sym) sym ## @GOTOFF(%ebx)
++# define INIT_PIC() \
++ call __i686.get_pc_thunk.bx ; \
++ addl $_GLOBAL_OFFSET_TABLE_, %ebx
++#else
++# define MUNG(sym) sym
++# define INIT_PIC()
++#endif
++
+ .globl IDCT_mmx
+ .type IDCT_mmx,@function
+ IDCT_mmx:
+@@ -92,8 +100,9 @@ IDCT_mmx:
+ pushl %edx
+ pushl %esi
+ pushl %edi
++ INIT_PIC()
+ movl 8(%ebp),%esi /* source matrix */
+- leal preSC, %ecx
++ leal MUNG(preSC), %ecx
+ /* column 0: even part
+ * use V4, V12, V0, V8 to produce V22..V25
+ */
+@@ -109,7 +118,7 @@ IDCT_mmx:
+ movq %mm1, %mm2 /* added 11/1/96 */
+ pmulhw 8*8(%esi),%mm5 /* V8 */
+ psubsw %mm0, %mm1 /* V16 */
+- pmulhw x5a825a825a825a82, %mm1 /* 23170 ->V18 */
++ pmulhw MUNG(x5a825a825a825a82), %mm1 /* 23170 ->V18 */
+ paddsw %mm0, %mm2 /* V17 */
+ movq %mm2, %mm0 /* duplicate V17 */
+ psraw $1, %mm2 /* t75=t82 */
+@@ -150,7 +159,7 @@ IDCT_mmx:
+ paddsw %mm0, %mm3 /* V29 ; free mm0 */
+ movq %mm7, %mm1 /* duplicate V26 */
+ psraw $1, %mm3 /* t91=t94 */
+- pmulhw x539f539f539f539f,%mm7 /* V33 */
++ pmulhw MUNG(x539f539f539f539f),%mm7 /* V33 */
+ psraw $1, %mm1 /* t96 */
+ movq %mm5, %mm0 /* duplicate V2 */
+ psraw $2, %mm4 /* t85=t87 */
+@@ -158,15 +167,15 @@ IDCT_mmx:
+ psubsw %mm4, %mm0 /* V28 ; free mm4 */
+ movq %mm0, %mm2 /* duplicate V28 */
+ psraw $1, %mm5 /* t90=t93 */
+- pmulhw x4546454645464546,%mm0 /* V35 */
++ pmulhw MUNG(x4546454645464546),%mm0 /* V35 */
+ psraw $1, %mm2 /* t97 */
+ movq %mm5, %mm4 /* duplicate t90=t93 */
+ psubsw %mm2, %mm1 /* V32 ; free mm2 */
+- pmulhw x61f861f861f861f8,%mm1 /* V36 */
++ pmulhw MUNG(x61f861f861f861f8),%mm1 /* V36 */
+ psllw $1, %mm7 /* t107 */
+ paddsw %mm3, %mm5 /* V31 */
+ psubsw %mm3, %mm4 /* V30 ; free mm3 */
+- pmulhw x5a825a825a825a82,%mm4 /* V34 */
++ pmulhw MUNG(x5a825a825a825a82),%mm4 /* V34 */
+ nop
+ psubsw %mm1, %mm0 /* V38 */
+ psubsw %mm7, %mm1 /* V37 ; free mm7 */
+@@ -233,7 +242,7 @@ IDCT_mmx:
+ psubsw %mm7, %mm1 /* V50 */
+ pmulhw 8*9(%esi), %mm5 /* V9 */
+ paddsw %mm7, %mm2 /* V51 */
+- pmulhw x5a825a825a825a82, %mm1 /* 23170 ->V52 */
++ pmulhw MUNG(x5a825a825a825a82), %mm1 /* 23170 ->V52 */
+ movq %mm2, %mm6 /* duplicate V51 */
+ psraw $1, %mm2 /* t138=t144 */
+ movq %mm3, %mm4 /* duplicate V1 */
+@@ -274,11 +283,11 @@ IDCT_mmx:
+ * even more by doing the correction step in a later stage when the number
+ * is actually multiplied by 16
+ */
+- paddw x0005000200010001, %mm4
++ paddw MUNG(x0005000200010001), %mm4
+ psubsw %mm6, %mm3 /* V60 ; free mm6 */
+ psraw $1, %mm0 /* t154=t156 */
+ movq %mm3, %mm1 /* duplicate V60 */
+- pmulhw x539f539f539f539f, %mm1 /* V67 */
++ pmulhw MUNG(x539f539f539f539f), %mm1 /* V67 */
+ movq %mm5, %mm6 /* duplicate V3 */
+ psraw $2, %mm4 /* t148=t150 */
+ paddsw %mm4, %mm5 /* V61 */
+@@ -287,13 +296,13 @@ IDCT_mmx:
+ psllw $1, %mm1 /* t169 */
+ paddsw %mm0, %mm5 /* V65 -> result */
+ psubsw %mm0, %mm4 /* V64 ; free mm0 */
+- pmulhw x5a825a825a825a82, %mm4 /* V68 */
++ pmulhw MUNG(x5a825a825a825a82), %mm4 /* V68 */
+ psraw $1, %mm3 /* t158 */
+ psubsw %mm6, %mm3 /* V66 */
+ movq %mm5, %mm2 /* duplicate V65 */
+- pmulhw x61f861f861f861f8, %mm3 /* V70 */
++ pmulhw MUNG(x61f861f861f861f8), %mm3 /* V70 */
+ psllw $1, %mm6 /* t165 */
+- pmulhw x4546454645464546, %mm6 /* V69 */
++ pmulhw MUNG(x4546454645464546), %mm6 /* V69 */
+ psraw $1, %mm2 /* t172 */
+ /* moved from next block */
+ movq 8*5(%esi), %mm0 /* V56 */
+@@ -418,7 +427,7 @@ IDCT_mmx:
+ * movq 8*13(%esi), %mm4 tmt13
+ */
+ psubsw %mm4, %mm3 /* V134 */
+- pmulhw x5a825a825a825a82, %mm3 /* 23170 ->V136 */
++ pmulhw MUNG(x5a825a825a825a82), %mm3 /* 23170 ->V136 */
+ movq 8*9(%esi), %mm6 /* tmt9 */
+ paddsw %mm4, %mm5 /* V135 ; mm4 free */
+ movq %mm0, %mm4 /* duplicate tmt1 */
+@@ -447,17 +456,17 @@ IDCT_mmx:
+ psubsw %mm7, %mm0 /* V144 */
+ movq %mm0, %mm3 /* duplicate V144 */
+ paddsw %mm7, %mm2 /* V147 ; free mm7 */
+- pmulhw x539f539f539f539f, %mm0 /* 21407-> V151 */
++ pmulhw MUNG(x539f539f539f539f), %mm0 /* 21407-> V151 */
+ movq %mm1, %mm7 /* duplicate tmt3 */
+ paddsw %mm5, %mm7 /* V145 */
+ psubsw %mm5, %mm1 /* V146 ; free mm5 */
+ psubsw %mm1, %mm3 /* V150 */
+ movq %mm7, %mm5 /* duplicate V145 */
+- pmulhw x4546454645464546, %mm1 /* 17734-> V153 */
++ pmulhw MUNG(x4546454645464546), %mm1 /* 17734-> V153 */
+ psubsw %mm2, %mm5 /* V148 */
+- pmulhw x61f861f861f861f8, %mm3 /* 25080-> V154 */
++ pmulhw MUNG(x61f861f861f861f8), %mm3 /* 25080-> V154 */
+ psllw $2, %mm0 /* t311 */
+- pmulhw x5a825a825a825a82, %mm5 /* 23170-> V152 */
++ pmulhw MUNG(x5a825a825a825a82), %mm5 /* 23170-> V152 */
+ paddsw %mm2, %mm7 /* V149 ; free mm2 */
+ psllw $1, %mm1 /* t313 */
+ nop /* without the nop - freeze here for one clock */
+@@ -483,7 +492,7 @@ IDCT_mmx:
+ paddsw %mm3, %mm6 /* V164 ; free mm3 */
+ movq %mm4, %mm3 /* duplicate V142 */
+ psubsw %mm5, %mm4 /* V165 ; free mm5 */
+- movq %mm2, scratch7 /* out7 */
++ movq %mm2, MUNG(scratch7) /* out7 */
+ psraw $4, %mm6
+ psraw $4, %mm4
+ paddsw %mm5, %mm3 /* V162 */
+@@ -494,11 +503,11 @@ IDCT_mmx:
+ */
+ movq %mm6, 8*9(%esi) /* out9 */
+ paddsw %mm1, %mm0 /* V161 */
+- movq %mm3, scratch5 /* out5 */
++ movq %mm3, MUNG(scratch5) /* out5 */
+ psubsw %mm1, %mm5 /* V166 ; free mm1 */
+ movq %mm4, 8*11(%esi) /* out11 */
+ psraw $4, %mm5
+- movq %mm0, scratch3 /* out3 */
++ movq %mm0, MUNG(scratch3) /* out3 */
+ movq %mm2, %mm4 /* duplicate V140 */
+ movq %mm5, 8*13(%esi) /* out13 */
+ paddsw %mm7, %mm2 /* V160 */
+@@ -508,7 +517,7 @@ IDCT_mmx:
+ /* moved from the next block */
+ movq 8*3(%esi), %mm7
+ psraw $4, %mm4
+- movq %mm2, scratch1 /* out1 */
++ movq %mm2, MUNG(scratch1) /* out1 */
+ /* moved from the next block */
+ movq %mm0, %mm1
+ movq %mm4, 8*15(%esi) /* out15 */
+@@ -565,15 +574,15 @@ IDCT_mmx:
+ paddsw %mm4, %mm3 /* V113 ; free mm4 */
+ movq %mm0, %mm4 /* duplicate V110 */
+ paddsw %mm1, %mm2 /* V111 */
+- pmulhw x539f539f539f539f, %mm0 /* 21407-> V117 */
++ pmulhw MUNG(x539f539f539f539f), %mm0 /* 21407-> V117 */
+ psubsw %mm1, %mm5 /* V112 ; free mm1 */
+ psubsw %mm5, %mm4 /* V116 */
+ movq %mm2, %mm1 /* duplicate V111 */
+- pmulhw x4546454645464546, %mm5 /* 17734-> V119 */
++ pmulhw MUNG(x4546454645464546), %mm5 /* 17734-> V119 */
+ psubsw %mm3, %mm2 /* V114 */
+- pmulhw x61f861f861f861f8, %mm4 /* 25080-> V120 */
++ pmulhw MUNG(x61f861f861f861f8), %mm4 /* 25080-> V120 */
+ paddsw %mm3, %mm1 /* V115 ; free mm3 */
+- pmulhw x5a825a825a825a82, %mm2 /* 23170-> V118 */
++ pmulhw MUNG(x5a825a825a825a82), %mm2 /* 23170-> V118 */
+ psllw $2, %mm0 /* t266 */
+ movq %mm1, (%esi) /* save V115 */
+ psllw $1, %mm5 /* t268 */
+@@ -591,7 +600,7 @@ IDCT_mmx:
+ movq %mm6, %mm3 /* duplicate tmt4 */
+ psubsw %mm0, %mm6 /* V100 */
+ paddsw %mm0, %mm3 /* V101 ; free mm0 */
+- pmulhw x5a825a825a825a82, %mm6 /* 23170 ->V102 */
++ pmulhw MUNG(x5a825a825a825a82), %mm6 /* 23170 ->V102 */
+ movq %mm7, %mm5 /* duplicate tmt0 */
+ movq 8*8(%esi), %mm1 /* tmt8 */
+ paddsw %mm1, %mm7 /* V103 */
+@@ -625,10 +634,10 @@ IDCT_mmx:
+ movq 8*2(%esi), %mm3 /* V123 */
+ paddsw %mm4, %mm7 /* out0 */
+ /* moved up from next block */
+- movq scratch3, %mm0
++ movq MUNG(scratch3), %mm0
+ psraw $4, %mm7
+ /* moved up from next block */
+- movq scratch5, %mm6
++ movq MUNG(scratch5), %mm6
+ psubsw %mm4, %mm1 /* out14 ; free mm4 */
+ paddsw %mm3, %mm5 /* out2 */
+ psraw $4, %mm1
+@@ -639,7 +648,7 @@ IDCT_mmx:
+ movq %mm5, 8*2(%esi) /* out2 ; free mm5 */
+ psraw $4, %mm2
+ /* moved up to the prev block */
+- movq scratch7, %mm4
++ movq MUNG(scratch7), %mm4
+ /* moved up to the prev block */
+ psraw $4, %mm0
+ movq %mm2, 8*12(%esi) /* out12 ; free mm2 */
+@@ -647,13 +656,13 @@ IDCT_mmx:
+ psraw $4, %mm6
+ /* move back the data to its correct place
+ * moved up to the prev block
+- * movq scratch3, %mm0
+- * movq scratch5, %mm6
+- * movq scratch7, %mm4
++ * movq MUNG(scratch3), %mm0
++ * movq MUNG(scratch5), %mm6
++ * movq MUNG(scratch7), %mm4
+ * psraw $4, %mm0
+ * psraw $4, %mm6
+ */
+- movq scratch1, %mm1
++ movq MUNG(scratch1), %mm1
+ psraw $4, %mm4
+ movq %mm0, 8*3(%esi) /* out3 */
+ psraw $4, %mm1
+@@ -671,6 +680,15 @@ IDCT_mmx:
+ .Lfe1:
+ .size IDCT_mmx,.Lfe1-IDCT_mmx
+
++#ifdef __PIC__
++ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
++.globl __i686.get_pc_thunk.bx
++ .hidden __i686.get_pc_thunk.bx
++ .type __i686.get_pc_thunk.bx,@function
++ __i686.get_pc_thunk.bx:
++ movl (%esp), %ebx
++ ret
++#endif
+
+ #endif /* i386 && USE_MMX */
+
diff --git a/media-libs/smpeg/smpeg-0.4.4-r7.ebuild b/media-libs/smpeg/smpeg-0.4.4-r7.ebuild
new file mode 100644
index 000000000000..c6d4f474fdae
--- /dev/null
+++ b/media-libs/smpeg/smpeg-0.4.4-r7.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/smpeg/smpeg-0.4.4-r7.ebuild,v 1.1 2005/10/04 23:22:02 vapier Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="SDL MPEG Player Library"
+HOMEPAGE="http://www.lokigames.com/development/smpeg.php3"
+SRC_URI="ftp://ftp.lokigames.com/pub/open-source/smpeg/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~sparc ~x86"
+IUSE="X debug gtk mmx opengl"
+
+DEPEND=">=media-libs/libsdl-1.2.0
+ opengl? ( virtual/opengl virtual/glu )
+ gtk? ( =x11-libs/gtk+-1.2* )
+ X? ( virtual/x11 )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-m4.patch
+ epatch "${FILESDIR}"/${P}-gnu-stack.patch
+ epatch "${FILESDIR}"/${P}-config.patch
+ epatch "${FILESDIR}"/${P}-PIC.patch
+ # Bundled libtool doesnt properly add C++ libs even
+ # though the shared library includes C++ objects
+ sed -i \
+ -e '/^libsmpeg_la_LIBADD =/s:$: -lstdc++:' \
+ Makefile.in || die "sed Makefile.in failed"
+}
+
+src_compile() {
+ tc-export CC CXX RANLIB AR
+
+ # the debug option is bogus ... all it does is add extra
+ # optimizations if you pass --disable-debug
+ econf \
+ $(use_enable debug assertions) \
+ $(use_enable gtk gtk-player) \
+ $(use_with X x) \
+ $(use_enable opengl opengl-player) \
+ $(use_enable mmx) \
+ --enable-debug \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc CHANGES README* TODO
+}