blob: 9c320e39790e53464cff5c9241dfd7c80fdaf339 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Maintainer: Alexandre Bouvier <contact@amb.tf>
_pkgname=libretro-lrps2
pkgname=$_pkgname-git
pkgver=r13104.f3c8743d6
pkgrel=2
pkgdesc="Sony PlayStation 2 core (fork of PCSX2)"
arch=('x86_64')
url="https://github.com/libretro/LRPS2"
license=('GPL2' 'GPL3' 'LGPL3')
groups=('libretro')
depends=(
'gcc-libs'
'glibc'
'libretro-core-info'
'wxwidgets'
'zlib'
)
makedepends=(
'cmake'
'git'
'libaio'
'libchdr'
'libgl'
'xxd'
'yaml-cpp'
)
provides=("$_pkgname=${pkgver#r}" 'libretro-pcsx2')
conflicts=("$_pkgname" 'libretro-pcsx2')
source=(
"$_pkgname::git+$url.git"
'fix-lto.patch'
'use-system-libs.patch'
)
b2sums=(
'SKIP'
'eefc261919281854605e4c9bcab7e53389197650481a2aea693aa0848b874a532acf445231836759c5602c02e7160eb45cfe120d726882e234d6580fcbde12a4'
'be061bf85aceb11daf52f78823d3306fef4ff852a3104c19566769bf1706a11c7670cfbd0f743c4fe24f7746c4f430c7df37b1855987be0218bb808b5e3dc07d'
)
pkgver() {
cd $_pkgname
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd $_pkgname
patch -Np1 < ../fix-lto.patch
patch -Np1 < ../use-system-libs.patch
sed -i '/ccache/d' CMakeLists.txt
sed -i '/include <vector>/a #include <string>' pcsx2/CDVD/CDVDdiscReader.h
sed -i '/include <thread>/a #include <system_error>' pcsx2/CDVD/CDVDdiscThread.cpp
sed -i '/include <vector>/a #include <cstdint>' pcsx2/MemoryPatchDatabase.h
}
build() {
cmake -S $_pkgname -B build \
-DCMAKE_BUILD_TYPE=Release \
-DDISABLE_ADVANCE_SIMD=ON \
-DOPTIMIZATION_FLAG="" \
-Wno-dev
cmake --build build
}
package() {
depends+=(
'libaio.so'
'libchdr.so'
'libOpenGL.so'
'libyaml-cpp.so'
)
# shellcheck disable=SC2154
install -D -t "$pkgdir"/usr/lib/libretro build/pcsx2/pcsx2_libretro.so
}
|