From 28a35e12be2eaf02e48d9c572ec829f6718662be Mon Sep 17 00:00:00 2001 From: Adrian Ho Date: Wed, 2 Dec 2020 00:00:44 +0800 Subject: [PATCH] osm2pgsql: reduce lua to build dependency Also add basic test. --- Formula/osm2pgsql.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Formula/osm2pgsql.rb b/Formula/osm2pgsql.rb index 8aa2fe684994..51fbcd82c9d1 100644 --- a/Formula/osm2pgsql.rb +++ b/Formula/osm2pgsql.rb @@ -4,6 +4,7 @@ class Osm2pgsql < Formula url "https://github.com/openstreetmap/osm2pgsql/archive/1.3.0.tar.gz" sha256 "1c0f229047491cf7d054c6f8fcb846eb3163c336340fa82035e19cc2bb7f0179" license "GPL-2.0-only" + revision 1 head "https://github.com/openstreetmap/osm2pgsql.git" bottle do @@ -14,9 +15,9 @@ class Osm2pgsql < Formula end depends_on "cmake" => :build + depends_on "lua" => :build depends_on "boost" depends_on "geos" - depends_on "lua" depends_on "luajit" depends_on "postgresql" depends_on "proj" @@ -40,6 +41,7 @@ def install end test do - assert_match version.to_s, shell_output("#{bin}/osm2pgsql -h 2>&1") + assert_match "Connection to database failed: could not connect to server", + shell_output("#{bin}/osm2pgsql /dev/null 2>&1", 2) end end