diff options
| author | Charlie Sharpsteen | 2012-06-25 09:41:28 -0800 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-06-25 09:41:28 -0800 |
| commit | d075914435ef035a495603b98e7f0b760e8a93cf (patch) | |
| tree | 18bf7f539a4b35ce2820a4d2f1a423a77772d32e /Library/Formula | |
| parent | b9d370084e6f7891b336115802bf72b3bac69585 (diff) | |
| download | homebrew-d075914435ef035a495603b98e7f0b760e8a93cf.tar.bz2 | |
postgis: Update to 2.0.1
Also, make PostGIS friendly to `--ignore-dependencies` as it is common to
want a PostGIS upgrade without upgrading Postgres.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/postgis.rb | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Library/Formula/postgis.rb b/Library/Formula/postgis.rb index 811675047..3ba942ea0 100644 --- a/Library/Formula/postgis.rb +++ b/Library/Formula/postgis.rb @@ -6,8 +6,8 @@ end class Postgis < Formula homepage 'http://postgis.refractions.net' - url 'http://postgis.org/download/postgis-2.0.0.tar.gz' - md5 '639d2b5d6a7dc94ea2e60d6942a615bc' + url 'http://postgis.org/download/postgis-2.0.1.tar.gz' + sha1 '31db797a835f14470f9e1183fe8fd2ba7b99aadf' head 'http://svn.osgeo.org/postgis/trunk/' @@ -36,9 +36,14 @@ class Postgis < Formula # them---these are callbacks for liblwgeom. skip_clean :all + def postgresql + # Follow the PostgreSQL linked keg back to the active Postgres installation + # as it is common for people to avoid upgrading Postgres. + Formula.factory('postgresql').linked_keg.realpath + end + def install ENV.deparallelize - postgresql = Formula.factory 'postgresql' jsonc = Formula.factory 'json-c' args = [ @@ -46,11 +51,11 @@ class Postgis < Formula # Can't use --prefix, PostGIS disrespects it and flat-out refuses to # accept it with 2.0. "--with-projdir=#{HOMEBREW_PREFIX}", - "--with-jsondir=#{jsonc.prefix}", + "--with-jsondir=#{jsonc.linked_keg.realpath}", # This is against Homebrew guidelines, but we have to do it as the # PostGIS plugin libraries can only be properly inserted into Homebrew's # Postgresql keg. - "--with-pgconfig=#{postgresql.bin}/pg_config", + "--with-pgconfig=#{postgresql}/bin/pg_config", # Unfortunately, NLS support causes all kinds of headaches because # PostGIS gets all of it's compiler flags from the PGXS makefiles. This # makes it nigh impossible to tell the buildsystem where our keg-only @@ -75,11 +80,11 @@ class Postgis < Formula # Install PostGIS plugin libraries into the Postgres keg so that they can # be loaded and so PostGIS databases will continue to function even if # PostGIS is removed. - postgresql.lib.install Dir['stage/**/*.so'] + (postgresql/'lib').install Dir['stage/**/*.so'] # Install extension scripts to the Postgres keg. # `CREATE EXTENSION postgis;` won't work if these are located elsewhere. - (postgresql.share + 'postgresql' + 'extension').install Dir['stage/**/extension/*'] + (postgresql/'share/postgresql/extension').install Dir['stage/**/extension/*'] bin.install Dir['stage/**/bin/*'] lib.install Dir['stage/**/lib/*'] @@ -104,8 +109,6 @@ class Postgis < Formula end def caveats; - postgresql = Formula.factory 'postgresql' - <<-EOS.undent To create a spatially-enabled database, see the documentation: http://postgis.refractions.net/documentation/manual-2.0/postgis_installation.html#create_new_db_extensions @@ -115,9 +118,9 @@ class Postgis < Formula PostGIS SQL scripts installed to: #{HOMEBREW_PREFIX}/share/postgis PostGIS plugin libraries installed to: - #{postgresql.lib} + #{postgresql}/lib PostGIS extension modules installed to: - #{postgresql.share}/postgresql/extension - EOS + #{postgresql}/share/postgresql/extension + EOS end end |
