--- /dev/null +++ portage/media-libs/libmpeg2/files/libmpeg2-0.5.1-pic.patch @@ -0,0 +1,56 @@ +--- libmpeg2-0.5.1/configure.ac ++++ libmpeg2-0.5.1/configure.ac +@@ -124,6 +124,12 @@ fi + + AM_CONDITIONAL(ARCH_ARM, ${arm_conditional}) + ++AC_ARG_ENABLE([arm-asm], ++ [ --disable-arm-asm disable non-PIC ARM assembly code]) ++if test x"$enable_arm_asm" = x"no"; then ++ AC_DEFINE([ARM_NO_ASM],,[disable non-PIC ARM assembly code]) ++fi ++ + dnl Checks for libtool - this must be done after we set cflags + AC_LIBTOOL_WIN32_DLL + AC_PROG_LIBTOOL +--- libmpeg2-0.5.1/libmpeg2/motion_comp.c ++++ libmpeg2-0.5.1/libmpeg2/motion_comp.c +@@ -57,7 +57,7 @@ void mpeg2_mc_init (uint32_t accel) + mpeg2_mc = mpeg2_mc_vis; + else + #endif +-#ifdef ARCH_ARM ++#if defined(ARCH_ARM) && !defined(ARM_NO_ASM) + if (accel & MPEG2_ACCEL_ARM) { + mpeg2_mc = mpeg2_mc_arm; + } else +--- libmpeg2-0.5.1.orig/libmpeg2/motion_comp_arm.c ++++ libmpeg2-0.5.1/libmpeg2/motion_comp_arm.c +@@ -22,7 +22,7 @@ + + #include "config.h" + +-#ifdef ARCH_ARM ++#if defined(ARCH_ARM) && !defined(ARM_NO_ASM) + + #include + +--- libmpeg2-0.5.1/libmpeg2/motion_comp_arm_s.S ++++ libmpeg2-0.5.1/libmpeg2/motion_comp_arm_s.S +@@ -18,6 +18,10 @@ + @ along with mpeg2dec; if not, write to the Free Software + @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ++#include "config.h" ++ ++@ Allow disabling of asm ++#ifndef ARM_NO_ASM + + @ Data preload is supported only by ARM V5TE and above + +@@ -335,3 +339,5 @@ MC_put_x_8_arm_align_jt: + .word MC_put_x_8_arm_align1 + .word MC_put_x_8_arm_align2 + .word MC_put_x_8_arm_align3 ++ ++#endif --- portage.orig/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild +++ portage/media-libs/libmpeg2/libmpeg2-0.5.1-r2.ebuild @@ -13,7 +13,7 @@ SRC_URI="http://libmpeg2.sourceforge.net LICENSE="GPL-2" SLOT="0" KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" -IUSE="sdl static-libs X" +IUSE="pic sdl static-libs X" RDEPEND="sdl? ( media-libs/libsdl ) X? ( x11-libs/libXv @@ -31,8 +31,10 @@ src_prepare() { epatch \ "${FILESDIR}"/${P}-arm-private-symbols.patch \ "${FILESDIR}"/${P}-global-symbol-test.patch \ - "${FILESDIR}"/${P}-armv4l.patch + "${FILESDIR}"/${P}-armv4l.patch \ + "${FILESDIR}"/${P}-pic.patch elibtoolize + eautoheader ### PowerPC fix for altivec epatch "${FILESDIR}"/${P}-altivec.patch eautoconf @@ -44,7 +46,8 @@ multilib_src_configure() { $(use_enable static-libs static) \ --enable-shared \ $(multilib_native_use_enable sdl) \ - $(multilib_native_use_with X x) + $(multilib_native_use_with X x) \ + $(usex pic --disable-arm-asm) # remove useless subdirs if ! multilib_is_native_abi ; then