1 |
commit: 5a2637f83aa789aeb847242cae2f45b3aab85527 |
2 |
Author: Sven Wegener <swegener <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 10 15:40:46 2017 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 10 15:40:46 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a2637f8 |
7 |
|
8 |
Revert "dev-db/postgis: remove unused patch." |
9 |
|
10 |
This reverts commit 8c98c95b939c0b40e9c061e7a5840db03bb2a652. |
11 |
|
12 |
The patch is still used by 2.1.8-r1 |
13 |
|
14 |
.../files/postgis-2.1.4-pkgconfig-json.patch | 122 +++++++++++++++++++++ |
15 |
1 file changed, 122 insertions(+) |
16 |
|
17 |
diff --git a/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch b/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..13634abb6de |
20 |
--- /dev/null |
21 |
+++ b/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch |
22 |
@@ -0,0 +1,122 @@ |
23 |
+diff --git a/configure.ac b/configure.ac |
24 |
+index a13cf13..c0a7842 100644 |
25 |
+--- a/configure.ac |
26 |
++++ b/configure.ac |
27 |
+@@ -780,61 +780,19 @@ dnl =========================================================================== |
28 |
+ dnl Detect if json-c installed |
29 |
+ dnl =========================================================================== |
30 |
+ |
31 |
+-CHECK_JSON=yes |
32 |
+-HAVE_JSON=no |
33 |
+-HAVE_JSON_C=no |
34 |
+- |
35 |
+-AC_ARG_WITH([json], |
36 |
+- [AS_HELP_STRING([--without-json], [build without json-c support])], |
37 |
+- [CHECK_JSON="$withval"], []) |
38 |
+- |
39 |
+-if test "$CHECK_JSON" != "no"; then dnl { |
40 |
+- |
41 |
+-AC_ARG_WITH([jsondir], |
42 |
+- [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])], |
43 |
+- [JSONDIR="$withval"], [JSONDIR=]) |
44 |
+- |
45 |
+-if test ! "x$JSONDIR" = "x"; then |
46 |
+- dnl Make sure that the directory exists |
47 |
+- if test "x$JSONDIR" = "xyes"; then |
48 |
+- AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to]) |
49 |
+- else |
50 |
+- AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR]) |
51 |
+- |
52 |
+- dnl Add the include directory to JSON_CPPFLAGS |
53 |
+- JSON_CPPFLAGS="-I$JSONDIR/include" |
54 |
+- JSON_LDFLAGS="-L$JSONDIR/lib" |
55 |
+- fi |
56 |
+-fi |
57 |
+- |
58 |
+-dnl Check that we can find the json/json.h header file |
59 |
+-CPPFLAGS_SAVE="$CPPFLAGS" |
60 |
+-CPPFLAGS="$JSON_CPPFLAGS" |
61 |
+-AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], [ |
62 |
+- AC_CHECK_HEADER([json-c/json.h], [HAVE_JSON=yes; HAVE_JSON_C=yes], []) |
63 |
+-]) |
64 |
+-CPPFLAGS="$CPPFLAGS_SAVE" |
65 |
+- |
66 |
+-dnl Ensure we can link against libjson |
67 |
+-LIBS_SAVE="$LIBS" |
68 |
+-LIBS="$JSON_LDFLAGS" |
69 |
+-AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"], [ |
70 |
+- AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson"], [], []) |
71 |
+-], []) |
72 |
+-LIBS="$LIBS_SAVE" |
73 |
+- |
74 |
+-if test "$HAVE_JSON" = "yes"; then |
75 |
++PKG_CHECK_MODULES([JSON], [json], |
76 |
++ [ |
77 |
++ HAVE_JSON=yes |
78 |
+ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) |
79 |
+-fi |
80 |
+-if test "$HAVE_JSON_C" = "yes"; then |
81 |
+- AC_DEFINE([HAVE_LIBJSON_C], 1, [Define to 1 if libjson resides in a json-c subdir]) |
82 |
+-fi |
83 |
+- |
84 |
+-AC_SUBST([JSON_CPPFLAGS]) |
85 |
+-AC_SUBST([JSON_LDFLAGS]) |
86 |
+-AC_SUBST([HAVE_JSON]) |
87 |
+- |
88 |
+-fi dnl } |
89 |
++ ], |
90 |
++ [ |
91 |
++ PKG_CHECK_MODULES([JSON], [json-c], |
92 |
++ [ |
93 |
++ HAVE_JSON=yes |
94 |
++ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) |
95 |
++ ], |
96 |
++ [HAVE_JSON=no]) |
97 |
++ ]) |
98 |
+ |
99 |
+ dnl =========================================================================== |
100 |
+ dnl Detect GTK+2.0 for GUI |
101 |
+@@ -927,7 +885,7 @@ AC_DEFINE_UNQUOTED([POSTGIS_USE_STATS], [1], [Enable use of ANALYZE statistics]) |
102 |
+ CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS $SFCGAL_CPPFLAGS $CPPFLAGS" |
103 |
+ AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS]) |
104 |
+ |
105 |
+-SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS $SFCGAL_LDFLAGS" |
106 |
++SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LIBS $XML2_LDFLAGS $SFCGAL_LDFLAGS" |
107 |
+ AC_SUBST([SHLIB_LINK]) |
108 |
+ dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK]) |
109 |
+ |
110 |
+diff --git a/liblwgeom/Makefile.in b/liblwgeom/Makefile.in |
111 |
+index 3cc6256..5ccbb3b 100644 |
112 |
+--- a/liblwgeom/Makefile.in |
113 |
++++ b/liblwgeom/Makefile.in |
114 |
+@@ -11,8 +11,8 @@ |
115 |
+ # ********************************************************************** |
116 |
+ |
117 |
+ CC = @CC@ |
118 |
+-CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CPPFLAGS@ |
119 |
+-LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LDFLAGS@ |
120 |
++CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CFLAGS@ |
121 |
++LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LIBS@ |
122 |
+ NUMERICFLAGS = @NUMERICFLAGS@ |
123 |
+ top_builddir = @top_builddir@ |
124 |
+ prefix = @prefix@ |
125 |
+diff --git a/liblwgeom/lwin_geojson.c b/liblwgeom/lwin_geojson.c |
126 |
+index 7019626..ec1d594 100644 |
127 |
+--- a/liblwgeom/lwin_geojson.c |
128 |
++++ b/liblwgeom/lwin_geojson.c |
129 |
+@@ -19,13 +19,8 @@ |
130 |
+ |
131 |
+ #include <string.h> |
132 |
+ |
133 |
+-#ifdef HAVE_LIBJSON_C |
134 |
+-#include <json-c/json.h> |
135 |
+-#include <json-c/json_object_private.h> |
136 |
+-#else |
137 |
+-#include <json/json.h> |
138 |
+-#include <json/json_object_private.h> |
139 |
+-#endif |
140 |
++#include <json.h> |
141 |
++#include <json_object_private.h> |
142 |
+ |
143 |
+ #ifndef JSON_C_VERSION |
144 |
+ // Adds support for libjson < 0.10 |