handle only subports install files

Bradley Giesbrecht pixilla at macports.org
Mon Mar 19 11:19:26 PDT 2012


On Mar 19, 2012, at 10:36 AM, Joshua Root wrote:

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

My question was for a better way :)

Is this better?
if {$subport == $name} {
    set subport "mysql55-connector-cpp"
}


Regards,
Bradley Giesbrecht (pixilla)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120319/6896b7ee/attachment.bin>


More information about the macports-dev mailing list