archrelease: copy trunk to community-any
[ArchLinux/community.git] / ppsspp / trunk / PKGBUILD
blobd9ef4cd53abbd8690f706f7cf6465fe25c99bb00
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: BartÅ‚omiej Piotrowski <bpiotrowski@archlinux.org>
3 # Contributor: Ben Reedy <thebenj88@gmail.com>
4 # Contributor: Clement Guerin <geecko.dev@free.fr>
5 # Contributor: Thiago Kenji Okada <thiago.mast3r@gmail.com>
7 pkgbase=ppsspp
8 pkgname=(
9   ppsspp
10   ppsspp-assets
12 pkgver=1.14.4
13 pkgrel=1
14 pkgdesc='A PSP emulator written in C++'
15 arch=(x86_64)
16 url=https://www.ppsspp.org/
17 license=(GPL2)
18 makedepends=(
19   clang
20   cmake
21   git
22   glew
23   glu
24   libglvnd
25   libzip
26   ninja
27   python
28   qt5-base
29   qt5-multimedia
30   qt5-tools
31   sdl2
32   snappy
33   zlib
35 _tag=c7a75cec3500e1640b534f2f3e201f62cd07f8e6
36 source=(
37   git+https://github.com/hrydgard/ppsspp.git#tag=${_tag}
38   git+https://github.com/Kingcom/armips.git
39   git+https://github.com/discordapp/discord-rpc.git
40   git+https://github.com/hrydgard/ppsspp-ffmpeg.git
41   armips-filesystem::git+https://github.com/Kingcom/filesystem.git
42   ppsspp-glslang::git+https://github.com/hrydgard/glslang.git
43   git+https://github.com/hrydgard/ppsspp-lang.git
44   ppsspp-miniupnp::git+https://github.com/hrydgard/miniupnp.git
45   git+https://github.com/Tencent/rapidjson.git
46   git+https://github.com/KhronosGroup/SPIRV-Cross.git
47   ppsspp-sdl.desktop
48   ppsspp-qt.desktop
50 b2sums=('SKIP'
51         'SKIP'
52         'SKIP'
53         'SKIP'
54         'SKIP'
55         'SKIP'
56         'SKIP'
57         'SKIP'
58         'SKIP'
59         'SKIP'
60         'c6bcdfedee866dfdcc82a8c333c31ff73ed0beec65b63acec8bc8186383c0bc9f0912f21bb9715b665e8dc1793b1a85599761f9037856fa54ad8aa3bfdbfd468'
61         '328e2ba47b78d242b0ec6ba6bfa039c77a36d1ef7246e5c2c2432d8e976e9360baf505eb05f48408ede1a30545cbbb7f875bf5ebd0252cef35523d449b8254a0')
63 pkgver() {
64   cd ppsspp
65   git describe --tags | sed 's/^v//'
68 prepare() {
69   cd ppsspp
70   for submodule in assets/lang ext/{glslang,miniupnp} ffmpeg; do
71     git submodule init ${submodule}
72     git config submodule.${submodule}.url ../ppsspp-${submodule#*/}
73     git -c protocol.file.allow=always submodule update ${submodule}
74   done
75   for submodule in ext/{armips,discord-rpc,rapidjson,SPIRV-Cross}; do
76     git submodule init ${submodule}
77     git config submodule.${submodule}.url ../${submodule#*/}
78     git -c protocol.file.allow=always submodule update ${submodule}
79   done
80   cd ext/armips
81   for submodule in ext/filesystem; do
82     git submodule init ${submodule}
83     git config submodule.${submodule}.url ../../../armips-${submodule#*/}
84     git -c protocol.file.allow=always submodule update ${submodule}
85   done
88 build() {
89   export CC=clang
90   export CXX=clang++
91   cmake -S ppsspp -B build-sdl -G Ninja \
92     -DCMAKE_BUILD_TYPE=None \
93     -DCMAKE_SKIP_RPATH=ON \
94     -DHEADLESS=ON \
95     -DOpenGL_GL_PREFERENCE=GLVND \
96     -DUSE_SYSTEM_LIBZIP=ON \
97     -DUSE_SYSTEM_SNAPPY=ON \
98     -DUSE_SYSTEM_ZSTD=ON \
99     -DUSING_QT_UI=OFF
100   cmake --build build-sdl
101   cmake -S ppsspp -B build-qt -G Ninja \
102     -DCMAKE_BUILD_TYPE=None \
103     -DCMAKE_SKIP_RPATH=ON \
104     -DHEADLESS=OFF \
105     -DOpenGL_GL_PREFERENCE=GLVND \
106     -DUSE_SYSTEM_LIBZIP=ON \
107     -DUSE_SYSTEM_SNAPPY=ON \
108     -DUSE_SYSTEM_ZSTD=ON \
109     -DUSING_QT_UI=ON
110   cmake --build build-qt
113 package_ppsspp() {
114   depends=(
115     glew
116     glibc
117     hicolor-icon-theme
118     libgl
119     libzip
120     ppsspp-assets
121     qt5-base
122     qt5-multimedia
123     sdl2
124     snappy
125     zlib
126     zstd
127   )
128   install -Dm 755 build-sdl/PPSSPPSDL -t "${pkgdir}"/usr/bin/
129   install -Dm 755 build-sdl/PPSSPPHeadless -t "${pkgdir}"/usr/bin/
130   install -Dm 755 build-qt/PPSSPPQt -t "${pkgdir}"/usr/bin/
131   install -dm 755 "${pkgdir}"/usr/share/icons
132   cp -dr --no-preserve=ownership ppsspp/icons/hicolor "${pkgdir}"/usr/share/icons/
133   install -Dm 644 ppsspp/icons/icon-512.svg "${pkgdir}"/usr/share/pixmaps/ppsspp.svg
134   install -Dm 644 ppsspp-sdl.desktop -t "${pkgdir}"/usr/share/applications/
135   install -Dm 644 ppsspp-qt.desktop -t "${pkgdir}"/usr/share/applications/
138 package_ppsspp-assets() {
139   install -dm 755 "${pkgdir}"/usr/share/ppsspp
140   cp -dr --no-preserve=ownership build-sdl/assets "${pkgdir}"/usr/share/ppsspp/
143 # vim: ts=2 sw=2 et: