2019-12-17 13:54:39 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.qemu.org
|
|
|
|
TERMUX_PKG_DESCRIPTION="A generic and open source machine emulator and virtualizer (headless)"
|
|
|
|
TERMUX_PKG_LICENSE="LGPL-2.1"
|
2022-01-31 19:18:51 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2021-08-25 16:01:43 +02:00
|
|
|
TERMUX_PKG_VERSION=1:6.1.0
|
2021-12-13 15:25:25 +01:00
|
|
|
TERMUX_PKG_REVISION=9
|
2020-12-11 13:43:22 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://download.qemu.org/qemu-${TERMUX_PKG_VERSION:2}.tar.xz
|
2021-08-25 16:01:43 +02:00
|
|
|
TERMUX_PKG_SHA256=eebc089db3414bbeedf1e464beda0a7515aad30f73261abc246c9b27503a3c96
|
2021-10-08 12:05:39 +02:00
|
|
|
TERMUX_PKG_DEPENDS="glib, libbz2, libc++, libcurl, libgnutls, libiconv, libjpeg-turbo, liblzo, libnettle, libnfs, libpixman, libpng, libspice-server, libssh, libusb, libusbredir, ncurses, pulseaudio, qemu-common, resolv-conf, zlib, zstd"
|
2021-08-25 16:01:43 +02:00
|
|
|
|
|
|
|
# Required by configuration script, but I can't find any binary that uses it.
|
|
|
|
TERMUX_PKG_BUILD_DEPENDS="libtasn1"
|
|
|
|
|
2020-12-08 13:38:08 +01:00
|
|
|
TERMUX_PKG_CONFLICTS="qemu-system-x86_64-headless"
|
|
|
|
TERMUX_PKG_REPLACES="qemu-system-x86_64-headless"
|
|
|
|
TERMUX_PKG_PROVIDES="qemu-system-x86_64-headless"
|
2019-12-17 13:54:39 +01:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
|
|
|
termux_step_configure() {
|
2020-12-11 13:23:50 +01:00
|
|
|
termux_setup_ninja
|
|
|
|
|
|
|
|
if [ "$TERMUX_ARCH" = "i686" ]; then
|
|
|
|
LDFLAGS+=" -latomic"
|
|
|
|
fi
|
|
|
|
|
2019-12-17 13:54:39 +01:00
|
|
|
local QEMU_TARGETS=""
|
|
|
|
|
|
|
|
# System emulation.
|
|
|
|
QEMU_TARGETS+="aarch64-softmmu,"
|
|
|
|
QEMU_TARGETS+="arm-softmmu,"
|
|
|
|
QEMU_TARGETS+="i386-softmmu,"
|
2021-12-04 17:28:47 +01:00
|
|
|
QEMU_TARGETS+="m68k-softmmu,"
|
2021-08-10 11:46:02 +02:00
|
|
|
QEMU_TARGETS+="ppc64-softmmu,"
|
|
|
|
QEMU_TARGETS+="ppc-softmmu,"
|
2019-12-17 13:54:39 +01:00
|
|
|
QEMU_TARGETS+="riscv32-softmmu,"
|
|
|
|
QEMU_TARGETS+="riscv64-softmmu,"
|
|
|
|
QEMU_TARGETS+="x86_64-softmmu,"
|
|
|
|
|
|
|
|
# User mode emulation.
|
|
|
|
QEMU_TARGETS+="aarch64-linux-user,"
|
|
|
|
QEMU_TARGETS+="arm-linux-user,"
|
|
|
|
QEMU_TARGETS+="i386-linux-user,"
|
2021-12-04 17:28:47 +01:00
|
|
|
QEMU_TARGETS+="m68k-linux-user,"
|
2021-08-10 11:46:02 +02:00
|
|
|
QEMU_TARGETS+="ppc64-linux-user,"
|
|
|
|
QEMU_TARGETS+="ppc-linux-user,"
|
2019-12-17 13:54:39 +01:00
|
|
|
QEMU_TARGETS+="riscv32-linux-user,"
|
|
|
|
QEMU_TARGETS+="riscv64-linux-user,"
|
|
|
|
QEMU_TARGETS+="x86_64-linux-user"
|
|
|
|
|
|
|
|
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 12:05:39 +02:00
|
|
|
--audio-drv-list=pa \
|
2019-12-17 13:54:39 +01:00
|
|
|
--enable-trace-backends=nop \
|
|
|
|
--disable-guest-agent \
|
2021-08-25 16:01:43 +02:00
|
|
|
--enable-gnutls \
|
|
|
|
--enable-nettle \
|
2019-12-17 13:54:39 +01:00
|
|
|
--disable-sdl \
|
|
|
|
--disable-sdl-image \
|
|
|
|
--disable-gtk \
|
|
|
|
--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-07 20:54:22 +02:00
|
|
|
--enable-kvm \
|
2019-12-17 13:54:39 +01:00
|
|
|
--disable-hax \
|
|
|
|
--disable-hvf \
|
|
|
|
--disable-whpx \
|
|
|
|
--enable-libnfs \
|
|
|
|
--enable-lzo \
|
|
|
|
--disable-snappy \
|
|
|
|
--enable-bzip2 \
|
|
|
|
--disable-lzfse \
|
|
|
|
--disable-seccomp \
|
|
|
|
--enable-libssh \
|
|
|
|
--enable-libxml2 \
|
|
|
|
--enable-bochs \
|
|
|
|
--enable-cloop \
|
|
|
|
--enable-dmg \
|
|
|
|
--enable-parallels \
|
|
|
|
--enable-qed \
|
2021-07-07 20:54:22 +02:00
|
|
|
--enable-spice \
|
2021-07-15 18:46:37 +02:00
|
|
|
--enable-libusb \
|
|
|
|
--enable-usb-redir \
|
2021-08-25 16:01:43 +02:00
|
|
|
--disable-vhost-user \
|
|
|
|
--disable-vhost-user-blk-server \
|
2019-12-17 13:54:39 +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
|
|
|
|
}
|