Blob Blame History Raw
commit 05bbb2ebaf683b022ef716df757a620f1bde4119
Author: Tom Hughes <tom@compton.nu>
Date:   Sat Sep 10 12:00:00 2016 +0100

    Build against system libraries

diff --git a/bin/mapnik-index.js b/bin/mapnik-index.js
index 0e18ada..04430dc 100755
--- a/bin/mapnik-index.js
+++ b/bin/mapnik-index.js
@@ -3,7 +3,7 @@
 'use strict';
 
 var path = require('path'),
-    bindingPath = path.resolve(path.join(__dirname, 'binding/mapnik.node')),
+    bindingPath = path.resolve(path.join(__dirname, '..', 'lib', 'binding', 'mapnik.node')),
     program = path.join(path.dirname(bindingPath), 'bin', 'mapnik-index'),
     spawn = require('child_process').spawn,
     fs = require('fs');
diff --git a/bin/mapnik-shapeindex.js b/bin/mapnik-shapeindex.js
index 0d73b7f..d4fed9f 100755
--- a/bin/mapnik-shapeindex.js
+++ b/bin/mapnik-shapeindex.js
@@ -3,7 +3,7 @@
 'use strict';
 
 var path = require('path'),
-    bindingPath = path.resolve(path.join(__dirname, 'binding/mapnik.node')),
+    bindingPath = path.resolve(path.join(__dirname, '..', 'lib', 'binding', 'mapnik.node')),
     shapeindex = path.join(path.dirname(bindingPath), 'bin', 'shapeindex'),
     spawn = require('child_process').spawn,
     fs = require('fs');
diff --git a/binding.gyp b/binding.gyp
index dd58659..4f024e7 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -54,16 +54,8 @@
         4267
       ],
       'include_dirs': [
-        './mason_packages/.link/include/',
-        './mason_packages/.link/include/freetype2',
-        './mason_packages/.link/include/cairo',
         './src',
         "<!(node -e \"require('nan')\")",
-        # TODO: move these to mason packages once we have a minimal windows client for mason (@springmeyer)
-        # https://github.com/mapbox/mason/issues/396
-        "./deps/geometry/include/",
-        "./deps/wagyu/include/",
-        "<!(node -e \"require('protozero')\")",
         "<!(node -e \"require('mapnik-vector-tile')\")"
       ],
       'defines': [
@@ -96,8 +88,7 @@
           {
             'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
             'cflags_cc' : [
-              '<!@(mapnik-config --cflags)',
-              '-D_GLIBCXX_USE_CXX11_ABI=0'
+              '<!@(mapnik-config --cflags)'
             ],
             'libraries':[
               '<!@(mapnik-config --libs)',
@@ -132,25 +123,5 @@
         ]
       ]
     },
-    {
-      'target_name': 'action_after_build',
-      'type': 'none',
-      'dependencies': [ '<(module_name)' ],
-      'hard_dependency': 1,
-      'conditions': [
-        ['OS!="win"',
-          {
-            'actions': [
-              {
-                'action_name': 'postinstall',
-                'inputs': ['./scripts/postinstall.sh'],
-                'outputs': ['./lib/binding/mapnik'],
-                'action': ['./scripts/postinstall.sh']
-              }
-            ]
-          }
-        ]
-      ]
-    },
   ]
 }
diff --git a/gen_settings.py b/gen_settings.py
index 3aa3e38..75b2f4f 100644
--- a/gen_settings.py
+++ b/gen_settings.py
@@ -7,7 +7,9 @@ settings = os.path.abspath(sys.argv[1])
 settings_template = """
 module.exports.paths = {
     'fonts': %s,
-    'input_plugins': %s
+    'input_plugins': %s,
+    'mapnik_index': 'mapnik-index',
+    'shape_index': 'shapeindex'
 };
 """
 
@@ -28,12 +30,12 @@ if __name__ == '__main__':
     if ip:
         settings_dict['input_plugins'] = ip
     else:
-        settings_dict['input_plugins'] = '\'%s\'' % os.popen("./mason_packages/.link/bin/mapnik-config --input-plugins").readline().strip()
+        settings_dict['input_plugins'] = '\'%s\'' % os.popen("mapnik-config --input-plugins").readline().strip()
     
     mf = os.environ.get('MAPNIK_FONTS')
     if mf:
         settings_dict['fonts'] = mf
     else:
-        settings_dict['fonts'] = '\'%s\'' % os.popen("./mason_packages/.link/bin/mapnik-config --fonts").readline().strip()
+        settings_dict['fonts'] = '\'%s\'' % os.popen("mapnik-config --fonts").readline().strip()
 
     write_mapnik_settings(**settings_dict)
diff --git a/lib/mapnik.js b/lib/mapnik.js
index ef64c92..57e783d 100644
--- a/lib/mapnik.js
+++ b/lib/mapnik.js
@@ -2,7 +2,7 @@
 
 var exists = require('fs').existsSync || require('path').existsSync;
 var path = require('path');
-var binding_path = path.resolve(path.join(__dirname,'binding/mapnik.node'));
+var binding_path = path.resolve(path.join(__dirname, 'binding', 'mapnik.node'));
 var settings_path = path.join(path.dirname(binding_path),'mapnik_settings.js');
 var settings = require(settings_path);