aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.options.mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-06-26 15:22:06 +0800
committerbapt <bapt@FreeBSD.org>2013-06-26 15:22:06 +0800
commit2ded89d4b30809ba2060cd95e381f1fe52949778 (patch)
treea586641a8f1a5511cf76f0101cb17a2bd337165d /Mk/bsd.options.mk
parent8cd5fb4322a63ec97b4857f6d6d261a497704e98 (diff)
downloadfreebsd-ports-gnome-2ded89d4b30809ba2060cd95e381f1fe52949778.tar.gz
freebsd-ports-gnome-2ded89d4b30809ba2060cd95e381f1fe52949778.tar.zst
freebsd-ports-gnome-2ded89d4b30809ba2060cd95e381f1fe52949778.zip
Replace OPTIONSFILE by OPTIONS_FILE which is a more robust variable with unicity
insurance in its path to avoid collision. A compatibility layer is available to automatically load and migration from OPTIONSFILE to OPTIONS_FILE (this is all transparent for users.) It is recommanded that ports that used to overwrite OPTIONSFILE to prevent the known bugs should keep the OPTIONSFILE overwrite for a while (6 month) to allow the migration to happen automatically and users to not lose their old save options. New options file is now based on the PKGORIGIN therefor the definition of the PKGORIGIN has been moved ealier in bsd.port.mk to allow it's usage from withing bsd.options.mk PR: ports/148637 Reviewed by: bdrewery
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r--Mk/bsd.options.mk27
1 files changed, 27 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 562e0fe9392e..d6df7c960811 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -75,7 +75,9 @@
.if !defined(OPTIONSMKINCLUDED)
OPTIONSMKINCLUDED= bsd.options.mk
+OPTIONS_NAME?= ${PKGORIGIN:S/\//_/}
OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options
+OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options
# Set the default values for the global options, as defined by portmgr
.if !defined(NOPORTDOCS)
@@ -162,6 +164,7 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
+# XXX To remove once UNIQUENAME will be removed
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${UNIQUENAME}_SET}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
@@ -175,7 +178,22 @@ NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
+# XXX To remove once UNIQUENAME will be removed
+## Set the options specified per-port (set by user in make.conf)
+. for opt in ${${OPTIONS_NAME}_SET}
+. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
+PORT_OPTIONS+= ${opt}
+. endif
+. endfor
+PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
+
+## Unset the options excluded per-port (set by user in make.conf)
+. for opt in ${${OPTIONS_NAME}_UNSET}
+PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
+. endfor
+
+# XXX to remove once UNIQUENAME is removed
## options files (from dialog)
. if exists(${OPTIONSFILE}) && !make(rmconfig)
. include "${OPTIONSFILE}"
@@ -183,6 +201,15 @@ NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. if exists(${OPTIONSFILE}.local)
. include "${OPTIONSFILE}.local"
. endif
+# XXX to remove once UNIQUENAME is removed
+
+## options files (from dialog)
+. if exists(${OPTIONS_FILE}) && !make(rmconfig)
+. include "${OPTIONS_FILE}"
+. endif
+. if exists(${OPTIONS_FILE}.local)
+. include "${OPTIONS_FILE}.local"
+. endif
### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile
.for opt in ${ALL_OPTIONS}