geos: move to Python 3

This commit is contained in:
FX Coudert 2018-12-27 23:36:51 +01:00
parent 2814a66de4
commit bbdd56d4f0

View file

@ -3,6 +3,7 @@ class Geos < Formula
homepage "https://trac.osgeo.org/geos"
url "https://download.osgeo.org/geos/geos-3.7.1.tar.bz2"
sha256 "0006c7b49eaed016b9c5c6f872417a7d7dc022e069ddd683335793d905a8228c"
revision 1
bottle do
cellar :any
@ -12,18 +13,19 @@ class Geos < Formula
end
depends_on "swig" => :build
depends_on "python@2"
depends_on "python"
def install
# https://trac.osgeo.org/geos/ticket/771
inreplace "configure" do |s|
s.gsub! /PYTHON_CPPFLAGS=.*/, %Q(PYTHON_CPPFLAGS="#{`python-config --includes`.strip}")
s.gsub! /PYTHON_CPPFLAGS=.*/, %Q(PYTHON_CPPFLAGS="#{`python3-config --includes`.strip}")
s.gsub! /PYTHON_LDFLAGS=.*/, 'PYTHON_LDFLAGS="-Wl,-undefined,dynamic_lookup"'
end
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-python"
"--enable-python",
"PYTHON=#{Formula["python"].opt_bin}/python3"
system "make", "install"
end