From 40f2876c1b24df5ddb4a0521224d6dcef9ae2d14 Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Sun, 8 Jan 2012 13:49:07 -0800 Subject: libspatialite: Update to 3.0.1 Adds new dependency on FreeXL for importing data from Excel spreadsheets. This can be disabled via a new `--without-freexl` option. --- Library/Formula/libspatialite.rb | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'Library') diff --git a/Library/Formula/libspatialite.rb b/Library/Formula/libspatialite.rb index 1193a6d8a..139c083ab 100644 --- a/Library/Formula/libspatialite.rb +++ b/Library/Formula/libspatialite.rb @@ -1,22 +1,35 @@ require 'formula' +def without_freexl? + ARGV.include? '--without-freexl' +end + class Libspatialite < Formula - url 'http://www.gaia-gis.it/spatialite-2.4.0-5/libspatialite-amalgamation-2.4.0.tar.gz' - version '2.4.0-rc5' - homepage 'http://www.gaia-gis.it/spatialite/' - md5 '33f8db72f4b6d863a2e0f4b2bed31a74' + homepage 'https://www.gaia-gis.it/fossil/libspatialite/index' + url 'http://www.gaia-gis.it/gaia-sins/libspatialite-amalgamation-3.0.1.tar.gz' + md5 'df7f0f714c2de1dc2791ddef6e8eaba5' + + def options + [['--without-freexl', 'Build without support for reading Excel files']] + end depends_on 'proj' depends_on 'geos' + depends_on 'freexl' unless without_freexl? + def install # O2 and O3 leads to corrupt/invalid rtree indexes # http://groups.google.com/group/spatialite-users/browse_thread/thread/8e1cfa79f2d02a00# ENV.Os - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--target=macosx" + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --target=macosx + ] + args << '--enable-freexl=no' if without_freexl? + + system './configure', *args system "make install" end end -- cgit v1.2.3