Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177010918
D8038.1793723563.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
13 KB
Referenced Files
None
Subscribers
None
D8038.1793723563.diff
View Options
Index: emulators/Makefile
===================================================================
--- emulators/Makefile
+++ emulators/Makefile
@@ -121,6 +121,7 @@
SUBDIR += qemu-launcher
SUBDIR += qemu-sbruno
SUBDIR += qemu-user-static
+ SUBDIR += qemu-utils
SUBDIR += qmc2
SUBDIR += qtemu
SUBDIR += quasi88
Index: emulators/qemu-utils/Makefile
===================================================================
--- /dev/null
+++ emulators/qemu-utils/Makefile
@@ -0,0 +1,129 @@
+# $FreeBSD$
+
+PORTNAME= qemu
+PORTVERSION= 2.6.1
+CATEGORIES= emulators
+MASTER_SITES= http://wiki.qemu.org/download/
+PKGNAMESUFFIX= -utils
+DIST_SUBDIR= qemu/${PORTVERSION}
+
+MAINTAINER= asomers@FreeBSD.org
+COMMENT= QEMU userland utilities
+
+LICENSE= GPLv2
+
+HAS_CONFIGURE= yes
+USES= cpe gmake pkgconfig perl5 python:2,build tar:bzip2
+USES+= gettext-runtime
+USE_PERL5= build
+USE_GNOME+= glib20
+MAKE_ENV+= BSD_MAKE="${MAKE}" PREFIX=${PREFIX}
+CONFLICTS_INSTALL= qemu-[0-9]* qemu-devel-* qemu-sbruno-*
+
+OPTIONS_DEFINE= DOCS
+
+DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html
+DOCS_USES= makeinfo
+DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1
+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
+
+.include <bsd.port.options.mk>
+
+.if !defined(STRIP) || ${STRIP} == ""
+CONFIGURE_ARGS+=--disable-strip
+.endif
+
+# -lprocstat actually only _needs_ -lelf after r249666 or r250870 (MFC)
+# but it shouldn't matter much
+post-patch:
+ @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -E \
+ -e "/^by Tibor .TS. S/s|Sch.*z.$$|Schuetz.|" \
+ ${WRKSRC}/qemu-doc.texi
+ @${REINPLACE_CMD} -E \
+ -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing|" \
+ -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
+ ${WRKSRC}/Makefile.target
+ @${REINPLACE_CMD} -E \
+ -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \
+ -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
+ ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -E \
+ -e "1s|^(#! )/usr/bin/perl|\1${PERL}|" \
+ ${WRKSRC}/scripts/texi2pod.pl
+
+post-patch-CDROM_DMA-off:
+ @${REINPLACE_CMD} -e '/USE_DMA_CDROM/d' ${WRKSRC}/hw/ide/internal.h
+
+post-patch-GNS3-on:
+ @${REINPLACE_CMD} -e 's|(buf\[0\] & 1) && (rctl & E1000_RCTL_MPE)|buf[0] \& 1|' \
+ ${WRKSRC}/hw/net/e1000.c
+
+# XXX need to disable usb host code on head while it's not ported to the
+# new usb stack yet
+post-configure:
+ @${REINPLACE_CMD} -E \
+ -e "s|^(HOST_USB=)bsd|\1stub|" \
+ ${WRKSRC}/config-host.mak
+
+.if !target(post-install)
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
+ @${RMDIR} ${STAGEDIR}${DATADIR}
+.endif
+
+.include <bsd.port.mk>
Index: emulators/qemu-utils/distinfo
===================================================================
--- /dev/null
+++ emulators/qemu-utils/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1471559363
+SHA256 (qemu/2.6.1/qemu-2.6.1.tar.bz2) = 4942fd1b6ee31f2f55ffc2201dd7397e6b9c55a2ef332e6d660c730d268e08d1
+SIZE (qemu/2.6.1/qemu-2.6.1.tar.bz2) = 25762855
Index: emulators/qemu-utils/files/patch-Makefile
===================================================================
--- /dev/null
+++ emulators/qemu-utils/files/patch-Makefile
@@ -0,0 +1,37 @@
+--- Makefile.orig 2016-08-17 15:26:51 UTC
++++ Makefile
+@@ -90,7 +90,11 @@ LIBS+=-lz $(LIBS_TOOLS)
+ HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
+
+ ifdef BUILD_DOCS
++ifdef NOPORTDOCS
++DOCS=qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
++else
+ DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
++endif
+ DOCS+=qmp-commands.txt
+ ifdef CONFIG_LINUX
+ DOCS+=kvm_stat.1
+@@ -410,8 +414,10 @@ else
+
+ install-doc: $(DOCS)
+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
++ifndef NOPORTDOCS
+ $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)"
+ $(INSTALL_DATA) qmp-commands.txt "$(DESTDIR)$(qemu_docdir)"
++endif
+ ifdef CONFIG_POSIX
+ $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
+ $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
+@@ -464,11 +471,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: emulators/qemu-utils/files/patch-configure
===================================================================
--- /dev/null
+++ emulators/qemu-utils/files/patch-configure
@@ -0,0 +1,218 @@
+--- configure.orig 2016-08-17 15:26:51 UTC
++++ configure
+@@ -245,7 +245,7 @@ DSOSUF=".so"
+ LDFLAGS_SHARED="-shared"
+ modules="no"
+ prefix="/usr/local"
+-mandir="\${prefix}/share/man"
++mandir="\${prefix}/man"
+ datadir="\${prefix}/share"
+ qemu_docdir="\${prefix}/share/doc/qemu"
+ bindir="\${prefix}/bin"
+@@ -317,6 +317,10 @@ virglrenderer=""
+ tpm="yes"
+ libssh2=""
+ vhdx=""
++quorum="no"
++pcap="no"
++pcap_create="no"
++bpf="no"
+ numa=""
+ tcmalloc="no"
+ jemalloc="no"
+@@ -576,7 +580,7 @@ FreeBSD)
+ audio_drv_list="oss"
+ audio_possible_drivers="oss sdl pa"
+ # needed for kinfo_getvmmap(3) in libutil.h
+- LIBS="-lutil $LIBS"
++ LIBS="-lprocstat -lelf -lelf -lelf -lelf -lelf -lelf -lkvm -lelf -lutil $LIBS"
+ netmap="" # enable netmap autodetect
+ HOST_VARIANT_DIR="freebsd"
+ ;;
+@@ -879,6 +883,10 @@ for opt do
+ ;;
+ --enable-vnc-png) vnc_png="yes"
+ ;;
++ --enable-pcap) pcap="yes"
++ ;;
++ --disable-pcap) pcap="no"
++ ;;
+ --disable-slirp) slirp="no"
+ ;;
+ --disable-uuid) uuid="no"
+@@ -2161,7 +2169,7 @@ if test "$gtk" != "no"; then
+ gtk_cflags="$gtk_cflags $x11_cflags"
+ gtk_libs="$gtk_libs $x11_libs"
+ fi
+- libs_softmmu="$gtk_libs $libs_softmmu"
++ libs_softmmu="$gtk_libs -lintl $libs_softmmu"
+ gtk="yes"
+ elif test "$gtk" = "yes"; then
+ feature_not_found "gtk" "Install gtk2 or gtk3 devel"
+@@ -2389,6 +2397,14 @@ if ! check_include "ifaddrs.h" ; then
+ fi
+
+ ##########################################
++# getifaddrs (for tests/test-io-channel-socket )
++
++have_ifaddrs_h=yes
++if ! check_include "ifaddrs.h" ; then
++ have_ifaddrs_h=no
++fi
++
++##########################################
+ # VTE probe
+
+ if test "$vte" != "no"; then
+@@ -2531,6 +2547,50 @@ EOF
+ fi
+ fi
+
++##########################################
++# pcap probe
++
++if test "$pcap" = "yes" -a "$pcap" != "no"; then
++ cat > $TMPC << EOF
++#include <pcap.h>
++int main(void) { return (pcap_lib_version() == (char *)0 ? 1 : 0); }
++EOF
++ if test "$mingw32" = "no" ; then
++ libpcap=-lpcap
++ else
++ libpcap=-lwpcap
++ fi
++ if compile_prog "" "$libpcap" ; then
++ :
++ else
++ echo
++ echo "Error: Could not find pcap"
++ echo "Make sure to have the pcap libs and headers installed."
++ echo
++ exit 1
++ fi
++ cat > $TMPC << EOF
++#include <pcap.h>
++int main(void)
++{
++ char errbuf[PCAP_ERRBUF_SIZE];
++ return (pcap_create("foo", errbuf) == (pcap_t *)0 ? 1 : 0);
++}
++EOF
++ if compile_prog "" "$libpcap" ; then
++ pcap_create="yes"
++ fi
++ cat > $TMPC << EOF
++#define PCAP_DONT_INCLUDE_PCAP_BPF_H
++#include <pcap.h>
++#include <net/bpf.h>
++int main(void) { return (BPF_MAJOR_VERSION); }
++EOF
++ if compile_prog ; then
++ bpf="yes"
++ fi
++ libs_softmmu="$libpcap $libs_softmmu"
++fi # test "$pcap"
+
+ ##########################################
+ # VNC SASL detection
+@@ -2945,7 +3005,7 @@ for i in $glib_modules; do
+ glib_libs=`$pkg_config --libs $i`
+ CFLAGS="$glib_cflags $CFLAGS"
+ LIBS="$glib_libs $LIBS"
+- libs_qga="$glib_libs $libs_qga"
++ libs_qga="$glib_libs -lintl -lintl -lintl -lintl -lintl -lintl $libs_qga"
+ else
+ error_exit "glib-$glib_req_ver $i is required to compile QEMU"
+ fi
+@@ -3021,7 +3081,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" \
+@@ -3865,14 +3925,7 @@ fi
+
+ # Check if tools are available to build documentation.
+ if test "$docs" != "no" ; then
+- if has makeinfo && has pod2man; then
+ docs=yes
+- else
+- if test "$docs" = "yes" ; then
+- feature_not_found "docs" "Install texinfo and Perl/perl-podlators"
+- fi
+- docs=no
+- fi
+ fi
+
+ # Search for bswap_32 function
+@@ -4000,6 +4053,17 @@ fi
+
+ # check for libusb
+ if test "$libusb" != "no" ; then
++ cat > $TMPC << EOF
++#include <libusb.h>
++
++int main(void) { return libusb_get_port_path(NULL, NULL, NULL, 0); }
++EOF
++ if compile_prog "-Werror" "-lusb -pthread" ; then
++ libusb="yes"
++ libusb_cflags=""
++ libusb_libs=-lusb
++ libs_softmmu="$libs_softmmu $libusb_libs"
++ else
+ if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
+ libusb="yes"
+ libusb_cflags=$($pkg_config --cflags libusb-1.0)
+@@ -4012,6 +4076,7 @@ if test "$libusb" != "no" ; then
+ fi
+ libusb="no"
+ fi
++ fi
+ fi
+
+ # check for usbredirparser for usb network redirection support
+@@ -4584,7 +4649,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
+@@ -4792,6 +4856,7 @@ echo "Audio drivers $audio_drv_list"
+ echo "Block whitelist (rw) $block_drv_rw_whitelist"
+ echo "Block whitelist (ro) $block_drv_ro_whitelist"
+ echo "VirtFS support $virtfs"
++echo "pcap support $pcap"
+ echo "VNC support $vnc"
+ if test "$vnc" = "yes" ; then
+ echo "VNC SASL support $vnc_sasl"
+@@ -4973,6 +5038,15 @@ fi
+ if test "$profiler" = "yes" ; then
+ echo "CONFIG_PROFILER=y" >> $config_host_mak
+ fi
++if test "$pcap" = "yes" ; then
++ echo "CONFIG_PCAP=y" >> $config_host_mak
++ if test "$pcap_create" = "yes" ; then
++ echo "CONFIG_PCAP_CREATE=y" >> $config_host_mak
++ fi
++ if test "$bpf" = "yes" ; then
++ echo "CONFIG_BPF=y" >> $config_host_mak
++ fi
++fi
+ if test "$slirp" = "yes" ; then
+ echo "CONFIG_SLIRP=y" >> $config_host_mak
+ echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
+@@ -5184,6 +5258,9 @@ fi
+ if test "$have_fsxattr" = "yes" ; then
+ echo "HAVE_FSXATTR=y" >> $config_host_mak
+ fi
++if test "$have_ifaddrs_h" = "yes" ; then
++ echo "HAVE_IFADDRS_H=y" >> $config_host_mak
++fi
+ if test "$vte" = "yes" ; then
+ echo "CONFIG_VTE=y" >> $config_host_mak
+ echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak
Index: emulators/qemu-utils/files/patch-qemu-doc.texi
===================================================================
--- /dev/null
+++ emulators/qemu-utils/files/patch-qemu-doc.texi
@@ -0,0 +1,21 @@
+--- qemu-doc.texi.orig 2016-08-17 15:26:57 UTC
++++ qemu-doc.texi
+@@ -223,7 +223,7 @@ VGA BIOS.
+ QEMU uses YM3812 emulation by Tatsuyuki Satoh.
+
+ QEMU uses GUS emulation (GUSEMU32 @url{http://www.deinmeister.de/gusemu/})
+-by Tibor "TS" Schütz.
++by Tibor "TS" Schuetz.
+
+ Note that, by default, GUS shares IRQ(7) with parallel ports and so
+ QEMU must be told to not have parallel ports to have working GUS.
+@@ -367,7 +367,8 @@ Send the escape character to the fronten
+
+ @c man begin SEEALSO
+ The HTML documentation of QEMU for more precise information and Linux
+-user mode emulator invocation.
++user mode emulator invocation, as well as the FreeBSD host notes in
++@file{pkg-message} in the relevant qemu port directory.
+ @c man end
+
+ @c man begin AUTHOR
Index: emulators/qemu-utils/pkg-descr
===================================================================
--- /dev/null
+++ 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: emulators/qemu-utils/pkg-plist
===================================================================
--- /dev/null
+++ 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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 3, 4:32 PM (5 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41377817
Default Alt Text
D8038.1793723563.diff (13 KB)
Attached To
Mode
D8038: Add emulators/qemu-utils
Attached
Detach File
Event Timeline