Fix include paths for cairo#574
Conversation
|
Just tested this on Ubuntu 13.10 and |
|
Hmm, the Travis CI build fails on 0.8 for an unrelated reason. It seems like it can't find Anyways, it works on the three other instances so this really seems like the right thing to do 👍 |
|
@TooTallNate Any change of merging this? It should fix #572, #514, #217 and also fix installation on Mac OS X with cairo from brew. |
|
@TooTallNate Is there anything more you want provided for this to get merged? |
|
I built this (node-gyp rebuild) and then included in my node V12.6 project and can confirm canvas now working back as normal. Thanks for this. |
|
Rebased on latest master. The tests now works on Nodejs 0.8 but fails on iojs because it's trying to get the source for iojs from the nodejs website. It fails on the master branch as well and it's not the fault of this pull request. @TooTallNate I'm sorry for spamming you but I would really like this merged. We are trying to use node-canvas in production but this is a huge blocker for that. |
|
I'm also blocked on this, @TooTallNate, and have to fork two other projects to take a branch dep on @LinusU. Merging would help a great deal. |
Fix include paths for cairo
|
Thanks 🍻 @TooTallNate Could you please cut a new release that we can depend on as well 👍 |
This will need some verification before we can merge, but I think that this is the right thing to do.
pkg-configgives the path to a folder that includes the header files forcairoright away. This is different for e.g.fontconfigwhich gives a path to a folder that contains a single folder namedfontconfig.In the former case
#include <cairo.h>should be used, but in the latter case#include <fontconfig/fontconfig.h>should be used.This patch fixes the
cairoincludes to point at<cairo.h>.I believe that the reason why it worked before (on linux at least, it seems to be broken on OS X) is because the search path included
/usr/local/includewhich in turn contained the folder that (calledcairo) thatpkg-configpointed to.The last proof for that the correct linking should be
<cairo.h>is the FAQ page on Cairo's official website.This pull request can be tested simply by running the following command: