aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlie Sharpsteen2012-05-07 10:49:48 -0700
committerCharlie Sharpsteen2012-05-07 11:37:36 -0700
commit09a5c407ada3a413b1a0204b83555b830e6dbc3c (patch)
tree88e2ca9097de590e21e31f1777a0c665da3aa2b2
parentc575b324b0a62bece4f046c24e66dfe863b85d9f (diff)
downloadhomebrew-09a5c407ada3a413b1a0204b83555b830e6dbc3c.tar.bz2
libspatialite: Use non-amalgamated version
The amalgamated version of SpatiaLite, which includes its own copy of SQLite, is depreciated and will be discontinued in the near future: https://groups.google.com/d/msg/spatialite-users/ZQcEx30p1W8/mi5Gvzlht7wJ
-rw-r--r--Library/Formula/libspatialite.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/Library/Formula/libspatialite.rb b/Library/Formula/libspatialite.rb
index e1b177d8e..fd1e71640 100644
--- a/Library/Formula/libspatialite.rb
+++ b/Library/Formula/libspatialite.rb
@@ -6,8 +6,8 @@ end
class Libspatialite < Formula
homepage 'https://www.gaia-gis.it/fossil/libspatialite/index'
- url 'http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-amalgamation-3.0.1.tar.gz'
- md5 'df7f0f714c2de1dc2791ddef6e8eaba5'
+ url 'http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-3.0.1.tar.gz'
+ md5 '450d1a0d9da1bd9f770b7db3f2509f69'
def options
[['--without-freexl', 'Build without support for reading Excel files']]
@@ -15,6 +15,10 @@ class Libspatialite < Formula
depends_on 'proj'
depends_on 'geos'
+ # Needs SQLite > 3.7.3 which rules out system SQLite on Snow Leopard and
+ # below. Also needs dynamic extension support which rules out system SQLite
+ # on Lion. Finally, RTree index support is required as well.
+ depends_on 'sqlite'
depends_on 'freexl' unless without_freexl?
@@ -22,10 +26,13 @@ class Libspatialite < Formula
# O2 and O3 leads to corrupt/invalid rtree indexes
# http://groups.google.com/group/spatialite-users/browse_thread/thread/8e1cfa79f2d02a00#
ENV.Os
+ # Ensure Homebrew's libsqlite is found before the system version.
+ ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib"
+
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
- --target=macosx
+ --with-sysroot=#{HOMEBREW_PREFIX}
]
args << '--enable-freexl=no' if without_freexl?