diff options
| author | nibbles 2bits | 2012-05-03 15:43:36 -0700 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-05-04 11:53:58 -0700 |
| commit | 579ca13946acbd7470bd81b83e0b704ff67fe383 (patch) | |
| tree | d05f6696e1abb46fee5200709f20d31c1d629a2d /Library | |
| parent | 2509e552901e88818843403dc4f7cd7612b20992 (diff) | |
| download | homebrew-579ca13946acbd7470bd81b83e0b704ff67fe383.tar.bz2 | |
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>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mapnik.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Formula/mapnik.rb b/Library/Formula/mapnik.rb index bc64b69c0..f8f7be3ce 100644 --- a/Library/Formula/mapnik.rb +++ b/Library/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 |
