From b6483c4224709fb27538aa8c1bab523250f3b9f5 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 12 Mar 2018 19:05:29 +0000 Subject: [PATCH] MFH: r464273 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) --- Mk/bsd.port.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 5c58a1ff0f6e3..d773ed20aed9e 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1488,6 +1488,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