diff options
| author | Charlie Sharpsteen | 2012-04-21 12:18:38 -0700 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-04-21 14:57:22 -0700 |
| commit | 11d98bb340f820931571f432a1211fb8e99dd6c7 (patch) | |
| tree | 993300d0ea95e56019c40f006bd30917ea113f6e /Library | |
| parent | 193ca71d33eef7ab20dcbe2aea762c9cacfa70b2 (diff) | |
| download | homebrew-11d98bb340f820931571f432a1211fb8e99dd6c7.tar.bz2 | |
GRASS: Fix Lion builds
- Disable WxPython GUI. We have no stable WxMac build for this and building
WxPython has the additional constraint of requiring a Framework build of
Python.
- Flag as failing with clang.
Fixes #8594.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/grass.rb | 70 |
1 files changed, 52 insertions, 18 deletions
diff --git a/Library/Formula/grass.rb b/Library/Formula/grass.rb index 92bc4fa5b..7f92b141b 100644 --- a/Library/Formula/grass.rb +++ b/Library/Formula/grass.rb @@ -8,6 +8,15 @@ def mysql? ARGV.include? "--with-mysql" end +def headless? + # The GRASS GUI is based on WxPython. Unfortunately, Lion does not include + # this module so we have to drop it. + # + # This restriction can be lifted once WxMac hits a stable release that is + # 64-bit capable. + ARGV.include? '--without-gui' or MacOS.lion? +end + class Grass < Formula homepage 'http://grass.osgeo.org/' url 'http://grass.osgeo.org/grass64/source/grass-6.4.2.tar.gz' @@ -28,10 +37,19 @@ class Grass < Formula # are not installed outside of the prefix. def patches; DATA; end + fails_with :clang do + build 318 + + cause <<-EOS.undent + Multiple build failures while compiling GRASS tools. + EOS + end + def options [ ['--with-postgres', 'Specify PostgreSQL as a dependency'], - ['--with-mysql', 'Specify MySQL as a dependency'] + ['--with-mysql', 'Specify MySQL as a dependency'], + ['--without-gui', 'Build without WxPython interface. Command line tools still available.'] ] end @@ -50,7 +68,6 @@ class Grass < Formula "--with-x", "--without-motif", "--with-python=/usr/bin/python-config", - "--with-wxwidgets=/usr/bin/wx-config", "--with-blas", "--with-lapack", "--with-sqlite", @@ -69,6 +86,12 @@ class Grass < Formula "--without-tcltk" # Disabled due to compatibility issues with OS X Tcl/Tk ] + if headless? + args << "--without-wxwidgets" + else + args << "--with-wxwidgets=/usr/bin/wx-config" + end + if MacOS.prefer_64_bit? args << "--enable-64bit" args << "--with-macosx-archs=x86_64" @@ -102,22 +125,33 @@ class Grass < Formula end def caveats - caveats = <<-EOS -GRASS is currently in a transition period with respect to GUI support. The old -Tcl/Tk GUI cannot be built using the version of Tcl/Tk provided by OS X. This -has the unfortunate consquence of disabling the NVIZ visualization system. A -keg-only Tcl/Tk brew or some deep hackery of the GRASS source may be possible -ways to get around this around this. - -Tcl/Tk will eventually be depreciated in GRASS 7 and this version has been built -to support the newer wxPython based GUI. However, there is a problem as -wxWidgets does not compile as a 64 bit library on OS X which affects Snow -Leopard users. In order to remedy this, the GRASS startup script: - - #{prefix}/grass-6.4.0/etc/Init.sh - -has been modified to use the OS X system Python and to start it in 32 bit mode. - EOS + if headless? + <<-EOS.undent + This build of GRASS has been compiled without the WxPython GUI. This is + done by default on Lion because there is no stable build of WxPython + available to compile against. + + The command line tools remain fully functional. + EOS + else + <<-EOS.undent + GRASS is currently in a transition period with respect to GUI support. + The old Tcl/Tk GUI cannot be built using the version of Tcl/Tk provided + by OS X. This has the unfortunate consquence of disabling the NVIZ + visualization system. A keg-only Tcl/Tk brew or some deep hackery of + the GRASS source may be possible ways to get around this around this. + + Tcl/Tk will eventually be depreciated in GRASS 7 and this version has + been built to support the newer wxPython based GUI. However, there is + a problem as wxWidgets does not compile as a 64 bit library on OS X + which affects Snow Leopard users. In order to remedy this, the GRASS + startup script: + + #{prefix}/grass-6.4.0/etc/Init.sh + + has been modified to use the OS X system Python and to start it in 32 bit mode. + EOS + end end end |
