aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-06-07 21:25:22 +0800
committerbdrewery <bdrewery@FreeBSD.org>2013-06-07 21:25:22 +0800
commit75b3d62c467745d9ce059dfd10e008cf464976b2 (patch)
tree075b2bf548b3873c405f3b47513c0f8d12b423c6
parentfa9d9efb2d7ede4dc2ebb81bf785a597dad4fe3b (diff)
downloadfreebsd-ports-gnome-75b3d62c467745d9ce059dfd10e008cf464976b2.tar.gz
freebsd-ports-gnome-75b3d62c467745d9ce059dfd10e008cf464976b2.tar.zst
freebsd-ports-gnome-75b3d62c467745d9ce059dfd10e008cf464976b2.zip
Add WRKSRC_SUBDIR to simplify overriding WRKSRC:
WRKSRC= ${WRKDIR}/${DISTNAME}/src This becomes: WRKSRC_SUBDIR= src Reviewed by: bapt With hat: portmgr
-rw-r--r--CHANGES12
-rw-r--r--Mk/bsd.port.mk6
2 files changed, 18 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 8e2705f3a129..182c4244a12c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,18 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20130606:
+AUTHOR: bdrewery@FreeBSD.org
+
+ * WRKSRC_SUBDIR has been added to simplify overriding WRKSRC
+ to use a subdirectory:
+
+ WRKSRC= ${WRKDIR}/${DISTNAME}/src
+
+ Becomes:
+
+ WRKSRC_SUBDIR= src
+
+20130606:
AUTHOR: bapt@FreeBSD.org
The OPTIONS macro is no longer recognized, please use the new options
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 0ef87d6fe6c9..c9221e5ff058 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -568,6 +568,9 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# unpacks to.
# Default: ${WRKDIR}/${DISTNAME} unless NO_WRKSUBDIR is set,
# in which case simply ${WRKDIR}
+# WRKSRC_SUBDIR - A subdirectory of ${WRKSRC} where the distribution actually
+# build in.
+# Default: not set
# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}.
# PATCHDIR - A directory containing any additional patches you made
# to port this software to FreeBSD.
@@ -1543,6 +1546,9 @@ WRKSRC?= ${WRKDIR}
.else
WRKSRC?= ${WRKDIR}/${DISTNAME}
.endif
+.if defined(WRKSRC_SUBDIR)
+WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR}
+.endif
PATCH_WRKSRC?= ${WRKSRC}
CONFIGURE_WRKSRC?= ${WRKSRC}