[add] node-gyp compatible taglib/zlib build #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Nikhil,
I finally got node-gyp to build taglib and zlib out-of-the-box. You can still use
to have it use your systemwide version of taglib. (foo is currently unused, it is available as the taglib variable in gyp, so one could also use it as a prefix for your taglib installation)
I tried to keep the additionaly overhead as minimal as possible, so I just copied parts from node-sqlite3, which uses a python script to untar the taglib/zlib sources before compilation.
We can keep track of upstream by replacing the tar.gzs and updating the version variable in .gyp files accordingly.
taglib itself uses a
config.h
andtaglib_config.h
generated by cmake. I added dummy files to make compilation work and added default settings as direct defines in thetaglib.gyp
. One could think about adding compiler specifica (like the _BYTESWAP defines, or SNPRINTF) via gyp, but I didn't have the time.One thing to note is the
rtti
flag. I had to manually override node-gyp's defaults adding a-fno-rtti
to the compilation which broke taglib being built statically as it uses dynamic_cast a lot.I ran the supplied tests on OS X 10.8 and linux against node 0.10.20 and they work fine, though our test-suite isn't very exhaustive.
With this I can now focus on getting the windows build done, as it currently still fails without heavy modification of the source. More on that in the corresponding Issue
Hope you like it and it serves a purpose!
Best regards,
Lennart