homebrew-core/Formula/osm2pgsql.rb

43 lines
855 B
Ruby
Raw Normal View History

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
2011-03-10 05:11:03 +00:00
class Osm2pgsql < Formula
homepage 'http://wiki.openstreetmap.org/wiki/Osm2pgsql'
2012-05-10 14:10:12 +00:00
head 'http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/'
depends_on PostgresqlInstalled.new
2012-07-07 18:08:22 +00:00
depends_on :automake
depends_on :libtool
depends_on "geos"
depends_on "proj"
depends_on "protobuf-c" => :optional
def install
system "./autogen.sh"
system "./configure"
system "make"
bin.install "osm2pgsql"
(share+'osm2pgsql').install 'default.style'
end
end