From 23ac8e412488df94a6a3ff774a09ebd6d1eaa2cc Mon Sep 17 00:00:00 2001 From: Aleksandar Topuzovic Date: Tue, 9 Nov 2010 23:05:44 +0100 Subject: [PATCH] mapnik 0.7.1 Signed-off-by: Adam Vandenberg --- Formula/mapnik.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Formula/mapnik.rb diff --git a/Formula/mapnik.rb b/Formula/mapnik.rb new file mode 100644 index 0000000000..04be7b74c7 --- /dev/null +++ b/Formula/mapnik.rb @@ -0,0 +1,31 @@ +require 'formula' + +class Mapnik < Formula + url 'http://download.berlios.de/mapnik/mapnik-0.7.1.tar.gz' + homepage 'http://www.mapnik.org/' + md5 '3a070fdd7c6a3367ad78d95c2387b03b' + + depends_on 'pkg-config' => :build + depends_on 'scons' => :build + depends_on 'libtiff' + depends_on 'jpeg' + depends_on 'proj' + depends_on 'icu4c' + depends_on 'boost' + depends_on 'cairomm' => :optional + + def install + ENV.x11 # for freetype-config + + # Allow compilation against boost 1.46 + inreplace ["src/datasource_cache.cpp", "src/libxml2_loader.cpp", "src/load_map.cpp", "src/tiff_reader.cpp"], + "#include ", + "#define BOOST_FILESYSTEM_VERSION 2\n#include " + + icu = Formula.factory("icu4c") + system "scons", + "PREFIX=#{prefix}", + "ICU_INCLUDES=#{icu.include}", "ICU_LIBS=#{icu.lib}", + "install" + end +end