Skip to content

Instantly share code, notes, and snippets.

@christoph-buente
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christoph-buente/e18584e312bcadfe82e5 to your computer and use it in GitHub Desktop.
Save christoph-buente/e18584e312bcadfe82e5 to your computer and use it in GitHub Desktop.
Homebrew formula for osm2pgsql 0.8.4 on Mac OS X Mavericks.
require 'formula'
class Osm2pgsql < Formula
homepage 'http://wiki.openstreetmap.org/wiki/Osm2pgsql'
url 'https://github.com/openstreetmap/osm2pgsql/archive/0.84.0.tar.gz'
sha1 '42145c39596580680f120a07a4f30f97a86a3698'
depends_on :postgresql
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "zlib" => :build
depends_on "lbzip2" => :build
depends_on "geos"
depends_on "proj"
depends_on "protobuf-c" => :optional
def install
args = [
"--with-proj=#{Formula["proj"].opt_prefix}",
"--with-zlib=#{Formula["zlib"].opt_prefix}",
"--with-bzip2=#{Formula["lbzip2"].opt_prefix}"
]
if build.with? "protobuf-c"
args << "--with-protobuf-c=#{Formula["protobuf-c"].opt_prefix}"
end
system "./autogen.sh"
system "./configure", *args
system "make"
bin.install "osm2pgsql"
(share+'osm2pgsql').install 'default.style'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment