aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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