Index: head/emulators/qemu-devel/Makefile =================================================================== --- head/emulators/qemu-devel/Makefile (revision 508307) +++ head/emulators/qemu-devel/Makefile (revision 508308) @@ -1,169 +1,160 @@ # Created by: Juergen Lock # $FreeBSD$ PORTNAME= qemu -PORTVERSION= 3.1.0 -PORTREVISION= 2 +PORTVERSION= 4.0.0 CATEGORIES= emulators MASTER_SITES= https://download.qemu.org/ PKGNAMESUFFIX= -devel DIST_SUBDIR= qemu/${PORTVERSION} MAINTAINER= bofh@FreeBSD.org COMMENT= QEMU CPU Emulator - development version LICENSE= GPLv2 ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64 LIB_DEPENDS= libnettle.so:security/nettle \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libepoxy.so:graphics/libepoxy \ libpcre2-8.so:devel/pcre2 -USES= cpe gmake gnome pkgconfig bison perl5 python:2.7,build tar:xz +USES= bison cpe gmake gnome iconv:wchar_t perl5 pkgconfig python:build tar:xz USE_GNOME= cairo glib20 libxml2 USE_PERL5= build USE_XORG= pixman #BROKEN_powerpc64= fails to compile: In function aio_bh_poll: internal compiler error: Segmentation fault #.if !defined(PKGNAMESUFFIX) || (${PKGNAMESUFFIX} != "-utils" && ${PKGNAMESUFFIX} != "-guest-agent") #.endif HAS_CONFIGURE= yes MAKE_ENV+= BSD_MAKE="${MAKE}" V=1 OPTIONS_DEFINE= SAMBA X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CURL \ VDE CDROM_DMA PCAP USBREDIR X86_TARGETS \ STATIC_LINK DOCS NCURSES SAMBA_DESC= samba dependency (for -smb) GNUTLS_DESC= gnutls dependency (vnc encryption) SASL_DESC= cyrus-sasl dependency (vnc encryption) JPEG_DESC= jpeg dependency (vnc lossy compression) PNG_DESC= png dependency (vnc compression) CDROM_DMA_DESC= IDE CDROM DMA PCAP_DESC= pcap dependency (networking with bpf) USBREDIR_DESC= usb device network redirection (experimental!) X86_TARGETS_DESC= Build only x86 system targets STATIC_LINK_DESC= Statically link the executables VDE_DESC= vde dependency (for vde networking) OPTIONS_DEFAULT=X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL PCAP NCURSES VDE OPTIONS_SUB= yes -X11_USE= SDL=sdl XORG=x11,xext GNOME=gdkpixbuf2 +X11_USE= SDL=sdl2 XORG=x11,xext GNOME=gdkpixbuf2 X11_USES= sdl X11_CONFIGURE_ENABLE= sdl GTK3_LIB_DEPENDS= libxkbcommon.so:x11/libxkbcommon GTK3_USE= GNOME=gdkpixbuf2,gtk30,vte3 XORG=x11,xext -GTK3_USES= gettext +GTK3_USES= gettext gl GTK3_CONFIGURE_OFF= --disable-gtk --disable-vte GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CONFIGURE_OFF= --disable-gnutls SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 SASL_CONFIGURE_OFF= --disable-vnc-sasl JPEG_USES= jpeg JPEG_CONFIGURE_OFF= --disable-vnc-jpeg PNG_LIB_DEPENDS= libpng.so:graphics/png PNG_CONFIGURE_OFF= --disable-vnc-png CURL_LIB_DEPENDS= libcurl.so:ftp/curl CURL_CONFIGURE_OFF= --disable-curl OPENGL_USE= GL=gl +OPENGL_USES= gl OPENGL_CONFIGURE_OFF= --disable-opengl USBREDIR_BUILD_DEPENDS= usbredir>=0.6:net/usbredir USBREDIR_RUN_DEPENDS= usbredir>=0.6:net/usbredir USBREDIR_CONFIGURE_OFF= --disable-usb-redir PCAP_CONFIGURE_ON= --enable-pcap PCAP_EXTRA_PATCHES= ${FILESDIR}/pcap-patch-qapi_net.json ${FILESDIR}/pcap-patch-net_net.c \ ${FILESDIR}/pcap-patch-net_clients.h VDE_LIB_DEPENDS= libvdeplug.so:net/vde2 VDE_CONFIGURE_OFF= --disable-vde STATIC_LINK_CONFIGURE_ON= --static STATIC_LINK_PREVENTS= GTK3 X11 STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static NCURSES_USES= ncurses:base SAMBA_USES= samba:run # smbd SAMBA_CONFIGURE_ON= --smbd=${LOCALBASE}/sbin/smbd -DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html +DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html \ + sphinx-build:textproc/py-sphinx DOCS_USES= makeinfo DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1 -PORTDOCS= docs qemu-doc.html qemu-doc.txt qemu-ga-ref.html qemu-ga-ref.txt \ +PORTDOCS= docs interop/.buildinfo interop/* qemu-doc.html qemu-doc.txt qemu-ga-ref.html qemu-ga-ref.txt \ qemu-qmp-ref.html qemu-qmp-ref.txt WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} CONFIGURE_ARGS= --localstatedir=/var --extra-ldflags=-L\"/usr/lib\" \ --extra-ldflags=-L\"${LOCALBASE}/lib\" --disable-libssh2 --enable-debug \ --prefix=${PREFIX} --cc=${CC} --enable-netmap --enable-docs --disable-kvm \ --disable-linux-user --disable-linux-aio --disable-xen \ --enable-debug-info --python=${PYTHON_CMD} \ --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\" +INSTALLS_ICONS= yes .include .if !defined(STRIP) || ${STRIP} == "" CONFIGURE_ARGS+=--disable-strip .endif .if ${ARCH} == "amd64" MAKE_ARGS+= ARCH=x86_64 .endif .if ${ARCH} == "powerpc" MAKE_ARGS+= ARCH=ppc .endif .if ${ARCH} == "powerpc64" MAKE_ARGS+= ARCH=ppc64 .endif .if ${ARCH} == "sparc64" CONFIGURE_ARGS+= --sparc_cpu=v9 .endif PLIST_SUB+= LINUXBOOT_DMA="" # -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|' \ -e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \ ${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}/include/hw/ide/internal.h # 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: ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${STAGEDIR}${PREFIX}/etc ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${STAGEDIR}${PREFIX}/etc @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-* post-install-DOCS-on: @(cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DOCSDIR}/) .endif .include Index: head/emulators/qemu-devel/distinfo =================================================================== --- head/emulators/qemu-devel/distinfo (revision 508307) +++ head/emulators/qemu-devel/distinfo (revision 508308) @@ -1,3 +1,3 @@ -TIMESTAMP = 1551235571 -SHA256 (qemu/3.1.0/qemu-3.1.0.tar.xz) = 6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc -SIZE (qemu/3.1.0/qemu-3.1.0.tar.xz) = 36070104 +TIMESTAMP = 1556455551 +SHA256 (qemu/4.0.0/qemu-4.0.0.tar.xz) = 13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469 +SIZE (qemu/4.0.0/qemu-4.0.0.tar.xz) = 55628624 Index: head/emulators/qemu-devel/files/patch-Makefile =================================================================== --- head/emulators/qemu-devel/files/patch-Makefile (revision 508307) +++ head/emulators/qemu-devel/files/patch-Makefile (revision 508308) @@ -1,42 +1,42 @@ ---- Makefile.orig 2018-12-11 17:44:34 UTC +--- Makefile.orig 2019-04-23 18:14:45 UTC +++ Makefile -@@ -353,9 +353,14 @@ LIBS+=-lz $(LIBS_TOOLS) +@@ -311,9 +311,14 @@ LIBS+=-lz $(LIBS_TOOLS) HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF) ifdef BUILD_DOCS +ifdef NOPORTDOCS +DOCS=qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 +DOCS+=docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7 +else DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7 DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7 +endif DOCS+=docs/qemu-block-drivers.7 DOCS+=docs/qemu-cpu-models.7 ifdef CONFIG_VIRTFS -@@ -823,11 +828,13 @@ BLOBS= - endif +@@ -742,11 +747,13 @@ install-sphinxdocs: sphinxdocs + $(call install-manual,interop) - install-doc: $(DOCS) + install-doc: $(DOCS) install-sphinxdocs +ifndef NOPORTDOCS $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)" +endif ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1" -@@ -842,8 +849,10 @@ ifneq ($(TOOLS),) +@@ -764,8 +771,10 @@ ifdef CONFIG_TRACE_SYSTEMTAP endif ifneq (,$(findstring qemu-ga,$(TOOLS))) $(INSTALL_DATA) qemu-ga.8 "$(DESTDIR)$(mandir)/man8" +ifndef NOPORTDOCS $(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)" +endif $(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7" endif endif Index: head/emulators/qemu-devel/files/patch-configure =================================================================== --- head/emulators/qemu-devel/files/patch-configure (revision 508307) +++ head/emulators/qemu-devel/files/patch-configure (revision 508308) @@ -1,145 +1,163 @@ ---- configure.orig 2018-12-11 17:44:34 UTC +--- configure.orig 2019-04-23 18:14:45 UTC +++ configure -@@ -393,7 +393,7 @@ DSOSUF=".so" +@@ -396,7 +396,7 @@ DSOSUF=".so" LDFLAGS_SHARED="-shared" modules="no" prefix="/usr/local" -mandir="\${prefix}/share/man" +mandir="\${prefix}/man" datadir="\${prefix}/share" firmwarepath="\${prefix}/share/qemu-firmware" qemu_docdir="\${prefix}/share/doc/qemu" -@@ -469,6 +469,9 @@ numa="" +@@ -476,6 +476,9 @@ numa="" tcmalloc="no" jemalloc="no" replication="yes" +pcap="no" +pcap_create="no" +bpf="no" vxhs="" bochs="yes" cloop="yes" -@@ -1097,6 +1100,10 @@ for opt do +@@ -1118,6 +1121,10 @@ for opt do ;; --enable-vnc-png) vnc_png="yes" ;; + --enable-pcap) pcap="yes" + ;; + --disable-pcap) pcap="no" + ;; --disable-slirp) slirp="no" ;; - --disable-vde) vde="no" -@@ -2860,6 +2867,14 @@ if ! check_include "ifaddrs.h" ; then + --enable-slirp=system) slirp="system" +@@ -2972,6 +2979,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 -@@ -4466,11 +4481,6 @@ fi +@@ -3629,7 +3644,7 @@ for i in $glib_modules; do + glib_libs=$($pkg_config --libs $i) + QEMU_CFLAGS="$glib_cflags $QEMU_CFLAGS" + LIBS="$glib_libs $LIBS" +- libs_qga="$glib_libs $libs_qga" ++ libs_qga="$glib_libs -lintl $libs_qga" + else + error_exit "glib-$glib_req_ver $i is required to compile QEMU" + fi +@@ -4723,11 +4738,6 @@ has_sphinx_build() { if test "$docs" != "no" ; then - if has makeinfo && has pod2man; then + if has makeinfo && has pod2man && has_sphinx_build; then docs=yes - else - if test "$docs" = "yes" ; then -- feature_not_found "docs" "Install texinfo and Perl/perl-podlators" +- feature_not_found "docs" "Install texinfo, Perl/perl-podlators and python-sphinx" - fi - docs=no fi fi -@@ -4984,7 +4994,51 @@ if test "$debug_stack_usage" = "yes"; then +@@ -4861,7 +4871,7 @@ fi + + # check for libusb + if test "$libusb" != "no" ; then +- if $pkg_config --atleast-version=1.0.13 libusb-1.0; then ++ if $pkg_config libusb-1.0; then + libusb="yes" + libusb_cflags=$($pkg_config --cflags libusb-1.0) + libusb_libs=$($pkg_config --libs libusb-1.0) +@@ -5251,7 +5261,51 @@ if test "$debug_stack_usage" = "yes"; then fi fi +########################################## +# pcap probe +if test "$pcap" = "yes" -a "$pcap" != "no"; then + cat > $TMPC << EOF +#include +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 +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 +#include +int main(void) { return (BPF_MAJOR_VERSION); } +EOF + if compile_prog ; then + bpf="yes" + fi + libs_softmmu="$libpcap $libs_softmmu" +fi # test "$pcap" + ########################################## # check if we have open_by_handle_at -@@ -6005,6 +6059,7 @@ echo "Audio drivers $audio_drv_list" +@@ -6332,6 +6386,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 "Multipath support $mpath" echo "VNC support $vnc" if test "$vnc" = "yes" ; then -@@ -6240,6 +6295,15 @@ fi +@@ -6565,6 +6620,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 + if test "$slirp" != "no"; then echo "CONFIG_SLIRP=y" >> $config_host_mak echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak -@@ -6470,6 +6534,9 @@ fi +@@ -6812,6 +6876,9 @@ fi # if this macro is set. 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 "$have_copy_file_range" = "yes" ; then echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak Index: head/emulators/qemu-devel/files/patch-disas_libvixl_vixl_a64_disasm-a64.cc =================================================================== --- head/emulators/qemu-devel/files/patch-disas_libvixl_vixl_a64_disasm-a64.cc (revision 508307) +++ head/emulators/qemu-devel/files/patch-disas_libvixl_vixl_a64_disasm-a64.cc (revision 508308) @@ -1,11 +1,11 @@ ---- disas/libvixl/vixl/a64/disasm-a64.cc.orig 2016-04-14 20:19:53 UTC +--- disas/libvixl/vixl/a64/disasm-a64.cc.orig 2019-04-23 18:14:45 UTC +++ disas/libvixl/vixl/a64/disasm-a64.cc -@@ -2693,7 +2693,7 @@ void Disassembler::AppendPCRelativeOffse +@@ -2693,7 +2693,7 @@ void Disassembler::AppendPCRelativeOffsetToOutput(cons if (offset < 0) { abs_offset = -abs_offset; } - AppendToOutput("#%c0x%" PRIx64, sign, abs_offset); + AppendToOutput("#%c0x%" PRIx64, sign, offset < 0 ? -offset : offset); } Index: head/emulators/qemu-devel/files/patch-include_net_net.h =================================================================== --- head/emulators/qemu-devel/files/patch-include_net_net.h (revision 508307) +++ head/emulators/qemu-devel/files/patch-include_net_net.h (revision 508308) @@ -1,13 +1,13 @@ ---- include/net/net.h.orig 2015-11-03 20:01:34 UTC +--- include/net/net.h.orig 2019-04-23 18:14:46 UTC +++ include/net/net.h -@@ -202,8 +202,8 @@ void qmp_netdev_add(QDict *qdict, QObjec +@@ -209,8 +209,8 @@ void qmp_netdev_add(QDict *qdict, QObject **ret, Error int net_hub_id_for_client(NetClientState *nc, int *id); NetClientState *net_hub_port_find(int hub_id); -#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" -#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown" +#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup" +#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown" #define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper" #define DEFAULT_BRIDGE_INTERFACE "br0" Index: head/emulators/qemu-devel/files/patch-include_qemu_atomic.h =================================================================== --- head/emulators/qemu-devel/files/patch-include_qemu_atomic.h (revision 508307) +++ head/emulators/qemu-devel/files/patch-include_qemu_atomic.h (revision 508308) @@ -1,54 +1,54 @@ ---- include/qemu/atomic.h.orig 2017-04-20 14:57:00 UTC +--- include/qemu/atomic.h.orig 2019-04-23 18:14:46 UTC +++ include/qemu/atomic.h -@@ -182,10 +182,12 @@ +@@ -201,10 +201,12 @@ /* Provide shorter names for GCC atomic builtins, return old value */ #define atomic_fetch_inc(ptr) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST) #define atomic_fetch_dec(ptr) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST) +#ifndef __cplusplus #define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST) #define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST) #define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST) #define atomic_fetch_or(ptr, n) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST) +#endif #define atomic_fetch_xor(ptr, n) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST) #define atomic_inc_fetch(ptr) __atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST) -@@ -199,10 +201,12 @@ +@@ -218,10 +220,12 @@ /* And even shorter names that return void. */ #define atomic_inc(ptr) ((void) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST)) #define atomic_dec(ptr) ((void) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST)) +#ifndef __cplusplus #define atomic_add(ptr, n) ((void) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST)) #define atomic_sub(ptr, n) ((void) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST)) #define atomic_and(ptr, n) ((void) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST)) #define atomic_or(ptr, n) ((void) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST)) +#endif #define atomic_xor(ptr, n) ((void) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST)) #else /* __ATOMIC_RELAXED */ -@@ -370,10 +374,12 @@ +@@ -389,10 +393,12 @@ #define atomic_inc_fetch(ptr) __sync_add_and_fetch(ptr, 1) #define atomic_dec_fetch(ptr) __sync_add_and_fetch(ptr, -1) +#ifndef __cplusplus #define atomic_add_fetch(ptr, n) __sync_add_and_fetch(ptr, n) #define atomic_sub_fetch(ptr, n) __sync_sub_and_fetch(ptr, n) #define atomic_and_fetch(ptr, n) __sync_and_and_fetch(ptr, n) #define atomic_or_fetch(ptr, n) __sync_or_and_fetch(ptr, n) +#endif #define atomic_xor_fetch(ptr, n) __sync_xor_and_fetch(ptr, n) #define atomic_cmpxchg(ptr, old, new) __sync_val_compare_and_swap(ptr, old, new) -@@ -382,10 +388,12 @@ +@@ -401,10 +407,12 @@ /* And even shorter names that return void. */ #define atomic_inc(ptr) ((void) __sync_fetch_and_add(ptr, 1)) #define atomic_dec(ptr) ((void) __sync_fetch_and_add(ptr, -1)) +#ifndef __cplusplus #define atomic_add(ptr, n) ((void) __sync_fetch_and_add(ptr, n)) #define atomic_sub(ptr, n) ((void) __sync_fetch_and_sub(ptr, n)) #define atomic_and(ptr, n) ((void) __sync_fetch_and_and(ptr, n)) #define atomic_or(ptr, n) ((void) __sync_fetch_and_or(ptr, n)) +#endif #define atomic_xor(ptr, n) ((void) __sync_fetch_and_xor(ptr, n)) #endif /* __ATOMIC_RELAXED */ Index: head/emulators/qemu-devel/files/patch-net_tap-bsd.c =================================================================== --- head/emulators/qemu-devel/files/patch-net_tap-bsd.c (revision 508307) +++ head/emulators/qemu-devel/files/patch-net_tap-bsd.c (revision 508308) @@ -1,10 +1,10 @@ ---- net/tap-bsd.c.orig 2015-11-03 20:01:34 UTC +--- net/tap-bsd.c.orig 2019-04-23 18:14:46 UTC +++ net/tap-bsd.c -@@ -29,6 +29,7 @@ +@@ -31,6 +31,7 @@ #if defined(__NetBSD__) || defined(__FreeBSD__) #include +#include #include #include #endif Index: head/emulators/qemu-devel/files/patch-qemu-doc.texi =================================================================== --- head/emulators/qemu-devel/files/patch-qemu-doc.texi (revision 508307) +++ head/emulators/qemu-devel/files/patch-qemu-doc.texi (revision 508308) @@ -1,12 +1,21 @@ ---- qemu-doc.texi.orig 2015-11-03 20:01:35 UTC +--- qemu-doc.texi.orig 2019-04-23 18:14:46 UTC +++ qemu-doc.texi -@@ -355,7 +355,8 @@ Send Ctrl-a +@@ -200,7 +200,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. +@@ -560,7 +560,8 @@ Send the escape character to the frontend @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: head/emulators/qemu-devel/pkg-plist =================================================================== --- head/emulators/qemu-devel/pkg-plist (revision 508307) +++ head/emulators/qemu-devel/pkg-plist (revision 508308) @@ -1,147 +1,155 @@ +bin/elf2dmp bin/qemu-edid bin/qemu-ga bin/qemu-i386 bin/qemu-img bin/qemu-io %%GTK3%%bin/qemu-keymap bin/qemu-nbd %%NO_X86_TARGETS%%bin/qemu-sparc %%NO_X86_TARGETS%%bin/qemu-sparc64 %%NO_X86_TARGETS%%bin/qemu-system-aarch64 %%NO_X86_TARGETS%%bin/qemu-system-alpha %%NO_X86_TARGETS%%bin/qemu-system-arm %%NO_X86_TARGETS%%bin/qemu-system-cris %%NO_X86_TARGETS%%bin/qemu-system-hppa bin/qemu-system-i386 %%NO_X86_TARGETS%%bin/qemu-system-lm32 %%NO_X86_TARGETS%%bin/qemu-system-m68k %%NO_X86_TARGETS%%bin/qemu-system-microblaze %%NO_X86_TARGETS%%bin/qemu-system-microblazeel %%NO_X86_TARGETS%%bin/qemu-system-mips %%NO_X86_TARGETS%%bin/qemu-system-mips64 %%NO_X86_TARGETS%%bin/qemu-system-mips64el %%NO_X86_TARGETS%%bin/qemu-system-mipsel %%NO_X86_TARGETS%%bin/qemu-system-moxie %%NO_X86_TARGETS%%bin/qemu-system-nios2 %%NO_X86_TARGETS%%bin/qemu-system-or1k %%NO_X86_TARGETS%%bin/qemu-system-ppc %%NO_X86_TARGETS%%bin/qemu-system-ppc64 %%NO_X86_TARGETS%%bin/qemu-system-riscv32 %%NO_X86_TARGETS%%bin/qemu-system-riscv64 %%NO_X86_TARGETS%%bin/qemu-system-s390x %%NO_X86_TARGETS%%bin/qemu-system-sh4 %%NO_X86_TARGETS%%bin/qemu-system-sh4eb %%NO_X86_TARGETS%%bin/qemu-system-sparc %%NO_X86_TARGETS%%bin/qemu-system-sparc64 %%NO_X86_TARGETS%%bin/qemu-system-tricore %%NO_X86_TARGETS%%bin/qemu-system-unicore32 bin/qemu-system-x86_64 %%NO_X86_TARGETS%%bin/qemu-system-xtensa %%NO_X86_TARGETS%%bin/qemu-system-xtensaeb bin/qemu-x86_64 man/man1/qemu.1.gz man/man1/qemu-img.1.gz man/man7/qemu-block-drivers.7.gz man/man7/qemu-cpu-models.7.gz man/man7/qemu-ga-ref.7.gz man/man7/qemu-qmp-ref.7.gz man/man8/qemu-ga.8.gz man/man8/qemu-nbd.8.gz @sample etc/qemu-ifup.sample @sample etc/qemu-ifdown.sample %%DATADIR%%/QEMU,tcx.bin %%DATADIR%%/QEMU,cgthree.bin %%DATADIR%%/bios-256k.bin %%DATADIR%%/bios.bin %%DATADIR%%/canyonlands.dtb %%DATADIR%%/efi-e1000.rom %%DATADIR%%/efi-e1000e.rom %%DATADIR%%/efi-eepro100.rom %%DATADIR%%/efi-ne2k_pci.rom %%DATADIR%%/efi-pcnet.rom %%DATADIR%%/efi-rtl8139.rom %%DATADIR%%/efi-virtio.rom %%DATADIR%%/efi-vmxnet3.rom %%DATADIR%%/hppa-firmware.img %%DATADIR%%/qemu_vga.ndrv %%DATADIR%%/s390-netboot.img %%DATADIR%%/u-boot-sam460-20100605.bin %%DATADIR%%/vgabios.bin %%DATADIR%%/vgabios-cirrus.bin %%DATADIR%%/vgabios-qxl.bin %%DATADIR%%/vgabios-stdvga.bin %%DATADIR%%/vgabios-virtio.bin %%DATADIR%%/vgabios-vmware.bin %%DATADIR%%/palcode-clipper %%DATADIR%%/ppc_rom.bin %%DATADIR%%/openbios-ppc %%DATADIR%%/openbios-sparc32 %%DATADIR%%/openbios-sparc64 %%DATADIR%%/pxe-e1000.rom %%DATADIR%%/pxe-eepro100.rom %%DATADIR%%/pxe-ne2k_pci.rom %%DATADIR%%/pxe-rtl8139.rom %%DATADIR%%/pxe-pcnet.rom %%DATADIR%%/pxe-virtio.rom %%DATADIR%%/petalogix-ml605.dtb %%DATADIR%%/spapr-rtas.bin %%DATADIR%%/slof.bin %%DATADIR%%/s390-ccw.img %%DATADIR%%/linuxboot.bin %%LINUXBOOT_DMA%%%%DATADIR%%/linuxboot_dma.bin %%DATADIR%%/multiboot.bin %%DATADIR%%/sgabios.bin %%DATADIR%%/skiboot.lid %%DATADIR%%/trace-events-all %%DATADIR%%/petalogix-s3adsp1800.dtb %%DATADIR%%/bamboo.dtb %%DATADIR%%/kvmvapic.bin -%%DATADIR%%/qemu-icon.bmp -%%DATADIR%%/qemu_logo_no_text.svg %%DATADIR%%/u-boot.e500 %%DATADIR%%/keymaps/ar %%DATADIR%%/keymaps/bepo -%%DATADIR%%/keymaps/common %%DATADIR%%/keymaps/cz %%DATADIR%%/keymaps/da %%DATADIR%%/keymaps/de %%DATADIR%%/keymaps/de-ch %%DATADIR%%/keymaps/en-gb %%DATADIR%%/keymaps/en-us %%DATADIR%%/keymaps/es %%DATADIR%%/keymaps/et %%DATADIR%%/keymaps/fi %%DATADIR%%/keymaps/fo %%DATADIR%%/keymaps/fr %%DATADIR%%/keymaps/fr-be %%DATADIR%%/keymaps/fr-ca %%DATADIR%%/keymaps/fr-ch %%DATADIR%%/keymaps/hr %%DATADIR%%/keymaps/hu %%DATADIR%%/keymaps/is %%DATADIR%%/keymaps/it %%DATADIR%%/keymaps/ja %%DATADIR%%/keymaps/lt %%DATADIR%%/keymaps/lv %%DATADIR%%/keymaps/mk -%%DATADIR%%/keymaps/modifiers %%DATADIR%%/keymaps/nl -%%DATADIR%%/keymaps/nl-be %%DATADIR%%/keymaps/no %%DATADIR%%/keymaps/pl %%DATADIR%%/keymaps/pt %%DATADIR%%/keymaps/pt-br %%DATADIR%%/keymaps/ru %%DATADIR%%/keymaps/sl %%DATADIR%%/keymaps/sv %%DATADIR%%/keymaps/th %%DATADIR%%/keymaps/tr +%%DATADIR%%/pvh.bin %%DATADIR%%/vgabios-bochs-display.bin %%DATADIR%%/vgabios-ramfb.bin +share/icons/hicolor/128x128/apps/qemu.png +share/icons/hicolor/16x16/apps/qemu.png +share/icons/hicolor/24x24/apps/qemu.png +share/icons/hicolor/256x256/apps/qemu.png +share/icons/hicolor/32x32/apps/qemu.bmp +share/icons/hicolor/32x32/apps/qemu.png +share/icons/hicolor/48x48/apps/qemu.png +share/icons/hicolor/512x512/apps/qemu.png +share/icons/hicolor/64x64/apps/qemu.png +share/icons/hicolor/scalable/apps/qemu.svg +share/applications/qemu.desktop %%GTK3%%share/locale/bg/LC_MESSAGES/qemu.mo %%GTK3%%share/locale/de_DE/LC_MESSAGES/qemu.mo %%GTK3%%share/locale/fr_FR/LC_MESSAGES/qemu.mo %%GTK3%%share/locale/hu/LC_MESSAGES/qemu.mo %%GTK3%%share/locale/it/LC_MESSAGES/qemu.mo %%GTK3%%share/locale/tr/LC_MESSAGES/qemu.mo %%GTK3%%share/locale/zh_CN/LC_MESSAGES/qemu.mo