homebrew-core/Formula/geos.rb

49 lines
1.5 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Geos < Formula
desc "Geometry Engine"
homepage "https://trac.osgeo.org/geos"
2016-12-10 17:11:38 +00:00
url "http://download.osgeo.org/geos/geos-3.5.1.tar.bz2"
sha256 "e6bb0a7ba0e142b1e952fae9d946b2b532fa05a5c384e458f7cb8990e1fcac32"
2014-04-10 10:40:32 +00:00
bottle do
2016-09-14 19:03:18 +00:00
cellar :any
2016-12-18 13:29:31 +00:00
sha256 "d061c3cbff08cef91394e3cc3d7e47c6142bc7ca87a6e0209042faf508f30b20" => :sierra
sha256 "30ee76270ea0c4c8de5c3477a2e5484bf18119805dc0b5785026980866acc7da" => :el_capitan
sha256 "0104a14d3fb41c0b7b6ae62c0cb6c5fd75746cc90fab1ed42244627d9d3770e2" => :yosemite
2014-04-10 10:40:32 +00:00
end
option :universal
option :cxx11
option "with-php", "Build the PHP extension"
option "without-python", "Do not build the Python extension"
option "with-ruby", "Build the ruby extension"
depends_on "swig" => :build if build.with?("python") || build.with?("ruby")
def install
ENV.universal_binary if build.universal?
ENV.cxx11 if build.cxx11?
# https://trac.osgeo.org/geos/ticket/771
inreplace "configure" do |s|
2016-10-22 12:33:54 +00:00
s.gsub! /PYTHON_CPPFLAGS=.*/, %Q(PYTHON_CPPFLAGS="#{`python-config --includes`.strip}")
s.gsub! /PYTHON_LDFLAGS=.*/, 'PYTHON_LDFLAGS="-Wl,-undefined,dynamic_lookup"'
end
args = [
"--disable-dependency-tracking",
2015-09-20 10:39:51 +00:00
"--prefix=#{prefix}",
]
args << "--enable-php" if build.with?("php")
args << "--enable-python" if build.with?("python")
args << "--enable-ruby" if build.with?("ruby")
system "./configure", *args
2014-12-27 16:00:40 +00:00
system "make", "install"
end
test do
system "#{bin}/geos-config", "--libs"
end
end