handle only subports install files

Joshua Root jmr at macports.org
Mon Mar 19 10:36:38 PDT 2012


On 2012-3-20 04:32 , Bradley Giesbrecht wrote:
> Does anyone have an example of a better way to handle the primary port not installing files?
> 
> Portfile:
> ...
> name mysql-connector-cpp
> if {$subport == $name} {
>    pre-fetch {
>        ui_msg "Stub port: Choose one of \
>            mysql5-connector-cpp, \
>            mysql55-connector-cpp, \
>            mariadb-connector-cpp, \
>            percona-connector-cpp.
>            "
>        return
>    }
> }
> ...

"Don't do that?" There's no point creating a port that can't be installed.

- Josh


More information about the macports-dev mailing list