diff --git a/Formula/mapnik.rb b/Formula/mapnik.rb index bc64b69c0bd..f8f7be3ce51 100644 --- a/Formula/mapnik.rb +++ b/Formula/mapnik.rb @@ -14,6 +14,12 @@ class Mapnik < Formula depends_on 'boost' depends_on 'cairomm' => :optional + # Reported upstream: https://github.com/mapnik/mapnik/issues/1171 + # Fix is not yet in HEAD as of 3 MAY 2012, but likely will be in 2.0.2. + def patches + DATA + end + def install ENV.x11 # for freetype-config @@ -50,3 +56,19 @@ class Mapnik < Formula "python" + `python -c 'import sys;print(sys.version[:3])'`.strip end end + +__END__ +--- a/bindings/python/build.py ++++ b/bindings/python/build.py +@@ -143,10 +143,7 @@ paths += "__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]\n" + if not os.path.exists('mapnik'): + os.mkdir('mapnik') + +-if hasattr(os.path,'relpath'): # python 2.6 and above +- file('mapnik/paths.py','w').write(paths % (os.path.relpath(env['MAPNIK_LIB_DIR'],target_path))) +-else: +- file('mapnik/paths.py','w').write(paths % (env['MAPNIK_LIB_DIR'])) ++file('mapnik/paths.py','w').write(paths % (env['MAPNIK_LIB_DIR'])) + + # force open perms temporarily so that `sudo scons install` + # does not later break simple non-install non-sudo rebuild