Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/ppsspp/
Date: Wed, 15 Aug 2018 10:37:42
Message-Id: 1534329439.3b865db19463ac0ee68f5d428b3d9fd3a1ed521b.asturm@gentoo
1 commit: 3b865db19463ac0ee68f5d428b3d9fd3a1ed521b
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 15 08:52:16 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 15 10:37:19 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b865db1
7
8 games-emulation/ppsspp: Fix REQUIRED_USE logic
9
10 Package-Manager: Portage-2.3.46, Repoman-2.3.10
11
12 games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild | 96 +++++++++++++++++++++++++++
13 games-emulation/ppsspp/ppsspp-9999.ebuild | 53 ++++++++-------
14 2 files changed, 122 insertions(+), 27 deletions(-)
15
16 diff --git a/games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild b/games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild
17 new file mode 100644
18 index 00000000000..25ec0aa433c
19 --- /dev/null
20 +++ b/games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild
21 @@ -0,0 +1,96 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit cmake-utils desktop
28 +
29 +DESCRIPTION="A PSP emulator written in C++"
30 +HOMEPAGE="https://www.ppsspp.org/"
31 +SRC_URI="
32 + https://github.com/hrydgard/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
33 + !system-ffmpeg? ( https://github.com/hrydgard/ppsspp-ffmpeg/archive/a2e98d7ba4c7c5cac08608732c3058cb46e3e0ef.tar.gz -> ${P}-ffmpeg.tar.gz )
34 + https://github.com/hrydgard/ppsspp-lang/archive/1e3e4a0ba0ca8c0a092e027dfb7c1c4778366db5.tar.gz -> ${P}-assets_lang.tar.gz
35 + https://github.com/hrydgard/pspautotests/archive/d02ba7407050f445edf9e908374ad4bf3b2f237b.tar.gz -> ${P}-pspautotests.tar.gz
36 + https://github.com/hrydgard/minidx9/archive/7751cf73f5c06f1be21f5f31c3e2d9a7bacd3a93.tar.gz -> ${P}-dx9sdk.tar.gz
37 + https://github.com/hrydgard/glslang/archive/2edde6665d9a56ead5ea0e55b4e64d9a803e6164.tar.gz -> ${P}-ext_glslang.tar.gz
38 + https://github.com/Kingcom/armips/archive/8b4cadaf62d7de42d374056fc6aafc555f2bc7dc.tar.gz -> ${P}-ext_armips.tar.gz
39 + https://github.com/Kingcom/tinyformat/archive/b7f5a22753c81d834ab5133d655f1fd525280765.tar.gz -> ${P}-ext_armips_ext_tinyformat.tar.gz
40 + https://github.com/KhronosGroup/SPIRV-Cross/archive/90966d50f57608587bafd95b4e345b02b814754a.tar.gz -> ${P}-ext_SPIRV-Cross.tar.gz
41 +"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +IUSE="headless libav +qt5 sdl +system-ffmpeg"
47 +REQUIRED_USE="!qt5? ( sdl )"
48 +
49 +RDEPEND="
50 + sys-libs/zlib:=
51 + qt5? (
52 + dev-qt/qtcore:5
53 + dev-qt/qtgui:5
54 + dev-qt/qtopengl:5
55 + dev-qt/qtwidgets:5
56 + !sdl? ( dev-qt/qtmultimedia:5 )
57 + )
58 + sdl? ( media-libs/libsdl2 )
59 + system-ffmpeg? (
60 + !libav? ( media-video/ffmpeg:= )
61 + libav? ( media-video/libav:= )
62 + )
63 +"
64 +DEPEND="${RDEPEND}"
65 +
66 +PATCHES=(
67 + "${FILESDIR}"/${PN}-1.4.2-assets-lookup.patch
68 + "${FILESDIR}"/${PN}-1.4-O2.patch
69 +)
70 +
71 +src_unpack() {
72 + unpack "${P}.tar.gz"
73 + cd "${S}" || die
74 + local i list=( assets_lang pspautotests dx9sdk ext_glslang ext_armips ext_SPIRV-Cross ext_armips_ext_tinyformat )
75 + if ! use system-ffmpeg; then
76 + list+=( ffmpeg )
77 + fi
78 + for i in "${list[@]}"; do
79 + tar xf "${DISTDIR}/${P}-${i}.tar.gz" --strip-components 1 -C "${i//_//}" || die "Failed to unpack ${P}-${i}.tar.gz"
80 + done
81 +}
82 +
83 +src_prepare() {
84 + if ! use system-ffmpeg; then
85 + sed -i -e "s#-O3#-O2#g;" "${S}"/ffmpeg/linux_*.sh || die
86 + fi
87 + cmake-utils_src_prepare
88 +}
89 +
90 +src_configure() {
91 + local mycmakeargs=(
92 + -DHEADLESS=$(usex headless)
93 + -DUSING_QT_UI=$(usex qt5)
94 + $(cmake-utils_use_find_package sdl SDL2)
95 + -DUSE_SYSTEM_FFMPEG=$(usex system-ffmpeg)
96 + )
97 + cmake-utils_src_configure
98 +}
99 +
100 +src_install() {
101 + use headless && dobin "${BUILD_DIR}/PPSSPPHeadless"
102 + insinto /usr/share/"${PN}"
103 + doins -r "${BUILD_DIR}/assets"
104 + dobin "${BUILD_DIR}/PPSSPP$(usex qt5 Qt SDL)"
105 + local i
106 + for i in 16 24 32 48 64 96 128 256 512 ; do
107 + doicon -s ${i} "icons/hicolor/${i}x${i}/apps/${PN}.png"
108 + done
109 + make_desktop_entry "PPSSPP$(usex qt5 Qt SDL)" "PPSSPP ($(usex qt5 Qt SDL))" "${PN}" "Game"
110 +}
111 +
112 +pkg_postinst() {
113 + if use system-ffmpeg; then
114 + ewarn "system-ffmpeg USE flag is enabled, some bugs might arise due to it."
115 + ewarn "See https://github.com/hrydgard/ppsspp/issues/9026 for more informations."
116 + fi
117 +}
118
119 diff --git a/games-emulation/ppsspp/ppsspp-9999.ebuild b/games-emulation/ppsspp/ppsspp-9999.ebuild
120 index 5ece82adfcc..a65fd45f5a9 100644
121 --- a/games-emulation/ppsspp/ppsspp-9999.ebuild
122 +++ b/games-emulation/ppsspp/ppsspp-9999.ebuild
123 @@ -1,36 +1,36 @@
124 -# Copyright 1999-2017 Gentoo Foundation
125 +# Copyright 1999-2018 Gentoo Foundation
126 # Distributed under the terms of the GNU General Public License v2
127
128 EAPI=6
129
130 -inherit eutils cmake-utils git-r3
131 +inherit cmake-utils desktop git-r3
132
133 -DESCRIPTION="A PSP emulator written in C++."
134 +DESCRIPTION="A PSP emulator written in C++"
135 HOMEPAGE="https://www.ppsspp.org/"
136 EGIT_REPO_URI="https://github.com/hrydgard/${PN}.git"
137 +EGIT_SUBMODULES=( '*' )
138
139 LICENSE="GPL-2"
140 SLOT="0"
141 -IUSE="+qt5 sdl headless libav +system-ffmpeg"
142 -REQUIRED_USE="
143 - !headless? ( || ( qt5 sdl ) )
144 - ?? ( qt5 sdl )
145 -"
146 -EGIT_SUBMODULES=( '*' )
147 +KEYWORDS=""
148 +IUSE="headless libav +qt5 sdl +system-ffmpeg"
149 +REQUIRED_USE="!qt5? ( sdl )"
150
151 -RDEPEND="sys-libs/zlib
152 - system-ffmpeg? (
153 - !libav? ( media-video/ffmpeg:= )
154 - libav? ( media-video/libav:= )
155 - )
156 - sdl? ( media-libs/libsdl2 )
157 +RDEPEND="
158 + sys-libs/zlib:=
159 qt5? (
160 dev-qt/qtcore:5
161 dev-qt/qtgui:5
162 dev-qt/qtopengl:5
163 dev-qt/qtwidgets:5
164 - )"
165 -
166 + !sdl? ( dev-qt/qtmultimedia:5 )
167 + )
168 + sdl? ( media-libs/libsdl2 )
169 + system-ffmpeg? (
170 + !libav? ( media-video/ffmpeg:= )
171 + libav? ( media-video/libav:= )
172 + )
173 +"
174 DEPEND="${RDEPEND}"
175
176 src_unpack() {
177 @@ -52,10 +52,11 @@ src_prepare() {
178
179 src_configure() {
180 local mycmakeargs=(
181 + -DHEADLESS=$(usex headless)
182 -DUSING_QT_UI=$(usex qt5)
183 + $(cmake-utils_use_find_package sdl SDL2)
184 -DUSE_SYSTEM_FFMPEG=$(usex system-ffmpeg)
185 - -DHEADLESS=$(usex headless)
186 - )
187 + )
188 cmake-utils_src_configure
189 }
190
191 @@ -63,14 +64,12 @@ src_install() {
192 use headless && dobin "${BUILD_DIR}/PPSSPPHeadless"
193 insinto /usr/share/"${PN}"
194 doins -r "${BUILD_DIR}/assets"
195 - if use qt5 || use sdl ; then
196 - dobin "${BUILD_DIR}/PPSSPP$(usex qt5 Qt SDL)"
197 - local i
198 - for i in 16 24 32 48 64 96 128 256 512 ; do
199 - doicon -s ${i} "icons/hicolor/${i}x${i}/apps/${PN}.png"
200 - done
201 - make_desktop_entry "PPSSPP$(usex qt5 Qt SDL)" "PPSSPP ($(usex qt5 Qt SDL))" "${PN}" "Game"
202 - fi
203 + dobin "${BUILD_DIR}/PPSSPP$(usex qt5 Qt SDL)"
204 + local i
205 + for i in 16 24 32 48 64 96 128 256 512 ; do
206 + doicon -s ${i} "icons/hicolor/${i}x${i}/apps/${PN}.png"
207 + done
208 + make_desktop_entry "PPSSPP$(usex qt5 Qt SDL)" "PPSSPP ($(usex qt5 Qt SDL))" "${PN}" "Game"
209 }
210
211 pkg_postinst() {