diff options
| author | Baptiste Fontaine | 2015-02-02 10:32:25 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-02 11:01:46 +0000 |
| commit | 04669a980d57aba102ad711ad2f836024d5b48f9 (patch) | |
| tree | dbe7f9cfcd1ce5198679036dca92d0a2856d3558 | |
| parent | 6576b13fa2223735bdf3d17813514169a0489907 (diff) | |
| download | homebrew-04669a980d57aba102ad711ad2f836024d5b48f9.tar.bz2 | |
osm2pgsql 0.87.0
Closes #36455.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/osm2pgsql.rb | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/Library/Formula/osm2pgsql.rb b/Library/Formula/osm2pgsql.rb index 9e3a28c97..ee7b16b6f 100644 --- a/Library/Formula/osm2pgsql.rb +++ b/Library/Formula/osm2pgsql.rb @@ -1,9 +1,7 @@ -require "formula" - class Osm2pgsql < Formula homepage "http://wiki.openstreetmap.org/wiki/Osm2pgsql" - url "https://github.com/openstreetmap/osm2pgsql/archive/0.86.0.tar.gz" - sha1 "243c0db886634b90563217afdc897ad49ab9a238" + url "https://github.com/openstreetmap/osm2pgsql/archive/0.87.0.tar.gz" + sha1 "6f302500e52d6e42147cc8dff8f344677e3131f8" bottle do cellar :any @@ -16,23 +14,42 @@ class Osm2pgsql < Formula depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build + depends_on "boost" => :build depends_on "geos" depends_on "proj" depends_on "protobuf-c" => :optional + # Fixes an upstream issue: + # https://github.com/openstreetmap/osm2pgsql/issues/196 + # Remove the patch when upgrading + patch do + url "https://github.com/openstreetmap/osm2pgsql/commit/943684a9b86bee46d245970b3e5870f83afc9208.diff" + sha1 "01c681513959b285038b3582afc1c1d63e440209" + end + def install args = [ + "--prefix=#{prefix}", + "--disable-dependency-tracking", "--with-proj=#{Formula["proj"].opt_prefix}", + "--with-boost=#{Formula["boost"].opt_prefix}", "--with-zlib=/usr", - "--with-bzip2=/usr" + "--with-bzip2=/usr", + # Related to the patch, remove this line when upgrading + "--without-lockfree", ] + puts args 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" + system "make", "install" + end + + test do + assert_match "version #{version}", + shell_output("#{bin}/osm2pgsql -h 2>&1", 1) end end |
