Skip to content

Commit

Permalink
geos: fix python module build
Browse files Browse the repository at this point in the history
  • Loading branch information
tdsmith committed Mar 3, 2016
1 parent 5931cab commit 9774e4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Library/Formula/geos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -25,6 +25,12 @@ def install
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}",
Expand Down

0 comments on commit 9774e4b

Please sign in to comment.