From 4d208043f4617fee83e2ad1c2fd6c7a8a75199e9 Mon Sep 17 00:00:00 2001 From: Brad Ackerman Date: Sun, 11 Mar 2012 11:16:17 -0700 Subject: osm2pgsql: add optional dep on protobuf-c Also, use a Postgresql requirement Signed-off-by: Adam Vandenberg --- Library/Formula/osm2pgsql.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Library/Formula') 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" -- cgit v1.2.3