diff options
| author | Charlie Sharpsteen | 2011-01-01 15:33:44 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2011-01-01 16:57:03 -0800 |
| commit | b5447a1c0c5e4de9e22d39113e211ff1f4bbfcee (patch) | |
| tree | 8cd19c7afc24dac39b3e2034e3d94a83dbda82e4 | |
| parent | ca284fb8809f41286c5add0196834c25bfa67d93 (diff) | |
| download | homebrew-b5447a1c0c5e4de9e22d39113e211ff1f4bbfcee.tar.bz2 | |
Update PostGIS HEAD build
Bugfix:
- The PostGIS HEAD requires libintl, which requires linking against keg-only
gettext.
Features:
- Added options for enabling the topology and raster extensions that are present
in the HEAD source.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/postgis.rb | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/Library/Formula/postgis.rb b/Library/Formula/postgis.rb index 8069d1d83..0a40fff3f 100644 --- a/Library/Formula/postgis.rb +++ b/Library/Formula/postgis.rb @@ -1,5 +1,13 @@ require 'formula' +def raster? + ARGV.include? '--with-raster' +end + +def topology? + ARGV.include? '--with-topology' +end + class Postgis <Formula url 'http://postgis.refractions.net/download/postgis-1.5.2.tar.gz' homepage 'http://postgis.refractions.net/' @@ -11,12 +19,34 @@ class Postgis <Formula depends_on 'proj' depends_on 'geos' + # For libintl + depends_on 'gettext' if ARGV.build_head? + + def options + [ + ['--with-raster', 'Enable PostGIS Raster extension (HEAD builds only).'], + ['--with-topology', 'Enable PostGIS Topology extension (HEAD builds only).'] + ] + end + def install ENV.deparallelize - system "./autogen.sh" if ARGV.build_head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-projdir=#{HOMEBREW_PREFIX}" + + args = [ + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-projdir=#{HOMEBREW_PREFIX}" + ] + + if ARGV.build_head? + system "./autogen.sh" + gettext = Formula.factory('gettext') + args << "--with-gettext=#{gettext.prefix}" + args << "--with-raster" if raster? + args << "--with-topology" if topology? + end + + system "./configure", *args system "make install" # Copy some of the generated files to the share folder |
