From 7b1157fd27b60823a8cab6e312b300b6304d086d Mon Sep 17 00:00:00 2001 From: jperkin Date: Wed, 11 Dec 2019 16:44:22 +0000 Subject: qemu: Various SunOS fixes. --- emulators/qemu/Makefile | 8 +++++++- emulators/qemu/distinfo | 5 ++++- emulators/qemu/patches/patch-capstone_Makefile | 17 +++++++++++++++++ emulators/qemu/patches/patch-net_tap-solaris.c | 14 ++++++++++++++ emulators/qemu/patches/patch-util_drm.c | 20 ++++++++++++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 emulators/qemu/patches/patch-capstone_Makefile create mode 100644 emulators/qemu/patches/patch-net_tap-solaris.c create mode 100644 emulators/qemu/patches/patch-util_drm.c (limited to 'emulators') diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index 0d101c1f943..11c36ab50d3 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.220 2019/11/03 19:24:33 rillig Exp $ +# $NetBSD: Makefile,v 1.221 2019/12/11 16:44:22 jperkin Exp $ DISTNAME= qemu-4.1.0 PKGREVISION= 2 @@ -127,6 +127,7 @@ PLIST.ivshmem= yes PLIST.pr-helper= yes PLIST.virtfs-proxy-helper= yes .elif !empty(MACHINE_PLATFORM:MSunOS-5.11-*) +PLIST.ivshmem= yes PLIST.nbd= yes CONFIGURE_ARGS+= --disable-coroutine-pool .endif @@ -141,6 +142,11 @@ PLIST_SRC= PLIST ${WRKDIR}/PLIST.STATIC TEST_TARGET= check +# Some dependencies aren't correct and this tries to be re-made on install, +# failing due to configure bugs. +post-build: + ${TOUCH} ${WRKSRC}/config-host.mak + post-install: ${INSTALL_DATA} ${FILESDIR}/Makefile.multinode-NetBSD \ ${DESTDIR}${PREFIX}/share/doc/qemu/ diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo index 2fad765456d..bd4eb511690 100644 --- a/emulators/qemu/distinfo +++ b/emulators/qemu/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.151 2019/08/16 15:12:19 adam Exp $ +$NetBSD: distinfo,v 1.152 2019/12/11 16:44:22 jperkin Exp $ SHA1 (qemu-4.1.0.tar.xz) = 29c99be326cd8f3b2b75d7fec9066ca24854df1e RMD160 (qemu-4.1.0.tar.xz) = 7f95536777579cec1793c894089a2f72bb7f09d8 @@ -7,6 +7,7 @@ Size (qemu-4.1.0.tar.xz) = 54001708 bytes SHA1 (patch-Makefile) = 85d24d842ad2f7e1e2ec6f0e0e3268c21ef9bf0d SHA1 (patch-accel_tcg_user-exec.c) = 86ee62f6e5c8cd7942cf0aa9c9f64e4b0879ff33 SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41 +SHA1 (patch-capstone_Makefile) = f59870031de8c4385a591362749ec82f57fd4c27 SHA1 (patch-configure) = 14c09363622bcee113b7fda5bd3f031bd9ff6b90 SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984 SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3 @@ -17,5 +18,7 @@ SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7 SHA1 (patch-hw_tpm_tpm__ioctl.h) = a350c1708e1f9d85e07c4c354068703a45174baf SHA1 (patch-hw_usb_dev-mtp.c) = 0f9034fb3904e5d5e3b98d24b94e054181687d95 SHA1 (patch-include_sysemu_kvm.h) = f99e8ad021f6c8e89e3ca52538bd9b0656e6f619 +SHA1 (patch-net_tap-solaris.c) = 74f27ae747e1ebcd37f8f1f50ddacf2be5f7ee46 SHA1 (patch-roms_u-boot_tools_imx8m__image.sh) = e4c452062f40569e33aa93eec4a65bd3af2e74fc SHA1 (patch-target_i386_kvm-stub.c) = 4cd2b7a8d8d8a317829f982b5acff7fdf2479d9f +SHA1 (patch-util_drm.c) = b30a46d623d9431c5af2f3cd101adb89be3f0c2b diff --git a/emulators/qemu/patches/patch-capstone_Makefile b/emulators/qemu/patches/patch-capstone_Makefile new file mode 100644 index 00000000000..38ca8e23ede --- /dev/null +++ b/emulators/qemu/patches/patch-capstone_Makefile @@ -0,0 +1,17 @@ +$NetBSD: patch-capstone_Makefile,v 1.1 2019/12/11 16:44:22 jperkin Exp $ + +Support greps that do not support -m. + +--- capstone/Makefile.orig 2019-08-15 19:04:33.000000000 +0000 ++++ capstone/Makefile +@@ -254,8 +254,8 @@ PKGCFGDIR ?= $(LIBDATADIR)/pkgconfig + API_MAJOR=$(shell echo `grep -e CS_API_MAJOR include/capstone.h | grep -v = | awk '{print $$3}'` | awk '{print $$1}') + VERSION_EXT = + +-IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep -cm 1 -e __apple_build_version__ -e __APPLE_CC__) +-ifeq ($(IS_APPLE),1) ++IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep -c -e __apple_build_version__ -e __APPLE_CC__) ++ifneq ($(IS_APPLE),0) + # on MacOS, compile in Universal format by default + MACOS_UNIVERSAL ?= yes + ifeq ($(MACOS_UNIVERSAL),yes) diff --git a/emulators/qemu/patches/patch-net_tap-solaris.c b/emulators/qemu/patches/patch-net_tap-solaris.c new file mode 100644 index 00000000000..23ef92774fa --- /dev/null +++ b/emulators/qemu/patches/patch-net_tap-solaris.c @@ -0,0 +1,14 @@ +$NetBSD: patch-net_tap-solaris.c,v 1.1 2019/12/11 16:44:22 jperkin Exp $ + +Requires qemu-common.h. + +--- net/tap-solaris.c.orig 2019-08-15 19:01:42.000000000 +0000 ++++ net/tap-solaris.c +@@ -23,6 +23,7 @@ + */ + + #include "qemu/osdep.h" ++#include "qemu-common.h" + #include "qapi/error.h" + #include "tap_int.h" + #include "sysemu/sysemu.h" diff --git a/emulators/qemu/patches/patch-util_drm.c b/emulators/qemu/patches/patch-util_drm.c new file mode 100644 index 00000000000..b0e95a9e145 --- /dev/null +++ b/emulators/qemu/patches/patch-util_drm.c @@ -0,0 +1,20 @@ +$NetBSD: patch-util_drm.c,v 1.1 2019/12/11 16:44:22 jperkin Exp $ + +Support SunOS. + +--- util/drm.c.orig 2019-08-15 19:01:43.000000000 +0000 ++++ util/drm.c +@@ -38,7 +38,13 @@ int qemu_drm_rendernode_open(const char + + fd = -1; + while ((e = readdir(dir))) { ++#ifdef __sun ++ struct stat s; ++ stat(e->d_name, &s); ++ if (!(s.st_mode & S_IFCHR)) { ++#else + if (e->d_type != DT_CHR) { ++#endif + continue; + } + -- cgit v1.2.3