From e6faf820e186c65e13b06e73f38d1fdaba818287 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Mon, 19 Apr 2021 16:55:13 +0100 Subject: [PATCH 1/2] node-mapnik-v4.5.7 uses mapnik@d70f20757 (fixes `parse_svg_value` to work with boost > 1.65.1) [publish binary] --- CHANGELOG.md | 6 ++++++ package.json | 4 ++-- scripts/install_deps.sh | 10 +++++----- scripts/setup.sh | 2 +- test/image.svg.test.js | 12 ++++++++++++ 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3845b70d76..3aba5752e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 4.5.7 +- Use mapnik@d70f20757 + (SVG: restore default values in `parse_svg_value` on failure to preserve "viewport/viewBox" logic when using boost > 1.65.1) +- Downgrade travis-ci build environment to use `precise` +- Upgrade to boost 1.75.0 + ## 4.5.6 - Upgrade node-addon-api (>=v3.1.0) - Upgrade to @mapbox/node-pre-gyp >= v1.x diff --git a/package.json b/package.json index 121450b17f..2cc67be09a 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "url": "http://github.com/mapnik/node-mapnik", "homepage": "http://mapnik.org", "author": "Dane Springmeyer (mapnik.org)", - "version": "4.5.6", - "mapnik_version": "c3eda40e0", + "version": "4.5.7", + "mapnik_version": "d70f20757", "main": "./lib/mapnik.js", "binary": { "module_name": "mapnik", diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index e184def4fa..7caa457848 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -27,10 +27,10 @@ if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then install cairo 1.14.8 install webp 0.6.0 install libgdal 2.1.3 - install boost 1.74.0 - install boost_libsystem 1.74.0 - install boost_libfilesystem 1.74.0 - install boost_libregex_icu57 1.74.0 + install boost 1.75.0 + install boost_libsystem 1.75.0 + install boost_libfilesystem 1.75.0 + install boost_libregex_icu57 1.75.0 install freetype 2.7.1 install harfbuzz 1.4.2-ft @@ -38,5 +38,5 @@ if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then # NOTE: sync this version with the `mapnik_version` in package.json (which is used for windows builds) # In the future we could pull from that version automatically if mason were to support knowing the right dep # versions to install automatically. Until then there is not much point since the deps are still hardcoded here. - install mapnik c3eda40e0 + install mapnik d70f20757 fi diff --git a/scripts/setup.sh b/scripts/setup.sh index dc9588b220..401d1517ed 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -3,7 +3,7 @@ set -eu set -o pipefail -export MASON_RELEASE="${MASON_RELEASE:-3bf6d4f}" +export MASON_RELEASE="${MASON_RELEASE:-1733bd0c}" export MASON_LLVM_RELEASE="${MASON_LLVM_RELEASE:-10.0.0}" PLATFORM=$(uname | tr A-Z a-z) diff --git a/test/image.svg.test.js b/test/image.svg.test.js index 414227b8ca..decdcf9b24 100644 --- a/test/image.svg.test.js +++ b/test/image.svg.test.js @@ -308,3 +308,15 @@ test('svg scaling', (assert) => { assert.equal(img.premultiplied(), false); assert.end(); }); + +test('svg viewBox', (assert) => { + var svgdata = ''; + // "em" units are not supported, use viewBox to determine viewport + var buffer = Buffer.from(svgdata); + var img = mapnik.Image.fromSVGBytesSync(buffer, {scale: 1.0}); + assert.ok(img); + assert.ok(img instanceof mapnik.Image); + assert.equal(img.width(), 24); + assert.equal(img.height(), 24); + assert.end(); +}); From 1570e77c99fbe94aa1750518b6e38d6c3e763388 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Mon, 19 Apr 2021 16:59:42 +0100 Subject: [PATCH 2/2] correct CHANGELOG [republish binary] --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aba5752e3..1a6db9f3b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ ## 4.5.7 - Use mapnik@d70f20757 (SVG: restore default values in `parse_svg_value` on failure to preserve "viewport/viewBox" logic when using boost > 1.65.1) -- Downgrade travis-ci build environment to use `precise` - Upgrade to boost 1.75.0 ## 4.5.6