2020-01-14 13:50:13 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.qemu.org
|
|
|
|
TERMUX_PKG_DESCRIPTION="A generic and open source machine emulator and virtualizer"
|
2022-03-20 16:40:41 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2022-01-31 19:27:06 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-04-21 10:43:16 +02:00
|
|
|
TERMUX_PKG_VERSION=1:7.0.0
|
2020-12-11 14:37:06 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://download.qemu.org/qemu-${TERMUX_PKG_VERSION:2}.tar.xz
|
2022-04-21 10:43:16 +02:00
|
|
|
TERMUX_PKG_SHA256=f6b375c7951f728402798b0baabb2d86478ca53d44cedbefabbe1c46bf46f839
|
2021-10-08 11:35:08 +02:00
|
|
|
TERMUX_PKG_DEPENDS="glib, gtk3, libbz2, libc++, libcurl, libgnutls, libiconv, libjpeg-turbo, liblzo, libnettle, libnfs, libpixman, libpng, libspice-server, libssh, libusb, libusbredir, libx11, ncurses, pulseaudio, qemu-common, resolv-conf, sdl2, sdl2-image, zlib, zstd"
|
2021-08-26 11:06:04 +02:00
|
|
|
|
|
|
|
# Required by configuration script, but I can't find any binary that uses it.
|
|
|
|
TERMUX_PKG_BUILD_DEPENDS="libtasn1"
|
2020-01-14 13:50:13 +01:00
|
|
|
|
|
|
|
# Remove files already present in qemu-utils and qemu-common.
|
|
|
|
TERMUX_PKG_RM_AFTER_INSTALL="
|
|
|
|
bin/elf2dmp
|
|
|
|
bin/qemu-edid
|
|
|
|
bin/qemu-img
|
|
|
|
bin/qemu-io
|
|
|
|
bin/qemu-nbd
|
|
|
|
bin/qemu-pr-helper
|
2020-12-11 14:37:06 +01:00
|
|
|
bin/qemu-storage-daemon
|
2021-11-13 10:40:39 +01:00
|
|
|
include/*
|
2020-12-11 14:37:06 +01:00
|
|
|
libexec/virtfs-proxy-helper
|
2020-01-14 13:50:13 +01:00
|
|
|
libexec/qemu-bridge-helper
|
|
|
|
share/applications
|
|
|
|
share/icons
|
|
|
|
share/doc
|
|
|
|
share/man/man1/qemu.1*
|
|
|
|
share/man/man1/qemu-img.1*
|
|
|
|
share/man/man1/virtfs-proxy-helper.1*
|
|
|
|
share/man/man7
|
2020-12-11 14:37:06 +01:00
|
|
|
share/man/man8/qemu-ga.8*
|
2020-01-14 13:50:13 +01:00
|
|
|
share/man/man8/qemu-nbd.8*
|
2020-12-11 14:37:06 +01:00
|
|
|
share/man/man8/qemu-pr-helper.8*
|
2020-01-14 13:50:13 +01:00
|
|
|
share/qemu
|
|
|
|
"
|
|
|
|
|
2021-08-26 11:06:04 +02:00
|
|
|
TERMUX_PKG_CONFLICTS="qemu-system-x86_64, qemu-system-x86_64-headless, qemu-system-x86-64-headless"
|
|
|
|
TERMUX_PKG_REPLACES="qemu-system-x86_64, qemu-system-x86_64-headless, qemu-system-x86-64-headless"
|
|
|
|
TERMUX_PKG_PROVIDES="qemu-system-x86_64"
|
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
2020-01-14 13:50:13 +01:00
|
|
|
termux_step_configure() {
|
2020-12-11 14:37:06 +01:00
|
|
|
termux_setup_ninja
|
|
|
|
|
2020-12-11 14:56:28 +01:00
|
|
|
if [ "$TERMUX_ARCH" = "i686" ]; then
|
|
|
|
LDFLAGS+=" -latomic"
|
|
|
|
fi
|
|
|
|
|
2020-01-14 13:50:13 +01:00
|
|
|
local QEMU_TARGETS=""
|
|
|
|
|
|
|
|
# System emulation.
|
|
|
|
QEMU_TARGETS+="aarch64-softmmu,"
|
|
|
|
QEMU_TARGETS+="arm-softmmu,"
|
|
|
|
QEMU_TARGETS+="i386-softmmu,"
|
2021-08-26 11:06:04 +02:00
|
|
|
QEMU_TARGETS+="ppc64-softmmu,"
|
|
|
|
QEMU_TARGETS+="ppc-softmmu,"
|
2020-01-14 13:50:13 +01:00
|
|
|
QEMU_TARGETS+="riscv32-softmmu,"
|
|
|
|
QEMU_TARGETS+="riscv64-softmmu,"
|
|
|
|
QEMU_TARGETS+="x86_64-softmmu"
|
|
|
|
|
|
|
|
CFLAGS+=" $CPPFLAGS"
|
|
|
|
CXXFLAGS+=" $CPPFLAGS"
|
|
|
|
LDFLAGS+=" -landroid-shmem -llog"
|
|
|
|
|
|
|
|
# Note: using --disable-stack-protector since stack protector
|
|
|
|
# flags already passed by build scripts but we do not want to
|
|
|
|
# override them with what QEMU configure provides.
|
|
|
|
./configure \
|
|
|
|
--prefix="$TERMUX_PREFIX" \
|
|
|
|
--cross-prefix="${TERMUX_HOST_PLATFORM}-" \
|
|
|
|
--host-cc="gcc" \
|
|
|
|
--cc="$CC" \
|
|
|
|
--cxx="$CXX" \
|
|
|
|
--objcc="$CC" \
|
|
|
|
--disable-stack-protector \
|
|
|
|
--smbd="$TERMUX_PREFIX/bin/smbd" \
|
|
|
|
--enable-coroutine-pool \
|
2021-10-08 11:35:08 +02:00
|
|
|
--audio-drv-list=pa,sdl \
|
2020-01-14 13:50:13 +01:00
|
|
|
--enable-trace-backends=nop \
|
|
|
|
--disable-guest-agent \
|
2021-08-26 11:06:04 +02:00
|
|
|
--enable-gnutls \
|
|
|
|
--enable-nettle \
|
2020-01-14 13:50:13 +01:00
|
|
|
--enable-sdl \
|
|
|
|
--enable-sdl-image \
|
2021-10-08 10:58:09 +02:00
|
|
|
--enable-gtk \
|
2020-01-14 13:50:13 +01:00
|
|
|
--disable-vte \
|
|
|
|
--enable-curses \
|
|
|
|
--enable-iconv \
|
|
|
|
--enable-vnc \
|
|
|
|
--disable-vnc-sasl \
|
|
|
|
--enable-vnc-jpeg \
|
|
|
|
--enable-vnc-png \
|
|
|
|
--disable-xen \
|
|
|
|
--disable-xen-pci-passthrough \
|
|
|
|
--enable-virtfs \
|
|
|
|
--enable-curl \
|
|
|
|
--enable-fdt \
|
2021-07-23 15:05:06 +02:00
|
|
|
--enable-kvm \
|
2020-01-14 13:50:13 +01:00
|
|
|
--disable-hax \
|
|
|
|
--disable-hvf \
|
|
|
|
--disable-whpx \
|
|
|
|
--enable-libnfs \
|
|
|
|
--enable-lzo \
|
|
|
|
--disable-snappy \
|
|
|
|
--enable-bzip2 \
|
|
|
|
--disable-lzfse \
|
|
|
|
--disable-seccomp \
|
|
|
|
--enable-libssh \
|
|
|
|
--enable-bochs \
|
|
|
|
--enable-cloop \
|
|
|
|
--enable-dmg \
|
|
|
|
--enable-parallels \
|
|
|
|
--enable-qed \
|
2021-07-23 15:05:06 +02:00
|
|
|
--enable-spice \
|
|
|
|
--enable-libusb \
|
|
|
|
--enable-usb-redir \
|
2021-08-26 11:06:04 +02:00
|
|
|
--disable-vhost-user \
|
|
|
|
--disable-vhost-user-blk-server \
|
2020-01-14 13:50:13 +01:00
|
|
|
--target-list="$QEMU_TARGETS"
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_make_install() {
|
|
|
|
local i
|
|
|
|
for i in aarch64 arm i386 riscv32 riscv64 x86_64; do
|
|
|
|
ln -sfr \
|
|
|
|
"${TERMUX_PREFIX}"/share/man/man1/qemu.1 \
|
|
|
|
"${TERMUX_PREFIX}"/share/man/man1/qemu-system-${i}.1
|
|
|
|
done
|
|
|
|
}
|