diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index be243a6839..a29c28b860 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -10,14 +10,14 @@ WWW= https://www.qemu.org/ LICENSE= GPLv2 -.if ${FLAVOR:U} != tools +.if ${FLAVOR:U} != tools && ${FLAVOR:U} != guestagent ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le # We need to check if it build with other ARCHS # For i386 we have unknown type name 'vm_page_t' .endif BUILD_DEPENDS= bash:shells/bash -.if ${FLAVOR:U} != tools +.if ${FLAVOR:U} != tools && ${FLAVOR:U} != guestagent LIB_DEPENDS+= libfdt.so:sysutils/dtc \ libzstd.so:archivers/zstd .endif @@ -25,7 +25,7 @@ LIB_DEPENDS+= libfdt.so:sysutils/dtc \ LIB_DEPENDS+= libepoxy.so:graphics/libepoxy .endif -FLAVORS= default nox11 tools +FLAVORS= default nox11 tools guestagent FLAVOR?= ${FLAVORS:[1]} default_CONFLICTS_INSTALL= qemu-devel qemu-nox11 qemu-tools qemu-utils \ qemu6* qemu70* @@ -38,20 +38,25 @@ tools_CONFLICTS_INSTALL= qemu qemu-devel qemu-nox11 qemu-utils qemu6* \ qemu70* tools_DESCR= ${.CURDIR}/pkg-descr-tools tools_PLIST= ${.CURDIR}/pkg-plist-tools +guestagent_PKGNAMESUFFIX= -guest-agent +guestagent_COMMENT= (guest agent) +guestagent_DESCR= ${.CURDIR}/pkg-descr-ga +guestagent_PLIST= ${.CURDIR}/pkg-plist-ga +guestagent_CONFLICTS_INSTALL= qemu qemu-devel qemu-nox11 qemu-tools qemu-utils qemu6* \ + qemu70* qemu-guest-agent USES= cpe gmake gnome ninja perl5 pkgconfig python:build tar:xz USE_GNOME= glib20 USE_PERL5= build -.if ${FLAVOR:U} != tools +.if ${FLAVOR:U} != tools && ${FLAVOR:U} != guestagent USES+= iconv:wchar_t .endif -.if (${FLAVOR:U} != nox11 && ${FLAVOR:U} != tools) +.if (${FLAVOR:U} != nox11 && ${FLAVOR:U} != tools && ${FLAVOR:U} != guestagent) USE_GNOME+= cairo .endif HAS_CONFIGURE= yes CONFIGURE_ARGS+= --cc=${CC} \ - --disable-guest-agent \ --disable-kvm \ --disable-linux-aio \ --disable-linux-user \ @@ -63,11 +68,17 @@ CONFIGURE_ARGS+= --cc=${CC} \ --mandir=${PREFIX}/man \ --prefix=${PREFIX} \ --python=${PYTHON_CMD} -.if ${FLAVOR:U} != tools +.if ${FLAVOR:U} == guestagent +USE_RC_SUBR= qemu-guest-agent +CONFIGURE_ARGS+= --enable-guest-agent --disable-tools --disable-xkbcommon +.else +CONFIGURE_ARGS+= --disable-guest-agent +.endif +.if ${FLAVOR:U} != tools && ${FLAVOR:U} != guestagent CONFIGURE_ARGS+= --enable-fdt=system \ --enable-netmap .endif -.if ${FLAVOR:U} == tools +.if ${FLAVOR:U} == tools || ${FLAVOR:U} == guestagent CONFIGURE_ARGS+= --disable-attr \ --disable-blobs \ --disable-brlapi \ @@ -78,7 +89,6 @@ CONFIGURE_ARGS+= --disable-attr \ --disable-fdt \ --disable-gcrypt \ --disable-glusterfs \ - --disable-guest-agent \ --disable-libnfs \ --disable-libusb \ --disable-lzo \ @@ -96,8 +106,10 @@ CONFIGURE_ARGS+= --disable-attr \ --disable-user \ --disable-vhost-net \ --disable-virtfs \ - --disable-vnc \ - --enable-tools + --disable-vnc +.endif +.if ${FLAVOR:U} == tools +CONFIGURE_ARGS+= --enable-tools .endif CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} @@ -117,7 +129,7 @@ OPTIONS_SINGLE_NCURSES= NCURSES_BASE NCURSES_DEFAULT NCURSES_PORT .if ${FLAVOR:U} == nox11 OPTIONS_EXCLUDE:= GTK3 X11 .endif -.if ${FLAVOR:U} == tools +.if ${FLAVOR:U} == tools || ${FLAVOR:U} == guestagent OPTIONS_EXCLUDE:= CAPSTONE CDROM_DMA CURL DEBUG GNUTLS GTK3 ISCSI \ JPEG NCURSES NCURSES_BASE NCURSES_DEFAULT \ NCURSES_PORT OPENGL PNG SAMBA SASL STATIC_LINK \ @@ -234,7 +246,7 @@ do-install: .if !target(post-install) post-install: -.if ${FLAVOR:U} != tools +.if ${FLAVOR:U} != tools && ${FLAVOR:U} != guestagent ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${STAGEDIR}${PREFIX}/etc ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${STAGEDIR}${PREFIX}/etc .endif