93 lines
3.8 KiB
Bash
93 lines
3.8 KiB
Bash
# Template file for 'ppsspp'
|
|
pkgname=ppsspp
|
|
version=1.15.4
|
|
revision=1
|
|
_glslang_commit=b34f619e1c85810dcb3c578107d2e48ba4ee2b37
|
|
_SPIRV_Cross_commit=4212eef67ed0ca048cb726a6767185504e7695e5
|
|
_armips_commit=7bd1ec93d4586985ba1ef420b43b5e620f68695e
|
|
_discord_rpc_commit=963aa9f3e5ce81a4682c6ca3d136cddda614db33
|
|
_miniupnp_commit=3a87be33e797ba947b2b2a5f8d087f6c3ff4d93e
|
|
_cpu_features_commit=75ec988188f62281efe7bf1d133338751369bb4c
|
|
create_wrksrc=yes
|
|
build_style=cmake
|
|
configure_args="-DHEADLESS=1 -DUSE_SYSTEM_FFMPEG=1 -DUNITTEST=ON
|
|
-DUSING_QT_UI=$(vopt_if qt ON OFF) -DUSE_SYSTEM_ZSTD=ON
|
|
-DARMIPS_USE_STD_FILESYSTEM=ON"
|
|
hostmakedepends="pkg-config python3 $(vopt_if qt qt5-host-tools)"
|
|
makedepends="zlib-devel glew-devel ffmpeg-devel libzip-devel
|
|
snappy-devel rapidjson libpng-devel libzstd-devel
|
|
$(vopt_if sdl2 SDL2-devel) $(vopt_if wayland wayland-devel)
|
|
$(vopt_if qt 'qt5-devel qt5-multimedia-devel')"
|
|
depends="desktop-file-utils"
|
|
short_desc="Fast and portable PSP emulator"
|
|
maintainer="John <me@johnnynator.dev>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://www.ppsspp.org/"
|
|
distfiles="
|
|
https://github.com/hrydgard/ppsspp/archive/v${version}.tar.gz
|
|
https://github.com/hrydgard/glslang/archive/${_glslang_commit}.tar.gz
|
|
https://github.com/KhronosGroup/SPIRV-Cross/archive/${_SPIRV_Cross_commit}.tar.gz
|
|
https://github.com/Kingcom/armips/archive/${_armips_commit}.tar.gz
|
|
https://github.com/discordapp/discord-rpc/archive/${_discord_rpc_commit}.tar.gz
|
|
https://github.com/hrydgard/miniupnp/archive/${_miniupnp_commit}.tar.gz
|
|
https://github.com/google/cpu_features/archive/${_cpu_features_commit}.tar.gz"
|
|
checksum="863c1343967061f623154b4afa0b0847898287af87c62ae6d223aeeb2c0885de
|
|
9be7a69f5e5e2b9db55feb6d36d4b78bfe7a0cfb02e5915ff9bad87d719b38f8
|
|
a7adf77b5680795302aee160309c6cb81b0da341d92bd7face01f9a156b65aeb
|
|
ed69c3e6362ae5b33b1e35efa16db48028b29e5b3b119f5ff046db25c05e8d1a
|
|
8f4115999391f95f443615fc5b13cb2398926ac4c418d3d34ff5735f71c6faea
|
|
1b1d2897f66835ea5eeec5851fe8757aca5afd86984107dcdc0e4b1ce2f2f8be
|
|
9a7b247873621d6191f56e6d1a4ac8711dbbd26c6cba98edfc0863a2730dd05d"
|
|
|
|
# ppsspp always tries to compile x86 unittest
|
|
# https://gist.github.com/Johnnynator/e18d59274451cff890b7235009d2e93d
|
|
case $XBPS_TARGET_MACHINE in
|
|
x86_64* | i686*) configure_args+=" -DUNITTEST=ON";;
|
|
armv[67]*) broken="SDL2 is not build against x11";;
|
|
ppc*) broken="No JIT support";;
|
|
*) configure_args+=" -DUNITTEST=OFF";;
|
|
esac
|
|
|
|
build_options="wayland qt sdl2"
|
|
build_options_default="sdl2"
|
|
|
|
post_extract() {
|
|
mv ppsspp-${version}/* .
|
|
rmdir -v ${wrksrc}/ext/armips
|
|
mv ${wrksrc}/armips-${_armips_commit} ${wrksrc}/ext/armips
|
|
rmdir -v ${wrksrc}/ext/glslang
|
|
mv ${wrksrc}/glslang-${_glslang_commit} ${wrksrc}/ext/glslang
|
|
rmdir -v ${wrksrc}/ext/SPIRV-Cross
|
|
mv ${wrksrc}/SPIRV-Cross-${_SPIRV_Cross_commit} ${wrksrc}/ext/SPIRV-Cross
|
|
rmdir -v ${wrksrc}/ext/discord-rpc
|
|
mv ${wrksrc}/discord-rpc-${_discord_rpc_commit} ${wrksrc}/ext/discord-rpc
|
|
rmdir -v ${wrksrc}/ext/miniupnp
|
|
mv ${wrksrc}/miniupnp-${_miniupnp_commit} ${wrksrc}/ext/miniupnp
|
|
rmdir -v ${wrksrc}/ext/cpu_features
|
|
mv ${wrksrc}/cpu_features-${_cpu_features_commit} ${wrksrc}/ext/cpu_features
|
|
|
|
}
|
|
|
|
post_patch(){
|
|
# disable git versioning
|
|
vsed -e 's|find_package(Git)|# &|' -i git-version.cmake
|
|
}
|
|
|
|
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/PPSSPPHeadless ppsspp-headless
|
|
vmkdir usr/share/ppsspp
|
|
vcopy build/assets usr/share/ppsspp/
|
|
|
|
if [ $build_option_sdl2 ]; then
|
|
vbin build/PPSSPPSDL ppsspp-sdl
|
|
sed -e 's,^Exec=.*,Exec=/usr/bin/ppsspp-sdl,' -i $DESTDIR/usr/share/applications/PPSSPP.desktop
|
|
elif [ $build_option_qt ] ;then
|
|
vbin build/PPSSPPQt ppsspp-qt
|
|
sed -e 's,^Exec=.*,Exec=/usr/bin/ppsspp-qt,' -i $DESTDIR/usr/share/applications/PPSSPP.desktop
|
|
fi
|
|
sed -e 's,^Icon=.*,Icon=/usr/share/pixmaps/ppsspp.svg,' -i $DESTDIR/usr/share/applications/PPSSPP.desktop
|
|
}
|