SF.net SVN: gar:[24994] csw/mgar/pkg/json-c/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Wed May 20 11:57:21 CEST 2015


Revision: 24994
          http://sourceforge.net/p/gar/code/24994
Author:   dmichelsen
Date:     2015-05-20 09:57:20 +0000 (Wed, 20 May 2015)
Log Message:
-----------
json-c/trunk: Update to 0.12

Modified Paths:
--------------
    csw/mgar/pkg/json-c/trunk/Makefile
    csw/mgar/pkg/json-c/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/json-c/trunk/files/0001-Solaris-does-not-allow-POSIX-compliant-evaluation-in.patch
    csw/mgar/pkg/json-c/trunk/files/0002-Use-GCC-flags-only-when-compiling-with-GCC.patch

Modified: csw/mgar/pkg/json-c/trunk/Makefile
===================================================================
--- csw/mgar/pkg/json-c/trunk/Makefile	2015-05-20 07:59:55 UTC (rev 24993)
+++ csw/mgar/pkg/json-c/trunk/Makefile	2015-05-20 09:57:20 UTC (rev 24994)
@@ -2,45 +2,42 @@
 # TODO (release-critical prefixed with !, non release-critical with *)
 #
 NAME = json-c
-VERSION = 0.10
+VERSION = 0.12
 GARTYPE = v2
 
 DESCRIPTION = JSON objects in C
 define BLURB
-	JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects.
+  JSON-C implements a reference counting object model that allows you to easily construct JSON
+  objects in C, output them as JSON formatted strings and parse JSON formatted strings back
+  into the C representation of JSON objects.
 endef
 
-MASTER_SITES = https://s3.amazonaws.com/json-c_releases/releases/
-# GIT_REPOS = git://github.com/json-c/json-c.git
+MASTER_SITES += https://s3.amazonaws.com/json-c_releases/releases/
+#DISTFILES += $(DISTNAME).tar.gz
+DISTNAME = json-c-solaris
+DISTFILES += $(DISTNAME)-branch.zip
 
-DISTFILES  = $(DISTNAME).tar.gz
+# PATCHFILES = 0001-allow-to-use-public-vasprintf-symbol.patch
 
-GARCOMPILER = GCC4
+# Use these patches until this is merged:
+#   https://github.com/json-c/json-c/pull/184
+#PATCHFILES += 0001-Solaris-does-not-allow-POSIX-compliant-evaluation-in.patch
+#PATCHFILES += 0002-Use-GCC-flags-only-when-compiling-with-GCC.patch
 
-PATCHFILES = 0001-allow-to-use-public-vasprintf-symbol.patch
+PACKAGES += CSWlibjson-c3
+PKGFILES_CSWlibjson-c3 += $(call pkgfiles_lib,libjson-c.so.3)
+SPKG_DESC_CSWlibjson-c3 += $(DESCRIPTION), libjson-c.so.3
 
-PACKAGES += CSWlibjson0
-CATALOGNAME_CSWlibjson0 = libjson0
-PKGFILES_CSWlibjson0 += $(call baseisadirs,$(libdir),libjson\.so\.0\.1\.0)
-PKGFILES_CSWlibjson0 += $(call baseisadirs,$(libdir),libjson\.so\.0(\.\d+)*)
-SPKG_DESC_CSWlibjson0 += $(DESCRIPTION), libjson.so.0
-RUNTIME_DEP_PKGS_CSWlibjson0 += CSWlibgcc-s1
-
 PACKAGES += CSWjson-c-dev
-CATALOGNAME_CSWjson-c-dev = json_c_dev
 SPKG_DESC_CSWjson-c-dev += $(DESCRIPTION), development files
-PKGFILES_CSWjson-c-dev += $(PKGFILES_DEVEL)
-RUNTIME_DEP_PKGS_CSWjson-c-dev += CSWlibjson0
+# PKGFILES_CSWjson-c-dev += $(PKGFILES_DEVEL)
+# PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWjson-c-dev += CSWlibjson-c3
 
-# vasprintf test failes with: 
-# symbol belongs to unavailable version /lib/libc.so (SUNW_1.22.7)
-# EXTRA_CONFIGURE_ENV = LD_OPTIONS=
+BUILD64 = 1
 
-# EXTRA_CFLAGS = -xnorunpath
-
-SKIPTEST = 1
-
-CONFIGURE_ARGS = $(DIRPATHS)
-
 include gar/category.mk
 
+post-patch:
+	cd $(WORKSRC) && ./autogen.sh
+	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/json-c/trunk/checksums
===================================================================
--- csw/mgar/pkg/json-c/trunk/checksums	2015-05-20 07:59:55 UTC (rev 24993)
+++ csw/mgar/pkg/json-c/trunk/checksums	2015-05-20 09:57:20 UTC (rev 24994)
@@ -1 +1 @@
-a4edc79410eb894f08d7d52ca9f88732  json-c-0.10.tar.gz
+ed4454c1288495a1bc88c4854759a44f  json-c-solaris-branch.zip

Added: csw/mgar/pkg/json-c/trunk/files/0001-Solaris-does-not-allow-POSIX-compliant-evaluation-in.patch
===================================================================
--- csw/mgar/pkg/json-c/trunk/files/0001-Solaris-does-not-allow-POSIX-compliant-evaluation-in.patch	                        (rev 0)
+++ csw/mgar/pkg/json-c/trunk/files/0001-Solaris-does-not-allow-POSIX-compliant-evaluation-in.patch	2015-05-20 09:57:20 UTC (rev 24994)
@@ -0,0 +1,34 @@
+From f569cf434198371211f411659f828c5d06c71e4d Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 20 May 2015 11:08:48 +0200
+Subject: [PATCH 1/2] Solaris does not allow POSIX-compliant evaluation in sh
+
+---
+ tests/test-defs.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test-defs.sh b/tests/test-defs.sh
+index 658a75d..09368ae 100755
+--- a/tests/test-defs.sh
++++ b/tests/test-defs.sh
+@@ -41,7 +41,7 @@ esac
+ 
+ rm -rf "$testsubdir" > /dev/null 2>&1
+ mkdir -p "$testsubdir"
+-CURDIR=$(pwd)
++CURDIR=`pwd`
+ cd "$testsubdir" \
+    || { echo "Cannot make or change into $testsubdir"; exit 1; }
+ 
+@@ -50,7 +50,7 @@ echo "=== Running test $progname"
+ CMP="${CMP-cmp}"
+ 
+ use_valgrind=${USE_VALGRIND-1}
+-valgrind_path=$(which valgrind 2> /dev/null)
++valgrind_path=`which valgrind 2> /dev/null`
+ if [ -z "${valgrind_path}" -o ! -x "${valgrind_path}" ] ; then
+ 	use_valgrind=0
+ fi
+-- 
+2.3.3
+

Added: csw/mgar/pkg/json-c/trunk/files/0002-Use-GCC-flags-only-when-compiling-with-GCC.patch
===================================================================
--- csw/mgar/pkg/json-c/trunk/files/0002-Use-GCC-flags-only-when-compiling-with-GCC.patch	                        (rev 0)
+++ csw/mgar/pkg/json-c/trunk/files/0002-Use-GCC-flags-only-when-compiling-with-GCC.patch	2015-05-20 09:57:20 UTC (rev 24994)
@@ -0,0 +1,118 @@
+From 3f0a36362d8b429dcb6795e7b80db6a8f78ee0ca Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 20 May 2015 11:22:42 +0200
+Subject: [PATCH 2/2] Use GCC flags only when compiling with GCC
+
+---
+ Makefile.am       |  2 --
+ Makefile.am.inc   |  2 --
+ config.h.in       |  6 +-----
+ configure.ac      | 32 +++++++++++++++++++++++++++-----
+ tests/Makefile.am |  2 --
+ 5 files changed, 28 insertions(+), 16 deletions(-)
+ delete mode 100644 Makefile.am.inc
+
+diff --git a/Makefile.am b/Makefile.am
+index 63781c0..451cb08 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-include Makefile.am.inc
+-
+ EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc json-c.vcproj
+ SUBDIRS = . tests
+ 
+diff --git a/Makefile.am.inc b/Makefile.am.inc
+deleted file mode 100644
+index fec591b..0000000
+--- a/Makefile.am.inc
++++ /dev/null
+@@ -1,2 +0,0 @@
+-AM_CFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
+-
+diff --git a/config.h.in b/config.h.in
+index af2e5fc..933594f 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -130,13 +130,9 @@
+ /* Public define for json_inttypes.h */
+ #undef JSON_C_HAVE_INTTYPES_H
+ 
+-/* Define to the sub-directory in which libtool stores uninstalled libraries.
+-   */
++/* Define to the sub-directory where libtool stores uninstalled libraries. */
+ #undef LT_OBJDIR
+ 
+-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+-#undef NO_MINUS_C_MINUS_O
+-
+ /* Name of package */
+ #undef PACKAGE
+ 
+diff --git a/configure.ac b/configure.ac
+index 37f9657..77bf4be 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,22 +24,44 @@ fi
+ # enable silent build by default
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes]]))
+ 
++# Checks for typedefs, structures, and compiler characteristics.
++AC_PROG_CC
++AM_PROG_CC_C_O
++
++dnl Try to detect/use GNU features
++CFLAGS="$CFLAGS -D_GNU_SOURCE"
++
++dnl which flags does the compiler support?
++if test "x$GCC" = "xyes"; then
++  for flag in -Wall -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -Werror; do
++    oCFLAGS="$CFLAGS"
++    CFLAGS="$CFLAGS $flag"
++    cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[[^A-Za-z]]/_/g'`
++    AC_CACHE_CHECK([if gcc likes the $flag flag], $cachename,
++       [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0 ]])],[eval $cachename=yes],[eval $cachename=no])])
++    if eval test \$$cachename = no; then
++         CFLAGS="$oCFLAGS"
++    fi
++  done
++fi
++
++dnl We need the definition, probably detect by testing the required function
++CFLAGS="$CFLAGS -D_REENTRANT"
++
++AC_C_CONST
++AC_TYPE_SIZE_T
++
+ # Checks for programs.
+ 
+ # Checks for libraries.
+ 
+ # Checks for header files.
+-AM_PROG_CC_C_O
+ AC_CONFIG_HEADER(config.h)
+ AC_CONFIG_HEADER(json_config.h)
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/cdefs.h] [sys/param.h] stdarg.h locale.h endian.h)
+ AC_CHECK_HEADER(inttypes.h,[AC_DEFINE([JSON_C_HAVE_INTTYPES_H],[1],[Public define for json_inttypes.h])])
+ 
+-# Checks for typedefs, structures, and compiler characteristics.
+-AC_C_CONST
+-AC_TYPE_SIZE_T
+-
+ # Checks for library functions.
+ AC_FUNC_VPRINTF
+ AC_FUNC_MEMCMP
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index a388eeb..aef7c29 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -1,5 +1,3 @@
+-
+-include ../Makefile.am.inc
+ LDADD= $(LIBJSON_LA)
+ 
+ LIBJSON_LA=$(top_builddir)/libjson-c.la
+-- 
+2.3.3
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list