1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-21 08:42:23 +00:00

Add emulators/qemu-utils

qemu-utils is a new port which installs a few miscellaneous qemu utilities
that are useful even without emulation capabilities. It is useful where
emulation is not needed, because it has far fewer dependencies than qemu.
It is equivalent to the Debian package of the same name.

Reviewed by:	sbruno, brd
Approved by:	brd (ports)
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D8038
This commit is contained in:
Alan Somers 2016-10-14 20:34:26 +00:00
parent 217e68c35b
commit f51dcaa2ea
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=423989
7 changed files with 139 additions and 5 deletions

View File

@ -123,6 +123,7 @@
SUBDIR += qemu-launcher
SUBDIR += qemu-sbruno
SUBDIR += qemu-user-static
SUBDIR += qemu-utils
SUBDIR += qmc2
SUBDIR += qtemu
SUBDIR += quasi88

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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