git: c0c57c629e25 - main - devel/wasi-libc: fix build when ${FLAVOR} is not specified

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Tue, 14 Jan 2025 03:44:40 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c0c57c629e25107ee5ead1f631fce3586280845f

commit c0c57c629e25107ee5ead1f631fce3586280845f
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2025-01-14 03:33:35 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2025-01-14 03:33:35 +0000

    devel/wasi-libc: fix build when ${FLAVOR} is not specified
    
    To have separate flavours per supported LLVM version, USES=llvm is
    version-locked to each flavour as USES=llvm:${FLAVOR}. This allows
    ${LLVM_VERSION} to be used throughout the Makefile for consistency.
    However, when ${FLAVOR} is not specified, ${LLVM_VERSION} uses
    ${LLVM_DEFAULT} which may not match the first item in ${FLAVORS},
    resulting in missing dependency. Specify a fallback ${FLAVOR} when
    not otherwise set so USES=llvm is guaranteed a version lock.
    
    Consumers always explicitly specify ${FLAVOR} so this problem is
    not generally exposed.
    
    Reported by: dim
    PR: 282265
---
 devel/wasi-libc/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/devel/wasi-libc/Makefile b/devel/wasi-libc/Makefile
index 88225814be6d..b18da6717f9c 100644
--- a/devel/wasi-libc/Makefile
+++ b/devel/wasi-libc/Makefile
@@ -18,6 +18,7 @@ LICENSE_NAME_LLVM2=	Apache License 2.0 with LLVM Exceptions
 LICENSE_PERMS_LLVM2=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
 FLAVORS=	18 19 17
+FLAVOR?=	${FLAVORS:[1]}
 
 USES=		gmake llvm:${FLAVOR}
 USE_GITHUB=	yes