2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-10-02 18:02:51 +00:00
|
|
|
|
|
|
|
class Postgis <Formula
|
2010-03-22 20:12:23 +00:00
|
|
|
url 'http://postgis.refractions.net/download/postgis-1.5.1.tar.gz'
|
2009-10-02 18:02:51 +00:00
|
|
|
homepage 'http://postgis.refractions.net/'
|
2010-03-22 20:12:23 +00:00
|
|
|
md5 '8353b38c38282b2192f01693f71b8d28'
|
2009-10-02 18:02:51 +00:00
|
|
|
|
|
|
|
depends_on 'postgresql'
|
|
|
|
depends_on 'proj'
|
|
|
|
depends_on 'geos'
|
|
|
|
|
|
|
|
def install
|
2010-03-22 22:43:58 +00:00
|
|
|
ENV.deparallelize
|
2010-03-24 13:01:22 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", "--with-projdir=#{HOMEBREW_PREFIX}"
|
2009-10-02 18:02:51 +00:00
|
|
|
system "make install"
|
2009-10-02 22:22:45 +00:00
|
|
|
|
|
|
|
# Copy some of the generated files to the share folder
|
2010-02-06 14:31:52 +00:00
|
|
|
(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 )
|
2009-10-02 22:22:45 +00:00
|
|
|
# Copy loader and utils binaries to bin folder
|
2010-02-06 14:31:52 +00:00
|
|
|
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 )
|
2010-05-07 16:31:01 +00:00
|
|
|
end
|
2009-10-02 22:22:45 +00:00
|
|
|
|
2010-05-07 16:31:01 +00:00
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
To create a spatially-enabled database, see the documentation:
|
|
|
|
http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2786223
|
|
|
|
EOS
|
2009-10-02 18:02:51 +00:00
|
|
|
end
|
|
|
|
end
|