Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC] qemu: update to 9.1.0, split
Date: Sun, 08 Sep 2024 03:59:58 +0200	[thread overview]
Message-ID: <20240908015958.BBA832C4F1@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-51814@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages qemu-banana
https://github.com/void-linux/void-packages/pull/51814

[RFC] qemu: update to 9.1.0, split
fixes #51804

#### Testing the changes
- I tested the changes in this PR: **YES**


A patch file from https://github.com/void-linux/void-packages/pull/51814.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qemu-banana-51814.patch --]
[-- Type: text/x-diff, Size: 46593 bytes --]

From 0b549255763a18bc8220b3ad5ba544c37b770fe1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 12 Aug 2024 19:08:53 -0400
Subject: [PATCH 1/4] qemu: update to 9.1.0, split system emulators etc into
 subpackages

disable user emulators, as those should be provided by qemu-user

add official upstream patch for mmap issue
---
 srcpkgs/qemu-common                  |   1 +
 srcpkgs/qemu-doc                     |   1 +
 srcpkgs/qemu-firmware                |   1 +
 srcpkgs/qemu-img                     |   1 +
 srcpkgs/qemu-system-aarch64          |   1 +
 srcpkgs/qemu-system-alpha            |   1 +
 srcpkgs/qemu-system-amd64            |   1 +
 srcpkgs/qemu-system-arm              |   1 +
 srcpkgs/qemu-system-avr              |   1 +
 srcpkgs/qemu-system-cris             |   1 +
 srcpkgs/qemu-system-hppa             |   1 +
 srcpkgs/qemu-system-i386             |   1 +
 srcpkgs/qemu-system-loongarch64      |   1 +
 srcpkgs/qemu-system-m68k             |   1 +
 srcpkgs/qemu-system-microblaze       |   1 +
 srcpkgs/qemu-system-microblazeel     |   1 +
 srcpkgs/qemu-system-mips             |   1 +
 srcpkgs/qemu-system-mips64           |   1 +
 srcpkgs/qemu-system-mips64el         |   1 +
 srcpkgs/qemu-system-mipsel           |   1 +
 srcpkgs/qemu-system-or1k             |   1 +
 srcpkgs/qemu-system-ppc              |   1 +
 srcpkgs/qemu-system-ppc64            |   1 +
 srcpkgs/qemu-system-riscv32          |   1 +
 srcpkgs/qemu-system-riscv64          |   1 +
 srcpkgs/qemu-system-rx               |   1 +
 srcpkgs/qemu-system-s390x            |   1 +
 srcpkgs/qemu-system-sh4              |   1 +
 srcpkgs/qemu-system-sh4eb            |   1 +
 srcpkgs/qemu-system-sparc            |   1 +
 srcpkgs/qemu-system-sparc64          |   1 +
 srcpkgs/qemu-system-tricore          |   1 +
 srcpkgs/qemu-system-xtensa           |   1 +
 srcpkgs/qemu-system-xtensaeb         |   1 +
 srcpkgs/qemu-tools                   |   1 +
 srcpkgs/qemu/files/README.voidlinux  |   8 --
 srcpkgs/qemu/patches/musl-mmap.patch |  33 -----
 srcpkgs/qemu/template                | 203 +++++++++++++++++++++++----
 38 files changed, 212 insertions(+), 67 deletions(-)
 create mode 120000 srcpkgs/qemu-common
 create mode 120000 srcpkgs/qemu-doc
 create mode 120000 srcpkgs/qemu-firmware
 create mode 120000 srcpkgs/qemu-img
 create mode 120000 srcpkgs/qemu-system-aarch64
 create mode 120000 srcpkgs/qemu-system-alpha
 create mode 120000 srcpkgs/qemu-system-amd64
 create mode 120000 srcpkgs/qemu-system-arm
 create mode 120000 srcpkgs/qemu-system-avr
 create mode 120000 srcpkgs/qemu-system-cris
 create mode 120000 srcpkgs/qemu-system-hppa
 create mode 120000 srcpkgs/qemu-system-i386
 create mode 120000 srcpkgs/qemu-system-loongarch64
 create mode 120000 srcpkgs/qemu-system-m68k
 create mode 120000 srcpkgs/qemu-system-microblaze
 create mode 120000 srcpkgs/qemu-system-microblazeel
 create mode 120000 srcpkgs/qemu-system-mips
 create mode 120000 srcpkgs/qemu-system-mips64
 create mode 120000 srcpkgs/qemu-system-mips64el
 create mode 120000 srcpkgs/qemu-system-mipsel
 create mode 120000 srcpkgs/qemu-system-or1k
 create mode 120000 srcpkgs/qemu-system-ppc
 create mode 120000 srcpkgs/qemu-system-ppc64
 create mode 120000 srcpkgs/qemu-system-riscv32
 create mode 120000 srcpkgs/qemu-system-riscv64
 create mode 120000 srcpkgs/qemu-system-rx
 create mode 120000 srcpkgs/qemu-system-s390x
 create mode 120000 srcpkgs/qemu-system-sh4
 create mode 120000 srcpkgs/qemu-system-sh4eb
 create mode 120000 srcpkgs/qemu-system-sparc
 create mode 120000 srcpkgs/qemu-system-sparc64
 create mode 120000 srcpkgs/qemu-system-tricore
 create mode 120000 srcpkgs/qemu-system-xtensa
 create mode 120000 srcpkgs/qemu-system-xtensaeb
 create mode 120000 srcpkgs/qemu-tools
 delete mode 100644 srcpkgs/qemu/files/README.voidlinux
 delete mode 100644 srcpkgs/qemu/patches/musl-mmap.patch

diff --git a/srcpkgs/qemu-common b/srcpkgs/qemu-common
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-common
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-doc b/srcpkgs/qemu-doc
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-doc
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-firmware b/srcpkgs/qemu-firmware
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-firmware
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-img b/srcpkgs/qemu-img
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-img
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-aarch64 b/srcpkgs/qemu-system-aarch64
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-aarch64
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-alpha b/srcpkgs/qemu-system-alpha
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-alpha
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-amd64 b/srcpkgs/qemu-system-amd64
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-amd64
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-arm b/srcpkgs/qemu-system-arm
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-arm
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-avr b/srcpkgs/qemu-system-avr
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-avr
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-cris b/srcpkgs/qemu-system-cris
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-cris
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-hppa b/srcpkgs/qemu-system-hppa
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-hppa
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-i386 b/srcpkgs/qemu-system-i386
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-i386
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-loongarch64 b/srcpkgs/qemu-system-loongarch64
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-loongarch64
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-m68k b/srcpkgs/qemu-system-m68k
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-m68k
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-microblaze b/srcpkgs/qemu-system-microblaze
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-microblaze
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-microblazeel b/srcpkgs/qemu-system-microblazeel
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-microblazeel
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-mips b/srcpkgs/qemu-system-mips
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-mips
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-mips64 b/srcpkgs/qemu-system-mips64
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-mips64
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-mips64el b/srcpkgs/qemu-system-mips64el
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-mips64el
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-mipsel b/srcpkgs/qemu-system-mipsel
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-mipsel
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-or1k b/srcpkgs/qemu-system-or1k
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-or1k
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-ppc b/srcpkgs/qemu-system-ppc
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-ppc
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-ppc64 b/srcpkgs/qemu-system-ppc64
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-ppc64
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-riscv32 b/srcpkgs/qemu-system-riscv32
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-riscv32
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-riscv64 b/srcpkgs/qemu-system-riscv64
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-riscv64
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-rx b/srcpkgs/qemu-system-rx
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-rx
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-s390x b/srcpkgs/qemu-system-s390x
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-s390x
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-sh4 b/srcpkgs/qemu-system-sh4
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-sh4
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-sh4eb b/srcpkgs/qemu-system-sh4eb
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-sh4eb
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-sparc b/srcpkgs/qemu-system-sparc
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-sparc
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-sparc64 b/srcpkgs/qemu-system-sparc64
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-sparc64
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-tricore b/srcpkgs/qemu-system-tricore
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-tricore
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-xtensa b/srcpkgs/qemu-system-xtensa
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-xtensa
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-system-xtensaeb b/srcpkgs/qemu-system-xtensaeb
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-system-xtensaeb
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu-tools b/srcpkgs/qemu-tools
new file mode 120000
index 00000000000000..d3d421aa08c50d
--- /dev/null
+++ b/srcpkgs/qemu-tools
@@ -0,0 +1 @@
+qemu
\ No newline at end of file
diff --git a/srcpkgs/qemu/files/README.voidlinux b/srcpkgs/qemu/files/README.voidlinux
deleted file mode 100644
index 7d61d82bca4e3c..00000000000000
--- a/srcpkgs/qemu/files/README.voidlinux
+++ /dev/null
@@ -1,8 +0,0 @@
-To enable KVM your user must be added to the 'kvm' group:
-
-	$ usermod -aG kvm <username>
-
-Don't forget to load the appropiate KVM module for your CPU (x86 only):
-
-	$ modprobe kvm-amd # for AMD CPUs
-	$ modprobe kvm-intel # for Intel CPUs
diff --git a/srcpkgs/qemu/patches/musl-mmap.patch b/srcpkgs/qemu/patches/musl-mmap.patch
deleted file mode 100644
index 2909f0a896d5c5..00000000000000
--- a/srcpkgs/qemu/patches/musl-mmap.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-source: https://gitlab.com/qemu-project/qemu/-/issues/2353
-
-diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index be3b9a6..dad29ef 100644
---- a/linux-user/mmap.c
-+++ b/linux-user/mmap.c
-@@ -559,7 +559,7 @@ static abi_long mmap_h_eq_g(abi_ulong start, abi_ulong len,
-                             int host_prot, int flags, int page_flags,
-                             int fd, off_t offset)
- {
--    void *p, *want_p = g2h_untagged(start);
-+    void *p, *want_p = start ? g2h_untagged(start) : 0;
-     abi_ulong last;
- 
-     p = mmap(want_p, len, host_prot, flags, fd, offset);
-@@ -609,7 +609,7 @@ static abi_long mmap_h_lt_g(abi_ulong start, abi_ulong len, int host_prot,
-                             int mmap_flags, int page_flags, int fd,
-                             off_t offset, int host_page_size)
- {
--    void *p, *want_p = g2h_untagged(start);
-+    void *p, *want_p = start ? g2h_untagged(start) : 0;
-     off_t fileend_adj = 0;
-     int flags = mmap_flags;
-     abi_ulong last, pass_last;
-@@ -739,7 +739,7 @@ static abi_long mmap_h_gt_g(abi_ulong start, abi_ulong len,
-                             int flags, int page_flags, int fd,
-                             off_t offset, int host_page_size)
- {
--    void *p, *want_p = g2h_untagged(start);
-+    void *p, *want_p = start ? g2h_untagged(start) : 0;
-     off_t host_offset = offset & -host_page_size;
-     abi_ulong last, real_start, real_last;
-     bool misaligned_offset = false;
diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template
index 29b410164f3a95..12f1a83f69281d 100644
--- a/srcpkgs/qemu/template
+++ b/srcpkgs/qemu/template
@@ -1,38 +1,32 @@
 # Template file for 'qemu'
-# This package should be updated together with qemu-user-static
+# This package should be updated together with qemu-user
 pkgname=qemu
-version=9.0.2
+version=9.1.0
 revision=1
-build_style=configure
-configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --localstatedir=/var
- --disable-glusterfs --disable-xen --enable-docs --enable-kvm --enable-libusb --enable-pie
- --enable-snappy --enable-tpm --enable-usb-redir --enable-vhost-net --enable-virtfs --enable-png
- --audio-drv-list=alsa$(vopt_if sdl2 ,sdl)$(vopt_if jack ,jack)$(vopt_if pulseaudio ,pa)
- $(vopt_enable opengl) $(vopt_enable pulseaudio pa) $(vopt_enable sdl2 sdl) $(vopt_enable smartcard)
- $(vopt_enable spice) $(vopt_enable virgl virglrenderer) $(vopt_if gtk3 '--enable-gtk')"
-hostmakedepends="flex glib-devel gettext pkg-config perl python3 python3-Sphinx python3-sphinx_rtd_theme ninja"
+build_style=meta
+configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
+ --localstatedir=/var --enable-pie --disable-user
+ -Dglusterfs=disabled -Dxen=disabled -Ddocs=enabled -Dlibusb=enabled -Dsnappy=enabled
+ -Dtpm=enabled -Dusb_redir=enabled -Dvhost_net=enabled -Dvirtfs=enabled -Dpng=enabled
+ -Daudio_drv_list=alsa,sdl,jack,pa -Dopengl=enabled -Dpa=enabled -Dsdl=enabled
+ -Dsmartcard=enabled -Dspice=enabled -Dvirglrenderer=enabled -Dgtk=enabled"
+hostmakedepends="meson flex glib-devel gettext pkg-config perl python3-sphinx_rtd_theme"
 makedepends="capstone-devel dtc-devel libpng-devel libjpeg-turbo-devel pixman-devel
  snappy-devel libuuid-devel libX11-devel alsa-lib-devel libaio-devel gnutls-devel
  libsasl-devel ncurses-devel libseccomp-devel nss-devel
  libcurl-devel xfsprogs-devel libcap-ng-devel vde2-devel usbredir-devel
  libbluetooth-devel libssh2-devel libusb-devel libnfs-devel libslirp-devel
- libxkbcommon-devel libzstd-devel $(vopt_if sdl2 'SDL2-devel SDL2_image-devel')
- $(vopt_if gtk3 'gtk+3-devel vte3-devel')
- $(vopt_if spice 'spice-devel pcsclite-devel') $(vopt_if virgl virglrenderer-devel)
- $(vopt_if opengl 'libepoxy-devel libdrm-devel MesaLib-devel')
- $(vopt_if iscsi 'libiscsi-devel')
- $(vopt_if smartcard libcacard-devel) $(vopt_if numa 'libnuma-devel')
- $(vopt_if jack 'jack-devel') $(vopt_if pulseaudio 'pulseaudio-devel')"
-short_desc="Open Source Processor Emulator"
+ libxkbcommon-devel libzstd-devel SDL2-devel SDL2_image-devel gtk+3-devel
+ vte3-devel spice-devel pcsclite-devel virglrenderer-devel libepoxy-devel
+ libdrm-devel MesaLib-devel libiscsi-devel libcacard-devel libnuma-devel
+ jack-devel pulseaudio-devel"
+short_desc="Open source processor emulator"
 maintainer="classabbyamp <void@placeviolette.net>"
 license="GPL-2.0-only, LGPL-2.1-only"
 homepage="https://www.qemu.org"
 distfiles="https://wiki.qemu.org/download/qemu-${version}.tar.bz2"
-checksum=6fef38a497ff65f8d45c611b12ed5f5bb3e19ea6d76bfaea6857bf6fd76701e6
+checksum=a61859004b531189f28245edaf4ce7fd96402594a33c67f27bf0383fb6e83cb3
 ignore_elf_dirs="/usr/share/qemu"
-nostrip_files="hppa-firmware.img hppa-firmware64.img openbios-ppc
- openbios-sparc32 openbios-sparc64 palcode-clipper s390-ccw.img
- s390-netboot.img u-boot.e500"
 
 build_options="gtk3 iscsi jack numa opengl pulseaudio sdl2 smartcard spice virgl"
 build_options_default="gtk3 iscsi jack numa opengl pulseaudio sdl2 smartcard spice virgl"
@@ -43,23 +37,180 @@ desc_option_smartcard="Enable smartcard support"
 desc_option_numa="Enable support for host NUMA"
 desc_option_iscsi="Enable support for iSCSI"
 
+subpackages="qemu-ga qemu-img qemu-tools qemu-firmware qemu-doc"
+depends="qemu-img>=${version}_${revision} qemu-tools>=${version}_${revision}
+ qemu-firmware>=${version}_${revision} qemu-doc>=${version}_${revision}
+ qemu-user>=${version}"
+
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" --cross-prefix=${XBPS_CROSS_TRIPLET}-"
 fi
 
-post_install() {
-	vdoc "${FILESDIR}/README.voidlinux"
+_archs=(
+ aarch64
+ alpha
+ arm
+ avr
+ cris
+ hppa
+ i386
+ loongarch64
+ m68k
+ microblaze
+ microblazeel
+ mips
+ mips64
+ mips64el
+ mipsel
+ or1k
+ ppc
+ ppc64
+ riscv32
+ riscv64
+ rx
+ s390x
+ sh4
+ sh4eb
+ sparc
+ sparc64
+ tricore
+ x86_64
+ xtensa
+ xtensaeb
+)
+
+for _arch in "${_archs[@]}"; do
+	# bug in xbps: it hates package names ending in _N
+	_pkgname="qemu-system-${_arch//x86_64/amd64}"
+
+	subpackages+=" ${_pkgname}"
+	depends+=" ${_pkgname}>=${version}_${revision}"
+
+	case "$_arch" in
+	aarch64)
+		_depends="qemu-firmware>=${version}_${revision}"
+		;;
+	alpha)
+		_extras="palcode-clipper"
+		;;
+	arm)
+		_depends="qemu-firmware>=${version}_${revision}"
+		_extras="npcm7xx_bootrom.bin"
+		;;
+	hppa)
+		_extras="hppa-firmware.img hppa-firmware64.img"
+		;;
+	i386)
+		_depends="qemu-firmware>=${version}_${revision}"
+		;;
+	ppc)
+		_extras="openbios-ppc u-boot.e500 u-boot-sam460-20100605.bin"
+		;;
+	riscv32)
+		_extras="opensbi-riscv32-generic-fw_dynamic.bin"
+		;;
+	riscv64)
+		_extras="opensbi-riscv64-generic-fw_dynamic.bin"
+		;;
+	s390x)
+		_extras="s390-ccw.img s390-netboot.img"
+		;;
+	sparc)
+		_extras="openbios-sparc32"
+		;;
+	sparc64)
+		_extras="openbios-sparc64"
+		;;
+	x86_64)
+		_depends="qemu-firmware>=${version}_${revision}"
+		;;
+	esac
 
+	eval "${_pkgname}_package() {
+		_sys_tmpl '$_arch' '$_depends' '$_extras'
+	}"
+	unset _depends _extras
+done
+
+subpackages+=" qemu-common"
+
+. /void-packages/common/build-style/configure.sh
+
+_sys_tmpl() {
+	_arch="$1"
+	_depends="$2"
+	_extras="$3"
+	depends="qemu-common>=${version}_${revision} ${_depends}"
+	short_desc+=" - ${_arch} system emulator"
+	nostrip_files="${_extras}"
+	ignore_elf_dirs="/usr/share/qemu"
+	pkg_install() {
+		vmove "usr/bin/qemu-system-$_arch"
+		for f in $_extras; do
+			vmove "usr/share/qemu/$f"
+		done
+	}
+}
+
+post_install() {
 	# qemu-bridge-helper must be setuid for non privileged users.
 	chmod u+s ${DESTDIR}/usr/libexec/qemu-bridge-helper
-
 	vsv qemu-ga
 }
 
+qemu-common_package() {
+	short_desc+=" - common files"
+	pkg_install() {
+		vmove usr/share
+		vmove usr/include
+		vmove usr/libexec
+	}
+}
+
 qemu-ga_package() {
-	short_desc="QEMU Guest Agent"
+	short_desc+=" - guest agent"
 	pkg_install() {
 		vmove usr/bin/qemu-ga
 		vmove etc/sv/qemu-ga
+		vmove usr/share/man/man7/qemu-ga-ref.7
+		vmove usr/share/man/man8/qemu-ga.8
+	}
+}
+
+qemu-img_package() {
+	short_desc+=" - tools for manipulating disk images"
+	pkg_install() {
+		for bin in qemu-{img,io,nbd,storage-daemon}; do
+			vmove "usr/bin/$bin"
+		done
+		vmove usr/share/man/man1/qemu-img.1
+		vmove usr/share/man/man1/qemu-storage-daemon.1
+		vmove usr/share/man/man7/qemu-storage-daemon-qmp-ref.7
+		vmove usr/share/man/man8/qemu-nbd.8
+	}
+}
+
+qemu-tools_package() {
+	short_desc+=" - support tools"
+	pkg_install() {
+		for bin in qemu-{edid,keymap,pr-helper,vmsr-helper} elf2dmp; do
+			vmove "usr/bin/$bin"
+		done
+		vmove usr/share/man/man8/qemu-pr-helper.8
+	}
+}
+
+qemu-firmware_package() {
+	short_desc+=" - EDK2 firmware files"
+	pkg_install() {
+		vmove usr/share/qemu/firmware
+		vmove "usr/share/qemu/edk2-*"
+	}
+}
+
+qemu-doc_package() {
+	short_desc+=" - documentation"
+	pkg_install() {
+		vmove usr/share/doc
 	}
 }

From bd3e4cfbc3b2e57293e40679d6962d1a594f0767 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 12 Aug 2024 19:59:56 -0400
Subject: [PATCH 2/4] qemu-user-static: update to 9.1.0, split emulators,
 rename to qemu-user

---
 srcpkgs/qemu-user-aarch64                     |   1 +
 srcpkgs/qemu-user-aarch64_be                  |   1 +
 srcpkgs/qemu-user-alpha                       |   1 +
 srcpkgs/qemu-user-amd64                       |   1 +
 srcpkgs/qemu-user-arm                         |   1 +
 srcpkgs/qemu-user-armeb                       |   1 +
 srcpkgs/qemu-user-cris                        |   1 +
 srcpkgs/qemu-user-hexagon                     |   1 +
 srcpkgs/qemu-user-hppa                        |   1 +
 srcpkgs/qemu-user-i386                        |   1 +
 srcpkgs/qemu-user-loongarch64                 |   1 +
 srcpkgs/qemu-user-m68k                        |   1 +
 srcpkgs/qemu-user-microblaze                  |   1 +
 srcpkgs/qemu-user-microblazeel                |   1 +
 srcpkgs/qemu-user-mips                        |   1 +
 srcpkgs/qemu-user-mips64                      |   1 +
 srcpkgs/qemu-user-mips64el                    |   1 +
 srcpkgs/qemu-user-mipsel                      |   1 +
 srcpkgs/qemu-user-mipsn32                     |   1 +
 srcpkgs/qemu-user-mipsn32el                   |   1 +
 srcpkgs/qemu-user-or1k                        |   1 +
 srcpkgs/qemu-user-ppc                         |   1 +
 srcpkgs/qemu-user-ppc64                       |   1 +
 srcpkgs/qemu-user-ppc64le                     |   1 +
 srcpkgs/qemu-user-riscv32                     |   1 +
 srcpkgs/qemu-user-riscv64                     |   1 +
 srcpkgs/qemu-user-s390x                       |   1 +
 srcpkgs/qemu-user-sh4                         |   1 +
 srcpkgs/qemu-user-sh4eb                       |   1 +
 srcpkgs/qemu-user-sparc                       |   1 +
 srcpkgs/qemu-user-sparc32plus                 |   1 +
 srcpkgs/qemu-user-sparc64                     |   1 +
 srcpkgs/qemu-user-static                      |   1 +
 srcpkgs/qemu-user-static/template             |  41 -------
 srcpkgs/qemu-user-xtensa                      |   1 +
 srcpkgs/qemu-user-xtensaeb                    |   1 +
 .../{qemu-user-static => qemu-user}/patches   |   0
 srcpkgs/qemu-user/template                    | 104 ++++++++++++++++++
 .../{qemu-user-static => qemu-user}/update    |   0
 39 files changed, 139 insertions(+), 41 deletions(-)
 create mode 120000 srcpkgs/qemu-user-aarch64
 create mode 120000 srcpkgs/qemu-user-aarch64_be
 create mode 120000 srcpkgs/qemu-user-alpha
 create mode 120000 srcpkgs/qemu-user-amd64
 create mode 120000 srcpkgs/qemu-user-arm
 create mode 120000 srcpkgs/qemu-user-armeb
 create mode 120000 srcpkgs/qemu-user-cris
 create mode 120000 srcpkgs/qemu-user-hexagon
 create mode 120000 srcpkgs/qemu-user-hppa
 create mode 120000 srcpkgs/qemu-user-i386
 create mode 120000 srcpkgs/qemu-user-loongarch64
 create mode 120000 srcpkgs/qemu-user-m68k
 create mode 120000 srcpkgs/qemu-user-microblaze
 create mode 120000 srcpkgs/qemu-user-microblazeel
 create mode 120000 srcpkgs/qemu-user-mips
 create mode 120000 srcpkgs/qemu-user-mips64
 create mode 120000 srcpkgs/qemu-user-mips64el
 create mode 120000 srcpkgs/qemu-user-mipsel
 create mode 120000 srcpkgs/qemu-user-mipsn32
 create mode 120000 srcpkgs/qemu-user-mipsn32el
 create mode 120000 srcpkgs/qemu-user-or1k
 create mode 120000 srcpkgs/qemu-user-ppc
 create mode 120000 srcpkgs/qemu-user-ppc64
 create mode 120000 srcpkgs/qemu-user-ppc64le
 create mode 120000 srcpkgs/qemu-user-riscv32
 create mode 120000 srcpkgs/qemu-user-riscv64
 create mode 120000 srcpkgs/qemu-user-s390x
 create mode 120000 srcpkgs/qemu-user-sh4
 create mode 120000 srcpkgs/qemu-user-sh4eb
 create mode 120000 srcpkgs/qemu-user-sparc
 create mode 120000 srcpkgs/qemu-user-sparc32plus
 create mode 120000 srcpkgs/qemu-user-sparc64
 create mode 120000 srcpkgs/qemu-user-static
 delete mode 100644 srcpkgs/qemu-user-static/template
 create mode 120000 srcpkgs/qemu-user-xtensa
 create mode 120000 srcpkgs/qemu-user-xtensaeb
 rename srcpkgs/{qemu-user-static => qemu-user}/patches (100%)
 create mode 100644 srcpkgs/qemu-user/template
 rename srcpkgs/{qemu-user-static => qemu-user}/update (100%)

diff --git a/srcpkgs/qemu-user-aarch64 b/srcpkgs/qemu-user-aarch64
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-aarch64
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-aarch64_be b/srcpkgs/qemu-user-aarch64_be
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-aarch64_be
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-alpha b/srcpkgs/qemu-user-alpha
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-alpha
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-amd64 b/srcpkgs/qemu-user-amd64
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-amd64
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-arm b/srcpkgs/qemu-user-arm
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-arm
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-armeb b/srcpkgs/qemu-user-armeb
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-armeb
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-cris b/srcpkgs/qemu-user-cris
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-cris
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-hexagon b/srcpkgs/qemu-user-hexagon
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-hexagon
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-hppa b/srcpkgs/qemu-user-hppa
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-hppa
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-i386 b/srcpkgs/qemu-user-i386
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-i386
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-loongarch64 b/srcpkgs/qemu-user-loongarch64
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-loongarch64
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-m68k b/srcpkgs/qemu-user-m68k
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-m68k
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-microblaze b/srcpkgs/qemu-user-microblaze
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-microblaze
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-microblazeel b/srcpkgs/qemu-user-microblazeel
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-microblazeel
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-mips b/srcpkgs/qemu-user-mips
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-mips
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-mips64 b/srcpkgs/qemu-user-mips64
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-mips64
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-mips64el b/srcpkgs/qemu-user-mips64el
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-mips64el
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-mipsel b/srcpkgs/qemu-user-mipsel
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-mipsel
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-mipsn32 b/srcpkgs/qemu-user-mipsn32
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-mipsn32
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-mipsn32el b/srcpkgs/qemu-user-mipsn32el
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-mipsn32el
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-or1k b/srcpkgs/qemu-user-or1k
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-or1k
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-ppc b/srcpkgs/qemu-user-ppc
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-ppc
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-ppc64 b/srcpkgs/qemu-user-ppc64
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-ppc64
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-ppc64le b/srcpkgs/qemu-user-ppc64le
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-ppc64le
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-riscv32 b/srcpkgs/qemu-user-riscv32
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-riscv32
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-riscv64 b/srcpkgs/qemu-user-riscv64
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-riscv64
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-s390x b/srcpkgs/qemu-user-s390x
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-s390x
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-sh4 b/srcpkgs/qemu-user-sh4
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-sh4
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-sh4eb b/srcpkgs/qemu-user-sh4eb
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-sh4eb
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-sparc b/srcpkgs/qemu-user-sparc
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-sparc
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-sparc32plus b/srcpkgs/qemu-user-sparc32plus
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-sparc32plus
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-sparc64 b/srcpkgs/qemu-user-sparc64
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-sparc64
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-static b/srcpkgs/qemu-user-static
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-static
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-static/template b/srcpkgs/qemu-user-static/template
deleted file mode 100644
index 8a365a19c14c7f..00000000000000
--- a/srcpkgs/qemu-user-static/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'qemu-user-static'
-# This package should be updated together with qemu
-pkgname=qemu-user-static
-version=9.0.2
-revision=2
-build_style=configure
-configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
- --disable-kvm --disable-png --disable-virtfs --disable-fdt --disable-seccomp
- --enable-linux-user --disable-system --static --disable-pie"
-hostmakedepends="flex glib-devel pkg-config perl python3 ninja"
-makedepends="dtc-devel glib-devel pixman-devel libuuid-devel"
-short_desc="QEMU User-mode emulators (statically compiled)"
-maintainer="classabbyamp <void@placeviolette.net>"
-license="GPL-2.0-only, LGPL-2.1-only"
-homepage="https://www.qemu.org"
-distfiles="https://wiki.qemu.org/download/qemu-${version}.tar.bz2"
-checksum=6fef38a497ff65f8d45c611b12ed5f5bb3e19ea6d76bfaea6857bf6fd76701e6
-
-if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --cross-prefix=${XBPS_CROSS_TRIPLET}-"
-fi
-
-post_install() {
-	# Remove unneeded stuff.
-	rm -rf ${DESTDIR}/etc ${DESTDIR}/usr/share ${DESTDIR}/usr/libexec
-	for f in nbd io img; do
-		rm -f ${DESTDIR}/usr/bin/qemu-${f}
-	done
-	for f in ${DESTDIR}/usr/bin/*; do
-		mv ${f} ${f}-static
-	done
-
-	vmkdir usr/share/binfmts
-	HOST_ARCH="${XBPS_TARGET_MACHINE%-musl}" scripts/qemu-binfmt-conf.sh --debian \
-		--exportdir "${DESTDIR}"/usr/share/binfmts --qemu-path /usr/bin \
-		--preserve-argv0 yes --persistent yes --credential yes
-	for bf in "${DESTDIR}"/usr/share/binfmts/*; do
-		vsed -i -e "s/${bf##*/}/&-static/g" "$bf"
-		mv "$bf" "${bf}-static"
-	done
-}
diff --git a/srcpkgs/qemu-user-xtensa b/srcpkgs/qemu-user-xtensa
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-xtensa
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-xtensaeb b/srcpkgs/qemu-user-xtensaeb
new file mode 120000
index 00000000000000..62973fbc0559e9
--- /dev/null
+++ b/srcpkgs/qemu-user-xtensaeb
@@ -0,0 +1 @@
+qemu-user
\ No newline at end of file
diff --git a/srcpkgs/qemu-user-static/patches b/srcpkgs/qemu-user/patches
similarity index 100%
rename from srcpkgs/qemu-user-static/patches
rename to srcpkgs/qemu-user/patches
diff --git a/srcpkgs/qemu-user/template b/srcpkgs/qemu-user/template
new file mode 100644
index 00000000000000..e66f3d629778aa
--- /dev/null
+++ b/srcpkgs/qemu-user/template
@@ -0,0 +1,104 @@
+# Template file for 'qemu-user'
+# This package should be updated together with qemu
+pkgname=qemu-user
+version=9.1.0
+revision=1
+build_style=meta
+configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
+ --enable-linux-user --disable-system
+ -Dkvm=disabled -Dpng=disabled -Dvirtfs=disabled -Dfdt=disabled -Dseccomp=disabled
+ -Dtools=disabled"
+hostmakedepends="meson flex glib-devel pkg-config perl"
+makedepends="dtc-devel glib-devel pixman-devel libuuid-devel"
+short_desc="QEMU user-mode emulators"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://www.qemu.org"
+distfiles="https://wiki.qemu.org/download/qemu-${version}.tar.bz2"
+checksum=a61859004b531189f28245edaf4ce7fd96402594a33c67f27bf0383fb6e83cb3
+subpackages="qemu-user-static"
+
+if [ "$CROSS_BUILD" ]; then
+	configure_args+=" --cross-prefix=${XBPS_CROSS_TRIPLET}-"
+fi
+
+_archs=(
+ aarch64
+ aarch64_be
+ alpha
+ arm
+ armeb
+ cris
+ hexagon
+ hppa
+ i386
+ loongarch64
+ m68k
+ microblaze
+ microblazeel
+ mips
+ mips64
+ mips64el
+ mipsel
+ mipsn32
+ mipsn32el
+ or1k
+ ppc
+ ppc64
+ ppc64le
+ riscv32
+ riscv64
+ s390x
+ sh4
+ sh4eb
+ sparc
+ sparc32plus
+ sparc64
+ x86_64
+ xtensa
+ xtensaeb
+)
+
+for _arch in "${_archs[@]}"; do
+	# bug in xbps: it hates package names ending in _N
+	_pkgname="qemu-user-${_arch//x86_64/amd64}"
+
+	subpackages+=" ${_pkgname}"
+	depends+=" ${_pkgname}>=${version}"
+
+	eval "${_pkgname}_package() {
+		_user_tmpl '$_arch'
+	}"
+done
+
+. /void-packages/common/build-style/configure.sh
+
+_user_tmpl() {
+	_arch="$1"
+	_binfmt="$2"
+	short_desc="QEMU ${_arch} user-mode emulator"
+	pkg_install() {
+		vmove "usr/bin/qemu-$_arch"
+		vmove "usr/bin/qemu-$_arch-static"
+		vmove "usr/share/binfmts/qemu-$_arch" || :
+	}
+}
+
+post_install() {
+	# provided by qemu
+	rm -rf ${DESTDIR}/etc ${DESTDIR}/usr/share ${DESTDIR}/usr/libexec ${DESTDIR}/usr/include
+	for f in ${DESTDIR}/usr/bin/*; do
+		ln -s ${f##*/} ${f}-static
+	done
+
+	vmkdir usr/share/binfmts
+	HOST_ARCH="${XBPS_TARGET_MACHINE%-musl}" scripts/qemu-binfmt-conf.sh --debian \
+		--exportdir "${DESTDIR}"/usr/share/binfmts --qemu-path /usr/bin \
+		--preserve-argv0 yes --persistent yes --credential yes
+}
+
+qemu-user-static_package() {
+	build_style=meta
+	short_desc+=" (transitional dummy package)"
+	depends="${sourcepkg}>=${version}_${revision}"
+}
diff --git a/srcpkgs/qemu-user-static/update b/srcpkgs/qemu-user/update
similarity index 100%
rename from srcpkgs/qemu-user-static/update
rename to srcpkgs/qemu-user/update

From 1e80c4e50721fe5710f8762c5776169a6c1e29c3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 12 Aug 2024 20:04:22 -0400
Subject: [PATCH 3/4] *: qemu-user-static -> qemu-user

---
 common/build-helper/gir.sh                       | 2 +-
 common/build-helper/qemu.sh                      | 4 ++--
 srcpkgs/aravis/template                          | 2 +-
 srcpkgs/glib-bootstrap/template                  | 2 +-
 srcpkgs/glib/template                            | 2 +-
 srcpkgs/gobject-introspection-bootstrap/template | 2 +-
 srcpkgs/gobject-introspection/template           | 2 +-
 srcpkgs/libgpg-error/template                    | 2 +-
 srcpkgs/libportal/template                       | 2 +-
 srcpkgs/php8.2/template                          | 2 +-
 srcpkgs/php8.3/template                          | 2 +-
 srcpkgs/umockdev/template                        | 2 +-
 xbps-src                                         | 2 +-
 13 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/common/build-helper/gir.sh b/common/build-helper/gir.sh
index 70699adb179732..e4ecd4f18af485 100644
--- a/common/build-helper/gir.sh
+++ b/common/build-helper/gir.sh
@@ -17,7 +17,7 @@ if [ "$build_option_gir" ] || [[ $build_options != *"gir"* ]]; then
 	if [ "$CROSS_BUILD" ]; then
 		# Required for running binaries produced from g-ir-compiler
 		# via g-ir-scanner-qemuwrapper
-		hostmakedepends+=" qemu-user-static"
+		hostmakedepends+=" qemu-user"
 
 		# Required for running the g-ir-scanner-lddwrapper
 		hostmakedepends+=" prelink-cross"
diff --git a/common/build-helper/qemu.sh b/common/build-helper/qemu.sh
index d6a4342f5e8ee3..f5c5658510102d 100644
--- a/common/build-helper/qemu.sh
+++ b/common/build-helper/qemu.sh
@@ -1,7 +1,7 @@
 if [ "$CROSS_BUILD" ]; then
 	export QEMU_LD_PREFIX=${XBPS_CROSS_BASE}
-	if [[ $hostmakedepends != *"qemu-user-static"* ]]; then
-		hostmakedepends+=" qemu-user-static"
+	if [[ $hostmakedepends != *"qemu-user"* ]]; then
+		hostmakedepends+=" qemu-user"
 	fi
 fi
 
diff --git a/srcpkgs/aravis/template b/srcpkgs/aravis/template
index cbcc7ea10d5ae7..33709983cc8bd7 100644
--- a/srcpkgs/aravis/template
+++ b/srcpkgs/aravis/template
@@ -18,7 +18,7 @@ checksum=d70b125666b23ca4c0f8986fa0786a3d2b9efb7a56b558b703083cdfaa793f4e
 make_check=ci-skip
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" glib-devel prelink-cross qemu-user-static"
+	hostmakedepends+=" glib-devel prelink-cross qemu-user"
 fi
 
 libaravis_package() {
diff --git a/srcpkgs/glib-bootstrap/template b/srcpkgs/glib-bootstrap/template
index 6693c4981387e8..62db4db27924f2 100644
--- a/srcpkgs/glib-bootstrap/template
+++ b/srcpkgs/glib-bootstrap/template
@@ -7,7 +7,7 @@ pkgname=glib-bootstrap
 version=2.80.3
 revision=1
 build_style=meson
-# static version is necessary for qemu-user-static;
+# static version is necessary for qemu-user
 # also disable LTO, otherwise there are multiple failures when linking qemu
 configure_args="-Dman=true -Dselinux=disabled
  --default-library=both -Db_lto=false -Dintrospection=disabled"
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index c3cf007b7d3677..548dc0f3d17557 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -5,7 +5,7 @@ version=2.80.3
 revision=1
 build_style=meson
 build_helper=qemu
-# static version is necessary for qemu-user-static;
+# static version is necessary for qemu-user
 # also disable LTO, otherwise there are multiple failures when linking qemu
 configure_args="-Dman=true -Dselinux=disabled -Dintrospection=enabled
  $(vopt_bool gtk_doc documentation) --default-library=both -Db_lto=false"
diff --git a/srcpkgs/gobject-introspection-bootstrap/template b/srcpkgs/gobject-introspection-bootstrap/template
index 8ca0cc1fcdf7ee..566d9e307c4ea9 100644
--- a/srcpkgs/gobject-introspection-bootstrap/template
+++ b/srcpkgs/gobject-introspection-bootstrap/template
@@ -27,7 +27,7 @@ conflicts="libgirepository libgirepository-devel gobject-introspection"
 noverifyrdeps=yes
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" gobject-introspection-bootstrap qemu-user-static prelink-cross"
+	hostmakedepends+=" gobject-introspection-bootstrap qemu-user prelink-cross"
 	configure_args+=" -Dgi_cross_use_prebuilt_gi=true
 	 -Dgi_cross_binary_wrapper=/usr/bin/g-ir-scanner-qemuwrapper
 	 -Dgi_cross_ldd_wrapper=/usr/bin/g-ir-scanner-lddwrapper
diff --git a/srcpkgs/gobject-introspection/template b/srcpkgs/gobject-introspection/template
index b4da5f12023f31..4a8810a95238fa 100644
--- a/srcpkgs/gobject-introspection/template
+++ b/srcpkgs/gobject-introspection/template
@@ -20,7 +20,7 @@ checksum=a1df7c424e15bda1ab639c00e9051b9adf5cea1a9e512f8a603b53cd199bc6d8
 python_version=3
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" gobject-introspection qemu-user-static prelink-cross"
+	hostmakedepends+=" gobject-introspection qemu-user prelink-cross"
 	configure_args+=" -Dgi_cross_use_prebuilt_gi=true
 	 -Dgi_cross_binary_wrapper=/usr/bin/g-ir-scanner-qemuwrapper
 	 -Dgi_cross_ldd_wrapper=/usr/bin/g-ir-scanner-lddwrapper
diff --git a/srcpkgs/libgpg-error/template b/srcpkgs/libgpg-error/template
index 57f80c5e2ab8df..3c76989aa855d5 100644
--- a/srcpkgs/libgpg-error/template
+++ b/srcpkgs/libgpg-error/template
@@ -12,7 +12,7 @@ distfiles="https://www.gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${version}.tar
 checksum=8b79d54639dbf4abc08b5406fb2f37e669a2dec091dd024fb87dd367131c63a9
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends="qemu-user-static"
+	hostmakedepends="qemu-user"
 fi
 
 post_install() {
diff --git a/srcpkgs/libportal/template b/srcpkgs/libportal/template
index c25d354e5afae0..bff7620ea3b7ac 100644
--- a/srcpkgs/libportal/template
+++ b/srcpkgs/libportal/template
@@ -22,7 +22,7 @@ build_options="gir gtk_doc"
 build_options_default="gir gtk_doc"
 
 if [ -n "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qemu-user-static prelink-cross"
+	hostmakedepends+=" qemu-user prelink-cross"
 fi
 
 libportal-devel_package() {
diff --git a/srcpkgs/php8.2/template b/srcpkgs/php8.2/template
index 50e6c851b1c2f5..fe9559e181f2c8 100644
--- a/srcpkgs/php8.2/template
+++ b/srcpkgs/php8.2/template
@@ -27,7 +27,7 @@ lib32disabled=yes
 
 if [ -n "$CROSS_BUILD" ]; then
 	# phar and pear need php to build
-	hostmakedepends+=" php${_php_version} qemu-user-static"
+	hostmakedepends+=" php${_php_version} qemu-user"
 	CFLAGS+=" -DHAVE_LIBDL
 		 -DHAVE_DLOPEN
 		 -DHAVE_DLSYM
diff --git a/srcpkgs/php8.3/template b/srcpkgs/php8.3/template
index f95ee61e305959..ede31751655581 100644
--- a/srcpkgs/php8.3/template
+++ b/srcpkgs/php8.3/template
@@ -27,7 +27,7 @@ lib32disabled=yes
 
 if [ -n "$CROSS_BUILD" ]; then
 	# phar and pear need php to build
-	hostmakedepends+=" php${_php_version} qemu-user-static"
+	hostmakedepends+=" php${_php_version} qemu-user"
 	CFLAGS+=" -DHAVE_LIBDL
 		 -DHAVE_DLOPEN
 		 -DHAVE_DLSYM
diff --git a/srcpkgs/umockdev/template b/srcpkgs/umockdev/template
index 7dc2f512695888..4dc52e13c94fa0 100644
--- a/srcpkgs/umockdev/template
+++ b/srcpkgs/umockdev/template
@@ -14,7 +14,7 @@ distfiles="https://github.com/martinpitt/umockdev/releases/download/${version}/u
 checksum=6c6ebf6e6209b6a49746e0d91a448d027b54271bab82ed70a132ecf294ca13cf
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" gobject-introspection qemu-user-static"
+	hostmakedepends+=" gobject-introspection qemu-user"
 fi
 
 umockdev-devel_package() {
diff --git a/xbps-src b/xbps-src
index f8c21b3b92738d..00e955fe8168b7 100755
--- a/xbps-src
+++ b/xbps-src
@@ -166,7 +166,7 @@ Options:
 
 -A <host>
     Use this host machine. Automatically creates masterdir-<host> if it doesn't
-    already exist. Some host machines may require qemu-user-static and
+    already exist. Some host machines may require qemu-user and
     binfmt-support if not natively supported by the processor. Supported hosts:
 
 $(print_cross_targets)

From e97be739948546198d16f80e9ff47591bcccb961 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 7 Sep 2024 21:59:38 -0400
Subject: [PATCH 4/4] gobject-introspection-bootstrap: rebuild for
 6f1df57a78fed63b136623adc2793a63abbe0a4d

---
 srcpkgs/gobject-introspection-bootstrap/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gobject-introspection-bootstrap/template b/srcpkgs/gobject-introspection-bootstrap/template
index 566d9e307c4ea9..1ac8bd90001ae3 100644
--- a/srcpkgs/gobject-introspection-bootstrap/template
+++ b/srcpkgs/gobject-introspection-bootstrap/template
@@ -5,7 +5,7 @@
 #   libgirepository-1.0 to libgirepository-2.0 migration.
 pkgname=gobject-introspection-bootstrap
 version=1.80.1
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dbuild_introspection_data=false"
 pycompile_dirs="usr/lib/gobject-introspection/giscanner"

  parent reply	other threads:[~2024-09-08  1:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13  1:35 [PR PATCH] [RFC] qemu: split classabbyamp
2024-08-14  9:40 ` [PR REVIEW] " classabbyamp
2024-08-14  9:40 ` classabbyamp
2024-08-14 18:37 ` [PR PATCH] [Updated] " classabbyamp
2024-08-14 18:50 ` classabbyamp
2024-08-15 12:23 ` classabbyamp
2024-08-19  5:53 ` classabbyamp
2024-08-19  9:01 ` classabbyamp
2024-08-23  3:54 ` classabbyamp
2024-09-05  6:07 ` [PR PATCH] [Updated] " classabbyamp
2024-09-07 11:27 ` [PR PATCH] [Updated] [RFC] qemu: update to 9.1.0, split classabbyamp
2024-09-08  1:59 ` classabbyamp [this message]
2024-09-08 13:27 ` classabbyamp
2024-09-08 23:40 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240908015958.BBA832C4F1@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).