summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlexandre Bouvier2023-08-13 05:39:09 +0200
committerAlexandre Bouvier2023-08-13 05:39:09 +0200
commitf0880dfc08c7f1817224470e60af8829437c98cd (patch)
tree07f7cf1cf133f920d66fe0e34fd167a2babd6d66 /PKGBUILD
downloadaur-f0880dfc08c7f1817224470e60af8829437c98cd.tar.gz
update to 0.62.r3.g58216c31
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD90
1 files changed, 90 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b44494c59794
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,90 @@
+# Maintainer: Alexandre Bouvier <contact@amb.tf>
+_pkgname=libretro-play
+pkgname=$_pkgname-git
+pkgver=0.62.r3.g58216c31
+pkgrel=1
+pkgdesc="Sony PlayStation 2 core"
+arch=('x86_64')
+url="https://purei.org/"
+license=('MIT')
+groups=('libretro')
+depends=('glibc' 'libretro-core-info' 'zlib')
+makedepends=(
+ 'bzip2'
+ 'cmake'
+ 'ghc-filesystem'
+ 'git'
+ 'glew'
+ 'icu'
+ 'libchdr'
+ 'libgl'
+ 'openssl'
+ 'xxhash'
+ 'zstd'
+)
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
+source=(
+ "$_pkgname::git+https://github.com/jpd002/Play-.git"
+ 'git+https://github.com/jpd002/Play--CodeGen.git'
+ 'git+https://github.com/jpd002/Play--Framework.git'
+ 'git+https://github.com/jpd002/Play-Dependencies.git'
+ 'git+https://github.com/facebook/zstd.git'
+ 'use-system-libs.patch'
+)
+b2sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'ee225cdbdc5452bcbf3d83e945080cafcd0baeb7d571798a9e9f61cb97387f701918d8b96df1f2f1768458bc7ab9d6173aca61b9272efcd4241e1e6883cc7dbb'
+)
+
+pkgver() {
+ cd $_pkgname
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd $_pkgname
+ git config submodule.deps/CodeGen.url ../Play--CodeGen
+ git config submodule.deps/Dependencies.url ../Play-Dependencies
+ git config submodule.deps/Framework.url ../Play--Framework
+ git -c protocol.file.allow=always submodule update
+ patch -Np1 < ../use-system-libs.patch
+ sed -i '/pragma once/a #include <cstdint>' Source/hdd/ApaDefs.h
+ cd deps/Dependencies
+ git config submodule.zstd.url ../../../zstd
+ git -c protocol.file.allow=always submodule update
+}
+
+build() {
+ cmake -S $_pkgname -B build \
+ -DBUILD_LIBRETRO_CORE=ON \
+ -DBUILD_PLAY=OFF \
+ -DBUILD_TESTS="$CHECKFUNC" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
+ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
+ -DENABLE_AMAZON_S3=OFF \
+ -Wno-dev
+ cmake --build build
+}
+
+check() {
+ ctest --test-dir build
+}
+
+package() {
+ depends+=(
+ 'libbz2.so'
+ 'libchdr.so'
+ 'libGLEW.so'
+ 'libGL.so'
+ 'libxxhash.so'
+ )
+ # shellcheck disable=SC2154
+ install -D -t "$pkgdir"/usr/lib/libretro build/Source/ui_libretro/play_libretro.so
+ install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname $_pkgname/License.txt
+}