aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2016-04-13 18:37:34 +0800
committerjbeich <jbeich@FreeBSD.org>2016-04-13 18:37:34 +0800
commitf4530be1f5a8f24388144b3b59090d0375714e4a (patch)
treee719409b6619de5371fe21df609fa58d68a0497e
parentee00c1f1115ca8d39ff4d10b9ee42bd2672f13f9 (diff)
downloadfreebsd-ports-gnome-f4530be1f5a8f24388144b3b59090d0375714e4a.tar.gz
freebsd-ports-gnome-f4530be1f5a8f24388144b3b59090d0375714e4a.tar.zst
freebsd-ports-gnome-f4530be1f5a8f24388144b3b59090d0375714e4a.zip
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
-rw-r--r--CHANGES12
-rw-r--r--Mk/bsd.port.mk11
2 files changed, 23 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 42766267f468..2590d75a2c06 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,18 @@ in the release notes and/or placed into UPDATING.
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
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ac93f1224d25..37fc659a5cdc 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -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}" \