On 2017-09-13 11:48, Mojca Miklavec wrote:
> When trying to update x86_64-w64-mingw32-gcc I noticed that GCC 7.2 no
> longer provides bzip2 sources, but I'm not sure how to tell the
> Portfile that it should use xz instead of bzip2 given that the
> crossgcc group already contains "use_bzip2 yes".
Normally, this would be as simple as 'use_xz yes' in the Portfile to
override the 'use_bzip2 yes' of the PortGroup. However, the port group
also explicitly sets the distfiles option, which is required for the
mirror tag for gcc and possibly a libc to be bundled. This option
hardcodes .tar.bz2 in the port group. Unfortunately, using
${extract.suffix} would not make a difference as the variable will be
expanded directly.
Therefore you also need to override these options:
use_xz yes
distfiles gcc-${version}.tar.xz:gcc
extract.only gcc-${version}.tar.xz
To make this easier for the gcc ports, we could pass the suffix to
crossgcc.setup as an optional parameter and use that instead of always
hardcoding bz2.
Rainer