Tuesday, December 14, 2021

UPDATE: QEMU 6.2.0

Here is an update to QEMU 6.2.0.

https://wiki.qemu.org/ChangeLog/6.2


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.217
diff -u -p -u -p -r1.217 Makefile
--- Makefile 22 Nov 2021 15:00:42 -0000 1.217
+++ Makefile 8 Dec 2021 14:28:56 -0000
@@ -6,9 +6,8 @@ DPB_PROPERTIES= parallel
COMMENT-main= multi system emulator
COMMENT-ga= QEMU guest agent

-VERSION= 6.1.0
+VERSION= 6.2.0
DISTNAME= qemu-${VERSION}
-REVISION-main= 1
CATEGORIES= emulators
MASTER_SITES= https://download.qemu.org/
EXTRACT_SUFX= .tar.xz
@@ -86,9 +85,10 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \
--cc="${CC}" \
--cxx="${CXX}" \
--host-cc="${CC}" \
- --disable-bsd-user \
--enable-capstone=system \
--disable-auth-pam \
+ --disable-bsd-user \
+ --disable-jack \
--disable-sdl-image \
--disable-smartcard \
--disable-snappy \
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/distinfo,v
retrieving revision 1.64
diff -u -p -u -p -r1.64 distinfo
--- distinfo 3 Sep 2021 23:04:49 -0000 1.64
+++ distinfo 14 Dec 2021 22:27:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (qemu-6.1.0.tar.xz) = 7rwInbNBS77t8eRkvtoKdRWq0w9zJhq8JGybJ1A6PJY=
-SIZE (qemu-6.1.0.tar.xz) = 111258808
+SHA256 (qemu-6.2.0.tar.xz) = aOFdjkWsVjJuC5pK+otJo9/oq6NIgiHQmMhGmLymW0U=
+SIZE (qemu-6.2.0.tar.xz) = 115667324
Index: patches/patch-audio_audio_c
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-audio_audio_c,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 patch-audio_audio_c
--- patches/patch-audio_audio_c 3 Sep 2021 23:04:49 -0000 1.10
+++ patches/patch-audio_audio_c 19 Nov 2021 06:01:28 -0000
@@ -1,5 +1,7 @@
$OpenBSD: patch-audio_audio_c,v 1.10 2021/09/03 23:04:49 sthen Exp $

+sndio module
+
Index: audio/audio.c
--- audio/audio.c.orig
+++ audio/audio.c
Index: patches/patch-audio_audio_template_h
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-audio_audio_template_h,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 patch-audio_audio_template_h
--- patches/patch-audio_audio_template_h 2 May 2021 08:15:19 -0000 1.5
+++ patches/patch-audio_audio_template_h 30 Nov 2021 09:07:44 -0000
@@ -1,5 +1,7 @@
$OpenBSD: patch-audio_audio_template_h,v 1.5 2021/05/02 08:15:19 landry Exp $

+sndio module
+
Index: audio/audio_template.h
--- audio/audio_template.h.orig
+++ audio/audio_template.h
Index: patches/patch-audio_meson_build
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-audio_meson_build,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-audio_meson_build
--- patches/patch-audio_meson_build 2 May 2021 08:15:19 -0000 1.1
+++ patches/patch-audio_meson_build 19 Nov 2021 06:00:44 -0000
@@ -6,10 +6,10 @@ Index: audio/meson.build
--- audio/meson.build.orig
+++ audio/meson.build
@@ -17,6 +17,7 @@ foreach m : [
- ['CONFIG_AUDIO_OSS', 'oss', oss, 'ossaudio.c'],
- ['CONFIG_AUDIO_PA', 'pa', pulse, 'paaudio.c'],
- ['CONFIG_AUDIO_SDL', 'sdl', sdl, 'sdlaudio.c'],
-+ ['CONFIG_AUDIO_SNDIO', 'sndio', sndio, 'sndioaudio.c'],
- ['CONFIG_AUDIO_JACK', 'jack', jack, 'jackaudio.c'],
- ['CONFIG_SPICE', 'spice', spice, 'spiceaudio.c']
+ ['pa', pulse, files('paaudio.c')],
+ ['sdl', sdl, files('sdlaudio.c')],
+ ['jack', jack, files('jackaudio.c')],
++ ['sndio', sndio, files('sndioaudio.c')],
+ ['spice', spice, files('spiceaudio.c')]
]
+ if m[1].found()
Index: patches/patch-audio_sndioaudio_c
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-audio_sndioaudio_c,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 patch-audio_sndioaudio_c
--- patches/patch-audio_sndioaudio_c 30 Mar 2020 20:10:24 -0000 1.4
+++ patches/patch-audio_sndioaudio_c 15 Dec 2021 04:28:35 -0000
@@ -7,19 +7,9 @@ Index: audio/sndioaudio.c
+++ audio/sndioaudio.c
@@ -0,0 +1,555 @@
+/*
-+ * Copyright (c) 2019 Alexandre Ratchov <alex@caoua.org>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
++ * SPDX-License-Identifier: ISC
+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ * Copyright (c) 2019 Alexandre Ratchov <alex@caoua.org>
+ */
+
+/*
@@ -43,7 +33,7 @@ Index: audio/sndioaudio.c
+#define AUDIO_CAP "sndio"
+#include "audio_int.h"
+
-+/* default latency in ms if no option is set */
++/* default latency in microseconds if no option is set */
+#define SNDIO_LATENCY_US 50000
+
+typedef struct SndioVoice {
@@ -64,6 +54,7 @@ Index: audio/sndioaudio.c
+ size_t qemu_pos;
+ unsigned int mode;
+ unsigned int nfds;
++ bool enabled;
+} SndioVoice;
+
+typedef struct SndioConf {
@@ -85,7 +76,7 @@ Index: audio/sndioaudio.c
+
+ for (i = 0; i < self->nfds; i++) {
+ pfd = &self->pfds[i];
-+ qemu_set_fd_handler (pfd->fd, NULL, NULL, NULL);
++ qemu_set_fd_handler(pfd->fd, NULL, NULL, NULL);
+ }
+
+ self->nfds = 0;
@@ -175,12 +166,12 @@ Index: audio/sndioaudio.c
+ for (i = 0; i < self->nfds; i++) {
+ pfd = &self->pfds[i];
+ if (pfd->fd < 0) {
-+ continue;
++ continue;
+ }
+ qemu_set_fd_handler(pfd->fd,
-+ (pfd->events & POLLIN) ? sndio_poll_in : NULL,
-+ (pfd->events & POLLOUT) ? sndio_poll_out : NULL,
-+ &self->pindexes[i]);
++ (pfd->events & POLLIN) ? sndio_poll_in : NULL,
++ (pfd->events & POLLOUT) ? sndio_poll_out : NULL,
++ &self->pindexes[i]);
+ pfd->revents = 0;
+ }
+}
@@ -227,7 +218,12 @@ Index: audio/sndioaudio.c
+ }
+ }
+
-+ sndio_poll_wait(self);
++ /*
++ * audio_run() may have changed state
++ */
++ if (self->enabled) {
++ sndio_poll_wait(self);
++ }
+}
+
+/*
@@ -238,7 +234,6 @@ Index: audio/sndioaudio.c
+{
+ SndioVoice *self = (SndioVoice *) hw;
+
-+ /* size is not set by the caller */
+ *size = self->buf_size - self->qemu_pos;
+ return self->buf + self->qemu_pos;
+}
@@ -375,6 +370,7 @@ Index: audio/sndioaudio.c
+ case AUDIO_FORMAT_U32:
+ req.bits = 32;
+ req.sig = 0;
++ break;
+ default:
+ dolog("unknown audio sample format\n");
+ return -1;
@@ -386,9 +382,9 @@ Index: audio/sndioaudio.c
+
+ req.rate = as->freq;
+ if (mode == SIO_PLAY) {
-+ req.pchan = as->nchannels;
++ req.pchan = as->nchannels;
+ } else {
-+ req.rchan = as->nchannels;
++ req.rchan = as->nchannels;
+ }
+
+ /* set on-device buffer size */
@@ -458,8 +454,10 @@ Index: audio/sndioaudio.c
+{
+ if (enable) {
+ sio_start(self->hdl);
++ self->enabled = true;
+ sndio_poll_wait(self);
+ } else {
++ self->enabled = false;
+ sndio_poll_clear(self);
+ sio_stop(self->hdl);
+ }
@@ -469,14 +467,14 @@ Index: audio/sndioaudio.c
+{
+ SndioVoice *self = (SndioVoice *) hw;
+
-+ return sndio_enable(self, enable);
++ sndio_enable(self, enable);
+}
+
+static void sndio_enable_in(HWVoiceIn *hw, bool enable)
+{
+ SndioVoice *self = (SndioVoice *) hw;
+
-+ return sndio_enable(self, enable);
++ sndio_enable(self, enable);
+}
+
+static int sndio_init_out(HWVoiceOut *hw, struct audsettings *as, void *opaque)
@@ -509,14 +507,14 @@ Index: audio/sndioaudio.c
+{
+ SndioVoice *self = (SndioVoice *) hw;
+
-+ return sndio_fini(self);
++ sndio_fini(self);
+}
+
+static void sndio_fini_in(HWVoiceIn *hw)
+{
+ SndioVoice *self = (SndioVoice *) hw;
+
-+ return sndio_fini(self);
++ sndio_fini(self);
+}
+
+static void *sndio_audio_init(Audiodev *dev)
@@ -533,10 +531,12 @@ Index: audio/sndioaudio.c
+ .init_out = sndio_init_out,
+ .fini_out = sndio_fini_out,
+ .enable_out = sndio_enable_out,
++ .write = audio_generic_write,
+ .get_buffer_out = sndio_get_buffer_out,
+ .put_buffer_out = sndio_put_buffer_out,
+ .init_in = sndio_init_in,
+ .fini_in = sndio_fini_in,
++ .read = audio_generic_read,
+ .enable_in = sndio_enable_in,
+ .get_buffer_in = sndio_get_buffer_in,
+ .put_buffer_in = sndio_put_buffer_in,
@@ -544,7 +544,7 @@ Index: audio/sndioaudio.c
+
+static struct audio_driver sndio_audio_driver = {
+ .name = "sndio",
-+ .descr = "https://man.openbsd.org/sndio",
++ .descr = "sndio https://sndio.org",
+ .init = sndio_audio_init,
+ .fini = sndio_audio_fini,
+ .pcm_ops = &sndio_pcm_ops,
Index: patches/patch-configure
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-configure,v
retrieving revision 1.68
diff -u -p -u -p -r1.68 patch-configure
--- patches/patch-configure 3 Sep 2021 23:04:49 -0000 1.68
+++ patches/patch-configure 30 Nov 2021 10:04:02 -0000
@@ -1,47 +1,9 @@
$OpenBSD: patch-configure,v 1.68 2021/09/03 23:04:49 sthen Exp $

-sndio module
-
Index: configure
--- configure.orig
+++ configure
-@@ -743,8 +743,8 @@ NetBSD)
- OpenBSD)
- bsd="yes"
- make="${MAKE-gmake}"
-- audio_drv_list="try-sdl"
-- audio_possible_drivers="sdl"
-+ audio_drv_list="sndio"
-+ audio_possible_drivers="sndio"
- ;;
- Darwin)
- bsd="yes"
-@@ -3066,6 +3066,24 @@ for drv in $audio_drv_list; do
- fi
- ;;
-
-+ sndio | try-sndio)
-+ if $pkg_config sndio --exists; then
-+ sndio=yes
-+ sndio_libs=$($pkg_config sndio --libs)
-+ sndio_cflags=$($pkg_config sndio --cflags)
-+ if test "$drv" = "try-sndio"; then
-+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sndio/sndio/')
-+ fi
-+ else
-+ if test "$drv" = "try-sndio"; then
-+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sndio//')
-+ else
-+ error_exit "$drv check failed" \
-+ "Make sure to have the $drv libs and headers installed."
-+ fi
-+ fi
-+ ;;
-+
- coreaudio | try-coreaudio)
- if test "$coreaudio" = "no"; then
- if test "$drv" = "try-coreaudio"; then
-@@ -4299,7 +4317,6 @@ write_c_skeleton
+@@ -3259,7 +3259,6 @@ write_c_skeleton
if test "$gcov" = "yes" ; then
:
elif test "$fortify_source" = "yes" ; then
@@ -49,15 +11,3 @@ Index: configure
debug=no
fi

-@@ -4565,6 +4582,11 @@ echo "PULSE_CFLAGS=$pulse_cflags" >> $config_host_mak
- echo "COREAUDIO_LIBS=$coreaudio_libs" >> $config_host_mak
- echo "DSOUND_LIBS=$dsound_libs" >> $config_host_mak
- echo "OSS_LIBS=$oss_libs" >> $config_host_mak
-+if test "$sndio" = "yes" ; then
-+ echo "CONFIG_SNDIO=y" >> $config_host_mak
-+fi
-+echo "SNDIO_LIBS=$sndio_libs" >> $config_host_mak
-+echo "SNDIO_CFLAGS=$sndio_cflags" >> $config_host_mak
- if test "$libjack" = "yes" ; then
- echo "CONFIG_LIBJACK=y" >> $config_host_mak
- fi
Index: patches/patch-meson_build
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-meson_build,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-meson_build
--- patches/patch-meson_build 3 Sep 2021 23:04:49 -0000 1.2
+++ patches/patch-meson_build 26 Nov 2021 03:52:16 -0000
@@ -1,34 +1,41 @@
$OpenBSD: patch-meson_build,v 1.2 2021/09/03 23:04:49 sthen Exp $

-- Fix curses build on OpenBSD
- sndio module
- Remove hardcoding of optimization

Index: meson.build
--- meson.build.orig
+++ meson.build
-@@ -441,6 +441,11 @@ jack = not_found
- if 'CONFIG_LIBJACK' in config_host
- jack = declare_dependency(link_args: config_host['JACK_LIBS'].split())
+@@ -554,6 +554,11 @@ if not get_option('jack').auto() or have_system
+ jack = dependency('jack', required: get_option('jack'),
+ method: 'pkg-config', kwargs: static_kwargs)
endif
+sndio = not_found
-+if 'CONFIG_SNDIO' in config_host
-+ sndio = declare_dependency(compile_args: config_host['SNDIO_CFLAGS'].split(),
-+ link_args: config_host['SNDIO_LIBS'].split())
++if not get_option('sndio').auto() or have_system
++ sndio = dependency('sndio', required: get_option('sndio'),
++ method: 'pkg-config', kwargs: static_kwargs)
+endif
- spice = not_found
- spice_headers = not_found
+
spice_protocol = not_found
-@@ -596,7 +601,7 @@ if have_system and not get_option('curses').disabled()
- endif
- endforeach
- msg = get_option('curses').enabled() ? 'curses library not found' : ''
-- curses_compile_args = ['-DNCURSES_WIDECHAR']
-+ curses_compile_args = ['-D_XOPEN_SOURCE_EXTENDED -DNCURSES_WIDECHAR']
- if curses.found()
- if cc.links(curses_test, args: curses_compile_args, dependencies: [curses])
- curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses])
-@@ -2907,11 +2912,9 @@ if targetos == 'windows'
+ if not get_option('spice_protocol').auto() or have_system
+@@ -1311,6 +1316,7 @@ if have_system
+ 'oss': oss.found(),
+ 'pa': pulse.found(),
+ 'sdl': sdl.found(),
++ 'sndio': sndio.found(),
+ }
+ foreach k, v: audio_drivers_available
+ config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), v)
+@@ -1318,7 +1324,7 @@ if have_system
+
+ # Default to native drivers first, OSS second, SDL third
+ audio_drivers_priority = \
+- [ 'pa', 'coreaudio', 'dsound', 'oss' ] + \
++ [ 'pa', 'coreaudio', 'dsound', 'sndio', 'oss' ] + \
+ (targetos == 'linux' ? [] : [ 'sdl' ])
+ audio_drivers_default = []
+ foreach k: audio_drivers_priority
+@@ -3234,11 +3240,9 @@ if targetos == 'windows'
endif
endif
summary_info += {'CFLAGS': ' '.join(get_option('c_args')
@@ -40,3 +47,11 @@ Index: meson.build
+ (get_option('debug') ? ['-g'] : []))}
endif
link_args = get_option(link_language + '_link_args')
+@@ -3385,6 +3389,7 @@ if vnc.found()
+ endif
+ if targetos not in ['darwin', 'haiku', 'windows']
+ summary_info += {'OSS support': oss}
++ summary_info += {'sndio support': sndio}
+ elif targetos == 'darwin'
+ summary_info += {'CoreAudio support': coreaudio}
+ elif targetos == 'windows'
Index: patches/patch-meson_mesonbuild_compilers_cpp_py
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-meson_mesonbuild_compilers_cpp_py,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-meson_mesonbuild_compilers_cpp_py
--- patches/patch-meson_mesonbuild_compilers_cpp_py 2 May 2021 08:15:19 -0000 1.1
+++ patches/patch-meson_mesonbuild_compilers_cpp_py 19 Nov 2021 06:00:40 -0000
@@ -3,19 +3,19 @@ $OpenBSD: patch-meson_mesonbuild_compile
Index: meson/mesonbuild/compilers/cpp.py
--- meson/mesonbuild/compilers/cpp.py.orig
+++ meson/mesonbuild/compilers/cpp.py
-@@ -210,7 +210,7 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
+@@ -247,7 +247,7 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
return []

- def language_stdlib_only_link_flags(self):
+ def language_stdlib_only_link_flags(self) -> T.List[str]:
- return ['-lstdc++']
+ return ['-lc++']


class AppleClangCPPCompiler(ClangCPPCompiler):
-@@ -346,7 +346,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
+@@ -397,7 +397,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
return ['-fpch-preprocess', '-include', os.path.basename(header)]

- def language_stdlib_only_link_flags(self):
+ def language_stdlib_only_link_flags(self) -> T.List[str]:
- return ['-lstdc++']
+ return ['-lestdc++']

Index: patches/patch-meson_options_txt
===================================================================
RCS file: patches/patch-meson_options_txt
diff -N patches/patch-meson_options_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-meson_options_txt 19 Nov 2021 06:14:46 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+sndio module
+
+Index: meson_options.txt
+--- meson_options.txt.orig
++++ meson_options.txt
+@@ -13,7 +13,7 @@ option('sphinx_build', type : 'string', value : '',
+ option('default_devices', type : 'boolean', value : true,
+ description: 'Include a default selection of devices in emulators')
+ option('audio_drv_list', type: 'array', value: ['default'],
+- choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', 'pa', 'sdl'],
++ choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', 'pa', 'sdl', 'sndio'],
+ description: 'Set audio driver list')
+ option('fuzzing_engine', type : 'string', value : '',
+ description: 'fuzzing engine library for OSS-Fuzz')
+@@ -184,6 +184,8 @@ option('oss', type: 'feature', value: 'auto',
+ description: 'OSS sound support')
+ option('pa', type: 'feature', value: 'auto',
+ description: 'PulseAudio sound support')
++option('sndio', type: 'feature', value: 'auto',
++ description: 'sndio sound support')
+
+ option('vhost_user_blk_server', type: 'feature', value: 'auto',
+ description: 'build vhost-user-blk server')
Index: patches/patch-qapi_audio_json
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-qapi_audio_json,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 patch-qapi_audio_json
--- patches/patch-qapi_audio_json 2 May 2021 08:15:19 -0000 1.5
+++ patches/patch-qapi_audio_json 30 Nov 2021 09:08:28 -0000
@@ -1,5 +1,7 @@
$OpenBSD: patch-qapi_audio_json,v 1.5 2021/05/02 08:15:19 landry Exp $

+sndio module
+
Index: qapi/audio.json
--- qapi/audio.json.orig
+++ qapi/audio.json
@@ -19,7 +21,7 @@ Index: qapi/audio.json
+#
+# @latency: play buffer size (in microseconds)
+#
-+# Since: 5.0
++# Since: 7.0
+##
+{ 'struct': 'AudiodevSndioOptions',
+ 'data': {
Index: patches/patch-qemu-options_hx
===================================================================
RCS file: /home/cvs/ports/emulators/qemu/patches/patch-qemu-options_hx,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 patch-qemu-options_hx
--- patches/patch-qemu-options_hx 3 Sep 2021 23:04:49 -0000 1.9
+++ patches/patch-qemu-options_hx 15 Dec 2021 04:28:32 -0000
@@ -1,9 +1,11 @@
$OpenBSD: patch-qemu-options_hx,v 1.9 2021/09/03 23:04:49 sthen Exp $

+sndio module
+
Index: qemu-options.hx
--- qemu-options.hx.orig
+++ qemu-options.hx
-@@ -643,6 +643,9 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
+@@ -657,6 +657,9 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
"-audiodev sdl,id=id[,prop[=value][,...]]\n"
" in|out.buffer-count= number of buffers\n"

No comments:

Post a Comment