summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f33b024dfd610cf201fc12aa8f82ac2694b80245 (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
86
87
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Oliver Jaksch <arch-aur@com-in.de>
# Contributor: Duck Hunt <vaporeon@tfwno.gf>

pkgname=libretro-ppsspp-git
pkgver=r24922.d9198ff03
pkgrel=1
pkgdesc='Sony PlayStation Portable core'
arch=('x86_64')
url='https://github.com/libretro/ppsspp'
license=('GPL2')
groups=('libretro-unstable')
depends=('gcc-libs' 'glew' 'glibc' 'libgl' 'libretro-core-info' 'sdl2' 'zlib')
makedepends=('cmake' 'git' 'glu' 'libglvnd')
provides=('libretro-ppsspp')
conflicts=('libretro-ppsspp')
source=('libretro-ppsspp::git+https://github.com/libretro/ppsspp.git'
        'git+https://github.com/Kingcom/armips.git'
        'git+https://github.com/discordapp/discord-rpc.git'
        'ppsspp-ffmpeg::git+https://github.com/hrydgard/ppsspp-ffmpeg.git'
        'ppsspp-glslang::git+https://github.com/hrydgard/glslang.git'
        'git+https://github.com/hrydgard/ppsspp-lang.git'
        'git+https://github.com/Tencent/rapidjson.git'
        'git+https://github.com/KhronosGroup/SPIRV-Cross.git'
        'armips-tinyformat::git+https://github.com/Kingcom/tinyformat.git')
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd libretro-ppsspp

  echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build

  cd libretro-ppsspp

  for submodule in ffmpeg assets/lang ext/glslang; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../ppsspp-${submodule#*/}
    git submodule update ${submodule}
  done
  for submodule in ext/{armips,discord-rpc,rapidjson,SPIRV-Cross}; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../${submodule#*/}
    git submodule update ${submodule}
  done

  cd ext/armips

  for submodule in ext/tinyformat; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../../../armips-${submodule#*/}
    git submodule update ${submodule}
  done
}

build() {
  cd build

  cmake ../libretro-ppsspp \
    -DCMAKE_BUILD_TYPE='Release' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DHEADLESS='OFF' \
    -DLIBRETRO='ON' \
    -DUSING_QT_UI='OFF'
  make
}

package() {
  install -Dm 644 build/lib/ppsspp_libretro.so -t "${pkgdir}"/usr/lib/libretro/
  install -Dm 644 libretro-ppsspp/LICENSE.TXT -t "${pkgdir}"/usr/share/licenses/libretro-ppsspp-git/
}

# vim: ts=2 sw=2 et: