220 lines
5.4 KiB
Bash
220 lines
5.4 KiB
Bash
# Template file for 'qemu'
|
|
# This package should be updated together with qemu-user
|
|
pkgname=qemu
|
|
version=9.1.0
|
|
revision=1
|
|
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 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=a61859004b531189f28245edaf4ce7fd96402594a33c67f27bf0383fb6e83cb3
|
|
ignore_elf_dirs="/usr/share/qemu"
|
|
|
|
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"
|
|
desc_option_sdl2="Enable SDL (2.x) video output"
|
|
desc_option_spice="Enable support for SPICE"
|
|
desc_option_virgl="Enable support for VirGL (A Virtual 3D GPU renderer)"
|
|
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
|
|
|
|
_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+=" - 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} elf2dmp; do
|
|
vmove "usr/bin/$bin"
|
|
done
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
vmove "usr/bin/qemu-vmsr-helper"
|
|
fi
|
|
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
|
|
}
|
|
}
|