From 04bb657872d51d0cf40669b2900195c066448c57 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 14 Jun 2025 17:45:02 -0400 Subject: [PATCH] qemu-user: move extra binfmts to the relevant package --- srcpkgs/qemu-user/template | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/srcpkgs/qemu-user/template b/srcpkgs/qemu-user/template index 56e96141b8f..c8f83fd9a94 100644 --- a/srcpkgs/qemu-user/template +++ b/srcpkgs/qemu-user/template @@ -73,8 +73,14 @@ for _arch in "${_archs[@]}"; do subpackages+=" ${_pkgname}" depends+=" ${_pkgname}>=${version}" + case "$_arch" in + i386) + _extra_binfmts="i486" + ;; + esac + eval "${_pkgname}_package() { - _user_tmpl '$_arch' + _user_tmpl '$_arch' '$_extra_binfmts' }" done @@ -82,12 +88,15 @@ export PYTHONUNBUFFERED=1 _user_tmpl() { _arch="$1" - _binfmt="$2" + _extra_binfmts="$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" || : + for bf in $_extra_binfmts; do + vmove "usr/share/binfmts/qemu-$bf" || : + done } }