net/unison232: isolate self-test from pre-existing $HOME

On the "exp - 121amd64-default-build-as-use" builder, $HOME appears
to be /nonexistent, and this jeopardizes the self-test.

Feed the selftest mktemp -d as its HOME so it doesn't read from,
or pollute, the actual building user's home directory.

Thanks to: pkg-fallout, kevans, rhtoad.

No PORTREVISION bump as this is purely a build-time fix.

MFH:		2020Q4 (blanket, one-line tested build robustness fix)
This commit is contained in:
Matthias Andree 2020-10-28 21:34:19 +00:00
parent fec06bf8fe
commit 725b66b9fd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=553568

View file

@ -66,7 +66,7 @@ post-patch:
${WRKSRC}/Makefile.OCaml
post-build:
( cd ${WRKSRC} && ./unison -selftest -ui text -batch )
d=$$(mktemp -d) && trap "rm -rf $$d" 0 && ( cd ${WRKSRC} && HOME=$$d ./unison -selftest -ui text -batch )
.if ${FLAVOR} == x11
@${ECHO} Building text-only version in ${WRKSRC}
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC} CFLAGS="" UISTYLE=text NAME=${PORTNAME}-text