From owner-svn-ports-all@freebsd.org Tue Oct 1 14:33:25 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91E8D137EDC; Tue, 1 Oct 2019 14:33:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46jMFd361zz3RKJ; Tue, 1 Oct 2019 14:33:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DA171CC8E; Tue, 1 Oct 2019 14:33:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x91EXP95028240; Tue, 1 Oct 2019 14:33:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x91EXOJZ028238; Tue, 1 Oct 2019 14:33:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201910011433.x91EXOJZ028238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 1 Oct 2019 14:33:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r513486 - in head: . Mk Mk/Wrappers X-SVN-Group: ports-head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: . Mk Mk/Wrappers X-SVN-Commit-Revision: 513486 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2019 14:33:25 -0000 Author: bapt Date: Tue Oct 1 14:33:24 2019 New Revision: 513486 URL: https://svnweb.freebsd.org/changeset/ports/513486 Log: 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. For example m4 in base is mostly compatible with GNU m4 when called with the -g arguement. This wrapper allows to use it with build systems that do check for it calling --version and expecting GNU in the arguments. Reviewed by: mat (final discussions on irc) Differential Revision: https://reviews.freebsd.org/D21835 Added: head/Mk/Wrappers/ head/Mk/Wrappers/gm4 (contents, props changed) Modified: head/CHANGES head/Mk/bsd.port.mk Modified: head/CHANGES ============================================================================== --- head/CHANGES Tue Oct 1 14:26:03 2019 (r513485) +++ head/CHANGES Tue Oct 1 14:33:24 2019 (r513486) @@ -10,6 +10,13 @@ in the release notes and/or placed into UPDATING. 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 Added: head/Mk/Wrappers/gm4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Wrappers/gm4 Tue Oct 1 14:33:24 2019 (r513486) @@ -0,0 +1,8 @@ +#!/bin/sh +# +# $FreeBSD$ + +case " $@ " in +*" --version "*) echo "m4 (GNU M4) 1.4.18" ;; +*) exec m4 -g $@ ;; +esac Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Tue Oct 1 14:26:03 2019 (r513485) +++ head/Mk/bsd.port.mk Tue Oct 1 14:33:24 2019 (r513486) @@ -1334,6 +1334,7 @@ INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} PACKAGES?= ${PORTSDIR}/packages TEMPLATES?= ${PORTSDIR}/Templates KEYWORDS?= ${PORTSDIR}/Keywords +WRAPPERSDIR?= ${PORTSDIR}/Mk/Wrappers/ PATCHDIR?= ${MASTERDIR}/files FILESDIR?= ${MASTERDIR}/files @@ -5101,6 +5102,15 @@ create-binary-alias: ${BINARY_LINKDIR} .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 @@ _PATCH_SEQ= 050:ask-license 100:patch-message 150:pat ${_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 \