diff options
author | grant <grant@pkgsrc.org> | 2005-08-20 11:44:09 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2005-08-20 11:44:09 +0000 |
commit | 756716bbec3ca1665c6762b7fa08c26514cd2901 (patch) | |
tree | 5f6c85f44cb8a8ddea19ec75c78f120cf41e3682 /multimedia/libmpeg2 | |
parent | f090d9cc710614492349e196abaa04574f0dda01 (diff) | |
download | pkgsrc-756716bbec3ca1665c6762b7fa08c26514cd2901.tar.gz |
don't assume a shared library can be built from non-PIC code.
Diffstat (limited to 'multimedia/libmpeg2')
-rw-r--r-- | multimedia/libmpeg2/Makefile | 10 | ||||
-rw-r--r-- | multimedia/libmpeg2/distinfo | 4 | ||||
-rw-r--r-- | multimedia/libmpeg2/patches/patch-aa | 53 |
3 files changed, 60 insertions, 7 deletions
diff --git a/multimedia/libmpeg2/Makefile b/multimedia/libmpeg2/Makefile index 096f7e8a2bb..52698b1df74 100644 --- a/multimedia/libmpeg2/Makefile +++ b/multimedia/libmpeg2/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2005/08/10 20:56:20 jlam Exp $ +# $NetBSD: Makefile,v 1.11 2005/08/20 11:44:09 grant Exp $ DISTNAME= mpeg2dec-0.4.0b PKGNAME= libmpeg2-0.4.0b @@ -24,5 +24,13 @@ PKGCONFIG_OVERRIDE+= libmpeg2/libmpeg2.pc.in CONFIGURE_ARGS+= --enable-shared +.include "../../mk/bsd.prefs.mk" + +.if ${MACHINE_ARCH} == "i386" +. if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux" +CONFIGURE_ENV+= LIBMPEG2_CFLAGS=-prefer-non-pic +. endif +.endif + .include "../../devel/SDL/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/multimedia/libmpeg2/distinfo b/multimedia/libmpeg2/distinfo index c47ca033463..8f20945c136 100644 --- a/multimedia/libmpeg2/distinfo +++ b/multimedia/libmpeg2/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.6 2005/08/10 20:18:18 adam Exp $ +$NetBSD: distinfo,v 1.7 2005/08/20 11:44:09 grant Exp $ SHA1 (mpeg2dec-0.4.0b.tar.gz) = 7ad99a810802f216893022fa14fa078ac49d67d7 RMD160 (mpeg2dec-0.4.0b.tar.gz) = 44df6c21e88d2c3029ef418ea46e2d6796c90004 Size (mpeg2dec-0.4.0b.tar.gz) = 473846 bytes -SHA1 (patch-aa) = 4a4ae2ac7a227386b52387782fd1bdef841ebdef +SHA1 (patch-aa) = d70e401272fe1f87a1a1866248caabe8fab77193 diff --git a/multimedia/libmpeg2/patches/patch-aa b/multimedia/libmpeg2/patches/patch-aa index 197cc6e3593..bbb89d8e05f 100644 --- a/multimedia/libmpeg2/patches/patch-aa +++ b/multimedia/libmpeg2/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.3 2005/08/10 20:18:19 adam Exp $ +$NetBSD: patch-aa,v 1.4 2005/08/20 11:44:09 grant Exp $ ---- configure.orig 2003-12-23 13:07:34.000000000 +0100 -+++ configure 2005-08-10 22:06:09.000000000 +0200 -@@ -3851,7 +3851,7 @@ +--- configure.orig 2003-12-23 23:07:34.000000000 +1100 ++++ configure +@@ -3851,7 +3851,7 @@ echo "${ECHO_T}$ac_cv_try_cflags_ok" >&6 TRY_CFLAGS=`echo "$OPT_CFLAGS $CFLAGS"|sed "s/-O[0-9]*//g"` @@ -11,3 +11,48 @@ $NetBSD: patch-aa,v 1.3 2005/08/10 20:18:19 adam Exp $ echo "$as_me:$LINENO: checking if $CC supports $TRY_CFLAGS flags" >&5 echo $ECHO_N "checking if $CC supports $TRY_CFLAGS flags... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" +@@ -24534,25 +24534,25 @@ done + + + +-echo "$as_me:$LINENO: checking if libtool supports -prefer-non-pic flag" >&5 +-echo $ECHO_N "checking if libtool supports -prefer-non-pic flag... $ECHO_C" >&6 +- mkdir ac_test_libtool; cd ac_test_libtool; ac_cv_libtool_non_pic=no +- echo "int g (int i); int f (int i) {return g (i);}" >f.c +- echo "int (* hook) (int) = 0; int g (int i) {if (hook) i = hook (i); return i + 1;}" >g.c +- ../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \ +- -c f.c >/dev/null 2>&1 && \ +- ../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \ +- -c g.c >/dev/null 2>&1 && \ +- ../libtool --mode=link $CC $CFLAGS -prefer-non-pic -o libfoo.la \ +- -rpath / f.lo g.lo >/dev/null 2>&1 && +- ac_cv_libtool_non_pic=yes +- cd ..; rm -fr ac_test_libtool; echo "$as_me:$LINENO: result: $ac_cv_libtool_non_pic" >&5 +-echo "${ECHO_T}$ac_cv_libtool_non_pic" >&6 +- if test x"$ac_cv_libtool_non_pic" = x"yes"; then +- LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -prefer-non-pic" +- else +- : +- fi ++#echo "$as_me:$LINENO: checking if libtool supports -prefer-non-pic flag" >&5 ++#echo $ECHO_N "checking if libtool supports -prefer-non-pic flag... $ECHO_C" >&6 ++# mkdir ac_test_libtool; cd ac_test_libtool; ac_cv_libtool_non_pic=no ++# echo "int g (int i); int f (int i) {return g (i);}" >f.c ++# echo "int (* hook) (int) = 0; int g (int i) {if (hook) i = hook (i); return i + 1;}" >g.c ++# ../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \ ++# -c f.c >/dev/null 2>&1 && \ ++# ../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \ ++# -c g.c >/dev/null 2>&1 && \ ++# ../libtool --mode=link $CC $CFLAGS -prefer-non-pic -o libfoo.la \ ++# -rpath / f.lo g.lo >/dev/null 2>&1 && ++# ac_cv_libtool_non_pic=yes ++# cd ..; rm -fr ac_test_libtool; echo "$as_me:$LINENO: result: $ac_cv_libtool_non_pic" >&5 ++#echo "${ECHO_T}$ac_cv_libtool_non_pic" >&6 ++# if test x"$ac_cv_libtool_non_pic" = x"yes"; then ++# LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -prefer-non-pic" ++# else ++# : ++# fi + + # Check whether --enable-accel-detect or --disable-accel-detect was given. + if test "${enable_accel_detect+set}" = set; then |