summaryrefslogtreecommitdiff
path: root/media-libs/libmpeg2
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libmpeg2')
-rw-r--r--media-libs/libmpeg2/Manifest9
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch16
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch44
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch20
-rw-r--r--media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch60
-rw-r--r--media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild65
-rw-r--r--media-libs/libmpeg2/metadata.xml10
7 files changed, 224 insertions, 0 deletions
diff --git a/media-libs/libmpeg2/Manifest b/media-libs/libmpeg2/Manifest
new file mode 100644
index 000000000000..65074b4741ad
--- /dev/null
+++ b/media-libs/libmpeg2/Manifest
@@ -0,0 +1,9 @@
+AUX libmpeg2-0.5.1-altivec.patch 688 SHA256 01d23bd352fd0a072e70e9ccc0a7567a0b007bd626154ab2cdb2d5345a9df5ce SHA512 4b8166c5c1cea6e62a78808cf5d86baa7dd10688f8fbaf89a0f78904ef0e69d4dc9a31afb33b9eddf011fd077edf4205707544f71e407eef4b2078ac1cefef51 WHIRLPOOL 6250fcbe7097c3247dc860022335c59e73a0cfae258717ffcfcc7be43f8f97383ecaefeb6c49f12cad1d73702110fda9468075faed5ed1a0a2d36d7f1d84546c
+AUX libmpeg2-0.5.1-arm-private-symbols.patch 1222 SHA256 c012b21203452efc0f5bb2334e65461c45d53110c0b0e9b79efab68a7784c944 SHA512 334e4e0b1e2877311503d2907f4f65c26d6a83ee79308c49697b2f3d2b8da9ac665e19ab419d85a944eaa34e1d43f512d1418a372cd444381d66f71df2a92c83 WHIRLPOOL 47340e4ac4db8f9cf23fb318fa05156a44c222ef90b4a54671e7e4033370680a4587af795a99a5208bb134198dc6efadc08f0923d3a4c02a488b0be36069aaf0
+AUX libmpeg2-0.5.1-armv4l.patch 749 SHA256 9136da8f10b1b8b51359855dccdb46dea69919890857264b94160e2f8774bfa7 SHA512 d11fb2196ba5c4a08b28693e069146b69f2a1034606b14981db9ca8d4ed09fd92ab99c9656950cc5d3a547177cd9dd7413698a50bd6b8f69080bcf10e8463e66 WHIRLPOOL b296d88dcf197fda473c778750c5ce1730759da6d7e2636f5caff48f1ccfc088c123f97e0b6128ba584d9f3bd9a0bee2c53a8427e006f4277e4b09cbafeb5118
+AUX libmpeg2-0.5.1-global-symbol-test.patch 1931 SHA256 67fde111b731ef04c31318aa05568fac6614cc102499dbfb8afc409a78b5680f SHA512 a9425f3cc3a3d6c660bd5c780906927827cdaad27a9526fa57d9026a100ba44b99aeea34c9467d1373316164cd7b36f8357c9aec2c46fa5c8b4557fab5cba2eb WHIRLPOOL ddf0fbba9c013113ae73ae985f151d75c03109d54dd508ae6ffa37df55f17e29f2ad3e232f548ee8493c2a8e2edf9362c3bdead31027addff4c668fcc88e7d9d
+DIST libmpeg2-0.5.1.tar.gz 524776 SHA256 dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4 SHA512 3648a2b3d7e2056d5adb328acd2fb983a1fa9a05ccb6f9388cc686c819445421811f42e8439418a0491a13080977f074a0d8bf8fa6bc101ff245ddea65a46fbc WHIRLPOOL 2ca188b98ca0119b61c590db88e678f1e1ed7b68a50e18bcbc9ce0e312796845d3d1c6a4e76e98754e2a635f83f1b7800a938290a65456723328db02faf59fe5
+EBUILD libmpeg2-0.5.1-r2.ebuild 1618 SHA256 8bfb401a81549cea92c2e0fdc082a05e4844f1bfd1df006301addce68cc8704d SHA512 e79b3a895be25c4c46d364d772591fc8102390ad4f070e16e268eeace8144f35f2ca685252558bdf53fd64f1c46cc6a7f6b177035ad1a2fa4d342e9b9a210db1 WHIRLPOOL c102f4b67e105113973be8565dc6ed6a63f815317f12bd68865b0d9aacb5fa4db3d57ce4f932ba466fd57afe3b669bc563997cf48e3dcd7d647d0afaee87a54d
+MISC ChangeLog 3162 SHA256 0e53e0f4f16fd7c6ab9e1d1db9c4beb622a6f7a5381e9039d718c47355c7f0e4 SHA512 0a0e222bad4a102b284536218c1322c6c9a6e6ac3d86deaac2d247e9f4fdce048dee3774fef891f8aa9a18041d163b15bba9e057eebe38fa16d79c3b4b033181 WHIRLPOOL 4a46314f589ad998f14cd55a0ac5b7015b111c8c648e11be201c45f58baaa56c87807be4f00db4b27f9442d3aa0c19366811bbd159c5bef01fd7adcb94f74695
+MISC ChangeLog-2015 11938 SHA256 fe87222c510f015cb231f0ac87d63e2864332423fc1b02128c07e5902cfa3451 SHA512 bb6bd52e65e26c5960cc8b8f8dba5d5d733ab83e752ec7a56359cb354f13b98452778ea98d47eb7973f28f5f1df75f64e440e81fe0cfd9ede834f26e15dbdf1c WHIRLPOOL af04be1bb5147992980cda33e2b8c70619c84786493d634860e1f4564433ecbb0a1b5552dae2e987dc1c7947ee5506da7031f760cbf35f291e6190a9084c7966
+MISC metadata.xml 301 SHA256 2a69813404be53c6c715b71c47be213fc856bf8ca081e3ef3405023cde9d28bc SHA512 ae5643be12156110bdfe381eef32d7586350eb5d70ee8b431f34a19a1b45dfa2cd1ee28d5b0101fef05f90b5d72ed767163051ce91cc1e9107c23432a29a1b46 WHIRLPOOL 3ea4a1f6b5e37c0348e328ce83d59f6d850d8b825693ae8cbe940cfc1ef9624f8f79a361e3854d23a4b7653e9d7799a058658a57df826b19fc0bb15a84e8293c
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch
new file mode 100644
index 000000000000..617fe7509951
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch
@@ -0,0 +1,16 @@
+--- configure.ac.bak 2010-05-25 17:12:14.756245990 +0000
++++ configure.ac 2010-05-25 17:11:51.629581723 +0000
+@@ -79,11 +79,10 @@
+ CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
+ AC_MSG_CHECKING([if <altivec.h> is needed])
+ AC_TRY_COMPILE([],
+- [typedef vector int t;
+- vec_ld(0, (unsigned char *)0);],
++ [vector int t; t = vec_add(t,t);],
+ [have_altivec=yes; AC_MSG_RESULT(no)],
+ [AC_TRY_COMPILE([#include <altivec.h>],
+- [typedef vector int t; vec_ld(0, (unsigned char *)0);],
++ [vector int t; t = vec_add(t,t);],
+ [AC_DEFINE([HAVE_ALTIVEC_H],,
+ [Define to 1 if you have the <altivec.h> header.])
+ have_altivec=yes; AC_MSG_RESULT(yes)],
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch
new file mode 100644
index 000000000000..222ff9954ef4
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-arm-private-symbols.patch
@@ -0,0 +1,44 @@
+Set visibility of global symbols used in ARM specific assembly file to internal
+
+--- a/libmpeg2/motion_comp_arm_s.S
++++ b/libmpeg2/motion_comp_arm_s.S
+@@ -23,7 +23,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_16_arm
++ .global MC_put_o_16_arm
++ .internal MC_put_o_16_arm
+ MC_put_o_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -83,7 +84,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_o_8_arm
++ .global MC_put_o_8_arm
++ .internal MC_put_o_8_arm
+ MC_put_o_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -152,7 +154,8 @@
+ .endm
+
+ .align
+- .global MC_put_x_16_arm
++ .global MC_put_x_16_arm
++ .internal MC_put_x_16_arm
+ MC_put_x_16_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
+@@ -244,7 +247,8 @@
+
+ @ ----------------------------------------------------------------
+ .align
+- .global MC_put_x_8_arm
++ .global MC_put_x_8_arm
++ .internal MC_put_x_8_arm
+ MC_put_x_8_arm:
+ @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ pld [r1]
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch
new file mode 100644
index 000000000000..bd9561e0c46f
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-armv4l.patch
@@ -0,0 +1,20 @@
+diff -urNp libmpeg2.orig/libmpeg2/motion_comp_arm_s.S libmpeg2/libmpeg2/motion_comp_arm_s.S
+--- libmpeg2.orig/libmpeg2/motion_comp_arm_s.S 2008-07-09 21:16:05.000000000 +0200
++++ libmpeg2/libmpeg2/motion_comp_arm_s.S 2009-11-20 19:55:22.000000000 +0100
+@@ -19,6 +19,16 @@
+ @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
++@ Data preload is supported only by ARM V5TE and above
++
++#if (defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
++ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
++ || defined (__ARM_ARCH_4T__) || defined (__ARM_ARCH_5__) \
++ || defined (__ARM_ARCH_5T__))
++.macro pld reg
++.endm
++#endif
++
+ .text
+
+ @ ----------------------------------------------------------------
diff --git a/media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch b/media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch
new file mode 100644
index 000000000000..1eb01f43f58b
--- /dev/null
+++ b/media-libs/libmpeg2/files/libmpeg2-0.5.1-global-symbol-test.patch
@@ -0,0 +1,60 @@
+Rewrite the public symbol check to verify the shared libraries, to check for
+more things, and to avoid duplication; fixes make check on ARM
+
+--- a/test/globals
++++ b/test/globals
+@@ -1,4 +1,8 @@
+ #!/bin/sh
++# TODO
++# - fix checking of .a libs; problem is that "nm -g --defined-only" lists
++# internal symbols; this can be solved by using objdump, but it's probably
++# good enough to just run the tests on the shared lib
+
+ if test x"$srcdir" != x""; then
+ builddir="." # running from make check, but it does not define that
+@@ -14,22 +18,30 @@
+
+ error=0
+
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'`
+-
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
++# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...]
++#
++# checks public symbols in shared libs:
++# - allow prefix_anything
++# - reject _prefixanything
++# - allow _anything
++# - reject anything else
++#
++# NB: skips missing files
++check_bad_public_symbols() {
++ symbols_prefix="$1"
++ shift
++ lib_files=`ls "$@" 2>/dev/null`
++ [ -z "$lib_files" ] && return
++ bad_globals=`nm -g --defined-only $lib_files |
++ awk '{if ($3) print $3}' |
++ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"`
++ [ -z "$bad_globals" ] && return
+ error=1
+-fi
+-
+-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\
+- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'`
++ echo BAD GLOBAL SYMBOLS in $lib_files:
++ echo "$bad_globals"
++}
+
+-if test x"$bad_globals" != x""; then
+- echo BAD GLOBAL SYMBOLS:
+- for s in $bad_globals; do echo $s; done
+- error=1
+-fi
++check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so
++check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so
+
+ exit $error
diff --git a/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild b/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild
new file mode 100644
index 000000000000..408d9378d6c6
--- /dev/null
+++ b/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils libtool multilib-minimal
+
+DESCRIPTION="library for decoding mpeg-2 and mpeg-1 video"
+HOMEPAGE="http://libmpeg2.sourceforge.net/"
+SRC_URI="http://libmpeg2.sourceforge.net/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
+IUSE="sdl static-libs X"
+
+RDEPEND="sdl? ( media-libs/libsdl )
+ X? ( x11-libs/libXv
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXt )
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r9
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xextproto )"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-arm-private-symbols.patch \
+ "${FILESDIR}"/${P}-global-symbol-test.patch \
+ "${FILESDIR}"/${P}-armv4l.patch
+ elibtoolize
+ ### PowerPC fix for altivec
+ epatch "${FILESDIR}"/${P}-altivec.patch
+ eautoconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ $(multilib_native_use_enable sdl) \
+ $(multilib_native_use_with X x)
+
+ # remove useless subdirs
+ if ! multilib_is_native_abi ; then
+ sed -i \
+ -e 's/ libvo src//' \
+ Makefile || die
+ fi
+}
+
+multilib_src_compile() {
+ emake OPT_CFLAGS="${CFLAGS}" \
+ MPEG2DEC_CFLAGS="${CFLAGS}" \
+ LIBMPEG2_CFLAGS=""
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+}
diff --git a/media-libs/libmpeg2/metadata.xml b/media-libs/libmpeg2/metadata.xml
new file mode 100644
index 000000000000..4264daa9a550
--- /dev/null
+++ b/media-libs/libmpeg2/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libmpeg2</remote-id>
+ </upstream>
+</pkgmetadata>