aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2016-12-24 08:30:21 +0800
committerbapt <bapt@FreeBSD.org>2016-12-24 08:30:21 +0800
commit583b2116e42d080dd56f50d03c3e59cbd2d98735 (patch)
treea08431b366a89ecb2b24a8316276c3a8a01e565b /Mk
parent383ac9b1dc48d9b11fe3634ad567d4b7355810bc (diff)
downloadfreebsd-ports-gnome-583b2116e42d080dd56f50d03c3e59cbd2d98735.tar.gz
freebsd-ports-gnome-583b2116e42d080dd56f50d03c3e59cbd2d98735.tar.zst
freebsd-ports-gnome-583b2116e42d080dd56f50d03c3e59cbd2d98735.zip
Make the ports infrastructure accept at least 3 level ports
Approved by: portmgr (rene Differential Revision: https://reviews.freebsd.org/D8889
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.options.mk2
-rw-r--r--Mk/bsd.port.mk4
-rw-r--r--Mk/bsd.sanity.mk4
3 files changed, 4 insertions, 6 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 193400364461..dfe815e6228b 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -153,7 +153,7 @@
.if !defined(OPTIONSMKINCLUDED)
OPTIONSMKINCLUDED= bsd.options.mk
-OPTIONS_NAME?= ${PKGORIGIN:S/\//_/}
+OPTIONS_NAME?= ${PKGORIGIN:S/\//_/g}
OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options
_OPTIONS_FLAGS= ALL_TARGET BROKEN CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 17e607cfef3b..7bf48ee2a4cb 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1211,9 +1211,7 @@ USE_SUBMAKE= yes
.for _CATEGORY in ${CATEGORIES}
PKGCATEGORY?= ${_CATEGORY}
.endfor
-_PORTDIRNAME= ${.CURDIR:T}
-PORTDIRNAME?= ${_PORTDIRNAME}
-PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME}
+PKGORIGIN?= ${.CURDIR:C/${PORTSDIR}\///}
# where 'make config' records user configuration options
PORT_DBDIR?= /var/db/ports
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index 913852be5b38..a0e2f3f5a332 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -15,8 +15,8 @@ WARNING+= "WITH_NEW_XORG and WITHOUT_NEW_XORG knobs were removed and have no eff
WARNING+= "WITH_KMS was removed and has no effect"
.endif
-.if exists(${.CURDIR}/../../Mk/bsd.port.mk)
-.if ${.CURDIR:H:T} != ${PKGCATEGORY}
+.if exists(${.CURDIR}/../../Mk/bsd.port.mk) || exists(${.CURDIR}/../../../Mk/bsd.port.mk)
+.if ${PKGORIGIN:C/\/.*//} != ${PKGCATEGORY}
DEV_ERROR+= "The first entry in CATEGORIES should be the directory where the port lives"
.endif
.else