diff options
| author | Larry Shaffer | 2013-11-13 23:34:08 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-11-25 07:43:07 -0800 |
| commit | 7f739da45fd599abcf27ebfe984f45cc261142d1 (patch) | |
| tree | 5f8445c05cdf13c739f5a9e403c339fc7ce545ea /Library/Formula/libspatialite.rb | |
| parent | d13ce183b2a36cd69867c561bd1b3ed2bf902e4b (diff) | |
| download | homebrew-7f739da45fd599abcf27ebfe984f45cc261142d1.tar.bz2 | |
libspatialite: re-enable liblwgeom support
Closes #24428.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/libspatialite.rb')
| -rw-r--r-- | Library/Formula/libspatialite.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Library/Formula/libspatialite.rb b/Library/Formula/libspatialite.rb index 4124f5835..b39aa9c6a 100644 --- a/Library/Formula/libspatialite.rb +++ b/Library/Formula/libspatialite.rb @@ -1,10 +1,5 @@ require 'formula' -# Postgis depends on gdal, which in turn depends on libspatialite, -# so enabling a "with-postgis" option in this formula introduces a -# circular dependency. -# See https://github.com/mxcl/homebrew/issues/20373 - class Libspatialite < Formula homepage 'https://www.gaia-gis.it/fossil/libspatialite/index' url 'http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.1.1.tar.gz' @@ -12,6 +7,7 @@ class Libspatialite < Formula option 'without-freexl', 'Build without support for reading Excel files' option 'without-libxml2', 'Disable support for xml parsing (parsing needed by spatialite-gui)' + option 'without-liblwgeom', 'Build without additional sanitization/segmentation routines provided by PostGIS 2.0+ library' depends_on 'pkg-config' => :build depends_on 'proj' @@ -22,6 +18,7 @@ class Libspatialite < Formula depends_on 'sqlite' depends_on 'libxml2' => :recommended depends_on 'freexl' => :recommended + depends_on 'liblwgeom' => :recommended def install # Ensure Homebrew's libsqlite is found before the system version. @@ -29,6 +26,12 @@ class Libspatialite < Formula ENV.append 'LDFLAGS', "-L#{sqlite.opt_prefix}/lib" ENV.append 'CFLAGS', "-I#{sqlite.opt_prefix}/include" + unless build.without? 'liblwgeom' + lwgeom = Formula.factory 'liblwgeom' + ENV.append 'LDFLAGS', "-L#{lwgeom.opt_prefix}/lib" + ENV.append 'CFLAGS', "-I#{lwgeom.opt_prefix}/include" + end + args = %W[ --disable-dependency-tracking --prefix=#{prefix} @@ -36,6 +39,7 @@ class Libspatialite < Formula ] args << '--enable-freexl=no' if build.without? 'freexl' args << '--enable-libxml2=yes' unless build.without? 'libxml2' + args << '--enable-lwgeom=yes' unless build.without? 'liblwgeom' system './configure', *args system "make install" |
