geos: fix python module build

Fixes Homebrew/homebrew#49725.

Closes Homebrew/homebrew#49744.
This commit is contained in:
Tim D. Smith 2016-03-02 19:19:05 -08:00 committed by Xu Cheng
parent c389e77fe9
commit 68e2ef7c31

View file

@ -14,7 +14,7 @@ class Geos < Formula
option :universal
option :cxx11
option "with-php", "Build the PHP extension"
option "with-python", "Build the Python 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")
@ -25,6 +25,12 @@ class Geos < Formula
ENV.universal_binary if build.universal?
ENV.cxx11 if build.cxx11?
# https://trac.osgeo.org/geos/ticket/771
inreplace "configure" do |s|
s.gsub! /PYTHON_CPPFLAGS=.*/, %(PYTHON_CPPFLAGS="#{`python-config --includes`.strip}")
s.gsub! /PYTHON_LDFLAGS=.*/, %(PYTHON_LDFLAGS="-Wl,-undefined,dynamic_lookup")
end
args = [
"--disable-dependency-tracking",
"--prefix=#{prefix}",