diff options
| author | Kashif Rasul | 2013-06-21 14:13:42 +0200 | 
|---|---|---|
| committer | Adam Vandenberg | 2013-06-21 16:44:59 -0700 | 
| commit | eeb3d655ffc638f13863b39b019e23253881f9a7 (patch) | |
| tree | ac20bb1941a61cd994b156aa83acd000247dde0d | |
| parent | f0dfea67f3ce2964689f400a4b635a271413bb3b (diff) | |
| download | homebrew-eeb3d655ffc638f13863b39b019e23253881f9a7.tar.bz2 | |
json-c 0.11
Pull upstream Postgis patch for json-c compatibility.
Closes #20660.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/json-c.rb | 11 | ||||
| -rw-r--r-- | Library/Formula/postgis.rb | 19 | 
2 files changed, 20 insertions, 10 deletions
| diff --git a/Library/Formula/json-c.rb b/Library/Formula/json-c.rb index a4805fafa..793bb14d4 100644 --- a/Library/Formula/json-c.rb +++ b/Library/Formula/json-c.rb @@ -1,18 +1,15 @@  require 'formula' -# Stick with 0.10; PostGIS doesn't build against 0.11  class JsonC < Formula    homepage 'https://github.com/json-c/json-c/wiki' -  url 'https://github.com/downloads/json-c/json-c/json-c-0.10.tar.gz' -  sha1 'f90f643c8455da21d57b3e8866868a944a93c596' +  url 'https://github.com/json-c/json-c/archive/json-c-0.11-20130402.tar.gz' +  version '0.11' +  sha1 '1910e10ea57a743ec576688700df4a0cabbe64ba'    def install      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}" +    ENV.deparallelize      system "make install" - -    # The Makefile forgets to install this header. This is fixed upstream and -    # can be pulled on the next release. -    (include/'json').install 'json_object_iterator.h'    end  end diff --git a/Library/Formula/postgis.rb b/Library/Formula/postgis.rb index 9711956fa..a1703f3b6 100644 --- a/Library/Formula/postgis.rb +++ b/Library/Formula/postgis.rb @@ -24,7 +24,9 @@ class Postgis < Formula    depends_on 'gdal'    # Force GPP to be used when pre-processing SQL files. See: -  #   http://trac.osgeo.org/postgis/ticket/1694 +  # http://trac.osgeo.org/postgis/ticket/1694 +  # Fix linking aganist json-c, upstream in: +  # https://github.com/postgis/postgis/commit/1c988618c9448dcdc43bc8ffe4ef8ff1d4dae838    def patches; DATA end    def install @@ -114,10 +116,10 @@ class Postgis < Formula  end  __END__ -Force usage of GPP as the SQL pre-processor as Clang chokes. +Force usage of GPP as the SQL pre-processor as Clang chokes and fix json-c link error  diff --git a/configure.ac b/configure.ac -index 136a1d6..c953c69 100644 +index 68d9240..8514041 100644  --- a/configure.ac  +++ b/configure.ac  @@ -31,17 +31,8 @@ AC_SUBST([ANT]) @@ -140,3 +142,14 @@ index 136a1d6..c953c69 100644   AC_SUBST([SQLPP])   dnl +@@ -740,7 +731,9 @@ CPPFLAGS="$CPPFLAGS_SAVE" + dnl Ensure we can link against libjson + LIBS_SAVE="$LIBS" + LIBS="$JSON_LDFLAGS" +-AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes], [], []) ++AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="-ljson-c"], [ ++  AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="-ljson"], [], []) ++], []) + LIBS="$LIBS_SAVE" + + if test "$HAVE_JSON" = "yes"; then | 
