summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandy Carter2023-11-19 15:34:30 -0500
committerSandy Carter2023-11-19 15:34:30 -0500
commitd1ede792dd84841e0c5aa48e8c9f1a850a49ba49 (patch)
tree67f3b4eb14d329c8279c2e9da843ff85d994271d
parent2d896c74cee5e318509303ad3aa1d659e2c7da12 (diff)
downloadaur-xenia-git.tar.gz
Clean-up package, use system premake, build release
-rw-r--r--.SRCINFO9
-rw-r--r--.gitignore5
-rw-r--r--0001-use-system-premake5.patch51
-rw-r--r--0002-remove-logging-from-console-main.patch34
-rw-r--r--PKGBUILD55
5 files changed, 117 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d099fa712ef7..c8e54a5c4394 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
pkgbase = xenia-git
- pkgdesc = Xenia is an experimental emulator for the Xbox 360.
- pkgver = r6934.00aba94b9
+ pkgdesc = An experimental emulator for the Xbox 360.
+ pkgver = r6938.f6b5424a9
pkgrel = 1
url = http://xenia.jp
arch = x86_64
license = BSD
+ makedepends = premake
makedepends = python
makedepends = clang
makedepends = git
@@ -47,6 +48,8 @@ pkgbase = xenia-git
source = git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
source = git+https://github.com/xenia-project/xbyak.git
source = xxhash::git+https://github.com/Cyan4973/xxHash.git
+ source = 0001-use-system-premake5.patch
+ source = 0002-remove-logging-from-console-main.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
@@ -77,5 +80,7 @@ pkgbase = xenia-git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = d8df7c6d7047fdc4278315b733a470843eab608f8bba5b8ea4355e8c4f44c88f
+ sha256sums = 91b5fe5c3a66b72bc4c7965b38a1dd5f925b55ce1f98f873300072f5f0f8a4e0
pkgname = xenia-git
diff --git a/.gitignore b/.gitignore
index 6815ee05cfe6..f8c44913005b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ rapidjson/
utfcpp/
xenia-linux-fixes/
xxhash/
+Vulkan-Headers/
-
-*.pkg.tar.xz
+*.pkg.tar.*
+xenia.log
diff --git a/0001-use-system-premake5.patch b/0001-use-system-premake5.patch
new file mode 100644
index 000000000000..3ac8f120d156
--- /dev/null
+++ b/0001-use-system-premake5.patch
@@ -0,0 +1,51 @@
+From 6a7d206be02e34cbfc97e5852b27332ba5ebb6b3 Mon Sep 17 00:00:00 2001
+From: Sandy Carter <bwrsandman@gmail.com>
+Date: Sun, 19 Nov 2023 14:46:56 -0500
+Subject: [PATCH] use system premake5
+
+---
+ tools/build/premake | 27 +--------------------------
+ 1 file changed, 1 insertion(+), 26 deletions(-)
+
+diff --git a/tools/build/premake b/tools/build/premake
+index b9f423dee..9cd93ae83 100644
+--- a/tools/build/premake
++++ b/tools/build/premake
+@@ -52,33 +52,8 @@ setup_premake_path_override()
+
+
+ def main():
+- # First try the freshly-built premake.
+- premake5_bin = os.path.join(premake_path, 'bin', 'release', 'premake5')
+- if not has_bin(premake5_bin):
+- # No fresh build, so fallback to checked in copy (which we may not have).
+- premake5_bin = os.path.join(self_path, 'bin', 'premake5')
+- if not has_bin(premake5_bin):
+- # Still no valid binary, so build it.
+- print('premake5 executable not found, attempting build...')
+- build_premake()
+- premake5_bin = os.path.join(premake_path, 'bin', 'release', 'premake5')
+- if not has_bin(premake5_bin):
+- # Nope, boned.
+- print('ERROR: cannot build premake5 executable.')
+- sys.exit(1)
+-
+- # Ensure the submodule has been checked out.
+- if not os.path.exists(os.path.join(premake_path, 'scripts', 'package.lua')):
+- print('third_party/premake-core was not present; run xb setup...')
+- sys.exit(1)
+- return
+-
+- if sys.platform == 'win32':
+- # Append the executable extension on windows.
+- premake5_bin = premake5_bin + '.exe'
+-
+ return_code = shell_call([
+- premake5_bin,
++ '/usr/bin/premake5',
+ '--scripts=%s' % (premake_path),
+ ] + sys.argv[1:],
+ throw_on_error=False)
+--
+2.42.1
+
diff --git a/0002-remove-logging-from-console-main.patch b/0002-remove-logging-from-console-main.patch
new file mode 100644
index 000000000000..92638087667f
--- /dev/null
+++ b/0002-remove-logging-from-console-main.patch
@@ -0,0 +1,34 @@
+From e1369b0785031eaf5c80064727c4ac59b3f39d7e Mon Sep 17 00:00:00 2001
+From: Sandy Carter <bwrsandman@gmail.com>
+Date: Sun, 19 Nov 2023 15:25:44 -0500
+Subject: [PATCH] remove logging from console main
+
+---
+ src/xenia/base/console_app_main_posix.cc | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/xenia/base/console_app_main_posix.cc b/src/xenia/base/console_app_main_posix.cc
+index 29a3ae6ab..9c8133449 100644
+--- a/src/xenia/base/console_app_main_posix.cc
++++ b/src/xenia/base/console_app_main_posix.cc
+@@ -22,9 +22,6 @@ extern "C" int main(int argc, char** argv) {
+ entry_info.positional_options);
+ }
+
+- // Initialize logging. Needs parsed cvars.
+- xe::InitializeLogging(entry_info.name);
+-
+ std::vector<std::string> args;
+ for (int n = 0; n < argc; n++) {
+ args.emplace_back(argv[n]);
+@@ -32,7 +29,5 @@ extern "C" int main(int argc, char** argv) {
+
+ int result = entry_info.entry_point(args);
+
+- xe::ShutdownLogging();
+-
+ return result;
+ }
+--
+2.42.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 47619066959c..260e7c84cd7d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,17 @@
pkgname=xenia-git
-pkgver=r6934.00aba94b9
+pkgver=r6938.f6b5424a9
pkgrel=1
-pkgdesc="Xenia is an experimental emulator for the Xbox 360."
+pkgdesc="An experimental emulator for the Xbox 360."
arch=('x86_64')
url="http://xenia.jp"
license=('BSD')
options=('debug' '!strip')
depends=('gtk3' 'lz4' 'glew' 'libx11')
-# TODO use installed premake5 instead of building it
-# premake: powerpc patch added
-makedepends=('python' 'clang' 'git' 'libpthread-stubs')
+makedepends=('premake' 'python' 'clang' 'git' 'libpthread-stubs')
provides=('xenia')
conflicts=('xenia')
# TODO: Use system installed deps for non-forked libs
source=("git+https://github.com/benvanik/xenia.git"
- # "xenia-linux-fixes::git+https://github.com/bwrsandman/xenia.git#branch=linux"
"git+https://github.com/openluopworld/aes_128.git"
"git+https://github.com/benvanik/binutils-ppc-cygwin.git"
"git+https://github.com/xenia-project/capstone.git"
@@ -43,9 +40,10 @@ source=("git+https://github.com/benvanik/xenia.git"
"git+https://github.com/KhronosGroup/Vulkan-Headers.git"
"git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git"
"git+https://github.com/xenia-project/xbyak.git"
- "xxhash::git+https://github.com/Cyan4973/xxHash.git")
+ "xxhash::git+https://github.com/Cyan4973/xxHash.git"
+ "0001-use-system-premake5.patch"
+ "0002-remove-logging-from-console-main.patch")
sha256sums=('SKIP'
- # 'SKIP'
'SKIP'
'SKIP'
'SKIP'
@@ -74,19 +72,21 @@ sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'SKIP')
+ 'SKIP'
+ 'd8df7c6d7047fdc4278315b733a470843eab608f8bba5b8ea4355e8c4f44c88f'
+ '91b5fe5c3a66b72bc4c7965b38a1dd5f925b55ce1f98f873300072f5f0f8a4e0')
pkgver() {
cd "${srcdir}/${pkgname%-git}"
- #printf "r%s.%s.linux_fixes" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${pkgname%-git}"
- sed -i '16 a #include <optional>' src/xenia/ui/imgui_drawer.h
- sed -i '16 a #include <cstdint>' src/xenia/base/utf8.cc
+ msg2 "Applying patches"
+ patch -Np1 -i "${srcdir}/0001-use-system-premake5.patch"
+ patch -Np1 -i "${srcdir}/0002-remove-logging-from-console-main.patch"
msg2 "Setting submodule paths"
# Take intersection of src and src/xenia/third_party
@@ -100,38 +100,27 @@ prepare() {
git -c protocol.file.allow=always submodule update "$_modulepath"
done
- # msg2 "Merging Linux Fixes"
- # git config pull.rebase false
- # git pull "../${pkgname%-git}-linux-fixes" --no-edit
-
- # FIXME: Currently the default /etc/makepkg.conf treat unused
- # results as warnings which causes build to fail
+ # FIXME: Warnings treated as errors that cause the build to fail.
+ # Warnings:
+ # - Currently the default /etc/makepkg.conf adds -Wunused-result
+ # - If config is set to debug, there is a warning about optimizations being off
sed -i 's,"FatalWarnings",--"FatalWarnings",g' premake5.lua
-
- # Manual submodule assign should make this line unnecessary
- # If package fails, it might be due to new submodule added
- # In that case, this line should be able to fetch it
- # python xenia-build setup
}
-# FIXME: Currently xenia does not compile on linux with the default
-# /etc/makepkg.conf debug and linking particularily
-# --fvar-tracking-assignments and --as-needed
-DEBUG_CFLAGS="-g"
-DEBUG_CXXFLAGS="-g"
-LDFLAGS="-Wl,-O1,--sort-common,-z,relro,-z,now"
-
build() {
cd "${srcdir}/${pkgname%-git}"
- CC=clang CXX=clang++ python xenia-build premake
- CC=clang CXX=clang++ python xenia-build build --no_premake
+ mkdir -p build
+ ./xenia-build \
+ build \
+ --config=release \
+ `echo $MAKEFLAGS | grep -oE '\-j\s?[0-9]+' | sed -r 's/-j([0-9]+)/-j \1/' | head -n 1`
}
package() {
cd "${srcdir}/${pkgname%-git}"
install -m755 -d ${pkgdir}/usr/bin
- install -m755 build/bin/Linux/Debug/* ${pkgdir}/usr/bin
+ install -m755 build/bin/Linux/Release/* ${pkgdir}/usr/bin
rm ${pkgdir}/usr/bin/*.a
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"