Gentoo Archives: gentoo-commits

From: "Maciej Barć" <xgqt@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/ppsspp/, games-emulation/ppsspp/files/
Date: Sun, 28 Aug 2022 20:56:09
Message-Id: 1661720164.403b41336f08a7c0bb4217fc41ea9095594ca3bb.xgqt@gentoo
1 commit: 403b41336f08a7c0bb4217fc41ea9095594ca3bb
2 Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
3 AuthorDate: Sun Aug 28 18:26:18 2022 +0000
4 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 28 20:56:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=403b4133
7
8 games-emulation/ppsspp: update build-system
9
10 Added support for system zstd library.
11 Remove ccache autodetection, build system automagically detects ccache and use it in situations where it shouldn't do that.
12
13 Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
14 Closes: https://github.com/gentoo/gentoo/pull/27047
15 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
16
17 .../ppsspp-disable-ccache-autodetection.patch | 26 ++++++
18 games-emulation/ppsspp/ppsspp-1.13-r1.ebuild | 102 +++++++++++++++++++++
19 2 files changed, 128 insertions(+)
20
21 diff --git a/games-emulation/ppsspp/files/ppsspp-disable-ccache-autodetection.patch b/games-emulation/ppsspp/files/ppsspp-disable-ccache-autodetection.patch
22 new file mode 100644
23 index 000000000000..007e64774c20
24 --- /dev/null
25 +++ b/games-emulation/ppsspp/files/ppsspp-disable-ccache-autodetection.patch
26 @@ -0,0 +1,26 @@
27 +From ca18b1b578ec7215277a73b6658753ff35e677ea Mon Sep 17 00:00:00 2001
28 +From: "Azamat H. Hackimov" <azamat.hackimov@×××××.com>
29 +Date: Sun, 28 Aug 2022 17:53:05 +0300
30 +Subject: [PATCH] Disable ccache autodetection
31 +
32 +Build system automagically detects ccache and use it in situations where
33 +it should'nt do that.
34 +---
35 + CMakeLists.txt | 1 -
36 + 1 file changed, 1 deletion(-)
37 +
38 +diff --git a/CMakeLists.txt b/CMakeLists.txt
39 +index 376e2c5ad..8c382ce5c 100644
40 +--- a/CMakeLists.txt
41 ++++ b/CMakeLists.txt
42 +@@ -111,7 +111,6 @@ if(MACOSX AND NOT USE_SYSTEM_LIBSDL2)
43 + set(SDL2_LIBRARY ${CMAKE_SOURCE_DIR}/SDL/macOS/SDL2.framework)
44 + endif()
45 +
46 +-include(ccache)
47 + include(GNUInstallDirs)
48 +
49 + add_definitions(-DASSETS_DIR="${CMAKE_INSTALL_FULL_DATADIR}/ppsspp/assets/")
50 +--
51 +2.35.1
52 +
53
54 diff --git a/games-emulation/ppsspp/ppsspp-1.13-r1.ebuild b/games-emulation/ppsspp/ppsspp-1.13-r1.ebuild
55 new file mode 100644
56 index 000000000000..3b1688d5a6d4
57 --- /dev/null
58 +++ b/games-emulation/ppsspp/ppsspp-1.13-r1.ebuild
59 @@ -0,0 +1,102 @@
60 +# Copyright 1999-2022 Gentoo Authors
61 +# Distributed under the terms of the GNU General Public License v2
62 +
63 +EAPI=8
64 +
65 +inherit desktop xdg cmake
66 +
67 +DESCRIPTION="A PSP emulator written in C++"
68 +HOMEPAGE="https://www.ppsspp.org/"
69 +SRC_URI="
70 + https://github.com/hrydgard/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
71 + https://github.com/KhronosGroup/SPIRV-Cross/archive/9acb9ec31f5a8ef80ea6b994bb77be787b08d3d1.tar.gz -> ${P}-ext_SPIRV-Cross.tar.gz
72 + https://github.com/Kingcom/armips/archive/7885552b208493a6a0f21663770c446c3ba65576.tar.gz -> ${P}-ext_armips.tar.gz
73 + https://github.com/Tencent/rapidjson/archive/73063f5002612c6bf64fe24f851cd5cc0d83eef9.tar.gz -> ${P}-ext_rapidjson.tar.gz
74 + https://github.com/hrydgard/glslang/archive/dc11adde23c455a24e13dd54de9b4ede8bdd7db8.tar.gz -> ${P}-ext_glslang.tar.gz
75 + https://github.com/hrydgard/miniupnp/archive/3a87be33e797ba947b2b2a5f8d087f6c3ff4d93e.tar.gz -> ${P}-ext_miniupnp.tar.gz
76 + https://github.com/hrydgard/ppsspp-freetype/archive/cbea79dc8fef4d9210e2bac7e7b9b5ff3388197a.tar.gz -> ${P}-ext_native_tools_prebuilt.tar.gz
77 + https://github.com/hrydgard/ppsspp-lang/archive/3bf6b18eb0ae68861fbfbb7b43cd764771ca42a9.tar.gz -> ${P}-assets_lang.tar.gz
78 + discord? ( https://github.com/discordapp/discord-rpc/archive/963aa9f3e5ce81a4682c6ca3d136cddda614db33.tar.gz -> ${P}-ext_discord-rpc.tar.gz )
79 +"
80 +
81 +LICENSE="Apache-2.0 BSD BSD-2 GPL-2 JSON MIT"
82 +SLOT="0"
83 +KEYWORDS="~amd64"
84 +IUSE="discord qt5"
85 +RESTRICT="test"
86 +
87 +RDEPEND="
88 + app-arch/snappy:=
89 + app-arch/zstd:=
90 + dev-libs/libzip:=
91 + dev-util/glslang:=
92 + media-libs/glew:=
93 + media-libs/libpng:=
94 + media-libs/libsdl2[joystick]
95 + media-video/ffmpeg:0/56.58.58
96 + sys-libs/zlib:=
97 + virtual/opengl
98 + qt5? (
99 + dev-qt/qtcore:5
100 + dev-qt/qtgui:5[-gles2-only]
101 + dev-qt/qtmultimedia:5[-gles2-only]
102 + dev-qt/qtopengl:5[-gles2-only]
103 + dev-qt/qtwidgets:5[-gles2-only]
104 + )
105 + !qt5? ( media-libs/libsdl2[X,opengl,sound,video] )
106 +"
107 +DEPEND="${RDEPEND}"
108 +
109 +PATCHES=(
110 + "${FILESDIR}/${PN}-CMakeLists-flags.patch"
111 + "${FILESDIR}/${PN}-disable-ccache-autodetection.patch"
112 +)
113 +
114 +src_unpack() {
115 + unpack ${P}.tar.gz
116 +
117 + cd "${S}" || die
118 + local list=(
119 + assets_lang
120 + ext_SPIRV-Cross
121 + ext_armips
122 + ext_glslang
123 + ext_miniupnp
124 + ext_native_tools_prebuilt
125 + ext_rapidjson
126 + )
127 + use discord && list+=( ext_discord-rpc )
128 +
129 + local i
130 + for i in "${list[@]}" ; do
131 + tar xf "${DISTDIR}/${P}-${i}.tar.gz" --strip-components 1 -C "${i//_//}" ||
132 + die "Failed to unpack ${P}-${i}.tar.gz"
133 + done
134 +}
135 +
136 +src_configure() {
137 + local mycmakeargs=(
138 + -DCMAKE_SKIP_RPATH=ON
139 + -DHEADLESS=false
140 + -DUSE_DISCORD=$(usex discord)
141 + -DUSE_SYSTEM_FFMPEG=ON
142 + -DUSE_SYSTEM_LIBZIP=ON
143 + -DUSE_SYSTEM_SNAPPY=ON
144 + -DUSE_SYSTEM_ZSTD=ON
145 + -DUSING_QT_UI=$(usex qt5)
146 + )
147 + cmake_src_configure
148 +}
149 +
150 +src_install() {
151 + insinto /usr/share/${PN}
152 + doins -r "${BUILD_DIR}/assets"
153 +
154 + local i
155 + for i in 16 24 32 48 64 96 128 256 512 ; do
156 + doicon -s ${i} icons/hicolor/${i}x${i}/apps/${PN}.png
157 + done
158 +
159 + dobin "${BUILD_DIR}/PPSSPP$(usex qt5 Qt SDL)"
160 + make_desktop_entry "PPSSPP$(usex qt5 Qt SDL)" "PPSSPP ($(usex qt5 Qt SDL))"
161 +}