diff --git a/.travis.yml b/.travis.yml index 6e8b1384..03e381cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -182,6 +182,13 @@ matrix: # Overrides `script` to disable publishing before_script: - npm test + # test building with out SSE_MATH enabled + - os: linux + env: BUILDTYPE=release SSE_MATH=false + node_js: 4 + # Overrides `script` to disable publishing + before_script: + - npm test # Coverage build - os: linux env: BUILDTYPE=debug CXXFLAGS="--coverage" LDFLAGS="--coverage" diff --git a/CHANGELOG.md b/CHANGELOG.md index 38cb854a..a4b71966 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 3.7.1 + +- Mapnik 3.7.0 was not properly published to npm with node-pre-gyp. Releasing again with fix. +- Fix to `SSE_MATH` flag during building + ## 3.7.0 Updated to 3.0.18 of mapnik. See [here](https://github.com/mapnik/mapnik/blob/master/CHANGELOG.md). diff --git a/Makefile b/Makefile index 003a1f48..de662ad7 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ MODULE_NAME := $(shell node -e "console.log(require('./package.json').binary.module_name)") +SSE_MATH ?= true + default: release ifneq (,$(findstring clang,$(CXX))) @@ -23,11 +25,11 @@ pre_build_check: mapnik-config -v release_base: pre_build_check deps/geometry/include/mapbox/geometry.hpp node_modules - V=1 CXXFLAGS="-fno-omit-frame-pointer $(PROFILING_FLAG)" ./node_modules/.bin/node-pre-gyp configure build --ENABLE_GLIBC_WORKAROUND=true --loglevel=error --clang + V=1 CXXFLAGS="-fno-omit-frame-pointer $(PROFILING_FLAG)" ./node_modules/.bin/node-pre-gyp configure build --ENABLE_GLIBC_WORKAROUND=true --enable_sse=$(SSE_MATH) --loglevel=error --clang @echo "run 'make clean' for full rebuild" debug_base: pre_build_check deps/geometry/include/mapbox/geometry.hpp node_modules - V=1 ./node_modules/.bin/node-pre-gyp configure build --ENABLE_GLIBC_WORKAROUND=true --loglevel=error --debug --clang + V=1 ./node_modules/.bin/node-pre-gyp configure build --ENABLE_GLIBC_WORKAROUND=true --enable_sse=$(SSE_MATH) --loglevel=error --debug --clang @echo "run 'make clean' for full rebuild" release: mason_packages/.link/bin/mapnik-config diff --git a/package.json b/package.json index 221b70cc..0b9594e9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "url": "http://github.com/mapnik/node-mapnik", "homepage": "http://mapnik.org", "author": "Dane Springmeyer (mapnik.org)", - "version": "3.7.0", + "version": "3.7.1", "mapnik_version":"v3.0.18", "main": "./lib/mapnik.js", "binary": { diff --git a/test/data/vector_tile/tile0-simple_and_distance.nosse.mvt b/test/data/vector_tile/tile0-simple_and_distance.nosse.mvt new file mode 100644 index 00000000..20c71c1a Binary files /dev/null and b/test/data/vector_tile/tile0-simple_and_distance.nosse.mvt differ diff --git a/test/data/vector_tile/tile0-simplify_distance.nosse.mvt b/test/data/vector_tile/tile0-simplify_distance.nosse.mvt new file mode 100644 index 00000000..20c71c1a Binary files /dev/null and b/test/data/vector_tile/tile0-simplify_distance.nosse.mvt differ diff --git a/test/vector-tile.test.js b/test/vector-tile.test.js index e1c0ab1b..c4e93190 100644 --- a/test/vector-tile.test.js +++ b/test/vector-tile.test.js @@ -2400,18 +2400,26 @@ describe('mapnik.VectorTile ', function() { assert.equal(vtile.reportGeometryValidity({split_multi_features:true}).length, 0); } var expected = './test/data/vector_tile/tile0-simplify_distance.mvt'; + var expected_nosse = './test/data/vector_tile/tile0-simplify_distance.nosse.mvt'; var actual = './test/data/vector_tile/tile0-simplify_distance.actual.mvt'; if (!existsSync(expected) || process.env.UPDATE) { fs.writeFileSync(expected, vtile.getData()); } + if (!existsSync(expected_nosse)) { + fs.writeFileSync(expected_nosse, vtile.getData()); + } var expected_data = fs.readFileSync(expected); + var expected_nosse_data = fs.readFileSync(expected_nosse); fs.writeFileSync(actual, vtile.getData()); var actual_data = fs.readFileSync(actual); var vt1 = new mapnik.VectorTile(0,0,0); vt1.setData(expected_data); var vt2 = new mapnik.VectorTile(0,0,0); - vt2.setData(actual_data); - assert.equal(JSON.stringify(vt1.toJSON()) == JSON.stringify(vt2.toJSON()), true); + vt2.setData(expected_nosse_data); + var vt3 = new mapnik.VectorTile(0,0,0); + vt3.setData(actual_data); + assert.equal(JSON.stringify(vt1.toJSON()) == JSON.stringify(vt3.toJSON()) || + JSON.stringify(vt2.toJSON()) == JSON.stringify(vt3.toJSON()), true); done(); }); }); @@ -2432,18 +2440,26 @@ describe('mapnik.VectorTile ', function() { assert.equal(vtile.reportGeometryValidity({split_multi_features:true}).length, 0); } var expected = './test/data/vector_tile/tile0-simple_and_distance.mvt'; + var expected_nosse = './test/data/vector_tile/tile0-simple_and_distance.nosse.mvt'; var actual = './test/data/vector_tile/tile0-simple_and_distance.actual.mvt'; if (!existsSync(expected) || process.env.UPDATE) { fs.writeFileSync(expected, vtile.getData()); } + if (!existsSync(expected_nosse)) { + fs.writeFileSync(expected_nosse, vtile.getData()); + } var expected_data = fs.readFileSync(expected); + var expected_nosse_data = fs.readFileSync(expected_nosse); fs.writeFileSync(actual, vtile.getData()); var actual_data = fs.readFileSync(actual); var vt1 = new mapnik.VectorTile(0,0,0); vt1.setData(expected_data); var vt2 = new mapnik.VectorTile(0,0,0); - vt2.setData(actual_data); - assert.equal(JSON.stringify(vt1.toJSON()) == JSON.stringify(vt2.toJSON()), true); + vt2.setData(expected_nosse_data); + var vt3 = new mapnik.VectorTile(0,0,0); + vt3.setData(actual_data); + assert.equal(JSON.stringify(vt1.toJSON()) == JSON.stringify(vt3.toJSON()) || + JSON.stringify(vt2.toJSON()) == JSON.stringify(vt3.toJSON()), true); done(); }); });