[Pkg-javascript-commits] [node-mapnik] 01/06: Update upstream-git.patch with recent changes.

Bas Couwenberg sebastic at debian.org
Sat Jan 27 10:00:08 UTC 2018


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository node-mapnik.

commit 9c699c64a76956200956bc04c93778ea56270b90
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Jan 26 19:01:26 2018 +0100

    Update upstream-git.patch with recent changes.
---
 debian/changelog                               |   1 +
 debian/patches/no-mason.patch                  |   2 +-
 debian/patches/upstream-git.patch              | 408 +++++++++++++++++++++----
 debian/patches/use-packaged-dependencies.patch |   2 +-
 4 files changed, 350 insertions(+), 63 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9978757..f0357ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ node-mapnik (3.6.2+dfsg-3) UNRELEASED; urgency=medium
 
   * Team upload.
   * Switch from nodejs to node in debian/tests/control too.
+  * Update upstream-git.patch with recent changes.
 
  -- Bas Couwenberg <sebastic at debian.org>  Thu, 30 Nov 2017 16:04:08 +0100
 
diff --git a/debian/patches/no-mason.patch b/debian/patches/no-mason.patch
index 9190a8a..1989749 100644
--- a/debian/patches/no-mason.patch
+++ b/debian/patches/no-mason.patch
@@ -4,7 +4,7 @@ Forwarded: not-needed
 
 --- a/binding.gyp
 +++ b/binding.gyp
-@@ -30,9 +30,9 @@
+@@ -33,9 +33,9 @@
          4267
        ],
        'include_dirs': [
diff --git a/debian/patches/upstream-git.patch b/debian/patches/upstream-git.patch
index 15ecaf2..4475255 100644
--- a/debian/patches/upstream-git.patch
+++ b/debian/patches/upstream-git.patch
@@ -14,18 +14,35 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
  examples
 --- a/.travis.yml
 +++ b/.travis.yml
-@@ -73,6 +73,10 @@ matrix:
+@@ -33,6 +33,7 @@ install:
+ # we use before_script rather than script to ensure fast failure (the script section continues even after an error)
+ # https://docs.travis-ci.com/user/customizing-the-build#Breaking-the-Build
+ before_script:
++  - ./scripts/check_glibcxx.sh
+   - npm test
+   # after successful tests, publish binaries if specified in commit message
+   - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
+@@ -41,7 +42,7 @@ before_script:
+ script:
+   - true
+ 
+-# the matrix allows you to specify different operating systems and environments to 
++# the matrix allows you to specify different operating systems and environments to
+ # run your tests and build binaries
+ matrix:
+   include:
+@@ -73,6 +74,10 @@ matrix:
      - os: linux
        env: BUILDTYPE=release
        node_js: 8
 +    # linux publishable node v9
 +    - os: linux
 +      env: BUILDTYPE=release
-+      node_js: 8
++      node_js: 9
      # osx publishable node v0.10
      - os: osx
        osx_image: xcode8.3
-@@ -83,11 +87,21 @@ matrix:
+@@ -83,22 +88,37 @@ matrix:
        osx_image: xcode8.3
        env: BUILDTYPE=release
        node_js: 4
@@ -46,22 +63,36 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
 +      node_js: 6
      # osx publishable node v7
      - os: osx
-       osx_image: xcode8.2
-@@ -98,11 +112,39 @@ matrix:
-       osx_image: xcode8.2
+-      osx_image: xcode8.2
++      osx_image: xcode8.3
+       env: BUILDTYPE=release
+       node_js: 7
+     # osx publishable node v8
+     - os: osx
+-      osx_image: xcode8.2
++      osx_image: xcode8.3
        env: BUILDTYPE=release
        node_js: 8
 -    # Sanitizer build node v4/Debug
 +    # osx publishable node v9
 +    - os: osx
-+      osx_image: xcode8.2
++      osx_image: xcode8.3
 +      env: BUILDTYPE=release
 +      node_js: 9
 +    # Sanitizer build linux node v4/Debug
      - os: linux
        env: BUILDTYPE=debug TOOLSET=-asan
        node_js: 4
-       # Overrides `install` to set up custom asan flags
+@@ -121,6 +141,30 @@ matrix:
+         - unset LD_PRELOAD
+         # after successful tests, publish binaries if specified in commit message
+         - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
++    # Sanitizer build osx node v4/Debug
++    - os: osx
++      osx_image: xcode8.3
++      env: BUILDTYPE=debug TOOLSET=-asan
++      node_js: 4
++      # Overrides `install` to set up custom asan flags
 +      install:
 +        - ./scripts/setup.sh --config local.env
 +        # put mason and clang++ on PATH
@@ -73,21 +104,16 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
 +        - make ${BUILDTYPE}
 +      # Overrides `script` to disable asan LD_PRELOAD before publishing
 +      before_script:
-+        - export LD_PRELOAD=${MASON_LLVM_RT_PRELOAD}
++        - export DYLD_INSERT_LIBRARIES=${MASON_LLVM_RT_PRELOAD}
 +        # TODO: re-enable detect_leaks=0 once we can build and test against an asan sanitized libc++
 +        - export ASAN_OPTIONS=fast_unwind_on_malloc=0:detect_leaks=0:${ASAN_OPTIONS}
-+        - npm test
-+        - unset LD_PRELOAD
++        - node ./node_modules/.bin/_mocha test/  --timeout 100000
++        - unset DYLD_INSERT_LIBRARIES
 +        # after successful tests, publish binaries if specified in commit message
 +        - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
-+    # Sanitizer build osx node v4/Debug
-+    - os: osx
-+      env: BUILDTYPE=debug TOOLSET=-asan
-+      node_js: 4
-+      # Overrides `install` to set up custom asan flags
-       install:
-         - ./scripts/setup.sh --config local.env
-         # put mason and clang++ on PATH
+     # g++ build (default builds all use clang++)
+     - os: linux
+       env: BUILDTYPE=debug CXX="g++-6" CC="gcc-6"
 --- a/CHANGELOG.md
 +++ b/CHANGELOG.md
 @@ -20,6 +20,7 @@ Due to changes in the mapnik core versio
@@ -122,31 +148,32 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
  	git submodule update --init
  
 -mason_packages/.link/bin/mapnik-config: deps/geometry/include/mapbox/geometry.hpp
-+node_modules:
-+	npm install --ignore-scripts --clang
-+
-+mason_packages/.link/bin/mapnik-config:
- 	./install_mason.sh
- 
+-	./install_mason.sh
+-
 -node_modules: mason_packages/.link/bin/mapnik-config
 -	# install deps but for now ignore our own install script
 -	# so that we can run it directly in either debug or release
--	npm install --ignore-scripts --clang
++node_modules:
+ 	npm install --ignore-scripts --clang
+ 
+-release: node_modules
+-	PATH="./mason_packages/.link/bin/:${PATH}" && V=1 ./node_modules/.bin/node-pre-gyp configure build --loglevel=error --clang
++mason_packages/.link/bin/mapnik-config:
++	./scripts/install_deps.sh
++
 +pre_build_check:
 +	@node -e "console.log('\033[94mNOTICE: to build from source you need mapnik >=',require('./package.json').mapnik_version,'\033[0m');"
 +	@echo "Looking for mapnik-config on your PATH..."
 +	mapnik-config -v
- 
--release: node_modules
--	PATH="./mason_packages/.link/bin/:${PATH}" && V=1 ./node_modules/.bin/node-pre-gyp configure build --loglevel=error --clang
++
 +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 --loglevel=error --clang
++	V=1 CXXFLAGS="-fno-omit-frame-pointer $(PROFILING_FLAG)" ./node_modules/.bin/node-pre-gyp configure build --ENABLE_GLIBC_WORKAROUND=true --loglevel=error --clang
  	@echo "run 'make clean' for full rebuild"
  
 -debug: node_modules
 -	PATH="./mason_packages/.link/bin/:${PATH}" && V=1 ./node_modules/.bin/node-pre-gyp configure build --loglevel=error --debug --clang
 +debug_base: pre_build_check deps/geometry/include/mapbox/geometry.hpp node_modules
-+	V=1 ./node_modules/.bin/node-pre-gyp configure build --loglevel=error --debug --clang
++	V=1 ./node_modules/.bin/node-pre-gyp configure build --ENABLE_GLIBC_WORKAROUND=true --loglevel=error --debug --clang
  	@echo "run 'make clean' for full rebuild"
  
 +release: mason_packages/.link/bin/mapnik-config
@@ -169,7 +196,7 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
  	npm pack
 --- a/README.md
 +++ b/README.md
-@@ -71,9 +71,9 @@ For more sample code see [the tests](./t
+@@ -71,22 +71,22 @@ For more sample code see [the tests](./t
  
  OS|Node.js|C++ minimum requirements|OS versions
  ---|---|---|---
@@ -177,20 +204,39 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
 -Linux|v0.10.x, v4, v5, v6|C++11|Ubuntu Linux > 16.04 or other Linux distributions with g++ >= 5 toolchain (>= GLIBCXX_3.4.21 from libstdc++)
 -Windows|v0.10.x, v4, v5|C++11|See the [Windows requirements](https://github.com/mapnik/node-mapnik#windows-specific) section
 +Mac|v0.10.x, v4, v6, v8|C++11|Mac OS X > 10.10
-+Linux|v0.10.x, v4, v6, v8|C++11|Ubuntu Linux > 16.04 or other Linux distributions with g++ >= 5 toolchain (>= GLIBCXX_3.4.21 from libstdc++)
++Linux|v0.10.x, v4, v6, v8|C++11|Ubuntu Linux > 14.04 (trusty) or Centos >= 7 or other Linux distributions with a libstdc++ recent enough to contain >= GLIBCXX_3.4.19 symbols (libstdc++ that comes with at least g++ 4.8).
 +Windows|v0.10.x, v4, v6, v8|C++11|See the [Windows requirements](https://github.com/mapnik/node-mapnik#windows-specific) section
  
  An installation error like below indicates your system does not have a modern enough libstdc++/gcc-base toolchain:
  
-@@ -115,7 +115,7 @@ Note: This will install the latest node-
+ ```
+-Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.21 not found (required by /node_modules/osrm/lib/binding/osrm.node)
++Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.19 not found
+ ```
+ 
+-If you are running Ubuntu older than 16.04 you can easily upgrade your libstdc++ version like:
++If you are running Ubuntu older than 14.04 you can easily upgrade your libstdc++ version like:
+ 
+ ```
+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
+ sudo apt-get update -y
+-sudo apt-get install -y libstdc++-5-dev
++sudo apt-get install -y libstdc++6
+ ```
+ 
+ To upgrade libstdc++ on travis (without sudo) you can do:
+@@ -115,9 +115,9 @@ Note: This will install the latest node-
  
  By default, binaries are provided for:
  
 - - 64 bit OS X 10.9, 64 bit Linux (>= Ubuntu Trusty), and 64/32 bit Windows
 + - 64 bit OS X >= 10.10, 64 bit Linux (>= Ubuntu Trusty), and 64/32 bit Windows
   - several node versions:
-    - [versions forLinux/Mac](<https://github.com/mapnik/node-mapnik/blob/master/.travis.yml#L19-L47>)
+-   - [versions forLinux/Mac](<https://github.com/mapnik/node-mapnik/blob/master/.travis.yml#L19-L47>)
++   - [versions for Linux/Mac](<https://github.com/mapnik/node-mapnik/blob/master/.travis.yml#L19-L47>)
     - [versions for Windows](<https://github.com/mapnik/node-mapnik/blob/master/appveyor.yml#L9-L32>)
+ 
+ On those platforms no external dependencies are needed.
 @@ -142,17 +142,39 @@ The **1.x** series require the Visual C+
  
  ## Source Build
@@ -244,8 +290,12 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
 +BSD, see LICENSE.txt
 --- a/binding.gyp
 +++ b/binding.gyp
-@@ -2,31 +2,7 @@
+@@ -1,32 +1,11 @@
+ {
    'includes': [ 'common.gypi' ],
++  'variables': {
++      'ENABLE_GLIBC_WORKAROUND%':'false', # can be overriden by a command line variable because of the % sign
++  },
    'targets': [
      {
 -      'target_name': 'make_vector_tile',
@@ -276,7 +326,19 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
        'product_dir': '<(module_path)',
        'sources': [
          "src/mapnik_logger.cpp",
-@@ -97,7 +73,6 @@
+@@ -70,6 +49,11 @@
+           'MAPNIK_GIT_REVISION="<!@(mapnik-config --git-describe)"',
+       ],
+       'conditions': [
++        ['ENABLE_GLIBC_WORKAROUND != "false"', {
++            'sources': [
++              "src/glibc_workaround.cpp"
++            ]
++        }],
+         ['OS=="win"',
+           {
+             'include_dirs':[
+@@ -97,7 +81,6 @@
              'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
              'cflags_cc' : [
                '<!@(mapnik-config --cflags)',
@@ -326,24 +388,6 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
 -        settings_dict['fonts'] = '\'%s\'' % os.popen("./mason_packages/.link/bin/mapnik-config --fonts").readline().strip()
 -
 -    write_mapnik_settings(**settings_dict)
---- a/install_mason.sh
-+++ b/install_mason.sh
-@@ -12,7 +12,7 @@ ICU_VERSION="57.1"
- 
- if [ ! -f ./mason/mason.sh ]; then
-     mkdir -p ./mason
--    curl -sSfL https://github.com/mapbox/mason/archive/c1948184d9430226e36f1bc1f8f081268b6bc2ba.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
-+    curl -sSfL https://github.com/mapbox/mason/archive/23fe28bc578667fc81f4d6e3479ab4ffb4702b77.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
- fi
- 
- if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
-@@ -38,5 +38,5 @@ if [ ! -f ./mason_packages/.link/bin/map
-     # 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 3.0.15
-+    install mapnik f64c757
- fi
 --- a/package.json
 +++ b/package.json
 @@ -4,8 +4,8 @@
@@ -352,13 +396,22 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
    "author": "Dane Springmeyer <dane at mapbox.com> (mapnik.org)",
 -  "version": "3.6.2",
 -  "mapnik_version":"v3.0.15",
-+  "version": "3.6.2-dev-v3.0.16",
-+  "mapnik_version":"v3.0.16",
++  "version": "3.6.3",
++  "mapnik_version": "v3.0.17",
    "main": "./lib/mapnik.js",
    "binary": {
      "module_name": "mapnik",
-@@ -45,18 +45,18 @@
-       "node-pre-gyp"
+@@ -38,25 +38,25 @@
+   "dependencies": {
+     "mapnik-vector-tile": "1.4.0",
+     "protozero": "1.5.1",
+-    "nan": "~2.5.0",
++    "nan": "~2.8.0",
+     "node-pre-gyp": "~0.6.30"
+   },
+   "bundledDependencies": [
+-      "node-pre-gyp"
++    "node-pre-gyp"
    ],
    "bin": {
 +    "mapnik-index.js": "./bin/mapnik-index.js",
@@ -393,6 +446,130 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
  :: actually install deps + compile node-mapnik
  ECHO building node-mapnik
  :: --msvs_version=2015 is passed along to node-gyp here
+--- /dev/null
++++ b/scripts/check_glibcxx.sh
+@@ -0,0 +1,33 @@
++#!/bin/bash
++
++set -eu
++set -o pipefail
++shopt -s nullglob
++
++: '
++
++Ensure no GLIBCXX_3.4.2x symbols are present in the binary
++
++If symbols >= 3.4.20 then it returns error code 1. This means
++the binaries would not run on ubuntu trusty without upgrading libstdc++
++
++'
++
++FINAL_RETURN_CODE=0
++
++function check() {
++    local RESULT=0
++    nm ${1} | grep "GLIBCXX_3.4.2[0-9]" > /tmp/out.txt || RESULT=$?
++    if [[ ${RESULT} != 0 ]]; then
++        echo "Success: GLIBCXX_3.4.2[0-9] symbols not present in binary (as expected)"
++    else
++        echo "$(cat /tmp/out.txt | c++filt)"
++        FINAL_RETURN_CODE=1
++    fi
++}
++
++
++echo "checking ./lib/binding/mapnik.node"
++check "lib/binding/mapnik.node"
++
++exit ${FINAL_RETURN_CODE}
+--- a/install_mason.sh
++++ /dev/null
+@@ -1,42 +0,0 @@
+-#!/bin/bash
+-
+-set -eu
+-set -o pipefail
+-
+-function install() {
+-    ./mason/mason install $1 $2
+-    ./mason/mason link $1 $2
+-}
+-
+-ICU_VERSION="57.1"
+-
+-if [ ! -f ./mason/mason.sh ]; then
+-    mkdir -p ./mason
+-    curl -sSfL https://github.com/mapbox/mason/archive/c1948184d9430226e36f1bc1f8f081268b6bc2ba.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
+-fi
+-
+-if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
+-
+-    # mapnik deps
+-    install jpeg_turbo 1.5.1
+-    install libpng 1.6.28
+-    install libtiff 4.0.7
+-    install icu ${ICU_VERSION}
+-    install proj 4.9.3
+-    install pixman 0.34.0
+-    install cairo 1.14.8
+-    install webp 0.6.0
+-    install libgdal 2.1.3
+-    install boost 1.63.0
+-    install boost_libsystem 1.63.0
+-    install boost_libfilesystem 1.63.0
+-    install boost_libregex_icu57 1.63.0
+-    install freetype 2.7.1
+-    install harfbuzz 1.4.2-ft
+-
+-    # mapnik
+-    # 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 3.0.15
+-fi
+--- /dev/null
++++ b/scripts/install_deps.sh
+@@ -0,0 +1,40 @@
++#!/bin/bash
++
++set -eu
++set -o pipefail
++
++function install() {
++    mason install $1 $2
++    mason link $1 $2
++}
++
++ICU_VERSION="57.1"
++
++./scripts/setup.sh --config local.env
++source local.env
++
++if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
++
++    # mapnik deps
++    install jpeg_turbo 1.5.1
++    install libpng 1.6.28
++    install libtiff 4.0.7
++    install icu ${ICU_VERSION}
++    install proj 4.9.3
++    install pixman 0.34.0
++    install cairo 1.14.8
++    install webp 0.6.0
++    install libgdal 2.1.3
++    install boost 1.65.1
++    install boost_libsystem 1.65.1
++    install boost_libfilesystem 1.65.1
++    install boost_libregex_icu57 1.65.1
++    install freetype 2.7.1
++    install harfbuzz 1.4.2-ft
++
++    # mapnik
++    # 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 3.0.17
++fi
 --- a/scripts/postinstall.sh
 +++ b/scripts/postinstall.sh
 @@ -5,6 +5,30 @@ set -o pipefail
@@ -426,6 +603,58 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
  mkdir -p ${MODULE_PATH}/bin/
  
  # the below switch is used since on osx the default cp
+--- a/scripts/setup.sh
++++ b/scripts/setup.sh
+@@ -3,8 +3,8 @@
+ set -eu
+ set -o pipefail
+ 
+-export MASON_RELEASE="${MASON_RELEASE:-0.7.0}"
+-export MASON_LLVM_RELEASE="${MASON_LLVM_RELEASE:-3.9.1}"
++export MASON_RELEASE="${MASON_RELEASE:-8074334}"
++export MASON_LLVM_RELEASE="${MASON_LLVM_RELEASE:-5.0.0}"
+ 
+ PLATFORM=$(uname | tr A-Z a-z)
+ if [[ ${PLATFORM} == 'darwin' ]]; then
+@@ -58,7 +58,7 @@ function run() {
+       local mason_release=${2}
+       if [[ ! -d ${install_dir} ]]; then
+           mkdir -p ${install_dir}
+-          curl -sSfL https://github.com/mapbox/mason/archive/v${mason_release}.tar.gz | tar --gunzip --extract --strip-components=1 --directory=${install_dir}
++          curl -sSfL https://github.com/mapbox/mason/archive/${mason_release}.tar.gz | tar --gunzip --extract --strip-components=1 --directory=${install_dir}
+       fi
+     }
+ 
+--- /dev/null
++++ b/src/glibc_workaround.cpp
+@@ -0,0 +1,26 @@
++#ifdef __linux__
++
++#ifdef MAPNIK_ENABLE_GLIBC_WORKAROUND
++
++#include <stdexcept>
++
++// https://github.com/bitcoin/bitcoin/pull/4042
++// allows building against libstdc++-dev-4.9 while avoiding
++// GLIBCXX_3.4.20 dep
++// This is needed because libstdc++ itself uses this API - its not
++// just an issue of your code using it, ughhh
++
++namespace std
++{
++
++void __throw_out_of_range_fmt(const char *, ...) __attribute__((__noreturn__));
++void __throw_out_of_range_fmt(const char *err, ...)
++{
++    // Safe and over-simplified version. Ignore the format and print it as-is.
++    __throw_out_of_range(err);
++}
++}
++
++#endif // MAPNIK_ENABLE_GLIBC_WORKAROUND
++
++#endif // __linux__
+\ No newline at end of file
 --- a/src/mapnik_color.cpp
 +++ b/src/mapnik_color.cpp
 @@ -13,7 +13,7 @@ Nan::Persistent<v8::FunctionTemplate> Co
@@ -2147,6 +2376,52 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
 +  </g>
 +  <path d="M231.353 318.616c10.047 1.218 24.052.304 30.14-.001M216.128 284.203c8.525 6.698 27.096 10.654 26.791 10.654M253.573 296.696c-2.74-14.004-5.783-17.353-8.219-26.183M201.82 254.67c14.31 6.393 16.44 10.654 25.573 17.047M232.569 257.718c1.219-17.355 3.654-21.922 7.917-25.88M201.82 229.718c5.177 5.785 22.225 23.746 22.225 23.746M217.044 213.877c6.395 4.566 6.395 21.005 6.395 21.005" stroke="#00a400" stroke-linecap="round" stroke-width="2.2203781" fill="none"/>
 +</svg>
+--- a/test/datasource.test.js
++++ b/test/datasource.test.js
+@@ -10,7 +10,7 @@ mapnik.register_datasource(path.join(map
+ mapnik.register_datasource(path.join(mapnik.settings.paths.input_plugins,'gdal.input'));
+ 
+ describe('mapnik.Datasource', function() {
+-    
++
+     it('should throw with invalid usage', function() {
+         assert.throws(function() { mapnik.Datasource('foo'); });
+         assert.throws(function() { mapnik.Datasource({ 'foo': 1 }); });
+@@ -165,7 +165,7 @@ describe('mapnik.Datasource', function()
+ 
+         assert.deepEqual(ds.fields(), expected.fields);
+     });
+-    
++
+     it('test invalid use of memory datasource', function() {
+         var ds = new mapnik.MemoryDatasource({'extent': '-180,-90,180,90'});
+         assert.throws(function() { ds.add(); });
+@@ -213,7 +213,10 @@ describe('mapnik.Datasource', function()
+     });
+ 
+     it('test empty geojson datasource due to invalid json file', function() {
+-        assert.throws(function() { new mapnik.Datasource({ type:'geojson', file: './test/data/parse.error.json', cache_features: false }); });
++        var ds = new mapnik.Datasource({ type:'geojson', file: './test/data/parse.error.json', cache_features: false });
++        var empty_fs = ds.featureset();
++        assert.equal(typeof(empty_fs),'undefined');
++        assert.equal(empty_fs, null);
+     });
+ 
+     it('test valid use of memory datasource', function() {
+@@ -221,11 +224,11 @@ describe('mapnik.Datasource', function()
+         assert.equal(true, ds.add({ 'x': 0, 'y': 0 }));
+         assert.equal(true, ds.add({ 'x': 0.23432, 'y': 0.234234 }));
+         assert.equal(true, ds.add({ 'x': 1, 'y': 1 , 'properties': {'a':'b', 'c':1, 'd':0.23 }}));
+-        var expected_describe = { 
++        var expected_describe = {
+             type: 'vector',
+             encoding: 'utf-8',
+             fields: {},
+-            geometry_type: 'collection' 
++            geometry_type: 'collection'
+         };
+         assert.deepEqual(expected_describe, ds.describe());
+         // Currently descriptors can not be added to memory datasource so will always be empty object
 --- a/test/image.svg.test.js
 +++ b/test/image.svg.test.js
 @@ -25,10 +25,10 @@ describe('mapnik.Image SVG', function()
@@ -2158,7 +2433,7 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
          assert.throws(function() {
            mapnik.Image.fromSVGSync('./test/data/SVG_DOES_NOT_EXIST.svg');
 -        }, /SVG parse error:\s+Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/);
-+        }, /SVG error: unbale to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/);
++        }, /SVG error: unable to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/);
          assert.throws(function() {
            mapnik.Image.fromSVGSync('./test/data/vector_tile/tile0.expected-svg.svg', 256);
          }, /optional second arg must be an options object/);
@@ -2194,7 +2469,7 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
        mapnik.Image.fromSVG('./test/data/SVG_DOES_NOT_EXIST.svg', function(err, svg) {
          assert.ok(err);
 -        assert.ok(err.message.match(/SVG parse error:\s+Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/));
-+        assert.ok(err.message.match(/SVG error: unbale to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/));
++        assert.ok(err.message.match(/SVG error: unable to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/));
          assert.equal(svg, undefined);
          done();
        });
@@ -2207,3 +2482,14 @@ Origin: https://github.com/mapnik/node-mapnik/tree/v3.0.x
      it('#fromSVGSync load from SVG file - 2', function() {
          var img = mapnik.Image.fromSVG('./test/data/vector_tile/tile0.expected-svg.svg');
          assert.ok(img);
+--- a/test/vector-tile.test.js
++++ b/test/vector-tile.test.js
+@@ -2493,7 +2493,7 @@ describe('mapnik.VectorTile ', function(
+                 var simplicityReport = vtile.reportGeometrySimplicity();
+                 var validityReport = vtile.reportGeometryValidity();
+                 assert.equal(simplicityReport.length, 0);
+-                assert.equal(validityReport.length, 1);
++                assert.equal(validityReport.length, 0);
+                 assert.equal(vtile.reportGeometryValidity({split_multi_features:true}).length, 0);
+             }
+             var expected = './test/data/vector_tile/tile0-mpu-true.mvt';
diff --git a/debian/patches/use-packaged-dependencies.patch b/debian/patches/use-packaged-dependencies.patch
index 16a5fda..838860c 100644
--- a/debian/patches/use-packaged-dependencies.patch
+++ b/debian/patches/use-packaged-dependencies.patch
@@ -4,7 +4,7 @@ Forwarded: not-needed
 
 --- a/binding.gyp
 +++ b/binding.gyp
-@@ -35,12 +35,7 @@
+@@ -38,12 +38,7 @@
          './mason_packages/.link/include/cairo',
          './src',
          "<!(node -e \"require('nan')\")",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/node-mapnik.git



More information about the Pkg-javascript-commits mailing list