qemu-user-static: fix binfmt generation on cross
This commit is contained in:
parent
44b4bc44cb
commit
00346cb2b4
|
@ -2,7 +2,7 @@
|
||||||
# This package should be updated together with qemu
|
# This package should be updated together with qemu
|
||||||
pkgname=qemu-user-static
|
pkgname=qemu-user-static
|
||||||
version=9.0.2
|
version=9.0.2
|
||||||
revision=1
|
revision=2
|
||||||
build_style=configure
|
build_style=configure
|
||||||
configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
|
configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
|
||||||
--disable-kvm --disable-png --disable-virtfs --disable-fdt --disable-seccomp
|
--disable-kvm --disable-png --disable-virtfs --disable-fdt --disable-seccomp
|
||||||
|
@ -28,6 +28,16 @@ case "$XBPS_TARGET_MACHINE" in
|
||||||
ppc64*) _omit+=(ppc) ;;
|
ppc64*) _omit+=(ppc) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
x86_64*|i686*) _host_arch="i386" ;;
|
||||||
|
mips*) _host_arch="mips" ;;
|
||||||
|
ppc*le) _host_arch="ppcle" ;;
|
||||||
|
ppc*) _host_arch="ppc" ;;
|
||||||
|
arm*|aarch64*) _host_arch="arm" ;;
|
||||||
|
riscv*) _host_arch="riscv" ;;
|
||||||
|
*) _host_arch="${XBPS_TARGET_MACHINE%-musl}" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
# Remove unneeded stuff.
|
# Remove unneeded stuff.
|
||||||
rm -rf ${DESTDIR}/etc ${DESTDIR}/usr/share ${DESTDIR}/usr/libexec
|
rm -rf ${DESTDIR}/etc ${DESTDIR}/usr/share ${DESTDIR}/usr/libexec
|
||||||
|
@ -39,7 +49,7 @@ post_install() {
|
||||||
done
|
done
|
||||||
|
|
||||||
vmkdir usr/share/binfmts
|
vmkdir usr/share/binfmts
|
||||||
scripts/qemu-binfmt-conf.sh --debian ALL --exportdir "${DESTDIR}"/usr/share/binfmts \
|
HOST_ARCH="$_host_arch" scripts/qemu-binfmt-conf.sh --debian --exportdir "${DESTDIR}"/usr/share/binfmts \
|
||||||
--qemu-path /usr/bin --preserve-argv0 yes --persistent yes --credential yes
|
--qemu-path /usr/bin --preserve-argv0 yes --persistent yes --credential yes
|
||||||
for bf in "${DESTDIR}"/usr/share/binfmts/*; do
|
for bf in "${DESTDIR}"/usr/share/binfmts/*; do
|
||||||
for ar in "${_omit[@]}"; do
|
for ar in "${_omit[@]}"; do
|
||||||
|
|
Loading…
Reference in New Issue