FLAVORS: Reorder so the default is first.

It is documented that the first FLAVOR is the default.  Due to some use
of DEFAULT_VERSIONS and USES, the default FLAVOR may be determined
dynamically.  Poudriere in particular expects the default to be first
and does the wrong thing for emacs ports currently [1].  This resolves
that and avoids other tools making the same mistake.

PR:		225659 comment #14
Approved by:	portmgr (implicit)
This commit is contained in:
Bryan Drewery 2018-03-12 19:04:59 +00:00
parent 56bc0620a2
commit 9823f56764
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=464273

View file

@ -1492,6 +1492,11 @@ IGNORE= Unknown flavor '${FLAVOR}', possible flavors: ${FLAVORS}.
FLAVOR= ${FLAVORS:[1]}
.endif
# Reorder FLAVORS so the default is first if set by the port.
.if empty(_FLAVOR) && !empty(FLAVORS) && !empty(FLAVOR)
FLAVORS:= ${FLAVOR} ${FLAVORS:N${FLAVOR}}
.endif
.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS)
_DID_FLAVORS_HELPERS= yes
_FLAVOR_HELPERS_OVERRIDE= DESCR PLIST PKGNAMEPREFIX PKGNAMESUFFIX