Skip to content

Commit

Permalink
qemu-user-static: update to 9.1.0, split emulators, rename to qemu-user
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed Sep 8, 2024
1 parent 7c2c822 commit ec662ff
Show file tree
Hide file tree
Showing 39 changed files with 139 additions and 41 deletions.
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-aarch64
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-aarch64_be
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-alpha
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-amd64
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-arm
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-armeb
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-cris
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-hexagon
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-hppa
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-i386
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-loongarch64
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-m68k
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-microblaze
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-microblazeel
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-mips
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-mips64
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-mips64el
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-mipsel
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-mipsn32
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-mipsn32el
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-or1k
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-ppc
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-ppc64
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-ppc64le
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-riscv32
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-riscv64
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-s390x
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-sh4
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-sh4eb
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-sparc
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-sparc32plus
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-sparc64
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-static
41 changes: 0 additions & 41 deletions srcpkgs/qemu-user-static/template

This file was deleted.

1 change: 1 addition & 0 deletions srcpkgs/qemu-user-xtensa
1 change: 1 addition & 0 deletions srcpkgs/qemu-user-xtensaeb
File renamed without changes.
104 changes: 104 additions & 0 deletions srcpkgs/qemu-user/template
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
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}"
}
File renamed without changes.

0 comments on commit ec662ff

Please sign in to comment.