"include" files in Portfiles - not PortGroups

Joshua Root jmr at macports.org
Wed Sep 13 04:25:29 UTC 2017


On 2017-9-13 13:23 , Ken Cunningham wrote:
> Not meaning to engender too big of a discussion about how good an idea it might or might not be, but Is there a method for having a Portfile that does something like the following?
> 
> ----------------------
> 
> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
> 
> PortSystem 1.0
> 
> platform darwin powerpc {
>     source    ${filesdir}/Portfile-powerpc
> } else {
>     source    ${filesdir}/Portfile-intel
> }

Of course you *can* do that, but be aware that the files dir is not 
available when executing portfiles from the registry (when running 
pre-/post- activate/deactivate/install/uninstall code.) So you'll get an 
error then. The situation when installing directly from a binary archive 
is similar.

- Josh


More information about the macports-dev mailing list