diff options
author | joerg <joerg@pkgsrc.org> | 2007-07-03 17:42:58 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-07-03 17:42:58 +0000 |
commit | 812dd65cb33a19fc6f03358e7e15bada8f98f812 (patch) | |
tree | 26ce148cc9f6ae168e3bf9bb2162ee21d8507c51 /devel/pkg-config | |
parent | b215af3fc82493e98b699ebfe59c5c83ea4685ea (diff) | |
download | pkgsrc-812dd65cb33a19fc6f03358e7e15bada8f98f812.tar.gz |
Add cross-compilation support: realloc(NULL, x) works as expected
on NetBSD, just assume that anything follows the ELF semantic and
has no leading underscore. This doesn't matter much as the module
support of glib is not used by pkg-config. Patch away the check for
ANSI library flags as we only support ANSI C compiler anyway. Move
the checks for the various inline keywords to compile-only. Always
fake the poll results, it doesn't really matter either.
Diffstat (limited to 'devel/pkg-config')
-rw-r--r-- | devel/pkg-config/Makefile | 6 | ||||
-rw-r--r-- | devel/pkg-config/distinfo | 3 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-ag | 196 |
3 files changed, 203 insertions, 2 deletions
diff --git a/devel/pkg-config/Makefile b/devel/pkg-config/Makefile index c93396d24c3..dac604a8f4d 100644 --- a/devel/pkg-config/Makefile +++ b/devel/pkg-config/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2007/06/01 19:03:46 wiz Exp $ +# $NetBSD: Makefile,v 1.9 2007/07/03 17:42:58 joerg Exp $ # DISTNAME= pkg-config-0.21 @@ -27,6 +27,10 @@ CONFLICTS= pkgconfig-[0-9]* CONFIGURE_ARGS+= --cache-file=/dev/null .endif +.if ${OPSYS} == "NetBSD" +CONFIGURE_ARGS+= glib_cv_sane_realloc=yes glib_cv_uscore=no +.endif + # needed for fifth test case BUILDLINK_PASSTHRU_DIRS= /private-dep /public-dep /requires-test TEST_TARGET= check diff --git a/devel/pkg-config/distinfo b/devel/pkg-config/distinfo index bc2eb9c5578..659e22df69e 100644 --- a/devel/pkg-config/distinfo +++ b/devel/pkg-config/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2007/06/01 19:03:46 wiz Exp $ +$NetBSD: distinfo,v 1.9 2007/07/03 17:42:58 joerg Exp $ SHA1 (pkg-config-0.21.tar.gz) = b2508ba8404cad46ec42f6f58cbca43ae59d715f RMD160 (pkg-config-0.21.tar.gz) = 6d48e449a3cedb576c0f54b08825be6ab684d955 @@ -9,3 +9,4 @@ SHA1 (patch-ac) = a8a4cfa7b6e9052b0c111088c6d8ede810d61752 SHA1 (patch-ad) = 9000209dc393925bb1750ffacdbb15f0edbf4729 SHA1 (patch-ae) = b924f64ee3c7ef9f3efe6d83b60bc0a6fbe1f26d SHA1 (patch-af) = 1186777da42151583594fd137e135ef6a77ee09f +SHA1 (patch-ag) = 507ace528c51cb544c3ee8a05c2a36882828bb77 diff --git a/devel/pkg-config/patches/patch-ag b/devel/pkg-config/patches/patch-ag new file mode 100644 index 00000000000..d2057f878c0 --- /dev/null +++ b/devel/pkg-config/patches/patch-ag @@ -0,0 +1,196 @@ +$NetBSD: patch-ag,v 1.1 2007/07/03 17:42:58 joerg Exp $ + +The last chunk is slightly bogus as it hard-codes the NetBSD values. +Since pkg-config doesn't use the event model of glib-1.2, this is +irrelevant. + +--- glib-1.2.8/configure.orig 2006-08-16 20:24:36.000000000 +0200 ++++ glib-1.2.8/configure +@@ -19728,6 +19728,7 @@ if test "x$GCC" = "xyes"; then + fi + fi + ++if false; then + echo "$as_me:$LINENO: checking for extra flags to get ANSI library prototypes" >&5 + echo $ECHO_N "checking for extra flags to get ANSI library prototypes... $ECHO_C" >&6 + glib_save_LIBS=$LIBS +@@ -19818,6 +19819,7 @@ fi + rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + LIBS=$glib_save_LIBS ++fi + + echo "$as_me:$LINENO: checking for extra flags for POSIX compliance" >&5 + echo $ECHO_N "checking for extra flags for POSIX compliance... $ECHO_C" >&6 +@@ -22938,7 +22940,7 @@ if test "${glib_cv_has__inline+set}" = s + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = XXX; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +@@ -22961,12 +22963,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); }; then + glib_cv_has__inline=yes + + else +@@ -22997,7 +22994,7 @@ if test "${glib_cv_has__inline__+set}" = + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = XXX; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +@@ -23020,12 +23017,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); }; then + glib_cv_has__inline__=yes + + else +@@ -23056,7 +23048,7 @@ if test "${glib_cv_hasinline+set}" = set + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = XXX; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +@@ -23079,12 +23071,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); }; then + glib_cv_hasinline=yes + + else +@@ -25638,7 +25625,7 @@ if test "${glib_cv_va_copy+set}" = set; + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = XXX; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +@@ -25671,12 +25658,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); }; then + glib_cv_va_copy=yes + + else +@@ -25701,7 +25683,7 @@ if test "${glib_cv___va_copy+set}" = set + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = XXX; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +@@ -25734,12 +25716,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); }; then + glib_cv___va_copy=yes + + else +@@ -25764,7 +25741,7 @@ if test "${glib_cv_va_val_copy+set}" = s + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = XXX; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +@@ -25797,12 +25774,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); }; then + glib_cv_va_val_copy=yes + + else +@@ -28203,7 +28175,7 @@ for glib_sysdef_input in POLLIN:1 POLLOU + echo "#endif" >>confrun.c + done + echo "return 0; }" >>confrun.c +-if test "$cross_compiling" = yes; then ++if test "$cross_compiling" = XXX; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot run test program while cross compiling +@@ -28223,12 +28195,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ (exit $ac_status); } && { ++ if test "$cross_compiling" = yes; then ++ echo '#define GLIB_SYSDEF_POLLIN =1' >> glibconfig-sysdefs.h ++ echo '#define GLIB_SYSDEF_POLLOUT =4' >> glibconfig-sysdefs.h ++ echo '#define GLIB_SYSDEF_POLLPRI =2' >> glibconfig-sysdefs.h ++ echo '#define GLIB_SYSDEF_POLLERR =8' >> glibconfig-sysdefs.h ++ echo '#define GLIB_SYSDEF_POLLHUP =16' >> glibconfig-sysdefs.h ++ echo '#define GLIB_SYSDEF_POLLNVAL =32' >> glibconfig-sysdefs.h ++ else ++ ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); }; ++ fi }; then + echo "$as_me:$LINENO: result: done" >&5 + echo "${ECHO_T}done" >&6 + else |