diff options
author | Franc[e]sco | 2020-09-25 18:43:20 +0200 |
---|---|---|
committer | Franc[e]sco | 2020-09-25 18:43:37 +0200 |
commit | c136daac90027f1fff3838e56325bfc7f5220e84 (patch) | |
tree | 3b37f03e0966809e558e6740be979c94a46fe51f | |
download | aur-xenia-linux-fixes-git.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 52 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 107 | ||||
-rw-r--r-- | glsl-fix.patch | 24 | ||||
-rw-r--r-- | sysctl-deprecated.patch | 23 |
5 files changed, 210 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cdc9164f6285 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,52 @@ +pkgbase = xenia-linux-fixes-git + pkgdesc = Xenia is an experimental emulator for the Xbox 360 (linux fixes fork). + pkgver = r5780.a641b5b1.linux_fixes + pkgrel = 1 + url = http://xenia.jp + arch = x86_64 + license = BSD + makedepends = python + makedepends = clang + makedepends = vulkan-headers + makedepends = git + makedepends = clang + makedepends = libpthread-stubs + depends = gtk3 + depends = lz4 + depends = glew + depends = libx11 + provides = xenia + conflicts = xenia + options = debug + options = !strip + source = xenia-linux-fixes::git+https://github.com/bwrsandman/xenia.git#branch=linux + source = git+https://github.com/benvanik/binutils-ppc-cygwin + source = git+https://github.com/xenia-project/capstone.git + source = git+https://github.com/catchorg/Catch2 + source = git+https://github.com/benvanik/gflags.git + source = git+https://github.com/ocornut/imgui.git + source = git+https://github.com/xenia-project/libav.git + source = git+https://github.com/xenia-project/premake-core.git + source = git+https://github.com/xenia-project/premake-export-compile-commands.git + source = git+https://github.com/xenia-project/snappy.git + source = git+https://github.com/KhronosGroup/SPIRV-Headers + source = git+https://github.com/xenia-project/SPIRV-Tools.git + source = git+https://github.com/xenia-project/xbyak.git + source = git+https://github.com/jbeder/yaml-cpp.git + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = xenia-linux-fixes-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..4508b52af9a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/bim +*.tar.zst +/pkg +/src diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b2d24911a74b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,107 @@ +pkgname=xenia-linux-fixes-git +pkgver=r5780.a641b5b1.linux_fixes +pkgrel=1 +pkgdesc="Xenia is an experimental emulator for the Xbox 360 (linux fixes fork)." +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' 'vulkan-headers' 'git' 'clang' 'libpthread-stubs') +provides=('xenia') +conflicts=('xenia') +# TODO: Use system installed deps for non-forked libs +source=("xenia-linux-fixes::git+https://github.com/bwrsandman/xenia.git#branch=linux" + "git+https://github.com/benvanik/binutils-ppc-cygwin" + "git+https://github.com/xenia-project/capstone.git" + "git+https://github.com/catchorg/Catch2" # catch-git + "git+https://github.com/benvanik/gflags.git" + "git+https://github.com/ocornut/imgui.git" + "git+https://github.com/xenia-project/libav.git" + "git+https://github.com/xenia-project/premake-core.git" + "git+https://github.com/xenia-project/premake-export-compile-commands.git" + "git+https://github.com/xenia-project/snappy.git" + "git+https://github.com/KhronosGroup/SPIRV-Headers" # spirv-headers or glslang + "git+https://github.com/xenia-project/SPIRV-Tools.git" + "git+https://github.com/xenia-project/xbyak.git" + "git+https://github.com/jbeder/yaml-cpp.git") # yaml-cpp +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + +pkgver() { + cd "${srcdir}/${pkgname%-git}" + printf "r%s.%s.linux_fixes" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + + git submodule init + git config submodule.third_party/binutils-ppc-cygwin.url $srcdir/binutils-ppc-cygwin + git config submodule.third_party/capstone.url $srcdir/capstone + git config submodule.third_party/catch.url $srcdir/Catch2 + git config submodule.third_party/gflags.url $srcdir/gflags + git config submodule.third_party/imgui.url $srcdir/imgui + git config submodule.third_party/libav.url $srcdir/libav + git config submodule.third_party/premake-core.url $srcdir/premake-core + git config submodule.third_party/premake-export-compile-commands.url $srcdir/premake-export-compile-commands + git config submodule.third_party/snappy.url $srcdir/snappy + git config submodule.third_party/spirv-headers.url $srcdir/SPIRV-Headers + git config submodule.third_party/spirv-tools.url $srcdir/SPIRV-Tools + git config submodule.third_party/xbyak.url $srcdir/xbyak + git config submodule.third_party/yaml-cpp.url $srcdir/yaml-cpp + git submodule update + + # FIXME: Currently the default /etc/makepkg.conf treat unused + # results as warnings which causes build to fail + 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 + + cd "${srcdir}/xenia-linux-fixes/third_party/glslang-spirv" + patch -p1 < "${startdir}/glsl-fix.patch" + cd "${srcdir}/xenia-linux-fixes/third_party/libav" + patch -p1 < "${startdir}/sysctl-deprecated.patch" +} + +# 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 +} + +package() { + cd "${srcdir}/${pkgname%-git}" + + install -m755 -d ${pkgdir}/usr/bin + install -m755 build/bin/Linux/Debug/* ${pkgdir}/usr/bin + rm ${pkgdir}/usr/bin/*.a + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +# vim:set ts=2 sw=2 et: diff --git a/glsl-fix.patch b/glsl-fix.patch new file mode 100644 index 000000000000..73cfe5511d0d --- /dev/null +++ b/glsl-fix.patch @@ -0,0 +1,24 @@ +From 24b3e8384e93f3e73b6aa14ea00a30574112f9ba Mon Sep 17 00:00:00 2001 +From: Reid Kleckner <rnk@google.com> +Date: Wed, 4 Dec 2019 14:09:03 -0800 +Subject: [PATCH] Remove glslang::pool_allocator::setAllocator + +TPoolAllocator is not copy assignable, so this setter could never have +been used. After a recent change (878a24ee2), new versions of Clang +reject this code outright. +--- + Include/PoolAlloc.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Include/PoolAlloc.h b/Include/PoolAlloc.h +index 0e237a6a2..b8eccb883 100644 +--- a/Include/PoolAlloc.h ++++ b/Include/PoolAlloc.h +@@ -304,7 +304,6 @@ class pool_allocator { + size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); } + size_type max_size(int size) const { return static_cast<size_type>(-1) / size; } + +- void setAllocator(TPoolAllocator* a) { allocator = *a; } + TPoolAllocator& getAllocator() const { return allocator; } + + protected: diff --git a/sysctl-deprecated.patch b/sysctl-deprecated.patch new file mode 100644 index 000000000000..a20bd7995636 --- /dev/null +++ b/sysctl-deprecated.patch @@ -0,0 +1,23 @@ +From f68fa2ff5a5d4355f128d8b4b9689011b01e3014 Mon Sep 17 00:00:00 2001 +From: Joel Linn <jl@conductive.de> +Date: Sun, 20 Oct 2019 15:59:20 +0200 +Subject: [PATCH] Fix Linux build on recent systems with deprecated + sys/sysctl.h + +--- + config_lin.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config_lin.h b/config_lin.h +index 3ceac51fdf..f5de57cd16 100644 +--- a/config_lin.h ++++ b/config_lin.h +@@ -257,7 +257,7 @@ + #define HAVE_SLEEP 0 + #define HAVE_STRERROR_R 1 + #define HAVE_SYSCONF 1 +-#define HAVE_SYSCTL 1 ++#define HAVE_SYSCTL 0 + #define HAVE_USLEEP 1 + #define HAVE_VIRTUALALLOC 0 + #define HAVE_PTHREADS 1 |