Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PPSSPP PKGBUILD without pulling in ppsspp-ffmpeg repo
# $Id$
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Ben Reedy <thebenj88@gmail.com>
# Contributor: Clement Guerin <geecko.dev@free.fr>
# Contributor: Thiago Kenji Okada <thiago.mast3r@gmail.com>
pkgbase=ppsspp
pkgname=('ppsspp' 'ppsspp-headless' 'ppsspp-qt')
pkgver=1.5.4.r374.b6ce6e2e6
pkgrel=1
pkgdesc='A PSP emulator written in C++'
arch=('x86_64')
url='http://www.ppsspp.org/'
license=('GPL2')
makedepends=('cmake' 'git' 'glew' 'libzip' 'sdl2' 'snappy' 'qt5-tools' 'zlib')
#_commit='a1e74d0d4f89ba3fa2d4fe64bac7a0fa16fc146f'
source=("git+https://github.com/hrydgard/ppsspp.git#commit=${_commit}"
'https://www.ffmpeg.org/releases/ffmpeg-3.0.10.tar.xz'
'https://raw.githubusercontent.com/hrydgard/ppsspp-ffmpeg/master/linux_x86-64.sh'
'ppsspp-glslang::git+https://github.com/hrydgard/glslang.git'
'git+https://github.com/hrydgard/ppsspp-lang.git'
'git+https://github.com/Kingcom/armips.git'
'git+https://github.com/KhronosGroup/SPIRV-Cross.git'
'ppsspp.sh'
'ppsspp-headless.sh'
'ppsspp-qt.sh'
'ppsspp.desktop'
'ppsspp-qt.desktop'
'ppsspp-flags.patch')
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'2c2d1ee6d1ce5c2acec372d58b8079885f6d5d674633cfea489cd550252a5426'
'1236ce000bb670ee2c0e0645c3d55f4d8c8e74dbc35a1af0962a3bdd7608f1c5'
'828b06aacc56672a4d953d77342717c5be414a68261025f74e466abd084b8e6b'
'1c332702d0aeced07df7e12ba8530bc3f19a52bc76c355f6c84c141becfd46d8'
'b3b1fb9e0ecd3c4472b51f27d028a69514b1a3823c26e33da6ffaebfb1522b7f'
'6694643d96dae673f01555637139468eb277f3379afbcceccad3f7e0ae670278')
pkgver() {
cd ppsspp
echo "$(git describe --tags | sed 's/^v//; s/-/.r/; s/-g/./')"
}
prepare() {
cd ppsspp
# patch -Np1 -i ../ppsspp-flags.patch
rm -r ffmpeg
ln -s $srcdir/ffmpeg-3.0.10 ffmpeg
cp $srcdir/linux_x86-64.sh ffmpeg/linux_x86-64.sh
chmod +x ffmpeg/linux_x86-64.sh
for submodule in 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/{SPIRV-Cross,armips}; do
git submodule init ${submodule}
git config submodule.${submodule}.url ../${submodule#*/}
git submodule update ${submodule}
done
for ui in sdl qt; do
if [[ -d build-$ui ]]; then
rm -rf build-$ui
fi
mkdir build-$ui
done
}
build() {
export CC="clang"
export CXX="clang++"
pushd ppsspp/ffmpeg
./linux_x86-64.sh
popd
cd ppsspp/build-sdl
cmake .. \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_SKIP_RPATH='ON' \
-DHEADLESS='ON'
VERBOSE=0 make
cd ../build-qt
cmake .. \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_SKIP_RPATH='ON' \
-DUSING_QT_UI='ON'
VERBOSE=0 make
}
package_ppsspp() {
depends=('gcc-libs' 'glew' 'glibc' 'hicolor-icon-theme' 'libgl' 'libzip' 'sdl2' 'snappy' 'zlib')
conflicts=('ppsspp-qt')
cd ppsspp/build-sdl
install -dm 755 "${pkgdir}"/{opt/ppsspp,usr/{bin,share/{applications,icons,pixmaps}}}
install -m 755 PPSSPPSDL "${pkgdir}"/opt/ppsspp/
cp -dr --no-preserve='ownership' assets "${pkgdir}"/opt/ppsspp/
cp -dr --no-preserve='ownership' ../icons/hicolor "${pkgdir}"/usr/share/icons/
install -m 644 ../icons/icon-512.svg "${pkgdir}"/usr/share/pixmaps/ppsspp.svg
install -m 755 ../../ppsspp.sh "${pkgdir}"/usr/bin/ppsspp
install -m 644 ../../ppsspp.desktop "${pkgdir}"/usr/share/applications/
}
package_ppsspp-headless() {
depends=('gcc-libs' 'glew' 'glibc' 'libgl' 'sdl2' 'snappy' 'zlib')
cd ppsspp/build-sdl
install -dm 755 "${pkgdir}"/{opt/ppsspp,usr/bin}
install -m 755 PPSSPPHeadless "${pkgdir}"/opt/ppsspp/
install -m 755 ../../ppsspp-headless.sh "${pkgdir}"/usr/bin/ppsspp-headless
}
package_ppsspp-qt() {
depends=('gcc-libs' 'glew' 'glibc' 'hicolor-icon-theme' 'libgl' 'libzip' 'qt5-base' 'sdl2' 'snappy' 'zlib')
conflicts=('ppsspp')
cd ppsspp/build-qt
install -dm 755 "${pkgdir}"/{opt/ppsspp,usr/{bin,share/{applications,icons,pixmaps}}}
install -m 755 PPSSPPQt "${pkgdir}"/opt/ppsspp/
cp -dr --no-preserve='ownership' assets "${pkgdir}"/opt/ppsspp/
cp -dr --no-preserve='ownership' ../icons/hicolor "${pkgdir}"/usr/share/icons/
install -m 644 ../icons/icon-512.svg "${pkgdir}"/usr/share/pixmaps/ppsspp.svg
install -m 755 ../../ppsspp-qt.sh "${pkgdir}"/usr/bin/ppsspp-qt
install -m 644 ../../ppsspp-qt.desktop "${pkgdir}"/usr/share/applications/
}
# vim: ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.