pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/pkg-config Add cross-compilation support: reallo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f8c9a120112b
branches:  trunk
changeset: 530663:f8c9a120112b
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Jul 03 17:42:58 2007 +0000

description:
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:

 devel/pkg-config/Makefile         |    6 +-
 devel/pkg-config/distinfo         |    3 +-
 devel/pkg-config/patches/patch-ag |  196 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 203 insertions(+), 2 deletions(-)

diffs (234 lines):

diff -r 6fd6aad479fd -r f8c9a120112b devel/pkg-config/Makefile
--- a/devel/pkg-config/Makefile Tue Jul 03 17:30:28 2007 +0000
+++ b/devel/pkg-config/Makefile Tue Jul 03 17:42:58 2007 +0000
@@ -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 @@
 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 -r 6fd6aad479fd -r f8c9a120112b devel/pkg-config/distinfo
--- a/devel/pkg-config/distinfo Tue Jul 03 17:30:28 2007 +0000
+++ b/devel/pkg-config/distinfo Tue Jul 03 17:42:58 2007 +0000
@@ -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-ad) = 9000209dc393925bb1750ffacdbb15f0edbf4729
 SHA1 (patch-ae) = b924f64ee3c7ef9f3efe6d83b60bc0a6fbe1f26d
 SHA1 (patch-af) = 1186777da42151583594fd137e135ef6a77ee09f
+SHA1 (patch-ag) = 507ace528c51cb544c3ee8a05c2a36882828bb77
diff -r 6fd6aad479fd -r f8c9a120112b devel/pkg-config/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pkg-config/patches/patch-ag Tue Jul 03 17:42:58 2007 +0000
@@ -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



Home | Main Index | Thread Index | Old Index