[Pkg-javascript-commits] [node-mapnik] 14/14: Add patch to fix postinstall script for packaged dependencies.

Bas Couwenberg sebastic at debian.org
Sun Jun 11 16:26:49 UTC 2017


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

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

commit 1ef1e5b17636aae651b100e9f4b6866d567fcd29
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Jun 11 14:12:16 2017 +0200

    Add patch to fix postinstall script for packaged dependencies.
---
 debian/changelog                 |  1 +
 debian/patches/postinstall.patch | 70 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 3 files changed, 72 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0c8ace9..7ee406b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ node-mapnik (3.6.0+dfsg-1) UNRELEASED; urgency=medium
   * Add patch to use packaged dependencies instead of mason.
   * Skip test target, cannot be executed.
   * Update binding path.
+  * Add patch to fix postinstall script for packaged dependencies.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 10 Jun 2017 22:52:20 +0200
 
diff --git a/debian/patches/postinstall.patch b/debian/patches/postinstall.patch
new file mode 100644
index 0000000..02a3d11
--- /dev/null
+++ b/debian/patches/postinstall.patch
@@ -0,0 +1,70 @@
+Description: Use paths for packaged dependencies.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: not-needed
+
+--- a/scripts/postinstall.sh
++++ b/scripts/postinstall.sh
+@@ -3,59 +3,14 @@ set -eu
+ set -o pipefail
+ 
+ MODULE_PATH=./lib/binding
+-MAPNIK_SDK=./mason_packages/.link
+-
+-mkdir -p ${MODULE_PATH}/bin/
+-
+-# the below switch is used since on osx the default cp
+-# resolves symlinks automatically with `cp -r`
+-# whereas on linux we need to pass `cp -rL`. But the latter
+-# command is not supported on OS X. We could upgrade coreutils
+-# but ideally we don't depend on more dependencies
+-if [[ $(uname -s) == 'Darwin' ]]; then
+-    cp ${MAPNIK_SDK}/bin/mapnik-index ${MODULE_PATH}/bin/
+-    # copy shapeindex
+-    cp ${MAPNIK_SDK}/bin/shapeindex ${MODULE_PATH}/bin/
+-    # copy lib
+-    mkdir -p ${MODULE_PATH}/lib/
+-    cp ${MAPNIK_SDK}/lib/libmapnik.* ${MODULE_PATH}/lib/
+-    # copy plugins
+-    cp -r ${MAPNIK_SDK}/lib/mapnik ${MODULE_PATH}/lib/
+-    # copy share data
+-    mkdir -p ${MODULE_PATH}/share/gdal
+-    cp -L ${MAPNIK_SDK}/share/gdal/*.* ${MODULE_PATH}/share/gdal/
+-    cp -r ${MAPNIK_SDK}/share/proj ${MODULE_PATH}/share/
+-    mkdir -p ${MODULE_PATH}/share/icu
+-    cp -L ${MAPNIK_SDK}/share/icu/*/*dat ${MODULE_PATH}/share/icu/
+-else
+-    cp -L ${MAPNIK_SDK}/bin/mapnik-index ${MODULE_PATH}/bin/
+-    # copy shapeindex
+-    cp -L ${MAPNIK_SDK}/bin/shapeindex ${MODULE_PATH}/bin/
+-    # copy lib
+-    mkdir -p ${MODULE_PATH}/lib/
+-    cp -L ${MAPNIK_SDK}/lib/libmapnik.* ${MODULE_PATH}/lib/
+-    # copy plugins
+-    cp -rL ${MAPNIK_SDK}/lib/mapnik ${MODULE_PATH}/lib/
+-    # copy share data
+-    mkdir -p ${MODULE_PATH}/share/gdal
+-    cp -rL ${MAPNIK_SDK}/share/gdal/*.* ${MODULE_PATH}/share/gdal/
+-    cp -rL ${MAPNIK_SDK}/share/proj ${MODULE_PATH}/share/
+-    mkdir -p ${MODULE_PATH}/share/icu
+-    cp -rL ${MAPNIK_SDK}/share/icu/*/*dat ${MODULE_PATH}/share/icu/
+-fi
+ 
+ # generate new settings
+ echo "
+ var path = require('path');
+ module.exports.paths = {
+-    'fonts': path.join(__dirname, 'lib/mapnik/fonts'),
+-    'input_plugins': path.join(__dirname, 'lib/mapnik/input'),
+-    'mapnik_index': path.join(__dirname, 'bin/mapnik-index'),
+-    'shape_index': path.join(__dirname, 'bin/shapeindex')
+-};
+-module.exports.env = {
+-    'ICU_DATA': path.join(__dirname, 'share/icu'),
+-    'GDAL_DATA': path.join(__dirname, 'share/gdal'),
+-    'PROJ_LIB': path.join(__dirname, 'share/proj')
++    'fonts': '/usr/share/fonts',
++    'input_plugins': '/usr/lib/mapnik/3.0/input',
++    'mapnik_index': '/usr/bin/mapnik-index',
++    'shape_index': '/usr/bin/shapeindex'
+ };
+ " > ${MODULE_PATH}/mapnik_settings.js
diff --git a/debian/patches/series b/debian/patches/series
index a615dc3..6de602c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ nodejs.patch
 use-packaged-dependencies.patch
 mapnik-config.patch
 no-mason.patch
+postinstall.patch

-- 
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