pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/pkg-config pkg-config: Fix build on SunOS C99.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/859e8fd82596
branches:  trunk
changeset: 314343:859e8fd82596
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Oct 25 09:47:19 2018 +0000

description:
pkg-config: Fix build on SunOS C99.

diffstat:

 devel/pkg-config/distinfo                     |   4 +-
 devel/pkg-config/patches/patch-glib_configure |  52 ++++++++++++++++++++++++--
 2 files changed, 50 insertions(+), 6 deletions(-)

diffs (91 lines):

diff -r e190dc1587fd -r 859e8fd82596 devel/pkg-config/distinfo
--- a/devel/pkg-config/distinfo Thu Oct 25 09:10:01 2018 +0000
+++ b/devel/pkg-config/distinfo Thu Oct 25 09:47:19 2018 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.35 2017/05/05 01:19:35 mef Exp $
+$NetBSD: distinfo,v 1.36 2018/10/25 09:47:19 jperkin Exp $
 
 SHA1 (pkg-config-0.29.2.tar.gz) = 76e501663b29cb7580245720edfb6106164fad2b
 RMD160 (pkg-config-0.29.2.tar.gz) = 31e6a17810893d95fd33967c2e433beb2175cd8a
 SHA512 (pkg-config-0.29.2.tar.gz) = 4861ec6428fead416f5cbbbb0bbad10b9152967e481d4b0ff2eb396a9f297f552984c9bb72f6864a37dcd8fca1d9ccceda3ef18d8f121938dbe4fdf2b870fe75
 Size (pkg-config-0.29.2.tar.gz) = 2016830 bytes
 SHA1 (patch-configure) = 6847644b9df3e3e2334f7c45bcbb2d3b7734d165
-SHA1 (patch-glib_configure) = 5080a19186a948ba305278cef91ec76a920429e4
+SHA1 (patch-glib_configure) = e31362f713f3634e75e33bf215bf8d6217ccaddb
 SHA1 (patch-glib_glib_gtimer.c) = ee877a6c148b148a86f9087960863cfa8305bbf7
diff -r e190dc1587fd -r 859e8fd82596 devel/pkg-config/patches/patch-glib_configure
--- a/devel/pkg-config/patches/patch-glib_configure     Thu Oct 25 09:10:01 2018 +0000
+++ b/devel/pkg-config/patches/patch-glib_configure     Thu Oct 25 09:47:19 2018 +0000
@@ -1,12 +1,12 @@
-$NetBSD: patch-glib_configure,v 1.4 2015/10/17 09:50:48 tnn Exp $
+$NetBSD: patch-glib_configure,v 1.5 2018/10/25 09:47:19 jperkin Exp $
 
 Fix unportable test construct.
 Disable Carbon support in the bundled glib. It does not link correctly
 with the Frameworks and pkg-config should not need any of those features.
 
---- glib/configure.orig        2015-09-27 14:07:16.000000000 +0000
+--- glib/configure.orig        2017-03-19 14:57:03.000000000 +0000
 +++ glib/configure
-@@ -5298,6 +5298,7 @@ $as_echo_n "checking for Mac OS X Carbon
+@@ -5306,6 +5306,7 @@ $as_echo_n "checking for Mac OS X Carbon
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
@@ -14,7 +14,7 @@
  #include <Carbon/Carbon.h>
  #include <CoreServices/CoreServices.h>
  
-@@ -5885,7 +5886,7 @@ else
+@@ -5893,7 +5894,7 @@ else
    ENABLE_ALWAYS_BUILD_TESTS_FALSE=
  fi
  
@@ -23,3 +23,47 @@
      installed_test_metadir=${datadir}/installed-tests/glib
  
      installed_testdir=${libexecdir}/installed-tests/glib
+@@ -23334,16 +23335,34 @@ fi
+ 
+ case $host in
+   *-*-solaris* )
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SunOS C99" >&5
++      $as_echo_n "checking for SunOS C99... " >&6; }
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++#if __STDC_VERSION__-0 < 199901L
++#error not C99
++#endif
+ 
+-$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
+-
+-
+-$as_echo "#define _XOPEN_SOURCE 2" >>confdefs.h
+-
+-
+-$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+-
+-     ;;
++int main()
++{
++  return 0;
++}
++_ACEOF
++    if ac_fn_c_try_compile "$LINENO"; then
++      g_have_sunos_c99=yes
++    else
++      g_have_sunos_c99=no
++    fi
++    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $g_have_sunos_c99" >&5
++      $as_echo "$g_have_sunos_c99" >&6; }
++    if test $g_have_sunos_c99 = yes; then
++      $as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
++    else
++      $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
++      $as_echo "#define _XOPEN_SOURCE 2" >>confdefs.h
++    fi
++    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
++    ;;
+ esac
+ 
+ if test "$ac_cv_func_statfs" = yes; then :



Home | Main Index | Thread Index | Old Index