This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

mapnik: fix relative path in paths.py

Add patch to mapnik.rb to use an absolute path into site-packages
rather than a relative path in the file `paths.py`.  The upstream
bug report is noted in the formula comments and is where the patch
offered by the developer came from.

Fixes #12026.
Closes #12043.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
  • Loading branch information...
1 parent 2509e55 commit 579ca13946acbd7470bd81b83e0b704ff67fe383 nibbles 2bits committed with Sharpie May 3, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 Library/Formula/mapnik.rb
View
@@ -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 @@ def which_python
"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

0 comments on commit 579ca13

Please sign in to comment.