Created attachment 176338 [details] USES=node This is based lightly on Mk/Uses/python.mk. Add build, run, test dependencies based on the arguments received. If the port does not explicitly set a version, use a default which can be overridden by the user.
There still are quite a few Python references in USES=node :-)
Created attachment 176398 [details] USES=node (updated) Updated patch to remove the Python references. :)
Created attachment 176879 [details] Add USES=node[:args] for specifying a dependency on Node.js This is based lightly on Mk/Uses/python.mk. Add build, run, test dependencies based on the arguments received. If the port does not explicitly set a version, use a default which can be overridden by the user. Change the www/node meta-port to USES=node:run.
Why are the paths in dependency lines using the full paths to binaries? RUN_DEPENDS+= ${LOCALBASE}/bin/node:www/node${_NODE_VERSION} There's no base utility called node. Why not this? RUN_DEPENDS+= node:www/node${_NODE_VERSION}
I do not have a good answer. I followed what Uses/python.mk does, since I used that as my inspiration. :)
It should never be used that way unless you're avoiding a binary in ex. /usr/bin by the same name.
Indeed. I was just reading bsd.port.mk and saw how it works. I will fixup the patch :)
Created attachment 178461 [details] USES=node Updated patch to account for recent comments and ports changes. I have omitted adding support for node.js 0.12.x here since it is now EOL.
Do I understand correctly that further work continues in Differential? https://reviews.freebsd.org/D11863
There is Mk/Uses/nodejs.mk now in the ports tree.