Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136462973
D12483.id33657.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12483.id33657.diff
View Options
Index: Mk/bsd.options.mk
===================================================================
--- Mk/bsd.options.mk
+++ Mk/bsd.options.mk
@@ -173,6 +173,11 @@
OPTIONSMKINCLUDED= bsd.options.mk
OPTIONS_NAME?= ${PKGORIGIN:S/\//_/}
+# If there is a FLAVOR and it is not the default one, append it to OPTIONS_NAME
+# so that the options can be different than the default flavor.
+.if !empty(FLAVOR) && ${FLAVOR} != ${FLAVORS:[1]}
+OPTIONS_NAME:= ${OPTIONS_NAME}@${FLAVOR}
+.endif
OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options
_OPTIONS_FLAGS= ALL_TARGET BROKEN CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -1089,6 +1089,31 @@
# Do not leak flavors to childs make
.MAKEOVERRIDES:= ${MAKEOVERRIDES:NFLAVOR=*}
+.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS)
+_DID_FLAVORS_HELPERS= yes
+# These overwrite the current value
+.for v in PKGNAMEPREFIX PKGNAMESUFFIX PLIST DESCR
+.if defined(${FLAVOR}_${v})
+${v}= ${${FLAVOR}_${v}}
+.endif
+.endfor
+
+# These append to the current value
+.for v in CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL
+.if defined(${FLAVOR}_${v})
+${v}+= ${${FLAVOR}_${v}}
+.endif
+.endfor
+
+.if defined(${FLAVOR}_OPTIONS_ON)
+OPTIONS_SLAVE+= ${${FLAVOR}_OPTIONS_ON}
+.endif
+
+.if defined(${FLAVOR}_OPTIONS_OFF)
+OPTIONS_EXCLUDE+= ${${FLAVOR}_OPTIONS_OFF}
+.endif
+.endif # defined(${FLAVOR})
+
.if defined(CROSS_TOOLCHAIN)
.if !defined(CROSS_SYSROOT)
IGNORE= CROSS_SYSROOT should be defined
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 18, 10:09 PM (15 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25554466
Default Alt Text
D12483.id33657.diff (1 KB)
Attached To
Mode
D12483: Add flavors helpers.
Attached
Detach File
Event Timeline
Log In to Comment