testing/xemu: new aport

Original Xbox Emulator for Windows, macOS, and Linux.
https://xemu.app/
This commit is contained in:
Díaz Urbaneja Víctor Diego Alejandro (Sodomon) 2024-06-03 19:04:37 -04:00 committed by Patrycja Rosa
parent 3234b56d22
commit c1aecba515
3 changed files with 112 additions and 0 deletions

63
testing/xemu/APKBUILD Normal file
View File

@ -0,0 +1,63 @@
# Contributor: Díaz Urbaneja Diego <sodomon2@gmail.com>
# Maintainer: Díaz Urbaneja Diego <sodomon2@gmail.com>
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
"

View File

@ -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

View File

@ -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 <httplib.h>
-#include <json.hpp>
+#include <nlohmann/json.hpp>
using json = nlohmann::json;
#define DEBUG_COMPAT_SERVICE 0