Skip to content

Instantly share code, notes, and snippets.

@oshimaya
Last active March 4, 2020 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oshimaya/febef66da380bd3de6c367a6b00df315 to your computer and use it in GitHub Desktop.
Save oshimaya/febef66da380bd3de6c367a6b00df315 to your computer and use it in GitHub Desktop.
patch for pkgsrc-current/emulators/qemu 4.2.0nb9 (make nvmm PKG_OPTIONS and enable when NetBSD/amd64 >= 9 only)
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index 6be2d40ebf9..bc8cca0103a 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -9,7 +9,7 @@ SHA1 (patch-accel_stubs_Makefile.objs) = 92266dc400ac1e97013f7f19ee4b7a63b42c7fc
SHA1 (patch-accel_stubs_nvmm-stub.c) = d66d47eabb8bb6728e777da7589b43d491adbcc8
SHA1 (patch-accel_tcg_user-exec.c) = 86ee62f6e5c8cd7942cf0aa9c9f64e4b0879ff33
SHA1 (patch-capstone_Makefile) = f59870031de8c4385a591362749ec82f57fd4c27
-SHA1 (patch-configure) = c2d68edf08e94ea12c9e57da3dacb0c1326c1213
+SHA1 (patch-configure) = 7bd1b0a64c31ec17031dba79d905876bcd16b933
SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984
SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3
SHA1 (patch-cpus.c) = a319b7533daf3036c44411c4b26270b1fbb96009
diff --git a/emulators/qemu/options.mk b/emulators/qemu/options.mk
index 5da2584b4f0..94291eb3584 100644
--- a/emulators/qemu/options.mk
+++ b/emulators/qemu/options.mk
@@ -14,6 +14,11 @@ PKG_SUPPORTED_OPTIONS+= virtfs-proxy-helper
PKG_SUGGESTED_OPTIONS+= sdl
.endif
+.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "x86_64" && ${OS_VERSION:R} >= 9
+PKG_SUPPORTED_OPTIONS+= nvmm
+PKG_SUGGESTED_OPTIONS+= nvmm
+.endif
+
.include "../../mk/bsd.options.mk"
PLIST_VARS+= gtk virtfs-proxy-helper
@@ -49,3 +54,9 @@ CONFIGURE_ARGS+= --enable-spice
.else
CONFIGURE_ARGS+= --disable-spice
.endif
+
+.if !empty(PKG_OPTIONS:Mnvmm)
+CONFIGURE_ARGS+= --enable-nvmm
+.else
+CONFIGURE_ARGS+= --disable-nvmm
+.endif
diff --git a/emulators/qemu/patches/patch-configure b/emulators/qemu/patches/patch-configure
index e2900d98e9a..8eb5631cd6d 100644
--- a/emulators/qemu/patches/patch-configure
+++ b/emulators/qemu/patches/patch-configure
@@ -43,7 +43,7 @@ Add NVMM support.
NetBSD)
bsd="yes"
hax="yes"
-+ nvmm="yes"
++ nvmm="no"
make="${MAKE-gmake}"
audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment