call script from Portfile?
Rainer Müller
raimue at macports.org
Tue Sep 7 14:43:55 PDT 2010
On 2010-09-07 23:27 , Titus von Boxberg wrote:
> Am 07.09.2010 um 21:43 schrieb Bradley Giesbrecht:
>> In which ever phase you want to work you can add some "if [variant_isset myvariant]" logic.
>>
>> man portfile
>> /variant
> Found it. The variable holding all selected variants of the port is ${portvariants}.
> It's neither in the guide nor in the manpage.
"if [variant_isset myvariant]" should be preferred over relying on such
a global variable which may be changed or removed any time. That you can
access this variable at all from a Portfile is caused by missing separation.
> Still, would be nice to know why not to handle the issue in post-activate commands.
post-build or post-destroot would be the most appropriate phase for such
a change. Files should not be changed after they are packed up and
installed. post-active would be appripriate for updating cache files or
handling configuration files. The install_name_tool only needs to be
called once at the time of build, not every time the port will be activated.
Rainer
More information about the macports-dev
mailing list