homebrew-core/Formula/spatialite-tools.rb
2019-03-24 22:17:41 +01:00

35 lines
1.2 KiB
Ruby

class SpatialiteTools < Formula
desc "CLI tools supporting SpatiaLite"
homepage "https://www.gaia-gis.it/fossil/spatialite-tools/index"
url "https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz"
sha256 "f739859bc04f38735591be2f75009b98a2359033675ae310dffc3114a17ccf89"
revision 4
bottle do
cellar :any
sha256 "51877773240ebc0e0c16bf601aa7bd2c605b2da0f23c5b6eb72666e3b4c986b8" => :mojave
sha256 "f31906cda1e3fbfe3a294d56ffbfa758f5022b71966002152217608350fbc8e2" => :high_sierra
sha256 "a10766fa139ba69e58f878ab6c2502b165a96643de3ddaaf94b8caf3ffc30af5" => :sierra
end
depends_on "pkg-config" => :build
depends_on "libspatialite"
depends_on "readosm"
def install
# See: https://github.com/Homebrew/homebrew/issues/3328
ENV.append "LDFLAGS", "-liconv"
# Ensure Homebrew SQLite is found before system SQLite.
sqlite = Formula["sqlite"]
ENV.append "LDFLAGS", "-L#{sqlite.opt_lib}"
ENV.append "CFLAGS", "-I#{sqlite.opt_include}"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end
test do
system bin/"spatialite", "--version"
end
end