## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname FEX %global forgeurl https://github.com/FEX-Emu/%{srcname} # FEX upstream only supports building with clang %global toolchain clang Name: fex-emu Version: 2306 Release: %autorelease Summary: Fast usermode x86 and x86-64 emulator for ARM64 # FEX itself is MIT, see below for the bundled libraries License: MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-1.0 AND GPL-2.0-or-later URL: https://fex-emu.com Source: %{forgeurl}/archive/%{srcname}-%{version}/%{srcname}-%{srcname}-%{version}.tar.gz # generated with get-fex-external.sh Source: FEX-External-%{version}.tar.gz Source: get-fex-external.sh # FEX upstream only supports these architectures ExclusiveArch: x86_64 aarch64 BuildRequires: cmake BuildRequires: clang BuildRequires: git BuildRequires: gdb BuildRequires: lld BuildRequires: nasm BuildRequires: ninja-build BuildRequires: python3 BuildRequires: python3-clang BuildRequires: python3-setuptools BuildRequires: libcxx-devel BuildRequires: libepoxy-devel BuildRequires: openssl-devel BuildRequires: SDL2-devel # Source: https://github.com/catchorg/Catch2/tree/c4e3767e265808590986d5db6ca1b5532a7f3d13 # License: BSL-1.0 # Notes: unmodified copy Provides: bundled(catch) = 2.13.7 # Source: https://github.com/KhronosGroup/Vulkan-Headers/tree/98f440ce6868c94f5ec6e198cc1adda4760e8849 # License: Apache-2.0 # Notes: unmodified copy Provides: bundled(vulkan-headers) = 1.3.231 # Source: https://github.com/FEX-Emu/drm-headers/tree/a11dbbb452d5649c3f9e778a6e4a72013bf751c3 # License: GPL-2.0-only # Notes: modified copy of include/drm Provides: bundled(kernel) = 6.2 # Source: https://github.com/FEX-Emu/fex-gcc-target-tests-bins/tree/442678a134e2d25e759c430cca32e06e9e142f1f # License: GPL-2.0-or-later # Notes: includes binaries built from gcc Provides: bundled(fex-gcc-target-tests) = 0 # Source: https://github.com/FEX-Emu/fex-gvisor-tests-bins/tree/71349ae6d14ac2e3e792730e240aecd8076cee6c # License: Apache-2.0 # Notes: includes binaries built from gvisor Provides: bundled(fex-gvisor-tests) = 0 # Source: https://github.com/FEX-Emu/fex-posixtest-bins/tree/9ae29638f8000c1603f16385ed1cf6c4c23ee414 # License: GPL-2.0-or-later # Notes: modified copy of posixtest, includes binaries Provides: bundled(posixtest) = 1.5.2 # Source: https://github.com/fmtlib/fmt/tree/c4ee726532178e556d923372f29163bd206d7732 # License: MIT # Notes: unmodified copy Provides: bundled(fmt) = 9.0.0 # Source: https://github.com/Sonicadvance1/imgui/tree/4c986ecb8d2807087fd8e34894d1e7a138bc2f1d # License: MIT # Notes: unmodified copy of a fork (original upstream is at https://github.com/ocornut/imgui) Provides: bundled(imgui) = 1.73 # Source: https://github.com/FEX-Emu/jemalloc/tree/19196715f12207455e32b4912618f0db8d4af4bb # https://github.com/FEX-Emu/jemalloc/tree/79e02853ed2f62fae182af2374274b66dda757e3 # License: MIT # Notes: modified copies Provides: bundled(jemalloc) = 5.3.0 # Source: https://github.com/Sonicadvance1/json-maker/tree/8ecb8ecc348bf88c592fac808c03efb342f69e0a # License: MIT # Notes: unmodified copy of a fork (original upstream is at https://github.com/rafagafe/json-maker) Provides: bundled(json-maker) = 0 # Source: https://github.com/FEX-Emu/robin-map/tree/f1ab6900466891af11e3c264c63acf1dd9c3532c # License: MIT # Notes: unmodified copy of a fork (original upstream is at https://github.com/Tessil/robin-map) Provides: bundled(robin-map) = 1.2.1 # Source: https://github.com/Sonicadvance1/tiny-json/tree/9d09127f87ea6a128fb17d1ffd0b444517343f1c # License: MIT # Notes: unmodified copy of a fork (original upstream is at https://github.com/rafagafe/tiny-json) Provides: bundled(tiny-json) = 0 # Source: https://github.com/FEX-Emu/vixl/tree/1027d946a5269c27b1b34e88e6673840a21c524a # License: BSD-3-Clause # Notes: unmodified copy of a fork (original upstream is at https://github.com/Linaro/vixl) Provides: bundled(vixil) = 5.1.0 # Source: https://github.com/FEX-Emu/xbyak/tree/5f8c0488bab7a5e1c8cee831c3b6a5a884e10df8 # License: BSD-3-Clause # Notes: unmodified copy of a fork (original upstream is at https://github.com/herumi/xbyak) Provides: bundled(xbyak) = 6.68 # Source: https://github.com/FEX-Emu/xxHash/tree/ba7375d54fbbf7bfd9519b465a146e9a8bf0240f # License: BSD-2-Clause # Notes: unmodified copy of a fork (original upstream is at https://github.com/Cyan4973/xxHash) Provides: bundled(xxhash) = 0.8.1 # Source: https://github.com/Sonicadvance1/cpp-optparse/tree/eab4212ae864ba64306f0fe87f102e66cb5a3617 # License: MIT # Notes: unmodified copy of a fork (original upstream is at https://github.com/weisslj/cpp-optparse) Provides: bundled(cpp-optparse) = 0 %description FEX allows you to run x86 and x86-64 binaries on an AArch64 host, similar to qemu-user and box86. It has native support for a rootfs overlay, so you don't need to chroot, as well as some thunklibs so it can forward things like GL to the host. FEX presents a Linux 5.0 interface to the guest, and supports both AArch64 and x86-64 as hosts. %prep %autosetup -p1 -n %{srcname}-%{srcname}-%{version} -a 1 %build # Notes: # - shared libs are disabled to avoid ending up with unsatisfiable deps due to # the bundled libraries # - libcxx is not officially supported, but the build fails without it %cmake -G Ninja \ -DBUILD_SHARED_LIBS=OFF \ -DENABLE_LLD=ON \ -DENABLE_LIBCXX=ON \ %ifarch x86_64 -DENABLE_X86_HOST_DEBUG=ON %endif %cmake_build %install %cmake_install %check # FIXME unfuck the tests %ctest || true %files %license LICENSE %doc Readme.md docs %{_bindir}/FEXBash %{_bindir}/FEXConfig %{_bindir}/FEXGetConfig %{_bindir}/FEXInterpreter %{_bindir}/FEXLoader %{_bindir}/FEXRootFSFetcher %{_bindir}/FEXServer %{_bindir}/FEXUpdateAOTIRCache # FIXME probably don't need includes %{_includedir}/FEXCore # FIXME move libs under libdir and drop the static library %{_prefix}/lib/libFEXCore.a %{_prefix}/lib/libFEXCore.so %dir %{_prefix}/lib/gdb %{_prefix}/lib/gdb/libFEXGDBReader.so # FIXME move binfmts somewhere saner %{_datadir}/binfmts %{_datadir}/fex-emu %{_mandir}/man1/FEX.1* %changelog * Sat Jun 24 2023 John Doe - 2306-1 - Uncommitted changes