summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2009-07-24 22:33:35 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2009-07-24 22:33:35 +0000
commitd25ce3074ec94bb9259a325f4df14dbe0ddbc89c (patch)
tree4ef4bd99214a12050332ffb7c6205ffe1168ffa6 /media-libs/libmpeg2
parentRespecting CC variable, closes bug #243906, Minor QA fixes (diff)
downloadgentoo-2-d25ce3074ec94bb9259a325f4df14dbe0ddbc89c.tar.gz
gentoo-2-d25ce3074ec94bb9259a325f4df14dbe0ddbc89c.tar.bz2
gentoo-2-d25ce3074ec94bb9259a325f4df14dbe0ddbc89c.zip
Set visibility of global symbols used in ARM specific assembly file to internal. Rewrite the public symbol check to verify the shared libraries, to check for more things, and to avoid duplication; fixes make check on ARM.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/libmpeg2')
-rw-r--r--media-libs/libmpeg2/ChangeLog13
-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-global-symbol-test.patch60
-rw-r--r--media-libs/libmpeg2/libmpeg2-0.5.1-r1.ebuild47
4 files changed, 163 insertions, 1 deletions
diff --git a/media-libs/libmpeg2/ChangeLog b/media-libs/libmpeg2/ChangeLog
index c92d3574a658..12d2da197401 100644
--- a/media-libs/libmpeg2/ChangeLog
+++ b/media-libs/libmpeg2/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for media-libs/libmpeg2
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libmpeg2/ChangeLog,v 1.71 2009/02/18 19:03:52 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libmpeg2/ChangeLog,v 1.72 2009/07/24 22:33:34 ssuominen Exp $
+
+*libmpeg2-0.5.1-r1 (24 Jul 2009)
+
+ 24 Jul 2009; Samuli Suominen <ssuominen@gentoo.org>
+ +libmpeg2-0.5.1-r1.ebuild,
+ +files/libmpeg2-0.5.1-arm-private-symbols.patch,
+ +files/libmpeg2-0.5.1-global-symbol-test.patch:
+ Set visibility of global symbols used in ARM specific assembly file to
+ internal. Rewrite the public symbol check to verify the shared libraries,
+ to check for more things, and to avoid duplication; fixes make check on
+ ARM.
18 Feb 2009; Raúl Porcel <armin76@gentoo.org> libmpeg2-0.5.1.ebuild:
ia64/sh/sparc stable wrt #255151
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-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-r1.ebuild b/media-libs/libmpeg2/libmpeg2-0.5.1-r1.ebuild
new file mode 100644
index 000000000000..636c9639ccde
--- /dev/null
+++ b/media-libs/libmpeg2/libmpeg2-0.5.1-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libmpeg2/libmpeg2-0.5.1-r1.ebuild,v 1.1 2009/07/24 22:33:34 ssuominen Exp $
+
+EAPI=2
+inherit eutils libtool
+
+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 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="sdl X"
+
+RDEPEND="sdl? ( media-libs/libsdl )
+ X? ( x11-libs/libXv
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xextproto )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-arm-private-symbols.patch \
+ "${FILESDIR}"/${P}-global-symbol-test.patch
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --disable-dependency-tracking \
+ $(use_enable sdl) \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake OPT_CFLAGS="${CFLAGS}" MPEG2DEC_CFLAGS="${CFLAGS}" \
+ LIBMPEG2_CFLAGS="" || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}