void-packages/srcpkgs/ppsspp/template

53 lines
2.1 KiB
Bash

# Template file for 'ppsspp'
pkgname=ppsspp
version=1.5.4
revision=1
build_wrksrc="${pkgname}-${version}"
build_style=cmake
configure_args="-DHEADLESS=1 -DUSE_SYSTEM_FFMPEG=1"
hostmakedepends="pkg-config"
makedepends="zlib-devel glew-devel SDL2-devel ffmpeg-devel"
depends="desktop-file-utils"
short_desc="A fast and portable PSP emulator"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://www.ppsspp.org/"
create_wrksrc=yes
distfiles="
https://github.com/hrydgard/ppsspp/archive/v${version}.tar.gz
https://github.com/hrydgard/ppsspp-lang/archive/6f00429315.tar.gz
https://github.com/hrydgard/glslang/archive/2edde6665d.tar.gz
https://github.com/KhronosGroup/SPIRV-Cross/archive/90966d50f5.tar.gz
https://github.com/Kingcom/armips/archive/8b4cadaf62.tar.gz"
checksum="e739155f135f9b3e2e5ce85d0cc11028c4ad71a0078673abe3f908ac6875284a
8dd3618cb90d38d784aa42c750d81621b7d8ad30b09552a5f60cfe671c3993cc
5e20a5758c13cc3967a2c31e7017fe4d8135c005733662be4585d9d19b5d8f34
282d1f17bd3003162dd945b8ba5c5a10cb5738a7750949a8200ff6555f10ff28
c4a2bdc231d8e30fb9a19467b7cc9854e844fb3aafc83449e31152b97ace2157"
nocross=yes
pre_configure() {
# copy submodules to right location
cp -rup ${wrksrc}/ppsspp-lang-*/* ${wrksrc}/${pkgname}-${version}/assets/lang
cp -rup ${wrksrc}/armips-*/* ${wrksrc}/${pkgname}-${version}/ext/armips
cp -rup ${wrksrc}/glslang-*/* ${wrksrc}/${pkgname}-${version}/ext/glslang
cp -rup ${wrksrc}/SPIRV-Cross-*/* ${wrksrc}/${pkgname}-${version}/ext/SPIRV-Cross
# disable git versioning
sed 's|find_package(Git)|# &|' -i ${wrksrc}/${pkgname}-${version}/git-version.cmake
rm -rf ${pkgname}-${version}/build
}
do_install() {
vlicense LICENSE.TXT
vinstall icons/icon.svg 644 usr/share/pixmaps ppsspp.svg
vinstall Qt/PPSSPP.desktop 644 usr/share/applications
vbin build/PPSSPPSDL ppsspp-sdl
vbin build/PPSSPPHeadless ppsspp-headless
vmkdir usr/share/ppsspp
vcopy build/assets usr/share/ppsspp/
sed -e 's,^Exec=.*,Exec=/usr/bin/ppsspp-sdl,' -i $DESTDIR/usr/share/applications/PPSSPP.desktop
sed -e 's,^Icon=.*,Icon=/usr/share/pixmaps/ppsspp.svg,' -i $DESTDIR/usr/share/applications/PPSSPP.desktop
}