homebrew-core/Formula/osm2pgsql.rb
2016-08-22 08:37:13 -07:00

43 lines
1.3 KiB
Ruby

class Osm2pgsql < Formula
desc "OpenStreetMap data to PostgreSQL converter"
homepage "https://wiki.openstreetmap.org/wiki/Osm2pgsql"
head "https://github.com/openstreetmap/osm2pgsql.git"
stable do
url "https://github.com/openstreetmap/osm2pgsql/archive/0.90.1.tar.gz"
sha256 "f9ba09714603db251e4a357c1968640c350b0ca5c99712008dadc71c0c3e898b"
# Remove for >0.90.1; adds the option to build without lua (-DWITH_LUA=OFF)
patch do
url "https://github.com/openstreetmap/osm2pgsql/commit/dbbca884.patch"
sha256 "1efce5c8feeb3646450bee567582252b15634c7e139d4aa73058efbd8236fb60"
end
end
bottle do
sha256 "b465872486185424901fbdf771d4bc5d6e0a443429991b19583fbb81d5e112d8" => :el_capitan
sha256 "41bfe9b7ffb6d3ae68666526916e2bc2813ac48b435c71a99b17c08b4961715c" => :yosemite
sha256 "5c8730f1b37bef49f57aea9c913c64bc410da5122d1fc02ab48693322e26908c" => :mavericks
end
depends_on "cmake" => :build
depends_on :postgresql
depends_on "boost"
depends_on "geos"
depends_on "proj"
depends_on "lua" => :recommended
def install
args = std_cmake_args
args << "-DWITH_LUA=OFF" if build.without? "lua"
mkdir "build" do
system "cmake", "..", *args
system "make", "install"
end
end
test do
assert_match version.to_s, shell_output("#{bin}/osm2pgsql -h 2>&1")
end
end