Determine dependencies of another port

Haren Samarasinghe harens at macports.org
Sun Jul 18 09:56:44 UTC 2021


On 17/07/2021 20:11, Joshua Root wrote:

> There would be hacky ways of doing that, but why not just depend on npm4
> and let its dependencies be handled automatically?

npm would act as a build dependency for the port, whilst nodejs would be
a lib dependency. After installing the port, a user could uninstall npm
(which is valid) followed by nodejs (which is invalid since the port
depends on it), and MacPorts wouldn't complain.

> If there's a true need to have the information in both places, then the
> Don't Repeat Yourself principle is good, but I think the structure
> should be reversed. The npm* portfiles should get the information about
> which nodejs* to depend on from the same place as the new portgroup,
> possibly the portgroup itself, or a separate portgroup if it's too
> difficult to make including the npm portgroup work in the npm ports.

That's a really good idea. I might try a separate portgroup and see how
it goes.

Thanks for your help.

-- 
Haren

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20210718/f212405e/attachment.sig>


More information about the macports-dev mailing list