git: 8d18eafa625f - main - emulators/qemu: Add nox11 FLAVOR

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sat, 11 Dec 2021 23:47:25 UTC
The branch main has been updated by bofh:

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

commit 8d18eafa625f7909693b8a166d8dac21acf61852
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2021-12-11 23:45:39 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2021-12-11 23:47:07 +0000

    emulators/qemu: Add nox11 FLAVOR
    
    - Fix build with DOCS unset [1]
    PR: 250733 [1]
    Reported by: xxjack12xx@gmail.com [1]
---
 emulators/qemu/Makefile  | 18 +++++++++++++-----
 emulators/qemu/pkg-plist | 22 +++++++++++-----------
 2 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index fa573051e78a..ba3fcef9bdec 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	qemu
 PORTVERSION=	6.1.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	emulators
 MASTER_SITES=	https://download.qemu.org/
 DIST_SUBDIR=	qemu/${PORTVERSION}
@@ -12,9 +12,7 @@ COMMENT?=	QEMU CPU Emulator
 
 LICENSE=	GPLv2
 
-BUILD_DEPENDS=	sphinx-build:textproc/py-sphinx@${PY_FLAVOR}\
-		${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR} \
-		bash:shells/bash
+BUILD_DEPENDS=	bash:shells/bash
 LIB_DEPENDS?=	libepoxy.so:graphics/libepoxy \
 		libfdt.so:sysutils/dtc \
 		libfontconfig.so:x11-fonts/fontconfig \
@@ -23,6 +21,12 @@ LIB_DEPENDS?=	libepoxy.so:graphics/libepoxy \
 		libpcre2-8.so:devel/pcre2 \
 		libzstd.so:archivers/zstd
 
+FLAVORS=	default nox11
+default_CONFLICTS_INSTALL=	qemu5* qemu42 qemu-devel
+nox11_PKGNAMESUFFIX=		-nox11
+nox11_CONFLICTS_INSTALL=	qemu5* qemu42 qemu-devel
+nox11_COMMENT=				(without X11)
+
 .if !defined(PKGNAMESUFFIX) || (${PKGNAMESUFFIX} != "-utils" && ${PKGNAMESUFFIX} != "-guest-agent")
 ONLY_FOR_ARCHS=	amd64 powerpc powerpc64 powerpc64 powerpc64le
 USES=		bison compiler:c11 cpe gmake gnome iconv:wchar_t ninja perl5 \
@@ -40,6 +44,9 @@ OPTIONS_SINGLE_NCURSES=	NCURSES_DEFAULT NCURSES_BASE NCURSES_PORT
 OPTIONS_DEFINE=	SAMBA X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CURL VDE \
 		CDROM_DMA USBREDIR X86_TARGETS STATIC_LINK DOCS ISCSI CAPSTONE DEBUG
 OPTIONS_DEFAULT=X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL NCURSES_DEFAULT VDE
+.if ${FLAVOR:U} == nox11
+OPTIONS_EXCLUDE:=	GTK3 X11
+.endif
 OPTIONS_SUB=	yes
 CAPSTONE_DESC=		Disassembly framework support
 CDROM_DMA_DESC=		IDE CDROM DMA
@@ -62,8 +69,9 @@ CAPSTONE_LIB_DEPENDS=	libcapstone.so:devel/capstone4
 CURL_CONFIGURE_OFF=	--disable-curl
 CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
 DEBUG_CONFIGURE_ON=	--enable-debug
+DOCS_BUILD_DEPENDS=	sphinx-build:textproc/py-sphinx@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR}
 DOCS_CONFIGURE_ENABLE=	docs
-DOCS_USES=		makeinfo
 GNUTLS_CONFIGURE_OFF=	--disable-gnutls
 GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
 GTK3_CONFIGURE_OFF=	--disable-gtk --disable-vte
diff --git a/emulators/qemu/pkg-plist b/emulators/qemu/pkg-plist
index 91a3cfabc794..d1492cc97c8a 100644
--- a/emulators/qemu/pkg-plist
+++ b/emulators/qemu/pkg-plist
@@ -39,17 +39,17 @@ bin/qemu-system-x86_64
 %%NO_X86_TARGETS%%bin/qemu-system-xtensaeb
 bin/qemu-x86_64
 include/qemu-plugin.h
-man/man1/qemu.1.gz
-man/man1/qemu-img.1.gz
-man/man7/qemu-block-drivers.7.gz
-man/man7/qemu-cpu-models.7.gz
-man/man8/qemu-ga.8.gz
-man/man7/qemu-ga-ref.7.gz
-man/man8/qemu-nbd.8.gz
-man/man8/qemu-pr-helper.8.gz
-man/man7/qemu-qmp-ref.7.gz
-man/man1/qemu-storage-daemon.1.gz
-man/man7/qemu-storage-daemon-qmp-ref.7.gz
+%%PORTDOCS%%man/man1/qemu.1.gz
+%%PORTDOCS%%man/man1/qemu-img.1.gz
+%%PORTDOCS%%man/man7/qemu-block-drivers.7.gz
+%%PORTDOCS%%man/man7/qemu-cpu-models.7.gz
+%%PORTDOCS%%man/man8/qemu-ga.8.gz
+%%PORTDOCS%%man/man7/qemu-ga-ref.7.gz
+%%PORTDOCS%%man/man8/qemu-nbd.8.gz
+%%PORTDOCS%%man/man8/qemu-pr-helper.8.gz
+%%PORTDOCS%%man/man7/qemu-qmp-ref.7.gz
+%%PORTDOCS%%man/man1/qemu-storage-daemon.1.gz
+%%PORTDOCS%%man/man7/qemu-storage-daemon-qmp-ref.7.gz
 @sample etc/qemu-ifup.sample
 @sample etc/qemu-ifdown.sample
 %%DATADIR%%/QEMU,tcx.bin