aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Ackerman2012-03-11 11:16:17 -0700
committerAdam Vandenberg2012-03-15 20:14:47 -0700
commit4d208043f4617fee83e2ad1c2fd6c7a8a75199e9 (patch)
treea27b18bb05651d7d496e2344f760826f499b2d29
parent351d7515b1bbf67d792910e4ac1286e1ecdb135b (diff)
downloadhomebrew-4d208043f4617fee83e2ad1c2fd6c7a8a75199e9.tar.bz2
osm2pgsql: add optional dep on protobuf-c
Also, use a Postgresql requirement Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-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"