Index: head/CHANGES =================================================================== --- head/CHANGES +++ head/CHANGES @@ -10,6 +10,13 @@ All ports committers are allowed to commit to this file. +20191001: +AUTHOR: bapt@FreeBSD.org + + BINARY_WRAPPERS allow to push in front of the PATH wrappers for binaries. + This is useful when 2 tools do provide the same feature, but the configure + scripts do test for some variables which are not in one of the tool. + 20190919: AUTHOR: madpilot@FreeBSD.org Index: head/Mk/Wrappers/gm4 =================================================================== --- head/Mk/Wrappers/gm4 +++ head/Mk/Wrappers/gm4 @@ -0,0 +1,8 @@ +#!/bin/sh +# +# $FreeBSD$ + +case " $@ " in +*" --version "*) echo "m4 (GNU M4) 1.4.18" ;; +*) exec m4 -g $@ ;; +esac Index: head/Mk/bsd.port.mk =================================================================== --- head/Mk/bsd.port.mk +++ head/Mk/bsd.port.mk @@ -1334,6 +1334,7 @@ PACKAGES?= ${PORTSDIR}/packages TEMPLATES?= ${PORTSDIR}/Templates KEYWORDS?= ${PORTSDIR}/Keywords +WRAPPERSDIR?= ${PORTSDIR}/Mk/Wrappers/ PATCHDIR?= ${MASTERDIR}/files FILESDIR?= ${MASTERDIR}/files @@ -5101,6 +5102,15 @@ .endif .endif +.if !empty(BINARY_WRAPPERS) +.if !target(create-binary-wrappers) +create-binary-wrappers: ${BINARY_LINKDIR} +.for bin in ${BINARY_WRAPPERS} + @${INSTALL_SCRIPT} ${WRAPPERSDIR}/${bin} ${BINARY_LINKDIR} +.endfor +.endif +.endif + .if defined(WARNING) WARNING_WAIT?= 10 show-warnings: @@ -5201,6 +5211,7 @@ ${_OPTIONS_patch} ${_USES_patch} _CONFIGURE_DEP= patch _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ + 161:create-binary-wrappers \ 200:configure-message \ 300:pre-configure 450:pre-configure-script \ 490:run-autotools-fixup 500:do-configure 700:post-configure \