summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 93f799e76a694d526855090d9d10fee526a58ea0 (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
74
75
76
77
78
79
80
81
82
83
84
85
# Maintainer: katt <magunasu.b97@gmail.com>
# Contributor: Sanpi <sanpi+aur@homecomputing.fr>
pkgname=rpcs3
pkgver=0.0.12
pkgrel=1
pkgdesc='Open-source Sony PlayStation 3 Emulator'
arch=(x86_64)
url=https://rpcs3.net
license=(GPL2)
depends=(alsa-lib glew glu libavcodec.so libavutil.so libevdev libgl libice libncursesw.so libpng libpulse libsm libswscale.so libx11 libxext openal qt5-base qt5-declarative sdl2 vulkan-icd-loader zlib curl)
makedepends=(cmake git libglvnd python vulkan-validation-layers)
options=(!emptydirs)
source=(
    git+https://github.com/RPCS3/rpcs3.git#tag=v${pkgver}
    rpcs3-cereal::git+https://github.com/RPCS3/cereal.git
    rpcs3-hidapi::git+https://github.com/RPCS3/hidapi.git
    rpcs3-llvm::git+https://github.com/RPCS3/llvm-mirror.git
    rpcs3-yaml-cpp::git+https://github.com/RPCS3/yaml-cpp.git
    git+https://github.com/Cyan4973/xxHash.git
    git+https://github.com/FNA-XNA/FAudio.git
    git+https://github.com/google/flatbuffers.git
    git+https://github.com/KhronosGroup/glslang.git
    git+https://github.com/KhronosGroup/SPIRV-Headers.git
    git+https://github.com/KhronosGroup/SPIRV-Tools.git
    git+https://github.com/kobalicek/asmjit.git
    git+https://github.com/libusb/libusb.git
    git+https://github.com/RipleyTom/wolfssl.git
    git+https://github.com/tcbrindle/span.git
    git+https://github.com/zeux/pugixml.git
)

md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

prepare() {
    cd "$pkgname"
    git submodule init
    git config submodule."3rdparty/cereal".url ../rpcs3-cereal
    git config submodule."3rdparty/hidapi".url ../rpcs3-hidapi
    git config submodule."llvm".url ../rpcs3-llvm
    git config submodule."3rdparty/yaml-cpp".url ../rpcs3-yaml-cpp
    git config submodule."3rdparty/xxHash".url ../xxHash
    git config submodule."3rdparty/FAudio".url ../FAudio
    git config submodule."3rdparty/flatbuffers".url ../flatbuffers
    git config submodule."Vulkan/glslang".url ../glslang
    git config submodule."Vulkan/spirv-headers".url ../SPIRV-Headers
    git config submodule."Vulkan/spirv-tools".url ../SPIRV-Tools
    git config submodule."asmjit".url ../asmjit
    git config submodule."3rdparty/libusb".url ../libusb
    git config submodule."3rdparty/wolfssl".url ../wolfssl
    git config submodule."3rdparty/span".url ../span
    git config submodule."3rdparty/pugixml".url ../pugixml
    git submodule update
}

build() {
    cmake -S "$pkgname" -B build \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_SKIP_RPATH=ON \
        -DUSE_NATIVE_INSTRUCTIONS=OFF \
        -DUSE_SYSTEM_FFMPEG=ON \
        -DUSE_SYSTEM_LIBPNG=ON \
        -DUSE_SYSTEM_ZLIB=ON \
        -DUSE_SYSTEM_CURL=ON
    cmake --build build
}

package() {
    DESTDIR="${pkgdir}" cmake --install build
}