mpkg package variants

Werner LEMBERG wl at
Sun Oct 6 12:55:50 UTC 2019

>>> I believe you can just specify the variants that you want (for the
>>> port and all of its dependencies) at the command line when you run
>>> `port mpkg`, can't you?  As in:
>>>  sudo port mpkg lilypond-devel +mactex +perl5_28
>> This seems to work, thanks!  Maybe it's worth to document that.
> Surely it's already documented that variants you specify are passed
> down to any dependencies that get built (but not to any that don't
> need to be built)?

If it is, I have missed that.

> But maybe it is worth mentioning that for mpkg, all packages get
> rebuilt, so the specified variants are applied to all of the ports,
> even those that were already installed (if that's not already
> mentioned in the guide).

It's either missing or I have missed that, too :-)

>> Of course, the next question is whether MacPorts variant strings
>> form a consistent set without contradictions.
> What does that mean?

Since MacPorts contains thousands of packages there might be a clash
somewhere in the variant names.  Assuming that package X needs
`+foo' and package Y needs `-foo', I would have to specify

  mpkg ... +foo -foo

which obviously doesn't work.

>> Another issue: There are many files in the mpkg file that are
>> definitely unnecessary to run the final program (in my case the
>> `lilypond' binary from `lilypond-devel'), for example test files
>> for python, or header files of C libraries, or (most of the)
>> documentation.  Is there any support from `port' to not package
>> that?
> MacPorts ports always install header files where possible.  Many
> ports also install examples or documentation.  If these files are
> unwanted in your package, you may need to manually edit the package
> after it's been made.

OK, thanks.  This was my conclusion, too.

> As for test files, if you mean tests that get run by the `port test`
> command, then I would not expect those to be installed by a port;
> they would be used at test time and would not be needed afterwards.

I'm not sure about the `port test` thing, but the python 2.7 and 3.7
bundles contains zillions of files in directories




Are these files of any use after installation?


More information about the macports-users mailing list