I have been running bulks with this for ages and forgotten about it until it actually triggered today. It extends the gettext-tools poisoning to a few more scripts, and adds the same for asciidoc, making hidden dependencies more obvious.
OK? (It maybe worth adding asciidoctor as well, as it is increasing in popularity, but not going to propose that until I have tested it in bulk build). Index: bsd.port.mk =================================================================== RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v retrieving revision 1.1555 diff -u -p -r1.1555 bsd.port.mk --- bsd.port.mk 3 May 2021 17:53:15 -0000 1.1555 +++ bsd.port.mk 13 Sep 2021 13:33:08 -0000 @@ -2664,17 +2664,26 @@ ${_WRKDIR_COOKIE}: .if !empty(WRKDIR_LINKNAME) @${_PBUILD} ln -sf ${WRKDIR} ${.CURDIR}/${WRKDIR_LINKNAME} .endif -# poison some common gettext-tools binaries +# poison some common binaries unless the relevant BUILD_DEPENDS is used .if empty(_BUILD_DEP:Mdevel/gettext,-tools) && \ empty(_BUILD_DEP:Mtextproc/intltool) @printf '#!/bin/sh\n\ echo "*** $$0 was called without devel/gettext,-tools dependency ***" >&2\n\ exit 1\n' ${_PREDIR} ${WRKDIR}/bin/msgfmt @${_PBUILD} chmod 555 ${WRKDIR}/bin/msgfmt -. for name in msgcat msginit autopoint xgettext gettextize +. for name in msgcat msgconv msginit msgmerge autopoint xgettext gettextize @${_PBUILD} ln -sf msgfmt ${WRKDIR}/bin/${name} . endfor .endif +.if empty(_BUILD_DEP:Mtextproc/asciidoc) + @printf '#!/bin/sh\n\ + echo "*** $$0 was called without textproc/asciidoc dependency ***" >&2\n\ + exit 1\n' ${_PREDIR} ${WRKDIR}/bin/asciidoc + @${_PBUILD} chmod 555 ${WRKDIR}/bin/asciidoc +. for name in a2x a2x.py asciidoc.py + @${_PBUILD} ln -sf asciidoc ${WRKDIR}/bin/${name} +. endfor +.endif @${_PMAKE_COOKIE} $@ ${_EXTRACT_COOKIE}: ${_WRKDIR_COOKIE}