mpkg package variants

Ryan Schmidt ryandesign at
Sun Oct 6 11:38:47 UTC 2019

On Oct 5, 2019, at 11:36, Werner LEMBERG wrote:

>>> Let me reformulate my question: Does the way how I have installed
>>> MacPorts packages on my computer influence how `port mpkg' works
>>> for a given package?  Given that `port mpkg' rebuilds all packages,
>>> I would expect no.  Instead, I would expect some control file (or a
>>> special command line sequence) to control variants of package
>>> dependencies.
>> 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)? 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).

> Of course, the next question is whether MacPorts variant strings form
> a consistent set without contradictions.

What does that mean?

> 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.

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.

More information about the macports-users mailing list