Bug 213947 - Add USES=node[:args] for specifying a dependency on Node.js
Summary: Add USES=node[:args] for specifying a dependency on Node.js
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on: 213693 213945 214386
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-31 12:43 UTC by Bradley T. Hughes
Modified: 2018-03-11 23:52 UTC (History)
4 users (show)

See Also:


Attachments
USES=node (3.88 KB, patch)
2016-10-31 12:43 UTC, Bradley T. Hughes
no flags Details | Diff
USES=node (updated) (3.88 KB, patch)
2016-11-01 20:32 UTC, Bradley T. Hughes
no flags Details | Diff
Add USES=node[:args] for specifying a dependency on Node.js (4.35 KB, patch)
2016-11-10 21:59 UTC, Bradley T. Hughes
no flags Details | Diff
USES=node (4.77 KB, patch)
2017-01-02 20:33 UTC, Bradley T. Hughes
bhughes: maintainer-approval? (portmgr)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bradley T. Hughes freebsd_committer 2016-10-31 12:43:17 UTC
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.
Comment 1 Mathieu Arnold freebsd_committer 2016-10-31 16:52:01 UTC
There still are quite a few Python references in USES=node :-)
Comment 2 Bradley T. Hughes freebsd_committer 2016-11-01 20:32:15 UTC
Created attachment 176398 [details]
USES=node (updated)

Updated patch to remove the Python references. :)
Comment 3 Bradley T. Hughes freebsd_committer 2016-11-10 21:59:04 UTC
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.
Comment 4 Adam Weinberger freebsd_committer 2016-11-28 21:55:01 UTC
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}
Comment 5 Bradley T. Hughes freebsd_committer 2016-11-28 21:57:30 UTC
I do not have a good answer. I followed what Uses/python.mk does, since I used that as my inspiration. :)
Comment 6 Adam Weinberger freebsd_committer 2016-11-28 21:59:00 UTC
It should never be used that way unless you're avoiding a binary in ex. /usr/bin by the same name.
Comment 7 Bradley T. Hughes freebsd_committer 2016-11-28 22:00:26 UTC
Indeed. I was just reading bsd.port.mk and saw how it works. I will fixup the patch :)
Comment 8 Bradley T. Hughes freebsd_committer 2017-01-02 20:33:45 UTC
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.
Comment 9 Marcin Cieślak 2018-03-11 23:52:22 UTC
Do I understand correctly that further work continues in Differential?

https://reviews.freebsd.org/D11863