Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to NAN #44

Closed
2 of 3 tasks
mikemorris opened this issue Jun 9, 2014 · 10 comments
Closed
2 of 3 tasks

Port to NAN #44

mikemorris opened this issue Jun 9, 2014 · 10 comments

Comments

@mikemorris
Copy link
Contributor

Port to NAN to develop against both Node v0.10.x and v0.12.x. Some potentially helpful porting details at mapnik/node-mapnik#256.

  • 0.8
  • 0.10
  • 0.11
@tmcw
Copy link
Contributor

tmcw commented Jun 9, 2014

Is this a launch task? I can help here - got fairly comfy with NaN on s2

@mikemorris
Copy link
Contributor Author

Not seeing this as necessary for launch, but I'd like to hit it sooner rather than later. Would love some help if you've got time to dig into this @tmcw!

tmcw added a commit that referenced this issue Jun 9, 2014
@tmcw
Copy link
Contributor

tmcw commented Jun 10, 2014

Added multi-node branch to test, description of 0.12 changes is over at https://github.com/joyent/node/wiki/API-changes-between-v0.10-and-v0.12

@mikemorris
Copy link
Contributor Author

Might be worth adding 0.8 too if it looks easy.

@tmcw
Copy link
Contributor

tmcw commented Jun 10, 2014

Weird: so I got v0.11.x to try to compile, but it looks like the errors are in the node_mapnik source rather than node-fontnik: https://travis-ci.org/mapbox/node-fontnik/jobs/27250909#L1185 /cc @springmeyer

@springmeyer
Copy link
Contributor

thats not node-mapnik, but rather just looks like it because I think @mikemorris pulled in some node-mapnik headers.

@mikemorris
Copy link
Contributor Author

@tmcw @springmeyer I only pulled in mapnik_fonts.hpp from node-mapnik to handle font registration. I made minimal changes to cut off a long dependency chain for TOSTR and support for older versions of Mapnik.

8a9
> #include <mapnik/version.hpp>
14c15,16
< #define TOSTR(obj) (*String::Utf8Value((obj)->ToString()))
---
> #include "utils.hpp"
> #include "mapnik3x_compatibility.hpp"
86a89
> #if MAPNIK_VERSION >= 200100
93a97,105
> #else
>     std::map<std::string,std::string> const& mapping = mapnik::freetype_engine::get_mapping();
>     Local<Object> obj = Object::New();
>     std::map<std::string,std::string>::const_iterator itr;
>     for (itr = mapping.begin();itr!=mapping.end();++itr)
>     {
>         obj->Set(String::NewSymbol(itr->first.c_str()),String::New(itr->second.c_str()));
>     }
> #endif

@mikemorris
Copy link
Contributor Author

@tmcw include/node_mapnik/mapnik_fonts.hpp likely needs to be updated to the (yet-to-be-merged) NAN branch version at https://github.com/kkoopa/node-mapnik/blob/nan/src/mapnik_fonts.hpp.

Maybe drop using namespace v8 for clarity too.

@tmcw
Copy link
Contributor

tmcw commented Jun 10, 2014

k, will do

@mikemorris mikemorris mentioned this issue Mar 20, 2015
3 tasks
@springmeyer
Copy link
Contributor

this happened as part of #80 in 6b62495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants