mapnik / mapnik-packaging

DEPRECATED packaging utilities for mapnik dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rewrite pkgconfig for protobuf

springmeyer opened this issue · comments

need some way to avoid incorrect absolute paths from being carried through to SDKs.

Note to self: workaround for node-mapnik:

diff --git a/binding.gyp b/binding.gyp
index 20d712d..d2ef0d9 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -122,12 +122,12 @@
             'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
             'cflags_cc' : [
                 '<!@(mapnik-config --cflags)',
-                '<!@(pkg-config protobuf --cflags)'
+                '<!@(pkg-config protobuf --cflags --define-variable=prefix=/foo)'
             ],
             'libraries':[
                 '<!@(mapnik-config --libs)',
                 '<!@(mapnik-config --ldflags)',
-                '<!@(pkg-config protobuf --libs-only-L)',
+                '<!@(pkg-config protobuf --libs-only-L --define-variable=prefix=/foo)',
                 '-lprotobuf-lite'
             ],
             'conditions': [
@@ -140,11 +140,11 @@
             'xcode_settings': {
               'OTHER_CPLUSPLUSFLAGS':[
                   '<!@(mapnik-config --cflags)',
-                  '<!@(pkg-config protobuf --cflags)'
+                  '<!@(pkg-config protobuf --cflags --define-variable=prefix=/foo)'
               ],
               'OTHER_CFLAGS':[
                   '<!@(mapnik-config --cflags)',
-                  '<!@(pkg-config protobuf --cflags)'
+                  '<!@(pkg-config protobuf --cflags --define-variable=prefix=/foo)'
               ],
               'GCC_ENABLE_CPP_RTTI': 'YES',
               'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'