Currently we require BUILD_DEPENDS to avoid tripping the (very useful)
poisoning that we have to detect ports with a missing dependency on
gettext-tools. This used to be fine, but now gettext-tools includes
libraries, a port may have LIB_DEPENDS instead of BUILD_DEPENDS.

We could just require that those ports list a redundant BUILD_DEPENDS
as well as the LIB_DEPENDS, but it's easy enough to handle the simple
(i.e. not multi-packages) case.

OK or is there a better idea?

(found by rsadowski with a new kde-applications port).


Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1505
diff -u -p -r1.1505 bsd.port.mk
--- bsd.port.mk 26 Nov 2019 11:49:02 -0000      1.1505
+++ bsd.port.mk 29 Nov 2019 01:56:23 -0000
@@ -2607,13 +2607,15 @@ ${_WRKDIR_COOKIE}:
 # poison some common gettext-tools binaries
 .if !defined(BUILD_DEPENDS) || !${BUILD_DEPENDS:Mdevel/gettext,-tools} && \
                !${BUILD_DEPENDS:M*textproc/intltool}
+.  if !defined(LIB_DEPENDS) || !${LIB_DEPENDS:Mdevel/gettext,-tools}
        @printf '#!/bin/sh\n\
                echo "*** $$0 was called without 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 msginit autopoint xgettext gettextize
        @${_PBUILD} ln -sf msgfmt ${WRKDIR}/bin/${name}
-.  endfor
+.    endfor
+.  endif
 .endif
        @${_PMAKE_COOKIE} $@
 

Reply via email to