diff options
| author | Charlie Sharpsteen | 2012-02-16 23:43:48 -0800 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-02-17 16:16:36 -0800 |
| commit | 3f06c0db98d2284e1c3acbc1a2ca4fca43ad417b (patch) | |
| tree | 70523d3ea72bac075d3a21e96e6eff9d128132c0 /Library | |
| parent | a9c0280673de97fee8e9a996c86d4abd8fce5721 (diff) | |
| download | homebrew-3f06c0db98d2284e1c3acbc1a2ca4fca43ad417b.tar.bz2 | |
PostGIS: Add --with-gui option
Builds the GKT+ based GUI for loading shapefiles into a database.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/postgis.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Formula/postgis.rb b/Library/Formula/postgis.rb index d3e52ea52..2f40299e6 100644 --- a/Library/Formula/postgis.rb +++ b/Library/Formula/postgis.rb @@ -1,5 +1,9 @@ require 'formula' +def build_gui? + ARGV.include? '--with-gui' +end + class Postgis < Formula url 'http://postgis.refractions.net/download/postgis-1.5.3.tar.gz' homepage 'http://postgis.refractions.net/' @@ -17,12 +21,20 @@ class Postgis < Formula depends_on 'proj' depends_on 'geos' + depends_on 'gtk+' if build_gui? + # For GeoJSON and raster handling if ARGV.build_head? or ARGV.build_devel? depends_on 'gdal' depends_on 'json-c' end + def options + [ + ['--with-gui', 'Build shp2pgsql-gui in addition to command line tools'] + ] + end + # PostGIS command line tools intentionally have unused symbols in # them---these are callbacks for liblwgeom. skip_clean :all @@ -40,6 +52,7 @@ class Postgis < Formula # Postgresql keg. "--with-pgconfig=#{postgresql.bin}/pg_config" ] + args << '--with-gui' if build_gui? if ARGV.build_head? or ARGV.build_devel? jsonc = Formula.factory 'json-c' @@ -91,6 +104,7 @@ class Postgis < Formula loader/.libs/shp2pgsql raster/loader/.libs/raster2pgsql ] + bin.install 'loader/.libs/shp2pgsql-gui' if build_gui? # Install PostGIS 2.0 SQL scripts postgis_sql.install %w[ @@ -120,6 +134,7 @@ class Postgis < Formula loader/shp2pgsql utils/new_postgis_restore.pl ] + bin.install 'loader/shp2pgsql-gui' if build_gui? # Install PostGIS 1.x upgrade scripts postgis_sql.install %w[ |
