git: 9b458083e20d - main - graphics/GraphicsMagick: Convert X11 option to x11 and nox11 flavors

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

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

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

    graphics/GraphicsMagick: Convert X11 option to x11 and nox11 flavors
    
    graphics/GraphicsMagick without X11 is graphics/GraphicsMagick@nox11 now.
---
 graphics/GraphicsMagick/Makefile | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/graphics/GraphicsMagick/Makefile b/graphics/GraphicsMagick/Makefile
index c706642ec1ba..d797f8207053 100644
--- a/graphics/GraphicsMagick/Makefile
+++ b/graphics/GraphicsMagick/Makefile
@@ -23,13 +23,24 @@ INSTALL_TARGET=	install-strip
 TEST_TARGET=	check
 USE_LDCONFIG=	yes
 
+FLAVORS=	x11 nox11
+FLAVOR?=	${FLAVORS:[1]}
+nox11_PKGNAMESUFFIX=	-nox11
+.if ${FLAVOR} == x11
+CONFIGURE_ARGS+=--with-x
+USE_XORG=	ice sm x11 xext
+USES+=		xorg
+.else
+CONFIGURE_ARGS+=--without-x ac_cv_lib_ICE_IceConnectionNumber=no
+.endif
+
 PORTSCOUT=	limit:^[0-9]\.[0-9]\.[1-9][0-9\]*$$
 
 # Use fonts installed by x11-fonts/webfonts by default
 WINDOWS_FONT_DIR?=	${LOCALBASE}/share/fonts/webfonts
 
-OPTIONS_DEFINE=	BZIP2 DOCS FPX FREETYPE HEIF JASPER JBIG JPEG JXL LCMS2 LZMA OPENMP Q8BIT PNG TEST TIFF WEBP WMF X11 XML ZLIB ZSTD
-OPTIONS_DEFAULT=BZIP2 FREETYPE JASPER JBIG JPEG JXL LCMS2 LZMA OPENMP PNG TIFF WEBP WMF X11 XML ZLIB
+OPTIONS_DEFINE=	BZIP2 DOCS FPX FREETYPE HEIF JASPER JBIG JPEG JXL LCMS2 LZMA OPENMP Q8BIT PNG TEST TIFF WEBP WMF XML ZLIB ZSTD
+OPTIONS_DEFAULT=BZIP2 FREETYPE JASPER JBIG JPEG JXL LCMS2 LZMA OPENMP PNG TIFF WEBP WMF XML ZLIB
 Q8BIT_DESC=	Use 8-bit pixels (speed) instead of 16-bit (quality)
 TEST_DESC=	Run bundled self-tests after build
 
@@ -67,10 +78,7 @@ TIFF_LIB_DEPENDS=	libtiff.so:graphics/tiff
 WEBP_CONFIGURE_WITH=	webp
 WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
 WMF_CONFIGURE_WITH=	wmf
-X11_CONFIGURE_OFF=	ac_cv_lib_ICE_IceConnectionNumber=no
-X11_CONFIGURE_WITH=	x
-X11_USE=		XORG=ice,sm,x11,xext
-X11_USES=		xorg
+WMF_LIB_DEPENDS=	libwmf.so:graphics/libwmf@${FLAVOR}
 XML_CONFIGURE_WITH=	xml
 XML_USE=		GNOME=libxml2
 XML_USES=		gnome
@@ -86,14 +94,6 @@ USES+=		compiler:gcc-c++11-lib
 .endif
 .endif
 
-.if ${PORT_OPTIONS:MWMF}
-.if ${PORT_OPTIONS:MX11}
-LIB_DEPENDS+=	libwmflite.so:graphics/libwmf
-.else
-LIB_DEPENDS+=	libwmflite.so:graphics/libwmf-nox11
-.endif
-.endif
-
 post-install-Q8BIT-off:
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib/GraphicsMagick/modules-Q16/coders ${STAGEDIR}${PREFIX}/lib/GraphicsMagick/modules-Q16/filters