2013-11-14 00:38:23 +00:00
|
|
|
class Liblwgeom < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Allows SpatiaLite to support ST_MakeValid() like PostGIS"
|
2014-11-23 19:50:04 +00:00
|
|
|
homepage "http://postgis.net"
|
2015-04-15 07:12:11 +00:00
|
|
|
revision 1
|
2014-03-17 02:35:20 +00:00
|
|
|
|
|
|
|
stable do
|
2014-11-23 19:50:04 +00:00
|
|
|
url "http://download.osgeo.org/postgis/source/postgis-2.1.5.tar.gz"
|
|
|
|
sha1 "5ac24b95495be258a7430c08b3407d7beca1832a"
|
|
|
|
# Strip all the PostgreSQL functions from PostGIS configure.ac, to allow
|
|
|
|
# building liblwgeom.dylib without needing PostgreSQL
|
|
|
|
# NOTE: this will need to be maintained per postgis version
|
|
|
|
# Somehow, this still works for 2.1.5, which is awesome!
|
2014-03-17 02:35:20 +00:00
|
|
|
patch do
|
2014-04-26 19:48:32 +00:00
|
|
|
url "https://gist.githubusercontent.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad0f61d4e1/postgis-config_strip-pgsql.diff"
|
2014-03-17 02:35:20 +00:00
|
|
|
sha1 "3d93c9ede79439f1c683a604f9d906f5c788c690"
|
|
|
|
end
|
|
|
|
end
|
2013-11-14 00:38:23 +00:00
|
|
|
|
2014-04-10 10:40:32 +00:00
|
|
|
bottle do
|
2015-04-20 04:36:26 +00:00
|
|
|
cellar :any
|
|
|
|
sha256 "48aa3296e32ff2a72c2c559649a37e7ad1ce3c8fe825d9a0f3e320683c97041e" => :yosemite
|
|
|
|
sha256 "c2a7148e99fe6b03f368a12bf89e69262795e97c1d8b1578f250607bf8833136" => :mavericks
|
|
|
|
sha256 "11a77a99a93daed092be094195bc1afce3f2c2d91adc9412106bf5c89e4f5755" => :mountain_lion
|
2014-04-10 10:40:32 +00:00
|
|
|
end
|
|
|
|
|
2013-11-25 19:15:32 +00:00
|
|
|
head do
|
2014-11-23 19:50:04 +00:00
|
|
|
url "http://svn.osgeo.org/postgis/trunk/"
|
|
|
|
depends_on "postgresql" => :build # don't maintain patches for HEAD
|
2013-11-25 19:15:32 +00:00
|
|
|
end
|
2013-11-14 00:38:23 +00:00
|
|
|
|
|
|
|
keg_only "Conflicts with PostGIS, which also installs liblwgeom.dylib"
|
|
|
|
|
2014-05-23 21:17:35 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2014-11-23 19:50:04 +00:00
|
|
|
depends_on "gpp" => :build
|
2013-11-14 00:38:23 +00:00
|
|
|
|
2014-11-23 19:50:04 +00:00
|
|
|
depends_on "proj"
|
|
|
|
depends_on "geos"
|
|
|
|
depends_on "json-c"
|
2013-11-14 00:38:23 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# See postgis.rb for comments about these settings
|
|
|
|
ENV.deparallelize
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-nls",
|
|
|
|
|
|
|
|
"--with-projdir=#{HOMEBREW_PREFIX}",
|
2014-02-26 04:46:32 +00:00
|
|
|
"--with-jsondir=#{Formula["json-c"].opt_prefix}",
|
2013-11-14 00:38:23 +00:00
|
|
|
|
|
|
|
# Disable extraneous support
|
|
|
|
"--without-libiconv-prefix",
|
|
|
|
"--without-libintl-prefix",
|
|
|
|
"--without-raster", # this ensures gdal is not required
|
|
|
|
"--without-topology"
|
|
|
|
]
|
|
|
|
|
2014-02-26 04:46:32 +00:00
|
|
|
if build.head?
|
2014-10-27 03:30:28 +00:00
|
|
|
args << "--with-pgconfig=#{Formula["postgresql"].opt_bin}/pg_config"
|
2014-02-26 04:46:32 +00:00
|
|
|
end
|
2013-11-14 00:38:23 +00:00
|
|
|
|
2014-11-23 19:50:04 +00:00
|
|
|
system "./autogen.sh"
|
|
|
|
system "./configure", *args
|
2013-11-14 00:38:23 +00:00
|
|
|
|
2014-11-23 19:50:04 +00:00
|
|
|
mkdir "stage"
|
|
|
|
cd "liblwgeom" do
|
|
|
|
system "make", "install", "DESTDIR=#{buildpath}/stage"
|
2013-11-14 00:38:23 +00:00
|
|
|
end
|
|
|
|
|
2014-10-27 03:30:29 +00:00
|
|
|
lib.install Dir["stage/**/lib/*"]
|
2013-11-14 00:38:23 +00:00
|
|
|
include.install Dir["stage/**/include/*"]
|
|
|
|
end
|
|
|
|
end
|