ppsspp-1.9.0.recipe revision 7046109c
1SUMMARY="A PSP emulator written in C++"
2DESCRIPTION="PPSSPP is a PSP (PlayStation Portable) emulator capable of playing the \
3majority of the games made for Sony���s first portable console right on your favorite \
4Android or PC device."
5HOMEPAGE="https://www.ppsspp.org/"
6COPYRIGHT="2012-2019 PPSSPP Project"
7LICENSE="GNU GPL v2"
8REVISION="1"
9SOURCE_URI="https://github.com/hrydgard/ppsspp/archive/v${portVersion%.*}.tar.gz"
10CHECKSUM_SHA256="11ac812f6169223760003b03c477733eb25bf5f83ba7aecc02b4c7bd08c0b22e"
11SOURCE_FILENAME="ppsspp-$portVersion.tar.gz"
12SOURCE_DIR="ppsspp-${portVersion%.*}"
13srcGitRev_2="7885552b208493a6a0f21663770c446c3ba65576"
14SOURCE_URI_2="https://github.com/Kingcom/armips/archive/$srcGitRev_2.tar.gz"
15CHECKSUM_SHA256_2="f8a03906135fb6f2932b80b7ef5991f39ccac46b36ec3690776fb38c69775c3d"
16SOURCE_FILENAME_2="armips-$srcGitRev_2.tar.gz"
17SOURCE_DIR_2="armips-$srcGitRev_2"
18srcGitRev_3="f9d08a25fbe17e0677a89d398f4d7f232339c3f9"
19SOURCE_URI_3="https://github.com/hrydgard/glslang/archive/$srcGitRev_3.tar.gz"
20CHECKSUM_SHA256_3="1e4284387cc586acb7ce0eefba712fe15e11a87c45c102063c11d0fa60f66dce"
21SOURCE_FILENAME_3="glslang-$srcGitRev_3.tar.gz"
22SOURCE_DIR_3="glslang-$srcGitRev_3"
23srcGitRev_4="a1f7c8dc8ea2f94443951ee27003bffa562c1f13"
24SOURCE_URI_4="https://github.com/KhronosGroup/SPIRV-Cross/archive/$srcGitRev_4.tar.gz"
25CHECKSUM_SHA256_4="456b1e2a75a8e82985ce22f4707570c7aa1fc50d4119cba1a641e8b233ecde26"
26SOURCE_FILENAME_4="SPIRV-Cross-$srcGitRev_4.tar.gz"
27SOURCE_DIR_4="SPIRV-Cross-$srcGitRev_4"
28srcGitRev_5="bfc3a511f60e84de4d49170e2c442ac36b09cdfd"
29SOURCE_URI_5="https://github.com/hrydgard/ppsspp-lang/archive/$srcGitRev_5.tar.gz"
30CHECKSUM_SHA256_5="c0cc57b54aa376a9dca6de9c6b162a613d54111f7a8587fcfc243e836568ac0c"
31SOURCE_FILENAME_5="ppsspp-lang-$srcGitRev_5.tar.gz"
32SOURCE_DIR_5="ppsspp-lang-$srcGitRev_5"
33PATCHES="ppsspp-$portVersion.patchset"
34ADDITIONAL_FILES="ppsspp.rdef.in"
35
36ARCHITECTURES="!x86_gcc2 x86_64"
37SECONDARY_ARCHITECTURES="x86"
38
39PROVIDES="
40	ppsspp$secondaryArchSuffix = $portVersion
41	app:PPSSPP$secondaryArchSuffix
42	"
43REQUIRES="
44	haiku$secondaryArchSuffix
45	lib:libavcodec$secondaryArchSuffix
46	lib:libavformat$secondaryArchSuffix
47	lib:libavutil$secondaryArchSuffix
48	lib:libGL$secondaryArchSuffix
49	lib:libglew$secondaryArchSuffix
50	lib:libGLU$secondaryArchSuffix
51	lib:libintl$secondaryArchSuffix
52	lib:libSDL2_2.0$secondaryArchSuffix
53	lib:libSDL2_image_2.0$secondaryArchSuffix
54	lib:libz$secondaryArchSuffix
55	lib:libzip$secondaryArchSuffix
56	"
57
58BUILD_REQUIRES="
59	haiku${secondaryArchSuffix}_devel
60	devel:libavcodec$secondaryArchSuffix
61	devel:libavformat$secondaryArchSuffix
62	devel:libavutil$secondaryArchSuffix
63	devel:libGL$secondaryArchSuffix
64	devel:libglew$secondaryArchSuffix
65	devel:libGLU$secondaryArchSuffix
66	devel:libintl$secondaryArchSuffix
67	devel:libSDL2_2.0$secondaryArchSuffix
68	devel:libSDL2_image_2.0$secondaryArchSuffix
69	devel:libz$secondaryArchSuffix
70	devel:libzip$secondaryArchSuffix
71	"
72BUILD_PREREQUIRES="
73	cmd:cmake
74	cmd:gcc$secondaryArchSuffix
75	cmd:make
76	cmd:pkg_config$secondaryArchSuffix
77	cmd:python3
78	"
79
80BUILD()
81{
82	rm -rf ext/{armips,glslang,SPIRV-Cross}
83	ln -s $sourceDir2 ext/armips
84	ln -s $sourceDir3 ext/glslang
85	ln -s $sourceDir4 ext/SPIRV-Cross
86	cp -rf $sourceDir5/*.ini assets/lang
87	sed -i "s|unknown| v$portVersion|" git-version.cmake
88
89	mkdir -p build
90	cd build
91
92	cmake .. \
93		-DCMAKE_C_FLAGS="-D_BSD_SOURCE" \
94		-DCMAKE_CXX_FLAGS="-D_BSD_SOURCE"
95	make $jobArgs
96}
97
98INSTALL()
99{
100	mkdir -p $appsDir/PPSSPP
101	cp -f build/PPSSPPSDL $appsDir/PPSSPP/PPSSPP
102	cp -rf assets $appsDir/PPSSPP
103
104	local APP_SIGNATURE="application/x-vnd.ppsspp"
105	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
106	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
107	local MINOR="`echo "$portVersion" | cut -d. -f3`"
108	local LONG_INFO="$SUMMARY"
109	sed \
110		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
111		-e "s|@MAJOR@|$MAJOR|" \
112		-e "s|@MIDDLE@|$MIDDLE|" \
113		-e "s|@MINOR@|$MINOR|" \
114		-e "s|@LONG_INFO@|$LONG_INFO|" \
115		$portDir/additional-files/ppsspp.rdef.in > ppsspp.rdef
116
117	addResourcesToBinaries ppsspp.rdef $appsDir/PPSSPP/PPSSPP
118	mimeset -f $appsDir/PPSSPP/PPSSPP
119	addAppDeskbarSymlink $appsDir/PPSSPP/PPSSPP
120}
121