summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/smpeg
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/smpeg')
-rw-r--r--media-libs/smpeg/Manifest2
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-PIC.patch308
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-automake.patch13
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-config.patch18
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-flags.patch129
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-format.patch11
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch41
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch32
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-m4.patch9
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-malloc.patch25
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch10
-rw-r--r--media-libs/smpeg/files/smpeg-0.4.4-mmx.patch12
-rw-r--r--media-libs/smpeg/metadata.xml5
-rw-r--r--media-libs/smpeg/smpeg-0.4.4-r10.ebuild75
14 files changed, 690 insertions, 0 deletions
diff --git a/media-libs/smpeg/Manifest b/media-libs/smpeg/Manifest
new file mode 100644
index 000000000000..94a4ca2e6a0b
--- /dev/null
+++ b/media-libs/smpeg/Manifest
@@ -0,0 +1,2 @@
+DIST smpeg-0.4.4-gtkm4.patch.bz2 3894 SHA256 85c1c2126bd0e405092f3f08caace3503997fd0447989fdd175c7f39c3f6091b SHA512 30370e0edd41767ce260d10de515be0087f47b479ec0085ec186506c93be0b2a404c1bcb1626f9a6a1f575160d9c382708d2769dddfe6dca6236fe0eaa58602d WHIRLPOOL 3645daa5da07c954d920fe4371486222a93a9aca6932892c12afe07a36b57a0b1752d768c3101cfeb0986579a78a319fe88aa03a9c2c48307ed4fe526f83ffe6
+DIST smpeg-0.4.4.tar.gz 315054 SHA256 1efa7984d0aada0c2954cd0aaef357e9d7871dadd3368dbe742ab5f260523e57 SHA512 d566bb68b0caacecdf61cd766b26e003fd4e153c243d873f7aae33ab69919202bd121bb9c10f494bd9530267ddec2a9e018eb46ee8bb9d502a29cd2de2f1bbfb WHIRLPOOL bc81726489b31901713857b9a77369493ef976adf40adb68b2d365d15a2ec635eef29a2e6a195c4c156a08a7fcbb39e2b872323525bc7841494e26c6a59e90a5
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/files/smpeg-0.4.4-automake.patch b/media-libs/smpeg/files/smpeg-0.4.4-automake.patch
new file mode 100644
index 000000000000..e541e1950113
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-automake.patch
@@ -0,0 +1,13 @@
+Index: smpeg-0.4.4/configure.in
+===================================================================
+--- smpeg-0.4.4.orig/configure.in
++++ smpeg-0.4.4/configure.in
+@@ -53,6 +53,8 @@ AC_LIBTOOL_WIN32_DLL
+ AM_PROG_LIBTOOL
+ AC_PROG_INSTALL
+
++AM_PROG_AS
++
+ dnl Work around the lack of certain typedefs.
+ AC_TYPE_SOCKLEN_T
+
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-config.patch b/media-libs/smpeg/files/smpeg-0.4.4-config.patch
new file mode 100644
index 000000000000..2175276c351f
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-config.patch
@@ -0,0 +1,18 @@
+Only dump -L/-rpath if libdir is non-standard
+
+--- smpeg-config.in
++++ smpeg-config.in
+@@ -45,11 +45,13 @@
+ echo $includes -I@includedir@/smpeg `@SDL_CONFIG@ --cflags`
+ ;;
+ --libs)
++ if [ "@libdir@" != "/usr/lib" ]; then
+ if [ "`uname`" = "SunOS" ]; then
+ libdirs="-L@libdir@ -R@libdir@"
+ else
+ libdirs="-L@libdir@ @SMPEG_RLD_FLAGS@"
+ fi
++ fi
+ echo $libdirs -lsmpeg `@SDL_CONFIG@ --libs`
+ ;;
+ *)
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-flags.patch b/media-libs/smpeg/files/smpeg-0.4.4-flags.patch
new file mode 100644
index 000000000000..d6b50f30d1bf
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-flags.patch
@@ -0,0 +1,129 @@
+Index: smpeg-0.4.4/configure.in
+===================================================================
+--- smpeg-0.4.4.orig/configure.in
++++ smpeg-0.4.4/configure.in
+@@ -60,7 +60,7 @@ dnl The alpha architecture needs special
+ case "$target" in
+ alpha*-*-linux*)
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -mcpu=ev4 -Wa,-mall"
+ fi
+ ;;
+ sparc*-*-solaris*)
+@@ -102,17 +102,17 @@ AC_ARG_ENABLE(debug,
+ , enable_debug=yes)
+ if test x$enable_debug != xyes; then
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -fexpensive-optimizations -fomit-frame-pointer"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -fexpensive-optimizations -fomit-frame-pointer"
+ fi
+ case "$target" in
+ i486-*-*) # Yeah right. :)
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -march=486"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -march=486"
+ fi
+ ;;
+ i?86-*-*)
+ if test x$ac_cv_prog_gcc = xyes; then
+- CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -march=pentium -mcpu=pentiumpro"
+ fi
+ ;;
+ esac
+@@ -124,7 +124,7 @@ AM_PATH_SDL($SDL_VERSION,
+ :,
+ AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
+ )
+-CFLAGS="$CFLAGS $SDL_CFLAGS"
++EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+
+ dnl See if we need to pass -lm for the math library
+@@ -145,7 +145,7 @@ if test x$enable_mmx = xyes; then
+ AC_MSG_RESULT($use_mmx)
+
+ if test x$use_mmx = xyes; then
+- CFLAGS="$CFLAGS -DUSE_MMX"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_MMX"
+ fi
+ fi
+
+@@ -162,7 +162,7 @@ if test x$enable_ati = xyes; then
+ AC_MSG_RESULT($use_ati)
+
+ if test x$use_ati = xyes; then
+- CFLAGS="$CFLAGS -DUSE_ATI"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_ATI"
+ fi
+ fi
+
+@@ -171,7 +171,7 @@ AC_ARG_ENABLE(timestamp-sync,
+ [ --enable-timestamp-sync enable system timestamp sync [default=yes]],
+ , enable_timestamp_sync=no)
+ if test x$enable_timestamp_sync = xyes; then
+- CFLAGS="$CFLAGS -DUSE_TIMESTAMP_SYNC"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_TIMESTAMP_SYNC"
+ fi
+
+ dnl Enable the use of the system thread
+@@ -179,7 +179,7 @@ AC_ARG_ENABLE(threaded-system,
+ [ --enable-threaded-system enable system thread [default=no]],
+ , enable_threaded_system=no)
+ if test x$enable_threaded_system = xyes; then
+- CFLAGS="$CFLAGS -DUSE_SYSTEM_THREAD"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_SYSTEM_THREAD"
+ fi
+
+ dnl Enable threaded audio
+@@ -187,7 +187,7 @@ AC_ARG_ENABLE(threaded-audio,
+ [ --enable-threaded-audio enable threaded audio [default=yes]],
+ , enable_threaded_audio=yes)
+ if test x$enable_threaded_audio = xyes; then
+- CFLAGS="$CFLAGS -DTHREADED_AUDIO"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -DTHREADED_AUDIO"
+ fi
+
+ dnl See if we can build the GTk player
+@@ -198,7 +198,7 @@ have_gtk=no
+ if test x$enable_gtk_player = xyes; then
+ AM_PATH_GTK(1.2.1, have_gtk=yes)
+ if test x$have_gtk = xyes; then
+- CFLAGS="$CFLAGS $GTK_CFLAGS"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS $GTK_CFLAGS"
+ fi
+ AC_SUBST(GTK_LIBS)
+ fi
+@@ -224,7 +224,7 @@ if test x$enable_opengl_player = xyes; t
+ AC_PATH_X
+ AC_PATH_XTRA
+ if test x$have_x = xyes; then
+- CFLAGS="$CFLAGS $X_CFLAGS"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
+ SYS_GL_LIBS="$X_LIBS -lGL -lGLU"
+ else
+ SYS_GL_LIBS="-lGL -lGLU"
+@@ -255,17 +255,16 @@ AC_ARG_ENABLE(assertions,
+ [ --enable-assertions Enable consistency checks in decoding [default=no]],
+ , enable_assertions=no)
+ if test x$enable_assertions != xyes; then
+- CFLAGS="$CFLAGS -DNDEBUG"
++ EXTRA_CFLAGS="$EXTRA_CFLAGS -DNDEBUG"
+ fi
+
+ dnl Add the source include directories
+-CFLAGS="$CFLAGS -I.. -DNOCONTROLS"
+-CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/audio -I\$(top_srcdir)/video"
+-CXXFLAGS="$CFLAGS"
+-
++EXTRA_CFLAGS="$EXTRA_CFLAGS -I.. -DNOCONTROLS"
++EXTRA_CFLAGS="$EXTRA_CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/audio -I\$(top_srcdir)/video"
++CXXFLAGS="$EXTRA_CFLAGS $CXXFLAGS"
++CFLAGS="$EXTRA_CFLAGS $CFLAGS"
+
+ dnl C++ flags are the same as the C flags
+-CXXFLAGS="$CFLAGS"
+ if test x$GCC = xyes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported
+ AC_MSG_CHECKING(if $CXX supports -fno-rtti -fno-exceptions)
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-format.patch b/media-libs/smpeg/files/smpeg-0.4.4-format.patch
new file mode 100644
index 000000000000..8503f032286a
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-format.patch
@@ -0,0 +1,11 @@
+--- plaympeg.c.old 2014-09-04 08:55:10.646132150 +0200
++++ plaympeg.c 2014-09-04 08:56:57.465210820 +0200
+@@ -262,7 +262,7 @@
+ answer[i] = c;
+ }
+ answer[i] = 0;
+- fprintf(stderr, answer + 4);
++ fprintf(stderr, "%s", answer + 4);
+ }
+ while(answer[3] == '-');
+
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch b/media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch
new file mode 100644
index 000000000000..4a0eeb4530ae
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-gcc41.patch
@@ -0,0 +1,41 @@
+Index: MPEGaudio.h
+===================================================================
+RCS file: /cvs/cvsroot/smpeg/MPEGaudio.h,v
+retrieving revision 1.23
+diff -u -p -r1.23 MPEGaudio.h
+--- smpeg/MPEGaudio.h 17 Jul 2001 19:52:24 -0000 1.23
++++ smpeg/MPEGaudio.h 6 Dec 2005 06:10:43 -0000
+@@ -151,12 +151,6 @@ private:
+ /* The actual MPEG audio class */
+ class MPEGaudio : public MPEGerror, public MPEGaudioaction {
+
+- friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
+- friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
+-#ifdef THREADED_AUDIO
+- friend int Decode_MPEGaudio(void *udata);
+-#endif
+-
+ public:
+ MPEGaudio(MPEGstream *stream, bool initSDL = true);
+ virtual ~MPEGaudio();
+@@ -367,6 +361,20 @@ public:
+ #define N_TIMESTAMPS 5
+
+ double timestamp[N_TIMESTAMPS];
++
++ /* Functions which access MPEGaudio internals */
++ friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++ friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++ friend int Decode_MPEGaudio(void *udata);
++#endif
+ };
+
++/* Need to duplicate the prototypes, this is not a typo :) */
++void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++int Decode_MPEGaudio(void *udata);
++#endif
++
+ #endif /* _MPEGAUDIO_H_ */
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch b/media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch
new file mode 100644
index 000000000000..12efb077f2b1
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-gnu-stack.patch
@@ -0,0 +1,32 @@
+Make sure that the asm files don't incorrectly trigger an executable
+stack marking in the final shared library. That's bad, mmmkay.
+
+before:
+$ readelf -l /usr/lib/libsmpeg.so | grep -A 1 GNU_STACK
+ GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
+ 0x0000000000000000 0x0000000000000000 RWE 8
+after:
+$ readelf -l /usr/lib/libsmpeg.so | grep -A 1 GNU_STACK
+ GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
+ 0x0000000000000000 0x0000000000000000 RW 8
+
+--- smpeg-0.4.4/video/mmxflags_asm.S
++++ smpeg-0.4.4/video/mmxflags_asm.S
+@@ -57,3 +57,7 @@
+ .size cpu_flags,.Lfe1-cpu_flags
+
+ #endif /* i386 && USE_MMX */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
+--- smpeg-0.4.4/video/mmxidct_asm.S
++++ smpeg-0.4.4/video/mmxidct_asm.S
+@@ -673,3 +673,7 @@
+
+
+ #endif /* i386 && USE_MMX */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-m4.patch b/media-libs/smpeg/files/smpeg-0.4.4-m4.patch
new file mode 100644
index 000000000000..660ba8808638
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-m4.patch
@@ -0,0 +1,9 @@
+Fix aclocal warning:
+/usr/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG
+--- smpeg-0.4.4/smpeg.m4
++++ smpeg-0.4.4/smpeg.m4
+@@ -12,3 +12,3 @@
+ dnl
+-AC_DEFUN(AM_PATH_SMPEG,
++AC_DEFUN([AM_PATH_SMPEG],
+ [dnl
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-malloc.patch b/media-libs/smpeg/files/smpeg-0.4.4-malloc.patch
new file mode 100644
index 000000000000..be54e58b4d23
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-malloc.patch
@@ -0,0 +1,25 @@
+Index: smpeg-0.4.4/glmovie.c
+===================================================================
+--- smpeg-0.4.4.orig/glmovie.c
++++ smpeg-0.4.4/glmovie.c
+@@ -6,7 +6,6 @@
+ #include "smpeg.h"
+ #include "SDL.h"
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include "glmovie.h"
+Index: smpeg-0.4.4/glmovie-tile.c
+===================================================================
+--- smpeg-0.4.4.orig/glmovie-tile.c
++++ smpeg-0.4.4/glmovie-tile.c
+@@ -16,7 +16,7 @@
+ */
+
+ #include "glmovie.h"
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ /* Some data is redundant at this stage. */
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch b/media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch
new file mode 100644
index 000000000000..594c5546ebf7
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-missing-init.patch
@@ -0,0 +1,10 @@
+--- MPEG_old.cpp 2007-01-07 23:24:45.000000000 +0100
++++ MPEG.cpp 2007-01-07 23:25:11.000000000 +0100
+@@ -133,6 +133,7 @@
+ video = NULL;
+ system = NULL;
+ error = NULL;
++ source = NULL;
+
+ audiostream = videostream = NULL;
+ audioaction = NULL;
diff --git a/media-libs/smpeg/files/smpeg-0.4.4-mmx.patch b/media-libs/smpeg/files/smpeg-0.4.4-mmx.patch
new file mode 100644
index 000000000000..71db62d055b4
--- /dev/null
+++ b/media-libs/smpeg/files/smpeg-0.4.4-mmx.patch
@@ -0,0 +1,12 @@
+Index: smpeg-0.4.4/configure.in
+===================================================================
+--- smpeg-0.4.4.orig/configure.in
++++ smpeg-0.4.4/configure.in
+@@ -148,6 +148,7 @@ if test x$enable_mmx = xyes; then
+
+ if test x$use_mmx = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_MMX"
++ CCASFLAGS="$CCASFLAGS -DUSE_MMX"
+ fi
+ fi
+
diff --git a/media-libs/smpeg/metadata.xml b/media-libs/smpeg/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/media-libs/smpeg/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/media-libs/smpeg/smpeg-0.4.4-r10.ebuild b/media-libs/smpeg/smpeg-0.4.4-r10.ebuild
new file mode 100644
index 000000000000..b1f57cbbb5ad
--- /dev/null
+++ b/media-libs/smpeg/smpeg-0.4.4-r10.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs autotools flag-o-matic multilib-minimal
+
+DESCRIPTION="SDL MPEG Player Library"
+HOMEPAGE="http://icculus.org/smpeg/"
+SRC_URI="ftp://ftp.lokigames.com/pub/open-source/smpeg/${P}.tar.gz
+ mirror://gentoo/${P}-gtkm4.patch.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-solaris"
+IUSE="X debug cpu_flags_x86_mmx opengl static-libs"
+
+RDEPEND="
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<=app-emulation/emul-linux-x86-sdl-20140406
+ )
+ >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ opengl? (
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ )
+ X? (
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ )"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README README.SDL_mixer TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-m4.patch \
+ "${FILESDIR}"/${P}-gnu-stack.patch \
+ "${FILESDIR}"/${P}-config.patch \
+ "${FILESDIR}"/${P}-PIC.patch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-flags.patch \
+ "${FILESDIR}"/${P}-automake.patch \
+ "${FILESDIR}"/${P}-mmx.patch \
+ "${FILESDIR}"/${P}-malloc.patch \
+ "${FILESDIR}"/${P}-format.patch \
+ "${FILESDIR}"/${P}-missing-init.patch
+
+ cd "${WORKDIR}"
+ epatch "${DISTDIR}"/${P}-gtkm4.patch.bz2
+ rm "${S}/acinclude.m4"
+
+ cd "${S}"
+ AT_M4DIR="${S}/m4" eautoreconf
+}
+
+multilib_src_configure() {
+ [[ ${CHOST} == *-solaris* ]] && append-libs -lnsl -lsocket
+
+ # the debug option is bogus ... all it does is add extra
+ # optimizations if you pass --disable-debug
+ ECONF_SOURCE="${S}" econf \
+ --enable-debug \
+ --disable-gtk-player \
+ $(use_enable static-libs static) \
+ $(use_enable debug assertions) \
+ $(use_with X x) \
+ $(use_enable opengl opengl-player) \
+ $(use_enable cpu_flags_x86_mmx mmx)
+}
+
+multilib_src_install_all() {
+ use static-libs || prune_libtool_files
+}