port ${name}

Ryan Schmidt ryandesign at macports.org
Mon Oct 13 14:03:12 PDT 2014


On Oct 13, 2014, at 9:44 AM, Mark Brethen wrote:
> 
> On Oct 13, 2014, at 7:41 AM, Brandon Allbery wrote:
> 
>> On Mon, Oct 13, 2014 at 8:33 AM, Mark Brethen  wrote:
>>> If a user tries to install port ${name} how should this be handled?
>> 
>> That depends on what exactly you're trying to do. Obvious possibilities include installing all subports or some common subset thereof, via dependencies possibly modified by variants: a classic metaport.
> 
> How would you install all subports?
> 
> if {${name} == ${subport}} {

Use "eq", not "==", for string comparisons.

>    depends_build-append    subport1 subport2 subport3
>    configure                          no
>    build {}
>    destroot {}
> }
> 
> like this?

All ports must install at least one file. You can look at other metaports to see what they do. Typically they create a file called README and put either a placeholder message or the port's description into it.

You'll also want to set "supported_archs noarch" and clear "distfiles", and you may as well clear "archive_sites" too.

I've requested that we make these kinds of ports easier by introducing a "stub" keyword, but we don't have this yet.




More information about the macports-dev mailing list