summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPatrick Northon2023-01-08 07:57:17 -0500
committerPatrick Northon2023-01-08 07:57:17 -0500
commite8b2fea893e6983fd915af6c07d4764d53036ea3 (patch)
tree1950c23b7a196259393feb58367d4c6277e9b23b /PKGBUILD
parent4993b45d69e0d810066e8e8a55b4430b3e3ffb01 (diff)
downloadaur-e8b2fea893e6983fd915af6c07d4764d53036ea3.tar.gz
Revamp.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD79
1 files changed, 51 insertions, 28 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 78f4025812da..1b032e8558be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,50 +1,73 @@
-# Maintainer: Alexandre Bouvier <contact@amb.tf>
+# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>
+
_pkgname=libretro-pcsx2
-pkgname=$_pkgname-git
-pkgver=r12271.afdbc84bf
+pkgname=${_pkgname}-git
+provides=($_pkgname)
+conflicts=($_pkgname)
+pkgver=12920
pkgrel=1
-pkgdesc="Sony PlayStation 2 core"
+pkgdesc='Sony PlayStation 2 core'
arch=('x86_64')
-url="https://github.com/libretro/pcsx2"
-license=('LGPL3')
-groups=('libretro')
-depends=('libaio' 'libchdr' 'libgl' 'libretro-core-info' 'yaml-cpp')
-makedepends=('cmake' 'git' 'libglvnd' 'xxd')
-provides=("$_pkgname")
-conflicts=("$_pkgname")
-options=('!lto') # https://github.com/libretro/pcsx2/issues/180
+url='https://github.com/libretro/pcsx2'
+license=(
+ 'GPL2'
+ 'GPL3'
+ 'LGPL2.1'
+ 'LGPL3'
+)
+depends=(
+ 'gcc-libs'
+ 'glibc'
+ 'libaio'
+ 'glib2'
+ 'libglvnd'
+ 'zlib'
+ 'yaml-cpp'
+ 'libchdr'
+)
+makedepends=(
+ 'cmake'
+ 'git'
+ 'ninja'
+ 'systemd'
+)
source=("$_pkgname::git+$url.git")
b2sums=('SKIP')
+_srcdir="$_pkgname"
+
pkgver() {
- cd $_pkgname
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "$_srcdir"
+ git rev-list --count HEAD
}
prepare() {
- cd $_pkgname
- # remove ccache
- sed -i '/ccache/d' CMakeLists.txt
+ cd "$_srcdir"
+
+ # https://github.com/libretro/LRPS2/issues/180
+ echo 'set_source_files_properties(FastJmp.cpp PROPERTIES COMPILE_FLAGS -fno-lto)' >> 'common/src/Utilities/CMakeLists.txt'
+
# unbundle libchdr
- sed -i '/libchdr/d' cmake/SearchForStuff.cmake
- sed -i 's/chdr-static/chdr/' common/src/Utilities/CMakeLists.txt
+ sed -i '/libchdr/d' 'cmake/SearchForStuff.cmake'
+ sed -i 's/chdr-static/chdr/' 'common/src/Utilities/CMakeLists.txt'
+
# unbundle yaml-cpp
- sed -i '/yaml-cpp/d' cmake/SearchForStuff.cmake
+ sed -i '/yaml-cpp/d' 'cmake/SearchForStuff.cmake'
}
build() {
- cmake -S $_pkgname -B build \
- -DARCH_FLAG="" \
- -DCMAKE_BUILD_TYPE=Release \
- -DDISABLE_ADVANCE_SIMD=ON \
+ cmake -S "$_srcdir" -B 'build' -G Ninja \
+ -DCMAKE_BUILD_TYPE='Release' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DDISABLE_ADVANCE_SIMD=OFF \
+ -DBUILD_TESTING=OFF \
-DLIBRETRO=ON \
- -DOPTIMIZATION_FLAG="" \
+ -DWITH_SYSTEM_ZLIB=ON \
-DUSE_LTO=OFF \
-Wno-dev
- cmake --build build
+ cmake --build 'build'
}
package() {
- # shellcheck disable=SC2154
- install -Dm644 -t "$pkgdir"/usr/lib/libretro build/pcsx2/pcsx2_libretro.so
+ install -Dm 644 'build/pcsx2/pcsx2_libretro.so' -t "${pkgdir}/usr/lib/libretro/"
}