aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/osm2pgsql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/osm2pgsql.rb')
-rw-r--r--Library/Formula/osm2pgsql.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Formula/osm2pgsql.rb b/Library/Formula/osm2pgsql.rb
index 0cf3301c2..717703a1f 100644
--- a/Library/Formula/osm2pgsql.rb
+++ b/Library/Formula/osm2pgsql.rb
@@ -1,5 +1,24 @@
require 'formula'
+class PostgresqlInstalled < Requirement
+ def message; <<-EOS.undent
+ PostgresQL is required to install.
+
+ You can install this with:
+ brew install postgresql
+
+ Or you can use an official installer from:
+ http://www.postgresql.org/
+ EOS
+ end
+ def satisfied?
+ which 'pg_config'
+ end
+ def fatal?
+ true
+ end
+end
+
class Osm2pgsql < Formula
head 'http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/', :using => :svn
homepage 'http://wiki.openstreetmap.org/wiki/Osm2pgsql'
@@ -9,8 +28,10 @@ class Osm2pgsql < Formula
depends_on "libtool" => :build
end
+ depends_on PostgresqlInstalled.new
depends_on "geos"
depends_on "proj"
+ depends_on "protobuf-c" => :optional
def install
system "./autogen.sh"