Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 926080 Details for
Bug 1129292
postgis fails to build in rawhide due to json-c
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
backport + spec changes
postgis-fix-ftfbs.patch (text/plain), 6.44 KB, created by
Marcin Juszkiewicz
on 2014-08-12 14:28:53 UTC
(
hide
)
Description:
backport + spec changes
Filename:
MIME Type:
Creator:
Marcin Juszkiewicz
Created:
2014-08-12 14:28:53 UTC
Size:
6.44 KB
patch
obsolete
>diff --git a/0001-2723-failure-to-build-against-external-json-c-0.12.patch b/0001-2723-failure-to-build-against-external-json-c-0.12.patch >new file mode 100644 >index 0000000..e72ff43 >--- /dev/null >+++ b/0001-2723-failure-to-build-against-external-json-c-0.12.patch >@@ -0,0 +1,129 @@ >+From 7e66c170c75a0db312e791547f7121f08faf86d5 Mon Sep 17 00:00:00 2001 >+From: Paul Ramsey <pramsey@cleverelephant.ca> >+Date: Tue, 24 Jun 2014 21:59:47 +0000 >+Subject: [PATCH] #2723 failure to build against external json-c 0.12 >+ >+git-svn-id: http://svn.osgeo.org/postgis/trunk@12647 b70326c6-7e19-0410-871a-916f4a2858ee >+--- >+ configure.ac | 18 +++++++----------- >+ liblwgeom/lwin_geojson.c | 16 +++++++++++----- >+ postgis_config.h.in | 3 +++ >+ 3 files changed, 21 insertions(+), 16 deletions(-) >+ >+Index: postgis-2.1.3/configure.ac >+=================================================================== >+--- postgis-2.1.3.orig/configure.ac >++++ postgis-2.1.3/configure.ac >+@@ -751,6 +751,7 @@ dnl ==================================== >+ >+ CHECK_JSON=yes >+ HAVE_JSON=no >++HAVE_JSON_C=no >+ >+ AC_ARG_WITH([json], >+ [AS_HELP_STRING([--without-json], [build without json-c support])], >+@@ -767,16 +768,6 @@ if test ! "x$JSONDIR" = "x"; then >+ 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 \ >+- ! \( -e "${JSONDIR}/lib/libjson.so" -o \ >+- -e "${JSONDIR}/lib/libjson.dll" -o \ >+- -e "${JSONDIR}/lib/libjson.dylib" -o \ >+- -e "${JSONDIR}/bin/libjson.dll" -o \ >+- -e "${JSONDIR}/lib/libjson.a" \) >+- then >+- AC_MSG_ERROR([Cannot find json dev files in "$JSONDIR"]) >+- fi >+ AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR]) >+ >+ dnl Add the include directory to JSON_CPPFLAGS >+@@ -788,8 +779,9 @@ fi >+ dnl Check that we can find the json/json.h header file >+ CPPFLAGS_SAVE="$CPPFLAGS" >+ CPPFLAGS="$JSON_CPPFLAGS" >+-AC_CHECK_HEADER([json-c/json.h], [HAVE_JSON=yes], [ >+- AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], [])]) >++AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], [ >++ AC_CHECK_HEADER([json-c/json.h], [HAVE_JSON=yes; HAVE_JSON_C=yes], []) >++]) >+ CPPFLAGS="$CPPFLAGS_SAVE" >+ >+ dnl Ensure we can link against libjson >+@@ -803,6 +795,9 @@ LIBS="$LIBS_SAVE" >+ if test "$HAVE_JSON" = "yes"; then >+ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) >+ fi >++if test "$HAVE_JSON_C" = "yes"; then >++ AC_DEFINE([HAVE_LIBJSON_C], 1, [Define to 1 if libjson resides in a json-c subdir]) >++fi >+ >+ AC_SUBST([JSON_CPPFLAGS]) >+ AC_SUBST([JSON_LDFLAGS]) >+Index: postgis-2.1.3/liblwgeom/lwin_geojson.c >+=================================================================== >+--- postgis-2.1.3.orig/liblwgeom/lwin_geojson.c >++++ postgis-2.1.3/liblwgeom/lwin_geojson.c >+@@ -17,8 +17,14 @@ >+ >+ #ifdef HAVE_LIBJSON >+ >++#ifdef HAVE_LIBJSON_C >++#include <json-c/json.h> >++#include <json-c/json_object_private.h> >++#else >+ #include <json/json.h> >+ #include <json/json_object_private.h> >++#endif >++ >+ #include <string.h> >+ >+ static void geojson_lwerror(char *msg, int error_code) >+@@ -490,7 +496,7 @@ LWGEOM* >+ lwgeom_from_geojson(const char *geojson, char **srs) >+ { >+ #ifndef HAVE_LIBJSON >+- *srs = NULL; >++ *srs = NULL; >+ lwerror("You need JSON-C for lwgeom_from_geojson"); >+ return NULL; >+ #else /* HAVE_LIBJSON */ >+@@ -502,7 +508,7 @@ lwgeom_from_geojson(const char *geojson, >+ json_tokener* jstok = NULL; >+ json_object* poObj = NULL; >+ json_object* poObjSrs = NULL; >+- *srs = NULL; >++ *srs = NULL; >+ >+ /* Begin to Parse json */ >+ jstok = json_tokener_new(); >+@@ -510,11 +516,11 @@ lwgeom_from_geojson(const char *geojson, >+ if( jstok->err != json_tokener_success) >+ { >+ char err[256]; >+- snprintf(err, 256, "%s (at offset %d)", json_tokener_errors[jstok->err], jstok->char_offset); >++ snprintf(err, 256, "%s (at offset %d)", json_tokener_error_desc(jstok->err), jstok->char_offset); >+ json_tokener_free(jstok); >+- json_object_put(poObj); >++ json_object_put(poObj); >+ geojson_lwerror(err, 1); >+- return NULL; >++ return NULL; >+ } >+ json_tokener_free(jstok); >+ >+Index: postgis-2.1.3/postgis_config.h.in >+=================================================================== >+--- postgis-2.1.3.orig/postgis_config.h.in >++++ postgis-2.1.3/postgis_config.h.in >+@@ -54,6 +54,9 @@ >+ /* Define to 1 if libjson is present */ >+ #undef HAVE_LIBJSON >+ >++/* Define to 1 if libjson resides in json-c subdir */ >++#undef HAVE_LIBJSON_C >++ >+ /* Define to 1 if you have the `pq' library (-lpq). */ >+ #undef HAVE_LIBPQ >+ >diff --git a/postgis.spec b/postgis.spec >index a6efa18..20ead22 100644 >--- a/postgis.spec >+++ b/postgis.spec >@@ -12,7 +12,7 @@ > Summary: Geographic Information Systems Extensions to PostgreSQL > Name: postgis > Version: 2.1.3 >-Release: 3%{?dist} >+Release: 4%{?dist} > License: GPLv2+ > Group: Applications/Databases > Source0: http://download.osgeo.org/%{name}/source/%{name}-%{version}.tar.gz >@@ -20,11 +20,13 @@ Source2: http://download.osgeo.org/%{name}/docs/%{name}-%{version}.pdf > Source3: http://download.osgeo.org/%{name}/source/%{name}-%{prevversion}.tar.gz > Source4: filter-requires-perl-Pg.sh > Patch0: postgis-1.5.1-pgsql9.patch >+Patch1: 0001-2723-failure-to-build-against-external-json-c-0.12.patch > URL: http://www.postgis.org > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > > BuildRequires: postgresql-devel >= %{pg_version_minimum}, proj-devel, geos-devel >= 3.4.2 byacc, proj-devel, flex, java, java-devel, ant > BuildRequires: gtk2-devel, libxml2-devel, gdal-devel >= 1.10.0, json-c-devel >+BuildRequires: autoconf, automake > Requires: postgresql >= %{pg_version_built}, geos >= 3.4.2, proj, gdal >= 1.10.0, json-c > > %description >@@ -75,10 +77,12 @@ The postgis-utils package provides the utilities for PostGIS. > %prep > %setup -q -n %{name}-%{version} > %patch0 -p1 -b .pgsql9 >+%patch1 -p1 > # Copy .pdf file to top directory before installing. > cp -p %{SOURCE2} . > > %build >+autoconf > %configure --with-gui --enable-raster > make %{?_smp_mflags} LPATH=`pg_config --pkglibdir` shlib="%{name}.so" > >@@ -202,6 +206,9 @@ rm -rf %{buildroot} > %doc postgis*.pdf > > %changelog >+* Tue Aug 12 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.1.3-4 >+- Backport support for JSON-C to fix FTBFS >+ > * Thu Jun 26 2014 Jozef Mlich <jmlich@redhat.com> - 2.1.3-3 > - Removing static libraries > Resolves: #979179
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mjuszkie
: review?
Actions:
View
|
Diff
Attachments on
bug 1129292
: 926080