[gdal] 04/05: Use upstream patch for external json-c fix.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun Apr 3 18:52:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository gdal.

commit 91e6721df46cdf5eb8969eed116b2e33903cb0ff
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Apr 3 20:12:19 2016 +0200

    Use upstream patch for external json-c fix.
---
 debian/patches/libjson-c.patch           | 22 -------
 debian/patches/r33882-link-libjson.patch | 98 ++++++++++++++++++++++++++++++++
 debian/patches/series                    |  2 +-
 3 files changed, 99 insertions(+), 23 deletions(-)

diff --git a/debian/patches/libjson-c.patch b/debian/patches/libjson-c.patch
deleted file mode 100644
index 7411b51..0000000
--- a/debian/patches/libjson-c.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Link to external json-c.
- Missing link caused build failure :
- .
- /usr/bin/ld: .libs/gdalinfo.o: undefined reference to symbol 'json_object_new_int'
- //lib/x86_64-linux-gnu/libjson-c.so.2: error adding symbols: DSO missing from command line
- collect2: error: ld returned 1 exit status
-Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: https://trac.osgeo.org/gdal/ticket/6440
-
---- a/apps/GNUmakefile
-+++ b/apps/GNUmakefile
-@@ -30,6 +30,10 @@ ifeq ($(HAVE_GEOS),yes)
- CPPFLAGS 	:=	$(CPPFLAGS) -DHAVE_GEOS=1 $(GEOS_CFLAGS)
- endif
- 
-+ifeq ($(LIBJSONC_SETTING),external)
-+LNK_FLAGS :=	$(LNK_FLAGS) -ljson-c
-+endif
-+
- NON_DEFAULT_LIST = 	multireadtest$(EXE) dumpoverviews$(EXE) \
- 	gdalwarpsimple$(EXE) gdalflattenmask$(EXE) \
- 	gdaltorture$(EXE) gdal2ogr$(EXE) test_ogrsf$(EXE) \
diff --git a/debian/patches/r33882-link-libjson.patch b/debian/patches/r33882-link-libjson.patch
new file mode 100644
index 0000000..2c2d91c
--- /dev/null
+++ b/debian/patches/r33882-link-libjson.patch
@@ -0,0 +1,98 @@
+Description: When using external libjson, explictly link GDAL utilities
+ (particularly gdalinfo that directly uses libjson) against it
+ (derived from patch by Sebastian Couwenberg, #6440)
+Author: Even Rouault <even.rouault at mines-paris.org>
+Origin: https://trac.osgeo.org/gdal/changeset/33882
+Bug: https://trac.osgeo.org/gdal/ticket/6440
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gdal/+bug/1565475
+
+--- a/GDALmake.opt.in
++++ b/GDALmake.opt.in
+@@ -301,6 +301,7 @@ CURL_INC	=	@CURL_INC@
+ #
+ LIBJSONC_SETTING = @LIBJSONC_SETTING@
+ JSON_INCLUDE = @JSON_INCLUDE@
++LIBJSON_LINK = @LIBJSON_LINK@
+ 
+ # 
+ # OpenCL support
+--- a/apps/GNUmakefile
++++ b/apps/GNUmakefile
+@@ -30,6 +30,10 @@ ifeq ($(HAVE_GEOS),yes)
+ CPPFLAGS 	:=	$(CPPFLAGS) -DHAVE_GEOS=1 $(GEOS_CFLAGS)
+ endif
+ 
++ifeq ($(LIBJSONC_SETTING),external)
++LNK_FLAGS :=	$(LNK_FLAGS) $(LIBJSON_LINK)
++endif
++
+ NON_DEFAULT_LIST = 	multireadtest$(EXE) dumpoverviews$(EXE) \
+ 	gdalwarpsimple$(EXE) gdalflattenmask$(EXE) \
+ 	gdaltorture$(EXE) gdal2ogr$(EXE) test_ogrsf$(EXE) \
+--- a/configure
++++ b/configure
+@@ -662,6 +662,7 @@ POPPLER_HAS_OPTCONTENT
+ HAVE_POPPLER
+ PAM_SETTING
+ JSON_INCLUDE
++LIBJSON_LINK
+ LIBJSONC_SETTING
+ FREEXL_INCLUDE
+ HAVE_FREEXL
+@@ -28213,6 +28214,9 @@ else
+   LIBJSONC_SETTING=internal
+ fi
+ 
++  if test "$LIBJSONC_SETTING" = "external" ; then
++    LIBJSON_LINK="-ljson-c"
++  fi
+ elif test "$with_libjson_c" = "internal" ; then
+   LIBJSONC_SETTING=internal
+ elif test "$with_libjson_c" != "no"; then
+@@ -28259,6 +28263,9 @@ else
+   LIBJSONC_SETTING=internal
+ fi
+ 
++  if test "$LIBJSONC_SETTING" = "external" ; then
++    LIBJSON_LINK="-L$with_libjson_c/lib -ljson-c"
++  fi
+ else
+   as_fn_error $? "libjson-c (internal or external) is required" "$LINENO" 5
+ fi
+@@ -28284,6 +28291,8 @@ fi
+ 
+ LIBJSONC_SETTING=$LIBJSONC_SETTING
+ 
++LIBJSON_LINK=$LIBJSON_LINK
++
+ JSON_INCLUDE=$JSON_INCLUDE
+ 
+ 
+--- a/configure.in
++++ b/configure.in
+@@ -3503,11 +3503,17 @@ AC_ARG_WITH(libjson-c,[  --with-libjson-
+ 
+ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjson_c" = "yes" ; then
+   AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,)
++  if test "$LIBJSONC_SETTING" = "external" ; then
++    LIBJSON_LINK="-ljson-c"
++  fi
+ elif test "$with_libjson_c" = "internal" ; then
+   LIBJSONC_SETTING=internal
+ elif test "$with_libjson_c" != "no"; then
+   LIBS="-L$with_libjson_c/lib $LIBS"
+   AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib)
++  if test "$LIBJSONC_SETTING" = "external" ; then
++    LIBJSON_LINK="-L$with_libjson_c/lib -ljson-c"
++  fi
+ else
+   AC_MSG_ERROR([libjson-c (internal or external) is required])
+ fi
+@@ -3530,6 +3536,7 @@ else
+ fi
+ 
+ AC_SUBST(LIBJSONC_SETTING,$LIBJSONC_SETTING)
++AC_SUBST(LIBJSON_LINK,$LIBJSON_LINK)
+ AC_SUBST(JSON_INCLUDE,$JSON_INCLUDE)
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index b366bc8..078557d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -22,4 +22,4 @@ formatted-typo.patch
 remaining-typo.patch
 ogr-vrt-implement-CloseDependantDataset.patch
 message-typo.patch
-libjson-c.patch
+r33882-link-libjson.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/gdal.git



More information about the Pkg-grass-devel mailing list