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
|
|
|
|
2014-06-04 13:25:19 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "dc345c1a9879184ad88a193e9a6ebfcf65f3750a" => :mavericks
|
|
|
|
sha1 "b4ecf55fdc125fccb7d994004b46938e8636fbcf" => :mountain_lion
|
|
|
|
sha1 "e0dd38b56230cfdad09abda16594fe978352b515" => :lion
|
|
|
|
end
|
|
|
|
|
2013-06-04 17:06:04 +00:00
|
|
|
depends_on :postgresql
|
2014-06-01 01:39:27 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2013-06-04 17:06:04 +00:00
|
|
|
depends_on "geos"
|
|
|
|
depends_on "proj"
|
|
|
|
depends_on "protobuf-c" => :optional
|
|
|
|
|
|
|
|
def install
|
2014-06-04 12:44:26 +00:00
|
|
|
args = [
|
|
|
|
"--with-proj=#{Formula["proj"].opt_prefix}",
|
|
|
|
"--with-zlib=/usr",
|
|
|
|
"--with-bzip2=/usr"
|
|
|
|
]
|
2013-08-22 03:35:51 +00:00
|
|
|
if build.with? "protobuf-c"
|
2014-02-27 04:29:12 +00:00
|
|
|
args << "--with-protobuf-c=#{Formula["protobuf-c"].opt_prefix}"
|
2013-08-22 03:35:51 +00:00
|
|
|
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
|