2013-06-04 17:06:04 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Osm2pgsql < Formula
|
|
|
|
homepage 'http://wiki.openstreetmap.org/wiki/Osm2pgsql'
|
2013-12-01 20:52:45 +00:00
|
|
|
url 'https://github.com/openstreetmap/osm2pgsql/archive/0.84.0.tar.gz'
|
|
|
|
sha1 '42145c39596580680f120a07a4f30f97a86a3698'
|
2013-06-04 17:06:04 +00:00
|
|
|
|
|
|
|
depends_on :postgresql
|
2013-11-13 17:01:29 +00:00
|
|
|
depends_on :autoconf
|
2013-06-04 17:06:04 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
|
|
|
depends_on "geos"
|
|
|
|
depends_on "proj"
|
|
|
|
depends_on "protobuf-c" => :optional
|
|
|
|
|
|
|
|
def install
|
2013-08-22 03:35:51 +00:00
|
|
|
args = ["--with-proj=#{Formula.factory('proj').opt_prefix}"]
|
|
|
|
if build.with? "protobuf-c"
|
|
|
|
args << "--with-protobuf-c=#{Formula.factory('protobuf-c').opt_prefix}"
|
|
|
|
end
|
2013-06-04 17:06:04 +00:00
|
|
|
system "./autogen.sh"
|
2013-08-22 03:35:51 +00:00
|
|
|
system "./configure", *args
|
2013-06-04 17:06:04 +00:00
|
|
|
system "make"
|
|
|
|
bin.install "osm2pgsql"
|
|
|
|
(share+'osm2pgsql').install 'default.style'
|
|
|
|
end
|
|
|
|
end
|