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