[Pkg-javascript-commits] [SCM] bindings to the Mapnik tile rendering library for NodeJS branch, master, updated. debian/0.5.8-2-8-gbe2f7c3
David Paleino
dapal at debian.org
Sun Apr 8 09:46:48 UTC 2012
The following commit has been merged in the master branch:
commit 76cf0bb9cb36525391d9052b727e6674716e2c40
Author: David Paleino <dapal at debian.org>
Date: Sun Apr 8 11:30:13 2012 +0200
Port code to work with mapnik 2.0.x
diff --git a/debian/changelog b/debian/changelog
index 259922e..6b35d85 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@ node-mapnik (0.6.7-1) UNRELEASED; urgency=low
* New upstream version
- now compatible with NodeJS 0.6 (Closes: #664926)
+ * Port code to work with mapnik 2.0.x
- -- David Paleino <dapal at debian.org> Wed, 21 Mar 2012 22:48:32 +0100
+ -- David Paleino <dapal at debian.org> Sun, 08 Apr 2012 11:29:59 +0200
node-mapnik (0.5.8-2) unstable; urgency=low
diff --git a/debian/patches/01-port_to_mapnik_2.0.x.patch b/debian/patches/01-port_to_mapnik_2.0.x.patch
new file mode 100644
index 0000000..cf8a9b0
--- /dev/null
+++ b/debian/patches/01-port_to_mapnik_2.0.x.patch
@@ -0,0 +1,634 @@
+From: Dane Springmeyer
+Subject: port code to mapnik 2.0.x
+Origin: upstream, https://github.com/mapnik/node-mapnik/compare/master...mapnik-2.0.x
+Forwarded: not-needed
+
+---
+ src/ds_emitter.hpp | 67 +++++++++++++++++++++-----------------------
+ src/js_grid_utils.hpp | 53 +++++++++++-----------------------
+ src/mapnik_datasource.cpp | 6 ++-
+ src/mapnik_datasource.hpp | 2 -
+ src/mapnik_fonts.hpp | 4 +-
+ src/mapnik_layer.cpp | 10 +++---
+ src/mapnik_map.cpp | 21 ++++++++-----
+ src/node_mapnik.cpp | 32 ++++++++++++---------
+ test/datasource.test.js | 4 ++
+ test/expression.test.js | 3 +
+ test/feature.test.js | 3 +
+ test/grid.test.js | 3 +
+ test/image.test.js | 3 +
+ test/map_generation.test.js | 2 +
+ test/parameters.test.js | 3 +
+ wscript | 12 +++----
+ 16 files changed, 120 insertions(+), 108 deletions(-)
+
+--- node-mapnik.orig/src/ds_emitter.hpp
++++ node-mapnik/src/ds_emitter.hpp
+@@ -78,14 +78,18 @@ static void describe_datasource(Local<Ob
+ }
+ description->Set(String::NewSymbol("fields"), fields);
+
++ // get first geometry type using naive first hit approach
++ // TODO proper approach --> https://trac.mapnik.org/ticket/701
++ #if MAPNIK_VERSION >= 800
+ mapnik::query q(ds->envelope());
++ #else
++ mapnik::query q(ds->envelope(),1.0,1.0);
++ #endif
+
+ mapnik::featureset_ptr fs = ds->features(q);
+ description->Set(String::NewSymbol("geometry_type"), Undefined());
+- description->Set(String::NewSymbol("has_features"), False());
++ description->Set(String::NewSymbol("has_features"), Boolean::New(false));
+
+- // TODO - need to remove this after this lands:
+- // https://github.com/mapnik/mapnik/issues/701
+ if (fs)
+ {
+ mapnik::feature_ptr fp = fs->next();
+@@ -96,42 +100,36 @@ static void describe_datasource(Local<Ob
+ {
+ mapnik::geometry_type const& geom = fp->get_geometry(0);
+ mapnik::eGeomType g_type = geom.type();
+- Local<String> js_type = String::New("unknown");
+ switch (g_type)
+ {
+ case mapnik::Point:
+- {
+- if (fp->num_geometries() > 1) {
+- js_type = String::New("multipoint");
+- } else {
+- js_type = String::New("point");
+- }
++ description->Set(String::NewSymbol("geometry_type"), String::New("point"));
+ break;
+- }
++
++ case mapnik::MultiPoint:
++ description->Set(String::NewSymbol("geometry_type"), String::New("multipoint"));
++ break;
++
+ case mapnik::Polygon:
+- {
+- if (fp->num_geometries() > 1) {
+- js_type = String::New("multipolygon");
+- } else {
+- js_type = String::New("polygon");
+- }
++ description->Set(String::NewSymbol("geometry_type"), String::New("polygon"));
+ break;
+- }
++
++ case mapnik::MultiPolygon:
++ description->Set(String::NewSymbol("geometry_type"), String::New("multipolygon"));
++ break;
++
+ case mapnik::LineString:
+- {
+- if (fp->num_geometries() > 1) {
+- js_type = String::New("multilinestring");
+- } else {
+- js_type = String::New("linestring");
+- }
++ description->Set(String::NewSymbol("geometry_type"), String::New("linestring"));
+ break;
+- }
++
++ case mapnik::MultiLineString:
++ description->Set(String::NewSymbol("geometry_type"), String::New("multilinestring"));
++ break;
++
+ default:
+- {
++ description->Set(String::NewSymbol("geometry_type"), String::New("unknown"));
+ break;
+- }
+ }
+- description->Set(String::NewSymbol("geometry_type"), js_type);
+ }
+ }
+ }
+@@ -177,16 +175,17 @@ static void datasource_features(Local<Ar
+ unsigned idx = 0;
+ while ((fp = fs->next()))
+ {
+- if ((idx >= first) && (idx <= last || last == 0)) {
++ if ((idx >= first) && (idx <= last || last == 0)) {
++ std::map<std::string,mapnik::value> const& fprops = fp->props();
+ Local<Object> feat = Object::New();
+- mapnik::feature_impl::iterator itr = fp->begin();
+- mapnik::feature_impl::iterator end = fp->end();
+- for ( ;itr!=end; ++itr)
++ std::map<std::string,mapnik::value>::const_iterator it = fprops.begin();
++ std::map<std::string,mapnik::value>::const_iterator end = fprops.end();
++ for (; it != end; ++it)
+ {
+- node_mapnik::params_to_object serializer( feat , boost::get<0>(*itr));
++ node_mapnik::params_to_object serializer( feat , it->first);
+ // need to call base() since this is a mapnik::value
+ // not a mapnik::value_holder
+- boost::apply_visitor( serializer, boost::get<1>(*itr).base() );
++ boost::apply_visitor( serializer, it->second.base() );
+ }
+
+ // add feature id
+--- node-mapnik.orig/src/js_grid_utils.hpp
++++ node-mapnik/src/js_grid_utils.hpp
+@@ -47,6 +47,7 @@ static void grid2utf(T const& grid_type,
+ // can't be encoded directly in JSON.
+ if (codepoint == 34) ++codepoint; // Skip "
+ else if (codepoint == 92) ++codepoint; // Skip backslash
++
+ keys[val] = codepoint;
+ key_order.push_back(val);
+ line[idx++] = static_cast<uint16_t>(codepoint);
+@@ -100,6 +101,7 @@ static void grid2utf(T const& grid_type,
+ // can't be encoded directly in JSON.
+ if (codepoint == 34) ++codepoint; // Skip "
+ else if (codepoint == 92) ++codepoint; // Skip backslash
++
+ keys[val] = codepoint;
+ key_order.push_back(val);
+ line[idx++] = static_cast<uint16_t>(codepoint);
+@@ -123,64 +125,45 @@ static void write_features(T const& grid
+ Local<Object>& feature_data,
+ std::vector<typename T::lookup_type> const& key_order)
+ {
+- std::string const& key = grid_type.get_key();
++ std::string const& key = grid_type.get_key(); // get_key();
+ std::set<std::string> const& attributes = grid_type.property_names();
+ typename T::feature_type const& g_features = grid_type.get_grid_features();
+ typename T::feature_type::const_iterator feat_itr = g_features.begin();
+ typename T::feature_type::const_iterator feat_end = g_features.end();
+ bool include_key = (attributes.find(key) != attributes.end());
++
+ for (; feat_itr != feat_end; ++feat_itr)
+ {
+- mapnik::feature_ptr feature = feat_itr->second;
+- boost::optional<std::string> join_value;
+- if (key == grid_type.key_name())
++ std::map<std::string,mapnik::value> const& props = feat_itr->second;
++ std::map<std::string,mapnik::value>::const_iterator const& itr = props.find(key);
++ if (itr != props.end())
+ {
+- std::stringstream s;
+- s << feature->id();
+- join_value = s.str();
+-
+- }
+- else if (feature->has_key(key))
+- {
+- join_value = feature->get(key).to_string();
+- }
++ typename T::lookup_type const& join_value = itr->second.to_string();
+
+- if (join_value)
+- {
+ // only serialize features visible in the grid
+- if(std::find(key_order.begin(), key_order.end(), *join_value) != key_order.end()) {
++ if(std::find(key_order.begin(), key_order.end(), join_value) != key_order.end()) {
+ Local<Object> feat = Object::New();
++ std::map<std::string,mapnik::value>::const_iterator it = props.begin();
++ std::map<std::string,mapnik::value>::const_iterator end = props.end();
+ bool found = false;
+- if (key == grid_type.key_name())
+- {
+- // drop key unless requested
+- if (include_key) {
+- found = true;
+- // TODO do we need to duplicate __id__ ?
+- //feat->Set(String::NewSymbol(key.c_str()), String::New(join_value->c_str()) );
+- }
+- }
+- mapnik::feature_impl::iterator itr = feature->begin();
+- mapnik::feature_impl::iterator end = feature->end();
+- for ( ;itr!=end; ++itr)
++ for (; it != end; ++it)
+ {
+- std::string const& key_name = boost::get<0>(*itr);
++ std::string const& key_name = it->first;
+ if (key_name == key) {
+- // drop key unless requested
++ // drop join_field unless requested
+ if (include_key) {
+ found = true;
+- params_to_object serializer( feat , key_name);
+- boost::apply_visitor( serializer, boost::get<1>(*itr).base() );
++ params_to_object serializer( feat , it->first);
++ boost::apply_visitor( serializer, it->second.base() );
+ }
+ }
+ else if ( (attributes.find(key_name) != attributes.end()) )
+ {
+ found = true;
+- params_to_object serializer( feat , key_name);
+- boost::apply_visitor( serializer, boost::get<1>(*itr).base() );
++ params_to_object serializer( feat , it->first);
++ boost::apply_visitor( serializer, it->second.base() );
+ }
+ }
+-
+ if (found)
+ {
+ feature_data->Set(String::NewSymbol(feat_itr->first.c_str()), feat);
+--- node-mapnik.orig/src/mapnik_datasource.cpp
++++ node-mapnik/src/mapnik_datasource.cpp
+@@ -2,7 +2,7 @@
+ #include <mapnik/datasource_cache.hpp>
+
+ #include "mapnik_datasource.hpp"
+-#include "mapnik_featureset.hpp"
++//#include "mapnik_featureset.hpp"
+ #include "utils.hpp"
+ #include "ds_emitter.hpp"
+
+@@ -23,7 +23,7 @@ void Datasource::Initialize(Handle<Objec
+ NODE_SET_PROTOTYPE_METHOD(constructor, "parameters", parameters);
+ NODE_SET_PROTOTYPE_METHOD(constructor, "describe", describe);
+ NODE_SET_PROTOTYPE_METHOD(constructor, "features", features);
+- NODE_SET_PROTOTYPE_METHOD(constructor, "featureset", featureset);
++ //NODE_SET_PROTOTYPE_METHOD(constructor, "featureset", featureset);
+
+ target->Set(String::NewSymbol("Datasource"),constructor->GetFunction());
+ }
+@@ -200,6 +200,7 @@ Handle<Value> Datasource::features(const
+ return scope.Close(a);
+ }
+
++/*
+ Handle<Value> Datasource::featureset(const Arguments& args)
+ {
+
+@@ -241,3 +242,4 @@ Handle<Value> Datasource::featureset(con
+
+ return Undefined();
+ }
++*/
+--- node-mapnik.orig/src/mapnik_datasource.hpp
++++ node-mapnik/src/mapnik_datasource.hpp
+@@ -20,7 +20,7 @@ class Datasource: public node::ObjectWra
+ static Handle<Value> describe(const Arguments &args);
+ static Handle<Value> features(const Arguments &args);
+
+- static Handle<Value> featureset(const Arguments &args);
++ //static Handle<Value> featureset(const Arguments &args);
+
+ Datasource();
+ inline mapnik::datasource_ptr get() { return datasource_; }
+--- node-mapnik.orig/src/mapnik_fonts.hpp
++++ node-mapnik/src/mapnik_fonts.hpp
+@@ -85,7 +85,7 @@ static inline Handle<Value> available_fo
+ return scope.Close(a);
+ }
+
+-static inline Handle<Value> available_font_files(const Arguments& args)
++/*static inline Handle<Value> available_font_files(const Arguments& args)
+ {
+ HandleScope scope;
+ std::map<std::string,std::pair<int,std::string> > const& mapping = mapnik::freetype_engine::get_mapping();
+@@ -96,7 +96,7 @@ static inline Handle<Value> available_fo
+ obj->Set(String::NewSymbol(itr->first.c_str()),String::New(itr->second.second.c_str()));
+ }
+ return scope.Close(obj);
+-}
++}*/
+
+
+ }
+--- node-mapnik.orig/src/mapnik_layer.cpp
++++ node-mapnik/src/mapnik_layer.cpp
+@@ -2,8 +2,8 @@
+ #include "utils.hpp"
+ #include "mapnik_layer.hpp"
+ #include "mapnik_datasource.hpp"
+-#include "mapnik_js_datasource.hpp"
+-#include "mapnik_memory_datasource.hpp"
++//#include "mapnik_js_datasource.hpp"
++//#include "mapnik_memory_datasource.hpp"
+ #include "ds_emitter.hpp"
+ #include "layer_emitter.hpp"
+
+@@ -220,11 +220,11 @@ void Layer::set_prop(Local<String> prope
+ ThrowException(Exception::TypeError(String::New("mapnik.Datasource, mapnik.JSDatasource, or mapnik.MemoryDatasource instance expected")));
+ } else {
+ if (Datasource::constructor->HasInstance(obj)) {
+- JSDatasource *d = ObjectWrap::Unwrap<JSDatasource>(obj);
++ Datasource *d = ObjectWrap::Unwrap<Datasource>(obj);
+ // TODO - addLayer should be add_layer in mapnik
+ l->layer_->set_datasource(d->get());
+ }
+- else if (JSDatasource::constructor->HasInstance(obj))
++ /*else if (JSDatasource::constructor->HasInstance(obj))
+ {
+ JSDatasource *d = ObjectWrap::Unwrap<JSDatasource>(obj);
+ // TODO - addLayer should be add_layer in mapnik
+@@ -235,7 +235,7 @@ void Layer::set_prop(Local<String> prope
+ MemoryDatasource *d = ObjectWrap::Unwrap<MemoryDatasource>(obj);
+ // TODO - addLayer should be add_layer in mapnik
+ l->layer_->set_datasource(d->get());
+- }
++ }*/
+ else
+ {
+ ThrowException(Exception::TypeError(String::New("mapnik.Datasource, mapnik.JSDatasource, or mapnik.MemoryDatasource instance expected")));
+--- node-mapnik.orig/src/mapnik_map.cpp
++++ node-mapnik/src/mapnik_map.cpp
+@@ -20,7 +20,7 @@
+ #include <mapnik/map.hpp>
+ #include <mapnik/projection.hpp>
+ #include <mapnik/layer.hpp>
+-#include <mapnik/expression.hpp>
++#include <mapnik/filter_factory.hpp>
+ #include <mapnik/image_util.hpp>
+ #include <mapnik/config_error.hpp>
+ #include <mapnik/load_map.hpp>
+@@ -238,6 +238,11 @@ public:
+ *usage_ += (sizeof(sym)*factor_);
+ }
+
++ void operator () ( mapnik::glyph_symbolizer const& sym)
++ {
++ *usage_ += (sizeof(sym)*factor_);
++ }
++
+ unsigned int * usage_;
+ unsigned int factor_;
+ };
+@@ -311,7 +316,7 @@ Handle<Value> Map::get_prop(Local<String
+ else
+ return Undefined();
+ }
+- else if (a == "parameters") {
++ /*else if (a == "parameters") {
+ Local<Object> ds = Object::New();
+ mapnik::parameters const& params = m->map_->get_extra_parameters();
+ mapnik::parameters::const_iterator it = params.begin();
+@@ -322,7 +327,7 @@ Handle<Value> Map::get_prop(Local<String
+ boost::apply_visitor( serializer, it->second );
+ }
+ return scope.Close(ds);
+- }
++ }*/
+ return Undefined();
+ }
+
+@@ -399,7 +404,7 @@ void Map::set_prop(Local<String> propert
+ Color *c = ObjectWrap::Unwrap<Color>(obj);
+ m->map_->set_background(*c->get());
+ }
+- else if (a == "parameters") {
++ /*else if (a == "parameters") {
+ if (!value->IsObject())
+ ThrowException(Exception::TypeError(
+ String::New("object expected for map.parameters")));
+@@ -433,7 +438,7 @@ void Map::set_prop(Local<String> propert
+ i++;
+ }
+ m->map_->set_extra_parameters(params);
+- }
++ }*/
+ }
+
+ Handle<Value> Map::scaleDenominator(const Arguments& args)
+@@ -1312,7 +1317,7 @@ void Map::EIO_RenderGrid(uv_work_t* req)
+ std::set<std::string> attributes = closure->g->get()->property_names();
+
+ std::string join_field = closure->g->get()->get_key();
+- if (join_field == closure->g->get()->key_name())
++ if (join_field == closure->g->get()->get_key())
+ {
+ // TODO - should feature.id() be a first class attribute?
+ if (attributes.find(join_field) != attributes.end())
+@@ -1707,7 +1712,7 @@ Handle<Value> Map::renderLayerSync(const
+ std::set<std::string> attributes = g->get()->property_names();
+
+ std::string join_field = g->get()->get_key();
+- if (join_field == g->get()->key_name())
++ if (join_field == g->get()->get_key())
+ {
+ // TODO - should feature.id() be a first class attribute?
+ if (attributes.find(join_field) != attributes.end())
+@@ -2097,7 +2102,7 @@ void Map::EIO_RenderGrid2(uv_work_t* req
+
+ std::string const& join_field = closure->join_field;
+
+- if (join_field == closure->grid_ptr->key_name())
++ if (join_field == closure->grid_ptr->get_key())
+ {
+ // TODO - should feature.id() be a first class attribute?
+ if (attributes.find(join_field) != attributes.end())
+--- node-mapnik.orig/src/node_mapnik.cpp
++++ node-mapnik/src/node_mapnik.cpp
+@@ -9,22 +9,22 @@
+ // node-mapnik
+ #include "mapnik_map.hpp"
+ #include "mapnik_color.hpp"
+-#include "mapnik_geometry.hpp"
+-#include "mapnik_feature.hpp"
++//#include "mapnik_geometry.hpp"
++//#include "mapnik_feature.hpp"
+ #include "mapnik_fonts.hpp"
+ #include "mapnik_plugins.hpp"
+ #include "mapnik_palette.hpp"
+ #include "mapnik_projection.hpp"
+ #include "mapnik_layer.hpp"
+ #include "mapnik_datasource.hpp"
+-#include "mapnik_featureset.hpp"
+-#include "mapnik_js_datasource.hpp"
+-#include "mapnik_memory_datasource.hpp"
++//#include "mapnik_featureset.hpp"
++//#include "mapnik_js_datasource.hpp"
++//#include "mapnik_memory_datasource.hpp"
+ #include "mapnik_image.hpp"
+ #include "mapnik_image_view.hpp"
+ #include "mapnik_grid.hpp"
+ #include "mapnik_grid_view.hpp"
+-#include "mapnik_expression.hpp"
++//#include "mapnik_expression.hpp"
+ #include "utils.hpp"
+
+ // mapnik
+@@ -60,6 +60,12 @@ static Handle<Value> gc(const Arguments&
+ return scope.Close(Boolean::New(V8::IdleNotification()));
+ }
+
++static Handle<Value> clearCache(const Arguments& args)
++{
++ HandleScope scope;
++ return Undefined();
++}
++
+ static std::string format_version(int version)
+ {
+ std::ostringstream s;
+@@ -76,14 +82,14 @@ extern "C" {
+ NODE_SET_METHOD(target, "datasources", node_mapnik::available_input_plugins);
+ NODE_SET_METHOD(target, "register_fonts", node_mapnik::register_fonts);
+ NODE_SET_METHOD(target, "fonts", node_mapnik::available_font_faces);
+- NODE_SET_METHOD(target, "fontFiles", node_mapnik::available_font_files);
++ //NODE_SET_METHOD(target, "fontFiles", node_mapnik::available_font_files);
+ NODE_SET_METHOD(target, "gc", gc);
+
+ // Classes
+ Map::Initialize(target);
+ Color::Initialize(target);
+- Geometry::Initialize(target);
+- Feature::Initialize(target);
++ //Geometry::Initialize(target);
++ //Feature::Initialize(target);
+ Image::Initialize(target);
+ ImageView::Initialize(target);
+ Palette::Initialize(target);
+@@ -92,10 +98,10 @@ extern "C" {
+ Grid::Initialize(target);
+ GridView::Initialize(target);
+ Datasource::Initialize(target);
+- Featureset::Initialize(target);
+- JSDatasource::Initialize(target);
+- MemoryDatasource::Initialize(target);
+- Expression::Initialize(target);
++ //Featureset::Initialize(target);
++ //JSDatasource::Initialize(target);
++ //MemoryDatasource::Initialize(target);
++ //Expression::Initialize(target);
+
+ // versions of deps
+ Local<Object> versions = Object::New();
+--- node-mapnik.orig/test/datasource.test.js
++++ node-mapnik/test/datasource.test.js
+@@ -1,3 +1,6 @@
++exports['test datasource creation'] = function(beforeExit, assert) {}
++
++/*
+ var mapnik = require('mapnik');
+ var fs = require('fs');
+ var path = require('path');
+@@ -131,3 +134,4 @@ exports['test JSON datasource'] = functi
+ has_features: true
+ });
+ };
++*/
+--- node-mapnik.orig/test/expression.test.js
++++ node-mapnik/test/expression.test.js
+@@ -1,3 +1,5 @@
++exports['test datasource creation'] = function(beforeExit, assert) {}
++/*
+ var mapnik = require('mapnik');
+ var assert = require('assert');
+
+@@ -31,3 +33,4 @@ exports['test expression evaluation'] =
+ assert.equal(expr.evaluate(feature).toString(),'true');
+
+ };
++*/
+--- node-mapnik.orig/test/feature.test.js
++++ node-mapnik/test/feature.test.js
+@@ -1,3 +1,5 @@
++exports['test datasource creation'] = function(beforeExit, assert) {}
++/*
+ var mapnik = require('mapnik');
+ var fs = require('fs');
+ var path = require('path');
+@@ -33,3 +35,4 @@ exports['test features'] = function(befo
+ }
+ assert.equal(count, 245);
+ };
++*/
+\ No newline at end of file
+--- node-mapnik.orig/test/grid.test.js
++++ node-mapnik/test/grid.test.js
+@@ -67,7 +67,7 @@ exports['test grids'] = function(beforeE
+ s += '</Map>';
+ m3.fromStringSync(s);
+
+- var mem_datasource = new mapnik.MemoryDatasource({'extent':'-180,-90,180,90'});
++ /*var mem_datasource = new mapnik.MemoryDatasource({'extent':'-180,-90,180,90'});
+ mem_datasource.add({ 'x':0, 'y':0 });
+ mem_datasource.add({ 'x':1, 'y':1 });
+ mem_datasource.add({ 'x':2, 'y':2 });
+@@ -83,5 +83,6 @@ exports['test grids'] = function(beforeE
+ // TODO - expose grid background
+ //assert.equal(grid_blank3.background,undefined);
+ });
++ */
+
+ };
+--- node-mapnik.orig/test/image.test.js
++++ node-mapnik/test/image.test.js
+@@ -73,7 +73,7 @@ exports['test images'] = function(before
+ s += '</Map>';
+ m3.fromStringSync(s);
+
+- var mem_datasource = new mapnik.MemoryDatasource({'extent': '-180,-90,180,90'});
++ /*var mem_datasource = new mapnik.MemoryDatasource({'extent': '-180,-90,180,90'});
+ mem_datasource.add({ 'x': 0, 'y': 0 });
+ mem_datasource.add({ 'x': 1, 'y': 1 });
+ mem_datasource.add({ 'x': 2, 'y': 2 });
+@@ -88,5 +88,6 @@ exports['test images'] = function(before
+ assert.equal(im_blank3.painted(), true);
+ assert.equal(im_blank3.background, undefined);
+ });
++ */
+
+ };
+--- node-mapnik.orig/test/map_generation.test.js
++++ node-mapnik/test/map_generation.test.js
+@@ -53,6 +53,7 @@ exports['test asynchronous map rendering
+ };
+
+
++/*
+ if(mapnik.supports.cairo) {
+ exports['test asynchronous map rendering to file with actual data and cairo'] = function(beforeExit, assert) {
+
+@@ -69,6 +70,7 @@ if(mapnik.supports.cairo) {
+ });
+ };
+ }
++*/
+
+ exports['test asynchronous map rendering to file with actual data (guess file type) '] = function(beforeExit, assert) {
+
+--- node-mapnik.orig/test/parameters.test.js
++++ node-mapnik/test/parameters.test.js
+@@ -1,3 +1,5 @@
++exports['test datasource creation'] = function(beforeExit, assert) {}
++/*
+ var mapnik = require('mapnik');
+ var assert = require('assert');
+ var fs = require('fs');
+@@ -20,3 +22,4 @@ exports['test setting map parameters'] =
+ assert.equal(map.toXML(),'<?xml version="1.0" encoding="utf-8"?>\n<Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">\n <Parameters>\n <Parameter name="a" type="string">b</Parameter>\n </Parameters>\n</Map>\n'
+ );
+ };
++*/
+\ No newline at end of file
+--- node-mapnik.orig/wscript
++++ node-mapnik/wscript
+@@ -164,20 +164,20 @@ def build(bld):
+ obj.source = ["src/node_mapnik.cpp",
+ "src/mapnik_map.cpp",
+ "src/mapnik_color.cpp",
+- "src/mapnik_geometry.cpp",
+- "src/mapnik_feature.cpp",
++ #"src/mapnik_geometry.cpp",
++ #"src/mapnik_feature.cpp",
+ "src/mapnik_image.cpp",
+ "src/mapnik_image_view.cpp",
+ "src/mapnik_grid.cpp",
+ "src/mapnik_grid_view.cpp",
+- "src/mapnik_js_datasource.cpp",
+- "src/mapnik_memory_datasource.cpp",
++ #"src/mapnik_js_datasource.cpp",
++ #"src/mapnik_memory_datasource.cpp",
+ "src/mapnik_palette.cpp",
+ "src/mapnik_projection.cpp",
+ "src/mapnik_layer.cpp",
+ "src/mapnik_datasource.cpp",
+- "src/mapnik_featureset.cpp",
+- "src/mapnik_expression.cpp"
++ #"src/mapnik_featureset.cpp",
++ #"src/mapnik_expression.cpp"
+ ]
+ obj.uselib = "MAPNIK"
+ # install 'mapnik' module
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9303b02
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-port_to_mapnik_2.0.x.patch
--
bindings to the Mapnik tile rendering library for NodeJS
More information about the Pkg-javascript-commits
mailing list