From c1aecba515e29c60bfafd71636a034df44eb2227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=ADaz=20Urbaneja=20V=C3=ADctor=20Diego=20Alejandro=20?= =?UTF-8?q?=28Sodomon=29?= Date: Mon, 3 Jun 2024 19:04:37 -0400 Subject: [PATCH] testing/xemu: new aport Original Xbox Emulator for Windows, macOS, and Linux. https://xemu.app/ --- testing/xemu/APKBUILD | 63 ++++++++++++++++++++++++++ testing/xemu/fix-missing-include.patch | 11 +++++ testing/xemu/use-system-libs.patch | 38 ++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 testing/xemu/APKBUILD create mode 100644 testing/xemu/fix-missing-include.patch create mode 100644 testing/xemu/use-system-libs.patch diff --git a/testing/xemu/APKBUILD b/testing/xemu/APKBUILD new file mode 100644 index 00000000000..3f9eccef4ec --- /dev/null +++ b/testing/xemu/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: Díaz Urbaneja Diego +# Maintainer: Díaz Urbaneja Diego +pkgname=xemu +pkgver=0.7.122 +pkgrel=0 +pkgdesc="Original Xbox Emulator for Windows, macOS, and Linux." +url="https://xemu.app/" +#x86/armv7/armhf failed compilation because of lto (without lto it still doesn't work) +arch="all !x86 !armv7 !armhf" +license="GPL-2.0-only AND LGPL-2.1-only" +makedepends=" + bash + gmp-dev + gtk+3.0-dev + glu-dev + iasl + keyutils-dev + libslirp-dev + libpcap-dev + libsamplerate-dev + nlohmann-json + openssl-dev + python3 + py3-setuptools + py3-yaml + samurai + sdl2-dev + tomlplusplus-dev + " +options="!check" # checks fails with xbox parameter +source="$pkgname-$pkgver.tar.gz::https://github.com/xemu-project/xemu/releases/download/v$pkgver/src.tar.gz + fix-missing-include.patch + use-system-libs.patch + " +builddir="$srcdir/" + +prepare() { + default_prepare + python scripts/gen-license.py > LICENSE +} + +build() { + ./configure \ + --target-list="i386-softmmu" \ + --extra-cflags="-DXBOX=1" \ + --enable-lto \ + --disable-werror + make qemu-system-i386 +} + +package() { + install -Dm755 build/qemu-system-i386 "$pkgdir/usr/bin/$pkgname" + install -Dm644 ui/xemu.desktop "$pkgdir/usr/share/applications/$pkgname.desktop" + + install -Dm644 ui/icons/xemu.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +sha512sums=" +3ce95783e10ec75244e980150a44a951e5ad7575e3c1b05a0b24f260c2e4100f96169eacd08494decd49e37a787f44271452824ffae283bc19c5d73d920e78b2 xemu-0.7.122.tar.gz +fc5e9c74c48496ccd1ea5227901b60d11af686641e5a724ad20f866c7ef7a4038ab00d06ba55fbb8e84c202b69a72304ed8a65855f53f6a0403f526dcd3928b8 fix-missing-include.patch +c5cfe0f593c0ae6408814ac5bfc19d4fe030f4e62fcc7665d5d6f52d21b48f42c7bf109c4d3b341afdcc68085bc29b1fad7110673dd157156b69bbfbf8e3c38f use-system-libs.patch +" diff --git a/testing/xemu/fix-missing-include.patch b/testing/xemu/fix-missing-include.patch new file mode 100644 index 00000000000..73255750336 --- /dev/null +++ b/testing/xemu/fix-missing-include.patch @@ -0,0 +1,11 @@ +--- a/include/exec/poison.h ++++ b/include/exec/poison.h +@@ -4,8 +4,6 @@ + #ifndef HW_POISON_H + #define HW_POISON_H + +-#include "config-poison.h" +- + #pragma GCC poison TARGET_I386 + #pragma GCC poison TARGET_X86_64 + #pragma GCC poison TARGET_AARCH64 diff --git a/testing/xemu/use-system-libs.patch b/testing/xemu/use-system-libs.patch new file mode 100644 index 00000000000..c46cc98b205 --- /dev/null +++ b/testing/xemu/use-system-libs.patch @@ -0,0 +1,38 @@ +Thanks to https://aur.archlinux.org/cgit/aur.git/tree/use-system-libs.patch?h=xemu +--- a/meson.build ++++ b/meson.build +@@ -1180,11 +1180,7 @@ + endif + have_vhost_user_gpu = have_vhost_user_gpu and virgl.found() and opengl.found() and gbm.found() + +-tomllib = static_library('tomlpp', sources: files('toml.cpp'), +- include_directories: 'tomlplusplus/include') +-toml = declare_dependency(compile_args: ['-DTOML_HEADER_ONLY=0'], +- include_directories: 'tomlplusplus/include', +- link_with: tomllib) ++toml = dependency('tomlplusplus') + + genconfig = declare_dependency(include_directories: 'genconfig') + +--- a/ui/thirdparty/meson.build ++++ b/ui/thirdparty/meson.build +@@ -60,7 +60,7 @@ + libfpng = static_library('fpng', sources: 'fpng/fpng.cpp', cpp_args: libfpng_cpp_args) + fpng = declare_dependency(include_directories: 'fpng', link_with: libfpng) + +-json = declare_dependency(include_directories: 'json') ++json = dependency('nlohmann_json') + httplib = declare_dependency(include_directories: 'httplib') + + libfatx = static_library('fatx', sources: 'fatx/fatx.c') +--- a/ui/xui/reporting.cc ++++ b/ui/xui/reporting.cc +@@ -24,7 +24,7 @@ + #include "reporting.hh" + #define CPPHTTPLIB_OPENSSL_SUPPORT 1 + #include +-#include ++#include + using json = nlohmann::json; + + #define DEBUG_COMPAT_SERVICE 0