aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorLarry Shaffer2014-01-01 21:32:39 -0700
committerMike McQuaid2014-01-04 15:05:33 +0000
commit3cbe67bbf01aa3a7841af2cda820492f3c6a6767 (patch)
tree77cfcaf92b7d0b5571079e2e45339f04262907f7 /Library
parentf1a233e1953e33ca31beae3a8e79303f818ec152 (diff)
downloadhomebrew-3cbe67bbf01aa3a7841af2cda820492f3c6a6767.tar.bz2
libspatialite: add head and geopackage options
Closes #25606. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/libspatialite.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/Library/Formula/libspatialite.rb b/Library/Formula/libspatialite.rb
index b39aa9c6a..c89e466ab 100644
--- a/Library/Formula/libspatialite.rb
+++ b/Library/Formula/libspatialite.rb
@@ -5,9 +5,17 @@ class Libspatialite < Formula
url 'http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.1.1.tar.gz'
sha1 'b8ed50fb66c4a898867cdf9d724d524c5e27e8aa'
+ head do
+ url "fossil://https://www.gaia-gis.it/fossil/libspatialite"
+ depends_on :autoconf
+ depends_on :automake
+ depends_on :libtool
+ end
+
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'
+ option "with-geopackage", "Build with experimental OGC GeoPackage support"
depends_on 'pkg-config' => :build
depends_on 'proj'
@@ -21,6 +29,14 @@ class Libspatialite < Formula
depends_on 'liblwgeom' => :recommended
def install
+ if build.head?
+ system "autoreconf", "-fi"
+ # new SQLite3 extension won't load via just 'spatialite' unless named spatialite.dylib
+ inreplace "configure",
+ "shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'",
+ "shrext_cmds='.dylib'"
+ end
+
# Ensure Homebrew's libsqlite is found before the system version.
sqlite = Formula.factory 'sqlite'
ENV.append 'LDFLAGS', "-L#{sqlite.opt_prefix}/lib"
@@ -40,9 +56,10 @@ 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'
+ args << "--enable-geopackage=yes" if build.with? "geopackage"
system './configure', *args
- system "make install"
+ system "make", "install"
end
end