Automattic / Automattic/node-canvas
How to do a static build?
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
I'm trying to do a cross-compile static build from scratch of node-canvas (including download automatically the Cairo library) to be used on [NodeOS](https://github.com/NodeOS/NodeOS), but I'm not able to make it work. According to https://github.com/Automattic/node-canvas/pull/349 there should be support for static builds just by setting all the [variables](https://github.com/Automattic/node-canvas/blob/70162e6bc23a05456163f2511befd17a59aa523a/binding.gyp#L12-L18) to false, but I get errors about `cairo.h` is not available:
```
In file included from ../src/CanvasGradient.cc:9:0:
../src/Canvas.h:19:25: fatal error: cairo/cairo.h: No such file or directory
compilation terminated.
```
The pull-request I put before seems to have support to detect automatically [if Cairo is available on the system](https://github.com/magicode/node-canvas/blob/master/binding.gyp), and if not, [download de dependencies source code](https://github.com/magicode/node-canvas/blob/master/deps/ensure_deps.sh) and [build a static Cairo library](https://github.com/magicode/node-canvas/blob/master/static.gyp), but I don't know if this functionality is already available on node-canvas (and how to enable it), or if not, the reason why the pull-request was not finally accepted... :-/
/cc @ReneHollander
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.