aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/osm2pgsql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/osm2pgsql.rb')
-rw-r--r--Library/Formula/osm2pgsql.rb23
1 files changed, 22 insertions, 1 deletions
diff --git a/Library/Formula/osm2pgsql.rb b/Library/Formula/osm2pgsql.rb
index 80609df4d..bdbad1fd0 100644
--- a/Library/Formula/osm2pgsql.rb
+++ b/Library/Formula/osm2pgsql.rb
@@ -1,12 +1,33 @@
require 'formula'
-require 'date'
class Osm2pgsql <Formula
head 'http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/', :using => :svn
homepage 'http://wiki.openstreetmap.org/wiki/Osm2pgsql'
+ def patches
+ { :p0 => DATA }
+ end
+
def install
+ system "./autogen.sh"
+ system "./configure"
system "make"
bin.install "osm2pgsql"
end
end
+
+# simple patch needed on osx to find the malloc include
+__END__
+Index: middle-pgsql.c
+===================================================================
+--- middle-pgsql.c (revision 21558)
++++ middle-pgsql.c (working copy)
+@@ -11,7 +11,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <assert.h>
+-#include <malloc.h>
++#include <malloc/malloc.h>
+
+ #ifdef HAVE_PTHREAD
+ #include <pthread.h>