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 3 bottle do cellar :any sha256 "88d05a58efb6ae3151229766ddc4c3e9c51b0e9a3b9243b196ea390efac9d368" => :mojave sha256 "7011cedf1ed20fdd2700f38247818c4adcf6aff700f6ee3fb6e3a8026554fec6" => :high_sierra sha256 "b3e79ee77a6de71cf4fb9fc834a2430efd836f7be79052956acdc441a60f1778" => :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