Is it possible to conditionally download a distfile based on architecture?
But that's messy/inefficient...
ARCH
isn't available since it isn't possible to put .include <bsd.port.pre.mk>
before DISTFILES
. So currently I'm resorting to downloading the artifact for every architecture and then picking the right one later when ARCH
is available like:
Makefile:
DISTFILES= some-artifact_amd64.tar.gz \
some-artifact_i386.tar.gz
...
.include <bsd.port.pre.mk>
.if ${ARCH} == amd64
${DO_SOMETHING} some-artifact_amd64.tar.gz
.elif ${ARCH} == i386
${DO_SOMETHING} some-artifact_i386.tar.gz
.else
...