Files
tigerbrew/Library/Formula/spatialite-tools.rb
T
Charlie Sharpsteen 4a68f0ba2e Clean up lib path searching for Spatialite
Anything linking against SpatiaLite also needs to use Homebrew's SQLite so that
loadable extensions are enabled along with RTree indices.

This commit cleans up several formulae to use the specific `opt/sqlite/lib`
prefix rather than `HOMEBREW_PREFIX/lib` and also adds this searching to
`gdal`.

However, this hack is getting a little large. The best fix would probably be to
flag SQLite as `keg_only` so that lib path munging is handled automagically for
everything with a dependency tree that includes SQLite.
2012-11-11 12:47:44 -08:00

30 lines
905 B
Ruby

require 'formula'
class SpatialiteTools < Formula
homepage 'https://www.gaia-gis.it/fossil/spatialite-tools/index'
url 'http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-3.1.0b.tar.gz'
sha1 '82d40a4ef92d86a310e07f0e7e43372904bdbba9'
devel do
url 'http://www.gaia-gis.it/gaia-sins/spatialite-tools-4.0.0-RC1.tar.gz'
sha1 'fa9c60b2c993ef22c5618261c13cc3cdcbad223b'
end
depends_on 'pkg-config' => :build
depends_on 'libspatialite'
depends_on 'readosm'
def install
# See: https://github.com/mxcl/homebrew/issues/3328
ENV.append 'LDFLAGS', '-liconv'
# Ensure Homebrew SQLite is found before system SQLite.
sqlite = Formula.factory 'sqlite'
ENV.append 'LDFLAGS', "-L#{sqlite.opt_prefix}/lib"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end