b4befaf35f
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.
21 lines
728 B
Ruby
21 lines
728 B
Ruby
require 'formula'
|
|
|
|
class Librasterlite < Formula
|
|
homepage 'https://www.gaia-gis.it/fossil/librasterlite/index'
|
|
url 'http://www.gaia-gis.it/gaia-sins/librasterlite-sources/librasterlite-1.1c.tar.gz'
|
|
sha1 'c54f38ef2974bc92410e2c2196088af14bd9c21a'
|
|
|
|
depends_on "pkg-config" => :build unless MacOS.version >= :mountain_lion
|
|
depends_on :libpng
|
|
depends_on "libgeotiff"
|
|
depends_on "libspatialite"
|
|
|
|
def install
|
|
# Ensure Homebrew SQLite libraries are found before the 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
|