Skip to content

Instantly share code, notes, and snippets.

@kenichi
Created July 22, 2013 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenichi/6057122 to your computer and use it in GitHub Desktop.
Save kenichi/6057122 to your computer and use it in GitHub Desktop.
postgis ebuild diff and patch with geojson for gentoo
diff -ru postgis-2.0.3-orig/configure.ac postgis-2.0.3/configure.ac
--- postgis-2.0.3-orig/configure.ac 2012-12-20 09:38:23.000000000 -0800
+++ postgis-2.0.3/configure.ac 2013-07-22 04:53:15.290999956 -0700
@@ -33,7 +33,7 @@
dnl
AC_PATH_PROG([CPPBIN], [cpp], [])
if test "x$CPPBIN" != "x"; then
- SQLPP="${CPPBIN} -traditional-cpp -P"
+ SQLPP="${CPPBIN} -traditional-cpp -P -C"
else
AC_PATH_PROG([GPP], [gpp_], [])
if test "x$GPP" != "x"; then
@@ -713,8 +713,8 @@
if test "x$JSONDIR" = "xyes"; then
AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to])
else
- dnl We need (libjson.so OR libjson.a OR libjson.dll) AND json/json.h
- if test ! -e "${JSONDIR}/include/json/json.h" -o \
+ dnl We need (libjson.so OR libjson.a OR libjson.dll) AND json-c/json.h
+ if test ! -e "${JSONDIR}/include/json-c/json.h" -o \
! \( -e "${JSONDIR}/lib/libjson.so" -o \
-e "${JSONDIR}/lib/libjson.dll" -o \
-e "${JSONDIR}/lib/libjson.dylib" -o \
@@ -727,14 +727,14 @@
dnl Add the include directory to JSON_CPPFLAGS
JSON_CPPFLAGS="-I$JSONDIR/include"
- JSON_LDFLAGS="-L$JSONDIR/lib -ljson"
+ JSON_LDFLAGS="-L$JSONDIR/lib -ljson-c"
fi
fi
-dnl Check that we can find the json/json.h header file
+dnl Check that we can find the json-c/json.h header file
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$JSON_CPPFLAGS"
-AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], [])
+AC_CHECK_HEADER([json-c/json.h], [HAVE_JSON=yes], [])
CPPFLAGS="$CPPFLAGS_SAVE"
dnl Ensure we can link against libjson
@@ -746,7 +746,7 @@
if test "$HAVE_JSON" = "yes"; then
AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present])
if test "x$JSON_LDFLAGS" = "x"; then
- JSON_LDFLAGS="-ljson"
+ JSON_LDFLAGS="-ljson-c"
fi
fi
diff -ru postgis-2.0.3-orig/postgis/lwgeom_in_geojson.c postgis-2.0.3/postgis/lwgeom_in_geojson.c
--- postgis-2.0.3-orig/postgis/lwgeom_in_geojson.c 2013-02-28 10:35:40.000000000 -0800
+++ postgis-2.0.3/postgis/lwgeom_in_geojson.c 2013-07-22 04:53:35.860999894 -0700
@@ -28,8 +28,8 @@
#ifdef HAVE_LIBJSON
#include "lwgeom_export.h"
-#include <json/json.h>
-#include <json/json_object_private.h>
+#include <json-c/json.h>
+#include <json-c/json_object_private.h>
/* Prototype */
LWGEOM* parse_geojson(json_object *geojson, bool *hasz, int *root_srid);
--- /usr/portage/dev-db/postgis/postgis-2.0.3.ebuild 2013-04-26 06:31:07.000000000 -0700
+++ /usr/local/portage/dev-db/postgis/postgis-2.0.3-r666.ebuild 2013-07-22 03:56:52.701010255 -0700
@@ -15,12 +15,7 @@
IUSE="doc gtk"
RDEPEND="
- || (
- dev-db/postgresql-server:9.2
- dev-db/postgresql-server:9.1
- dev-db/postgresql-server:9.0
- dev-db/postgresql-server:8.4
- )
+ dev-db/postgresql-server:9.2
dev-libs/json-c
dev-libs/libxml2:2
>=sci-libs/geos-3.3.8
@@ -67,7 +62,7 @@
src_prepare() {
epatch "${FILESDIR}/${PN}-${PGIS}-ldflags.patch" \
- "${FILESDIR}/${PN}-${PGIS}-pkgconfig-json.patch"
+ "${FILESDIR}/${PN}-${PGIS}-json.patch"
local AT_M4DIR="macros"
eautoreconf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment