homebrew-core/Formula/geos.rb
Nibbles 2bits 51d9be4634 geos: Fix LLVM compiler errors
geos 3.3.1 fails_with_llvm due to missing symbols that get optimized out of
libgeom. This patches the makefile for that library so all objects are compiled
at -O1 rather than -O3.

Closes Homebrew/homebrew#8858.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 10:01:52 -08:00

18 lines
616 B
Ruby

require 'formula'
class Geos < Formula
url 'http://download.osgeo.org/geos/geos-3.3.1.tar.bz2'
homepage 'http://trac.osgeo.org/geos/'
sha1 '4f89e62c636dbf3e5d7e1bfcd6d9a7bff1bcfa60'
def install
# fixes compile error: missing symbols being optimized out using llvm.
if ENV.compiler == :llvm then
inreplace 'src/geom/Makefile.in', 'CFLAGS = @CFLAGS@', 'CFLAGS = @CFLAGS@ -O1'
inreplace 'src/geom/Makefile.in', 'CXXFLAGS = @CXXFLAGS@', 'CXXFLAGS = @CXXFLAGS@ -O1'
end
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"
end
end