git: 55a7a5fc09d8 - main - graphics/libwmf: Convert X11 option to x11 and nox11 flavors

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 15 Aug 2024 11:54:38 UTC
The branch main has been updated by sunpoet:

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

commit 55a7a5fc09d8d2357c0d7b8c91024246a9556226
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-08-15 09:41:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-08-15 10:55:27 +0000

    graphics/libwmf: Convert X11 option to x11 and nox11 flavors
    
    graphics/libwmf-nox11 is graphics/libwmf@nox11 now.
---
 graphics/libwmf/Makefile | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/graphics/libwmf/Makefile b/graphics/libwmf/Makefile
index cb791decd836..81c656b4f66b 100644
--- a/graphics/libwmf/Makefile
+++ b/graphics/libwmf/Makefile
@@ -28,6 +28,17 @@ GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
 USE_LDCONFIG=	yes
 
+FLAVORS=	x11 nox11
+FLAVOR?=	${FLAVORS:[1]}
+FLAVORS_SUB=	yes
+nox11_PKGNAMESUFFIX=	-nox11
+.if ${FLAVOR} == x11
+USE_XORG=	x11
+USES+=		xorg
+.else
+CONFIGURE_ARGS+=--with-x=no
+.endif
+
 CONFLICTS_INSTALL=	libwmf libwmf-nox11
 
 CPE_VENDOR=	wvware
@@ -35,14 +46,9 @@ CPE_VENDOR=	wvware
 USE_GITHUB=	yes
 GH_ACCOUNT=	caolanm
 
-OPTIONS_DEFINE=	DOCS X11
-OPTIONS_DEFAULT=X11
+OPTIONS_DEFINE=	DOCS
 OPTIONS_SUB=	yes
 
-X11_CONFIGURE_OFF=	--with-x=no
-X11_USE=	XORG=x11
-X11_USES=	xorg
-
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}/
 	cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/ "! -name Makefile ! -name Makefile.am ! -name Makefile.in"