From owner-svn-ports-head@freebsd.org Wed Apr 13 10:37:35 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66AA1B0F029; Wed, 13 Apr 2016 10:37:35 +0000 (UTC) (envelope-from jbeich@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 mx1.freebsd.org (Postfix) with ESMTPS id 208F91FB2; Wed, 13 Apr 2016 10:37:35 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3DAbYFU097738; Wed, 13 Apr 2016 10:37:34 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3DAbYMd097736; Wed, 13 Apr 2016 10:37:34 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201604131037.u3DAbYMd097736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 13 Apr 2016 10:37:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r413186 - in head: . Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2016 10:37:35 -0000 Author: jbeich Date: Wed Apr 13 10:37:34 2016 New Revision: 413186 URL: https://svnweb.freebsd.org/changeset/ports/413186 Log: Add CONFIGURE_OUTSOURCE support If CONFIGURE_OUTSOURCE is defined HAS_CONFIGURE invokes configure script and builds the port out of source tree, under ${WRKDIR}/.build by default. The feature is inspired by USES=cmake:outsource and USES=qmake:outsource. PR: 208294 Exp-run by: antoine Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D4157 Modified: head/CHANGES head/Mk/bsd.port.mk (contents, props changed) Modified: head/CHANGES ============================================================================== --- head/CHANGES Wed Apr 13 10:36:54 2016 (r413185) +++ head/CHANGES Wed Apr 13 10:37:34 2016 (r413186) @@ -10,6 +10,18 @@ in the release notes and/or placed into All ports committers are allowed to commit to this file. +20160416: +AUTHOR: jbeich@FreeBSD.org + + Introducing CONFIGURE_OUTSOURCE. It changes HAS_CONFIGURE and GNU_CONFIGURE + by invoking configure, build and install stage outside of source tree e.g., + + $ mkdir ../.build + $ cd ../.build + $ ${OLDPWD}/configure + $ gmake + $ gmake install + 20160402: AUTHOR: bapt@FreeBSD.org Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Wed Apr 13 10:36:54 2016 (r413185) +++ head/Mk/bsd.port.mk Wed Apr 13 10:37:34 2016 (r413186) @@ -780,6 +780,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # configure stage will not do anything if this is not set. # GNU_CONFIGURE - If set, you are using GNU configure (optional). Implies # HAS_CONFIGURE. +# CONFIGURE_OUTSOURCE - If set, this port builds in an empty ${CONFIGURE_WRKSRC} +# not being under ${WRKSRC}. # CONFIGURE_WRKSRC # - Directory to run configure in. # Default: ${WRKSRC} @@ -1554,6 +1556,14 @@ EXTRACT_WRKDIR:= ${WRKDIR} WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} .endif +.if defined(CONFIGURE_OUTSOURCE) +CONFIGURE_CMD?= ${WRKSRC}/${CONFIGURE_SCRIPT} +CONFIGURE_WRKSRC?= ${WRKDIR}/.build +BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} +INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} +TEST_WRKSRC?= ${CONFIGURE_WRKSRC} +.endif + PATCH_WRKSRC?= ${WRKSRC} CONFIGURE_WRKSRC?= ${WRKSRC} BUILD_WRKSRC?= ${WRKSRC} @@ -3334,6 +3344,7 @@ do-configure: done .endif .if defined(HAS_CONFIGURE) + @${MKDIR} ${CONFIGURE_WRKSRC} @(cd ${CONFIGURE_WRKSRC} && \ ${SET_LATE_CONFIGURE_ARGS} \ if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \