[Pkg-javascript-commits] [node-mapnik] 07/09: Drop patches applied upstream, refresh remaining patches.

Bas Couwenberg sebastic at debian.org
Sun Sep 11 13:56:11 UTC 2016


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

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

commit 6cf9a24761025bdb73117cd5dafe7d82583aa837
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Sep 11 14:43:08 2016 +0200

    Drop patches applied upstream, refresh remaining patches.
---
 debian/changelog                                   |   1 +
 ...ast-to-match-value_holder-char-const-ctor.patch | 361 ---------------------
 ...ile-against-both-mapnik-3.0.12-and-before.patch |  35 --
 debian/patches/nodejs.patch                        |  10 +-
 debian/patches/series                              |   3 -
 debian/patches/spelling-errors.patch               |  47 ---
 6 files changed, 8 insertions(+), 449 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 89ad6c5..d6db0fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ node-mapnik (3.5.14+dfsg-1) UNRELEASED; urgency=medium
   * Bump minimum required libprotozero-dev to 1.4.2.
   * Bump minimum required mapnik-vector-tile to 1.2.1.
   * Bump minimum required node-nan to 2.4.0.
+  * Drop patches applied upstream, refresh remaining patches.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sun, 11 Sep 2016 14:33:52 +0200
 
diff --git a/debian/patches/0001-add-const-cast-to-match-value_holder-char-const-ctor.patch b/debian/patches/0001-add-const-cast-to-match-value_holder-char-const-ctor.patch
deleted file mode 100644
index a0a8ea7..0000000
--- a/debian/patches/0001-add-const-cast-to-match-value_holder-char-const-ctor.patch
+++ /dev/null
@@ -1,361 +0,0 @@
-From a6ec507bffd3cb8e9c8dc3872be7154fdc5201b1 Mon Sep 17 00:00:00 2001
-From: artemp <artem at mapnik.org>
-Date: Tue, 26 Jul 2016 13:24:35 +0200
-Subject: add const cast to match value_holder(char const*) ctor
-
----
- src/mapnik_datasource.cpp        |  5 +--
- src/mapnik_map.cpp               | 96 ++++++++++++++++++++--------------------
- src/mapnik_memory_datasource.cpp |  6 +--
- 3 files changed, 53 insertions(+), 54 deletions(-)
-
---- a/src/mapnik_datasource.cpp
-+++ b/src/mapnik_datasource.cpp
-@@ -1,4 +1,3 @@
--
- #include "mapnik_datasource.hpp"
- #include "mapnik_featureset.hpp"
- #include "utils.hpp"
-@@ -21,7 +20,7 @@ Nan::Persistent<v8::FunctionTemplate> Da
- 
- /**
-  * **`mapnik.Datasource`**
-- * 
-+ *
-  * A Datasource object. This is the connector from Mapnik to any kind
-  * of file, network, or database source of geographical data.
-  *
-@@ -103,7 +102,7 @@ NAN_METHOD(Datasource::New)
-         v8::Local<v8::Value> name = names->Get(i)->ToString();
-         v8::Local<v8::Value> value = options->Get(name);
-         // TODO - don't treat everything as strings
--        params[TOSTR(name)] = TOSTR(value);
-+        params[TOSTR(name)] = const_cast<char const*>(TOSTR(value));
-         i++;
-     }
- 
---- a/src/mapnik_map.cpp
-+++ b/src/mapnik_map.cpp
-@@ -51,7 +51,7 @@ Nan::Persistent<v8::FunctionTemplate> Ma
- 
- /**
-  * **`mapnik.Map`**
-- * 
-+ *
-  * A map in mapnik is an object that combines data sources and styles in
-  * a way that lets you produce styled cartographic output.
-  *
-@@ -73,13 +73,13 @@ Nan::Persistent<v8::FunctionTemplate> Ma
-  * @example
-  * var map = new mapnik.Map(25, 25, '+init=epsg:3857');
-  * console.log(map);
-- * // { 
-+ * // {
-  * //   aspect_fix_mode: 0,
-  * //   parameters: {},
-  * //   background: undefined,
-  * //   maximumExtent: undefined,
-  * //   bufferedExtent: [ NaN, NaN, NaN, NaN ],
-- * //   extent: 
-+ * //   extent:
-  * //   [ 1.7976931348623157e+308,
-  * //    1.7976931348623157e+308,
-  * //    -1.7976931348623157e+308,
-@@ -87,7 +87,7 @@ Nan::Persistent<v8::FunctionTemplate> Ma
-  * //   bufferSize: 0,
-  * //   height: 400,
-  * //   width: 600,
-- * //   srs: '+init=epsg:3857' 
-+ * //   srs: '+init=epsg:3857'
-  * // }
-  */
- void Map::Initialize(v8::Local<v8::Object> target) {
-@@ -302,7 +302,7 @@ NAN_GETTER(Map::get_prop)
-         else
-             return;
-     }
--    else //if (a == "parameters") 
-+    else //if (a == "parameters")
-     {
-         v8::Local<v8::Object> ds = Nan::New<v8::Object>();
-         mapnik::parameters const& params = m->map_->get_extra_parameters();
-@@ -419,7 +419,7 @@ NAN_SETTER(Map::set_prop)
-             v8::Local<v8::Value> name = names->Get(i)->ToString();
-             v8::Local<v8::Value> a_value = obj->Get(name);
-             if (a_value->IsString()) {
--                params[TOSTR(name)] = TOSTR(a_value);
-+                params[TOSTR(name)] = const_cast<char const*>(TOSTR(a_value));
-             } else if (a_value->IsNumber()) {
-                 double num = a_value->NumberValue();
-                 // todo - round
-@@ -440,11 +440,11 @@ NAN_SETTER(Map::set_prop)
- 
- /**
-  * Load fonts from local or external source
-- * 
-+ *
-  * @name loadFonts
-  * @memberof Map
-  * @instance
-- * 
-+ *
-  */
- NAN_METHOD(Map::loadFonts)
- {
-@@ -1465,8 +1465,8 @@ NAN_METHOD(Map::zoomToBox)
-     {
-         Nan::ThrowError("Must provide 4 arguments: minx,miny,maxx,maxy");
-         return;
--    } 
--    else if (info[0]->IsNumber() && 
-+    }
-+    else if (info[0]->IsNumber() &&
-                info[1]->IsNumber() &&
-                info[2]->IsNumber() &&
-                info[3]->IsNumber())
-@@ -1827,15 +1827,15 @@ NAN_METHOD(Map::render)
-             uv_queue_work(uv_default_loop(), &closure->request, EIO_RenderGrid, (uv_after_work_cb)EIO_AfterRenderGrid);
-         }
- #endif
--        else if (Nan::New(VectorTile::constructor)->HasInstance(obj)) 
-+        else if (Nan::New(VectorTile::constructor)->HasInstance(obj))
-         {
- 
-             vector_tile_baton_t *closure = new vector_tile_baton_t();
- 
--            if (options->Has(Nan::New("image_scaling").ToLocalChecked())) 
-+            if (options->Has(Nan::New("image_scaling").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("image_scaling").ToLocalChecked());
--                if (!param_val->IsString()) 
-+                if (!param_val->IsString())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'image_scaling' must be a string");
-@@ -1843,7 +1843,7 @@ NAN_METHOD(Map::render)
-                 }
-                 std::string image_scaling = TOSTR(param_val);
-                 boost::optional<mapnik::scaling_method_e> method = mapnik::scaling_method_from_string(image_scaling);
--                if (!method) 
-+                if (!method)
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'image_scaling' must be a string and a valid scaling method (e.g 'bilinear')");
-@@ -1852,10 +1852,10 @@ NAN_METHOD(Map::render)
-                 closure->scaling_method = *method;
-             }
- 
--            if (options->Has(Nan::New("image_format").ToLocalChecked())) 
-+            if (options->Has(Nan::New("image_format").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("image_format").ToLocalChecked());
--                if (!param_val->IsString()) 
-+                if (!param_val->IsString())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'image_format' must be a string");
-@@ -1864,10 +1864,10 @@ NAN_METHOD(Map::render)
-                 closure->image_format = TOSTR(param_val);
-             }
- 
--            if (options->Has(Nan::New("area_threshold").ToLocalChecked())) 
-+            if (options->Has(Nan::New("area_threshold").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("area_threshold").ToLocalChecked());
--                if (!param_val->IsNumber()) 
-+                if (!param_val->IsNumber())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'area_threshold' must be a number");
-@@ -1882,10 +1882,10 @@ NAN_METHOD(Map::render)
-                 }
-             }
- 
--            if (options->Has(Nan::New("strictly_simple").ToLocalChecked())) 
-+            if (options->Has(Nan::New("strictly_simple").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("strictly_simple").ToLocalChecked());
--                if (!param_val->IsBoolean()) 
-+                if (!param_val->IsBoolean())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'strictly_simple' must be a boolean");
-@@ -1894,10 +1894,10 @@ NAN_METHOD(Map::render)
-                 closure->strictly_simple = param_val->BooleanValue();
-             }
- 
--            if (options->Has(Nan::New("multi_polygon_union").ToLocalChecked())) 
-+            if (options->Has(Nan::New("multi_polygon_union").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("multi_polygon_union").ToLocalChecked());
--                if (!param_val->IsBoolean()) 
-+                if (!param_val->IsBoolean())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'multi_polygon_union' must be a boolean");
-@@ -1906,10 +1906,10 @@ NAN_METHOD(Map::render)
-                 closure->multi_polygon_union = param_val->BooleanValue();
-             }
- 
--            if (options->Has(Nan::New("fill_type").ToLocalChecked())) 
-+            if (options->Has(Nan::New("fill_type").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("fill_type").ToLocalChecked());
--                if (!param_val->IsNumber()) 
-+                if (!param_val->IsNumber())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'fill_type' must be an unsigned integer");
-@@ -1934,7 +1934,7 @@ NAN_METHOD(Map::render)
-                     return;
-                 }
-                 closure->threading_mode = static_cast<std::launch>(param_val->IntegerValue());
--                if (closure->threading_mode != std::launch::async && 
-+                if (closure->threading_mode != std::launch::async &&
-                     closure->threading_mode != std::launch::deferred &&
-                     closure->threading_mode != (std::launch::async | std::launch::deferred))
-                 {
-@@ -1944,10 +1944,10 @@ NAN_METHOD(Map::render)
-                 }
-             }
- 
--            if (options->Has(Nan::New("simplify_distance").ToLocalChecked())) 
-+            if (options->Has(Nan::New("simplify_distance").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("simplify_distance").ToLocalChecked());
--                if (!param_val->IsNumber()) 
-+                if (!param_val->IsNumber())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'simplify_distance' must be an floating point number");
-@@ -1974,10 +1974,10 @@ NAN_METHOD(Map::render)
-                 object_to_container(closure->variables,bind_opt->ToObject());
-             }
- 
--            if (options->Has(Nan::New("process_all_rings").ToLocalChecked())) 
-+            if (options->Has(Nan::New("process_all_rings").ToLocalChecked()))
-             {
-                 v8::Local<v8::Value> param_val = options->Get(Nan::New("process_all_rings").ToLocalChecked());
--                if (!param_val->IsBoolean()) 
-+                if (!param_val->IsBoolean())
-                 {
-                     delete closure;
-                     Nan::ThrowTypeError("option 'process_all_rings' must be a boolean");
-@@ -2003,8 +2003,8 @@ NAN_METHOD(Map::render)
-             }
-             closure->cb.Reset(info[info.Length() - 1].As<v8::Function>());
-             uv_queue_work(uv_default_loop(), &closure->request, EIO_RenderVectorTile, (uv_after_work_cb)EIO_AfterRenderVectorTile);
--        } 
--        else 
-+        }
-+        else
-         {
-             Nan::ThrowTypeError("renderable mapnik object expected");
-             return;
-@@ -2060,12 +2060,12 @@ void Map::EIO_AfterRenderVectorTile(uv_w
-     vector_tile_baton_t *closure = static_cast<vector_tile_baton_t *>(req->data);
-     closure->m->release();
- 
--    if (closure->error) 
-+    if (closure->error)
-     {
-         v8::Local<v8::Value> argv[1] = { Nan::Error(closure->error_name.c_str()) };
-         Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(closure->cb), 1, argv);
--    } 
--    else 
-+    }
-+    else
-     {
-         v8::Local<v8::Value> argv[2] = { Nan::Null(), closure->d->handle() };
-         Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(closure->cb), 2, argv);
-@@ -2144,18 +2144,18 @@ void Map::EIO_AfterRenderGrid(uv_work_t*
- 
- struct agg_renderer_visitor
- {
--    agg_renderer_visitor(mapnik::Map const& m, 
--                         mapnik::request const& req, 
-+    agg_renderer_visitor(mapnik::Map const& m,
-+                         mapnik::request const& req,
-                          mapnik::attributes const& vars,
--                         double scale_factor, 
--                         unsigned offset_x, 
--                         unsigned offset_y, 
-+                         double scale_factor,
-+                         unsigned offset_x,
-+                         unsigned offset_y,
-                          double scale_denominator)
-         : m_(m),
-           req_(req),
-           vars_(vars),
--          scale_factor_(scale_factor), 
--          offset_x_(offset_x), 
-+          scale_factor_(scale_factor),
-+          offset_x_(offset_x),
-           offset_y_(offset_y),
-           scale_denominator_(scale_denominator) {}
- 
-@@ -2164,7 +2164,7 @@ struct agg_renderer_visitor
-         mapnik::agg_renderer<mapnik::image_rgba8> ren(m_,req_,vars_,pixmap,scale_factor_,offset_x_,offset_y_);
-         ren.apply(scale_denominator_);
-     }
--    
-+
-     template <typename T>
-     void operator() (T &)
-     {
-@@ -2190,10 +2190,10 @@ void Map::EIO_RenderImage(uv_work_t* req
-         mapnik::Map const& map = *closure->m->map_;
-         mapnik::request m_req(map.width(),map.height(),map.get_current_extent());
-         m_req.set_buffer_size(closure->buffer_size);
--        agg_renderer_visitor visit(map, 
--                                   m_req, 
--                                   closure->variables, 
--                                   closure->scale_factor, 
-+        agg_renderer_visitor visit(map,
-+                                   m_req,
-+                                   closure->variables,
-+                                   closure->scale_factor,
-                                    closure->offset_x,
-                                    closure->offset_y,
-                                    closure->scale_denominator);
-@@ -2467,9 +2467,9 @@ NAN_METHOD(Map::renderSync)
-     double scale_denominator = 0.0;
-     int buffer_size = 0;
- 
--    if (info.Length() >= 1) 
-+    if (info.Length() >= 1)
-     {
--        if (!info[0]->IsObject()) 
-+        if (!info[0]->IsObject())
-         {
-             Nan::ThrowTypeError("first argument is optional, but if provided must be an object, eg. {format: 'pdf'}");
-             return;
---- a/src/mapnik_memory_datasource.cpp
-+++ b/src/mapnik_memory_datasource.cpp
-@@ -95,7 +95,7 @@ NAN_METHOD(MemoryDatasource::New)
-         }
-         else
-         {
--            params[TOSTR(name)] = TOSTR(value);
-+            params[TOSTR(name)] = const_cast<char const*>(TOSTR(value));
-         }
-         i++;
-     }
-@@ -134,7 +134,7 @@ NAN_METHOD(MemoryDatasource::describe)
- {
-     MemoryDatasource* d = Nan::ObjectWrap::Unwrap<MemoryDatasource>(info.Holder());
-     v8::Local<v8::Object> description = Nan::New<v8::Object>();
--    if (d->datasource_) 
-+    if (d->datasource_)
-     {
-         node_mapnik::describe_datasource(description,d->datasource_);
-     }
-@@ -164,7 +164,7 @@ NAN_METHOD(MemoryDatasource::featureset)
-             info.GetReturnValue().Set(Featureset::NewInstance(fs));
-         }
-     }
--    
-+
-     // Even if there is an empty query, a featureset is still created
-     // therefore it should be impossible to reach this point in the code.
-     /* LCOV_EXCL_START */
diff --git a/debian/patches/0001-compile-against-both-mapnik-3.0.12-and-before.patch b/debian/patches/0001-compile-against-both-mapnik-3.0.12-and-before.patch
deleted file mode 100644
index 9224627..0000000
--- a/debian/patches/0001-compile-against-both-mapnik-3.0.12-and-before.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 741ad319e1360144c3796ca1ce876d6a352ab41e Mon Sep 17 00:00:00 2001
-From: Dane Springmeyer <dane at mapbox.com>
-Date: Wed, 3 Aug 2016 17:16:10 -0700
-Subject: compile against both mapnik >= 3.0.12 and before
-
----
- src/mapnik_palette.cpp | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/src/mapnik_palette.cpp
-+++ b/src/mapnik_palette.cpp
-@@ -94,7 +94,11 @@ NAN_METHOD(Palette::ToString)
- 
-     const std::vector<mapnik::rgb>& colors = p->palette();
-     std::size_t length = colors.size();
-+#if MAPNIK_VERSION >= 300012
-+    const std::vector<unsigned>& alpha = p->alpha_table();
-+#else
-     const std::vector<unsigned>& alpha = p->alphaTable();
-+#endif
-     std::size_t alphaLength = alpha.size();
- 
-     std::ostringstream str("");
-@@ -122,7 +126,11 @@ NAN_METHOD(Palette::ToBuffer)
- 
-     const std::vector<mapnik::rgb>& colors = p->palette();
-     std::size_t length = colors.size();
-+#if MAPNIK_VERSION >= 300012
-+    const std::vector<unsigned>& alpha = p->alpha_table();
-+#else
-     const std::vector<unsigned>& alpha = p->alphaTable();
-+#endif
-     std::size_t alphaLength = alpha.size();
- 
-     char palette[256 * 4];
diff --git a/debian/patches/nodejs.patch b/debian/patches/nodejs.patch
index 0b352fd..e2c9aea 100644
--- a/debian/patches/nodejs.patch
+++ b/debian/patches/nodejs.patch
@@ -35,12 +35,16 @@ Author: Bas Couwenberg <sebastic at debian.org>
  
 --- a/binding.gyp
 +++ b/binding.gyp
-@@ -57,7 +57,7 @@
+@@ -56,9 +56,9 @@
+       'include_dirs': [
          './deps/clipper/',
-         './node_modules/mapnik-vector-tile/src/',
          './src',
 -        "<!(node -e \"require('nan')\")",
+-        "<!(node -e \"require('protozero')\")",
+-        "<!(node -e \"require('mapnik-vector-tile')\")"
 +        "<!(nodejs -e \"require('nan')\")",
-         './node_modules/protozero/include/',
++        "<!(nodejs -e \"require('protozero')\")",
++        "<!(nodejs -e \"require('mapnik-vector-tile')\")"
        ],
        'defines': [
+           'MAPNIK_GIT_REVISION="<!@(mapnik-config --git-describe)"',
diff --git a/debian/patches/series b/debian/patches/series
index c3aed59..bf04208 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,2 @@
 test_disable_raster_layer.patch
 nodejs.patch
-spelling-errors.patch
-0001-compile-against-both-mapnik-3.0.12-and-before.patch
-0001-add-const-cast-to-match-value_holder-char-const-ctor.patch
diff --git a/debian/patches/spelling-errors.patch b/debian/patches/spelling-errors.patch
deleted file mode 100644
index 07b570e..0000000
--- a/debian/patches/spelling-errors.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Description: Fix spelling errors.
- paramter      -> parameter
- intialization -> initialization
- orginal       -> original
-Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: https://github.com/mapnik/node-mapnik/pull/676
-Applied-Upstream: https://github.com/mapnik/node-mapnik/commit/8eac772887f84c8af865c63918a3136a0a068b76
-
---- a/src/mapnik_image.cpp
-+++ b/src/mapnik_image.cpp
-@@ -1825,7 +1825,7 @@ NAN_METHOD(Image::resize)
-     }
-     else
-     {
--        Nan::ThrowTypeError("resize requires a width and height paramter.");
-+        Nan::ThrowTypeError("resize requires a width and height parameter.");
-         return;
-     }
-     if (info.Length() >= 4)
---- a/src/mapnik_projection.cpp
-+++ b/src/mapnik_projection.cpp
-@@ -56,7 +56,7 @@ NAN_METHOD(Projection::New)
-     }
- 
-     if (info.Length() <= 0 || !info[0]->IsString()) {
--        Nan::ThrowTypeError("please provide a proj4 intialization string");
-+        Nan::ThrowTypeError("please provide a proj4 initialization string");
-         return;
-     }
-     bool lazy = false;
---- a/src/mapnik_vector_tile.cpp
-+++ b/src/mapnik_vector_tile.cpp
-@@ -4880,12 +4880,12 @@ NAN_METHOD(VectorTile::render)
-         {
-             if (!set_z || !set_x || !set_y)
-             {
--                Nan::ThrowTypeError("orginal args 'z', 'x', and 'y' must all be used together");
-+                Nan::ThrowTypeError("original args 'z', 'x', and 'y' must all be used together");
-                 return;
-             }
-             if (closure->x < 0 || closure->y < 0 || closure->z < 0)
-             {
--                Nan::ThrowTypeError("orginal args 'z', 'x', and 'y' can not be negative");
-+                Nan::ThrowTypeError("original args 'z', 'x', and 'y' can not be negative");
-                 return;
-             }
-             int max_at_zoom = pow(2,closure->z);

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