aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorKashif Rasul2011-09-11 07:28:53 -0600
committerCharlie Sharpsteen2011-09-11 09:44:49 -0700
commit9a25b0554cbb874fe250c9af266d6b088b83bbda (patch)
treecfc5afcbad5807955bc23f1230ee44d047ef11ec /Library/Formula
parent1cf80272fc5982a8d468ddc0ee8f1c9b34c99f28 (diff)
downloadhomebrew-9a25b0554cbb874fe250c9af266d6b088b83bbda.tar.bz2
PostGIS: Fix installation of SQL files for --HEAD
Fixed the formula which was not compiling for Postgis --HEAD. Closes #7566. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/postgis.rb38
1 files changed, 24 insertions, 14 deletions
diff --git a/Library/Formula/postgis.rb b/Library/Formula/postgis.rb
index 79e3f6596..3ba4b5699 100644
--- a/Library/Formula/postgis.rb
+++ b/Library/Formula/postgis.rb
@@ -39,15 +39,15 @@ class Postgis < Formula
"--with-projdir=#{HOMEBREW_PREFIX}"
]
- # Apple ship a postgres client in Lion, conflicts with installed PostgreSQL server.
+ # Apple ships a postgres client in Lion, conflicts with installed PostgreSQL server.
if MacOS.lion?
- postgresql = Formula.factory('postgresql')
+ postgresql = Formula.factory 'postgresql'
args << "--with-pgconfig=#{postgresql.bin}/pg_config"
end
if ARGV.build_head?
system "./autogen.sh"
- gettext = Formula.factory('gettext')
+ gettext = Formula.factory 'gettext'
args << "--with-gettext=#{gettext.prefix}"
args << "--with-raster" if raster?
args << "--with-topology" if topology?
@@ -56,25 +56,35 @@ class Postgis < Formula
system "./configure", *args
system "make install"
- # Copy some of the generated files to the share folder
- (share+'postgis').install %w(
- spatial_ref_sys.sql postgis/postgis.sql
- postgis/postgis_upgrade_13_to_15.sql
- postgis/postgis_upgrade_14_to_15.sql
- postgis/postgis_upgrade_15_minor.sql postgis/uninstall_postgis.sql
- )
+ # Copy generated SQL files to the share folder
+ postgis_sql = share + 'postgis'
+ # Install common SQL scripts
+ postgis_sql.install %w[spatial_ref_sys.sql postgis/postgis.sql postgis/uninstall_postgis.sql]
if ARGV.build_head?
- (share+'postgis').install 'raster/rt_pg/rtpostgis.sql' if raster?
- (share+'postgis').install 'topology/topology.sql' if topology?
+ # Install PostGIS 2.0 SQL scripts
+ postgis_sql.install %w[
+ postgis/legacy.sql postgis/legacy_compatibility_layer.sql postgis/uninstall_legacy.sql
+ postgis/postgis_upgrade_20_minor.sql
+ ]
+ postgis_sql.install 'raster/rt_pg/rtpostgis.sql' if raster?
+ postgis_sql.install 'topology/topology.sql' if topology?
+ else
+ # Install PostGIS 1.x upgrade scripts
+ postgis_sql.install %w[
+ postgis/postgis_upgrade_13_to_15.sql
+ postgis/postgis_upgrade_14_to_15.sql
+ postgis/postgis_upgrade_15_minor.sql
+ ]
end
# Copy loader and utils binaries to bin folder
- bin.install %w(
+ bin.install %w[
loader/pgsql2shp loader/shp2pgsql utils/create_undef.pl
utils/new_postgis_restore.pl utils/postgis_proc_upgrade.pl
utils/postgis_restore.pl utils/profile_intersects.pl
- )
+ utils/test_estimation.pl utils/test_joinestimation.pl
+ ]
end
def caveats; <<-EOS.undent