aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emulators/Makefile1
-rw-r--r--emulators/qemu-utils/Makefile85
-rw-r--r--emulators/qemu-utils/files/patch-Makefile14
-rw-r--r--emulators/qemu-utils/files/patch-configure19
-rw-r--r--emulators/qemu-utils/pkg-descr7
-rw-r--r--emulators/qemu-utils/pkg-plist6
-rw-r--r--emulators/qemu/Makefile12
7 files changed, 139 insertions, 5 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 41b092b74a96..f6ec0445226d 100644
--- a/emulators/Makefile
+++ b/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
diff --git a/emulators/qemu-utils/Makefile b/emulators/qemu-utils/Makefile
new file mode 100644
index 000000000000..d7eaa0f272c9
--- /dev/null
+++ b/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"
diff --git a/emulators/qemu-utils/files/patch-Makefile b/emulators/qemu-utils/files/patch-Makefile
new file mode 100644
index 000000000000..a55b7448f599
--- /dev/null
+++ b/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
diff --git a/emulators/qemu-utils/files/patch-configure b/emulators/qemu-utils/files/patch-configure
new file mode 100644
index 000000000000..7c5c7a5515e5
--- /dev/null
+++ b/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
diff --git a/emulators/qemu-utils/pkg-descr b/emulators/qemu-utils/pkg-descr
new file mode 100644
index 000000000000..f1914609c286
--- /dev/null
+++ b/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
diff --git a/emulators/qemu-utils/pkg-plist b/emulators/qemu-utils/pkg-plist
new file mode 100644
index 000000000000..0ddc7886c72c
--- /dev/null
+++ b/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
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 9cff04751996..572f79957479 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -14,12 +14,14 @@ COMMENT?= QEMU CPU Emulator
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_BUILD_DEPENDS= texi2html:textproc/texi2html
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