Index: head/emulators/Makefile =================================================================== --- head/emulators/Makefile +++ head/emulators/Makefile @@ -123,6 +123,7 @@ SUBDIR += qemu-launcher SUBDIR += qemu-sbruno SUBDIR += qemu-user-static + SUBDIR += qemu-utils SUBDIR += qmc2 SUBDIR += qtemu SUBDIR += quasi88 Index: head/emulators/qemu-utils/Makefile =================================================================== --- head/emulators/qemu-utils/Makefile +++ head/emulators/qemu-utils/Makefile @@ -0,0 +1,85 @@ +# $FreeBSD$ + +PKGNAMESUFFIX= -utils + +MAINTAINER= asomers@FreeBSD.org +COMMENT= QEMU userland utilities + +HAS_CONFIGURE= yes +USES= cpe gmake pkgconfig perl5 python:2,build tar:bzip2 +USES+= gettext-runtime +USE_GNOME+= glib20 +MAKE_ENV+= BSD_MAKE="${MAKE}" PREFIX=${PREFIX} +CONFLICTS_INSTALL= qemu-[0-9]* qemu-devel-* qemu-sbruno-* + +OPTIONS_SLAVE= DOCS +OPTIONS_EXCLUDE= SAMBA X11 GTK2 OPENGL GNUTLS SASL JPEG PNG CURL \ + CDROM_DMA PCAP USBREDIR GNS3 X86_TARGETS \ + STATIC_LINK NCURSES +MASTERDIR= ${.CURDIR}/../qemu +PLIST= ${.CURDIR}/pkg-plist +DESCR= ${.CURDIR}/pkg-descr +EXTRA_PATCHES= ${.CURDIR}/files/patch-Makefile ${.CURDIR}/files/patch-configure +PKGMESSAGE= + +PORTDOCS= qemu-doc.html qemu-tech.html qmp-commands.txt + +CONFIGURE_ARGS=--localstatedir=/var --extra-ldflags=-L\"${LOCALBASE}/lib\" \ + --disable-libssh2 \ + --prefix=${PREFIX} --cc=${CC} --disable-kvm \ + --disable-linux-user --disable-linux-aio --disable-xen \ + --python=${PYTHON_CMD} \ + --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\" \ + --disable-curl \ + --disable-gnutls \ + --disable-gtk \ + --disable-vte \ + --disable-vnc-jpeg \ + --disable-opengl \ + --disable-usb-redir \ + --disable-sdl \ + --disable-system \ + --disable-user \ + --disable-guest-agent \ + --disable-nettle \ + --disable-gcrypt \ + --disable-curses \ + --disable-vnc \ + --disable-virtfs \ + --disable-brlapi \ + --disable-fdt \ + --disable-bluez \ + --disable-kvm \ + --disable-rdma \ + --disable-uuid \ + --disable-vde \ + --disable-netmap \ + --disable-cap-ng \ + --disable-attr \ + --disable-vhost-net \ + --disable-spice \ + --disable-rbd \ + --disable-libiscsi \ + --disable-libnfs \ + --disable-smartcard \ + --disable-libusb \ + --disable-usb-redir \ + --disable-lzo \ + --disable-snappy \ + --disable-bzip2 \ + --disable-seccomp \ + --disable-coroutine-pool \ + --disable-glusterfs \ + --disable-archipelago \ + --disable-tpm \ + --disable-numa \ + --disable-blobs \ + --without-pixman + +LIB_DEPENDS= + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-* + @${RMDIR} ${STAGEDIR}${DATADIR} + +.include "${MASTERDIR}/Makefile" Index: head/emulators/qemu-utils/files/patch-Makefile =================================================================== --- head/emulators/qemu-utils/files/patch-Makefile +++ head/emulators/qemu-utils/files/patch-Makefile @@ -0,0 +1,14 @@ +--- Makefile.orig 2016-10-04 19:25:28 UTC ++++ Makefile +@@ -464,11 +464,6 @@ endif + ifeq ($(CONFIG_GTK),y) + $(MAKE) -C po $@ + endif +- $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" +- set -e; for x in $(KEYMAPS); do \ +- $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ +- done +- $(INSTALL_DATA) $(SRC_PATH)/trace-events "$(DESTDIR)$(qemu_datadir)/trace-events" + for d in $(TARGET_DIRS); do \ + $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ + done Index: head/emulators/qemu-utils/files/patch-configure =================================================================== --- head/emulators/qemu-utils/files/patch-configure +++ head/emulators/qemu-utils/files/patch-configure @@ -0,0 +1,19 @@ +--- configure.orig 2016-08-17 15:26:51 UTC ++++ configure +@@ -3021,7 +3021,7 @@ if test "$pixman" = ""; then + fi + fi + if test "$pixman" = "none"; then +- if test "$want_tools" != "no" -o "$softmmu" != "no"; then ++ if test "$softmmu" != "no"; then + error_exit "pixman disabled but system emulation or tools build" \ + "enabled. You can turn off pixman only if you also" \ + "disable all system emulation targets and the tools" \ +@@ -4584,7 +4584,6 @@ if test "$want_tools" = "yes" ; then + tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" + if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then + tools="qemu-nbd\$(EXESUF) $tools" +- tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools" + fi + fi + if test "$softmmu" = yes ; then Index: head/emulators/qemu-utils/pkg-descr =================================================================== --- head/emulators/qemu-utils/pkg-descr +++ head/emulators/qemu-utils/pkg-descr @@ -0,0 +1,7 @@ +Miscellaneous tools that can be used without the rest of QEMU + +* qemu-img: QEMU disk image utility +* qemu-io: QEMU disk exerciser +* qemu-nbd: QEMU disk network block device server + +WWW: http://wiki.qemu.org/Main_Page Index: head/emulators/qemu-utils/pkg-plist =================================================================== --- head/emulators/qemu-utils/pkg-plist +++ head/emulators/qemu-utils/pkg-plist @@ -0,0 +1,6 @@ +bin/qemu-img +bin/qemu-io +bin/qemu-nbd +man/man1/qemu-img.1.gz +man/man1/qemu.1.gz +man/man8/qemu-nbd.8.gz Index: head/emulators/qemu/Makefile =================================================================== --- head/emulators/qemu/Makefile +++ head/emulators/qemu/Makefile @@ -14,12 +14,14 @@ LICENSE= GPLv2 HAS_CONFIGURE= yes -USES= cpe gmake pkgconfig bison perl5 python:2,build tar:bzip2 +USES?= cpe gmake pkgconfig bison perl5 python:2,build tar:bzip2 USE_PERL5= build +MAKE_ENV+= BSD_MAKE="${MAKE}" +.if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX} != "-utils" USE_XORG= pixman USE_GNOME+= cairo glib20 -MAKE_ENV+= BSD_MAKE="${MAKE}" ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64 # XXX someone wants to debug sparc64 hosts? +.endif OPTIONS_DEFINE= SAMBA X11 GTK2 OPENGL GNUTLS SASL JPEG PNG CURL \ CDROM_DMA PCAP USBREDIR GNS3 X86_TARGETS \ @@ -68,18 +70,18 @@ DOCS_USES= makeinfo DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1 -PORTDOCS= docs qemu-doc.html qemu-tech.html qmp-commands.txt +PORTDOCS?= docs qemu-doc.html qemu-tech.html qmp-commands.txt WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} -CONFIGURE_ARGS+=--localstatedir=/var --extra-ldflags=-L\"${LOCALBASE}/lib\" \ +CONFIGURE_ARGS?=--localstatedir=/var --extra-ldflags=-L\"${LOCALBASE}/lib\" \ --disable-libssh2 --enable-debug \ --prefix=${PREFIX} --cc=${CC} --enable-docs --disable-kvm \ --disable-linux-user --disable-linux-aio --disable-xen \ --smbd=${LOCALBASE}/sbin/smbd --enable-debug-info --python=${PYTHON_CMD} \ --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\" -LIB_DEPENDS+= libnettle.so:security/nettle \ +LIB_DEPENDS?= libnettle.so:security/nettle \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2