summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoredake <fdsfgs@krutt.org>2017-04-04 16:11:03 +0300
committerPatrice Clement <monsieurp@gentoo.org>2017-04-04 23:14:02 +0200
commit051286e08843fc07d1561486ad0fb2eabdf0472b (patch)
tree2268bf7d5c6a3dc87e1dcb87563d85fd9fdf08e7 /games-emulation
parentgames-emulation/ppsspp: clean up old. (diff)
downloadgentoo-051286e08843fc07d1561486ad0fb2eabdf0472b.tar.gz
gentoo-051286e08843fc07d1561486ad0fb2eabdf0472b.tar.bz2
gentoo-051286e08843fc07d1561486ad0fb2eabdf0472b.zip
games-emulation/ppsspp: update 9999 version.
Closes: https://github.com/gentoo/gentoo/pull/4342
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/ppsspp/ppsspp-9999.ebuild138
1 files changed, 42 insertions, 96 deletions
diff --git a/games-emulation/ppsspp/ppsspp-9999.ebuild b/games-emulation/ppsspp/ppsspp-9999.ebuild
index 16ca5dd693f8..ff8656b6a2db 100644
--- a/games-emulation/ppsspp/ppsspp-9999.ebuild
+++ b/games-emulation/ppsspp/ppsspp-9999.ebuild
@@ -1,127 +1,73 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
-inherit eutils cmake-utils qt4-r2 git-r3
+inherit eutils cmake-utils git-r3
DESCRIPTION="A PSP emulator written in C++."
-HOMEPAGE="http://www.ppsspp.org/"
-EGIT_REPO_URI="git://github.com/hrydgard/${PN}.git"
+HOMEPAGE="https://www.ppsspp.org/"
+EGIT_REPO_URI="https://github.com/hrydgard/${PN}.git"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS=""
-IUSE="qt4 qt5 +sdl"
+IUSE="+qt5 sdl headless libav"
REQUIRED_USE="
- ?? ( qt4 qt5 sdl )
+ !headless? ( || ( qt5 sdl ) )
+ ?? ( qt5 sdl )
"
+EGIT_SUBMODULES=( '*' '-ffmpeg' )
-RDEPEND=""
-
-DEPEND="
- sys-libs/zlib
+RDEPEND="sys-libs/zlib
+ !libav? ( media-video/ffmpeg:= )
+ libav? ( media-video/libav:= )
sdl? (
- dev-util/cmake
media-libs/libsdl
media-libs/libsdl2
)
- qt4? (
- dev-qt/qtsvg:4
- dev-qt/qtgui:4
- dev-qt/qtcore:4
- dev-qt/qtopengl:4
- dev-qt/qtmultimedia:4
- dev-qt/qt-mobility[multimedia]
- )
qt5? (
- dev-qt/qtsvg:5
- dev-qt/qtgui:5
+ dev-db/sqlite
+ dev-qt/assistant:5
dev-qt/qtcore:5
- dev-qt/qtopengl:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5
dev-qt/qtmultimedia:5
+ dev-qt/qtopengl:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwebkit:5
dev-qt/qtwidgets:5
- dev-qt/qt-mobility[multimedia]
- )
-"
+ )"
-src_unpack() {
- git-r3_fetch
- git-r3_checkout
- if use qt4 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_unpack
- elif use qt5 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_unpack
- fi
-}
+DEPEND="${RDEPEND}"
src_prepare() {
- sed -i -e "s#-O3#-O2#g;" "${S}"/CMakeLists.txt || die
- sed -i -e "s#-O3#-O2#g;" "${S}"/Qt/Settings.pri || die
- sed -i -e "s#-O3#-O2#g;" "${S}"/ffmpeg/linux_*.sh || die
+ # https://github.com/hrydgard/ppsspp/blob/150619c5a341f372266bec86fd874ac5a1343a43/UI/NativeApp.cpp#L318
+ # patch ppsspp to use /usr/share instead of working dir to find the assets
+ sed -i 's|VFSRegister("", new AssetsAssetReader());|VFSRegister("", new DirectoryAssetReader("/usr/share/ppsspp/assets/"));|g' UI/NativeApp.cpp || die "Patching qt assets path failed"
- if use qt4 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_prepare
- elif use qt5 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_prepare
- else
- cmake-utils_src_prepare
- fi
+ sed -i -e "s#-O3#-O2#g;" "${S}"/CMakeLists.txt || die
+ cmake-utils_src_prepare
}
src_configure() {
- if use qt4 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_configure
- eqmake4 "${WORKDIR}"/"${P}"/Qt/PPSSPPQt.pro
- elif use qt5 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_configure
- eqmake5 "${WORKDIR}"/"${P}"/Qt/PPSSPPQt.pro
- else
- cmake-utils_src_configure
- fi
-}
-
-src_compile() {
- if use qt4 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_compile
- elif use qt5 ; then
- cd "${WORKDIR}"/"${P}"/Qt || die
- qt4-r2_src_compile
- else
- cmake-utils_src_compile
- fi
+ local mycmakeargs=(
+ -DUSING_QT_UI=$(usex qt5)
+ -DUSE_SYSTEM_FFMPEG=ON
+ -DHEADLESS=$(usex headless)
+ )
+ cmake-utils_src_configure
}
src_install() {
- if use qt4 ; then
- exeinto /usr/games/bin
- newexe "${WORKDIR}"/"${P}"/Qt/ppsspp ppsspp
- elif use qt5 ; then
- exeinto /usr/games/bin
- newexe "${WORKDIR}"/"${P}"/Qt/ppsspp ppsspp
- else
- exeinto /usr/games
- dobin "${FILESDIR}"/ppsspp
- exeinto /usr/share/games/"${PN}"
- doexe "${WORKDIR}"/"${P}"_build/PPSSPPSDL
- insinto /usr/share/games/"${PN}"
- doins -r "${WORKDIR}"/"${P}"_build/assets
- doins -r "${WORKDIR}"/"${P}"/lang
+ use headless && dobin "${BUILD_DIR}/PPSSPPHeadless"
+ insinto /usr/share/"${PN}"
+ doins -r "${BUILD_DIR}/assets"
+ if use qt5 || use sdl ; then
+ dobin "${BUILD_DIR}/PPSSPP$(usex qt5 Qt SDL)"
+ local i
+ for i in 16 24 32 48 64 96 128 256 512 ; do
+ doicon -s ${i} "icons/hicolor/${i}x${i}/apps/${PN}.png"
+ done
+ make_desktop_entry "PPSSPP$(usex qt5 Qt SDL)" "PPSSPP ($(usex qt5 Qt SDL))" "${PN}" "Game"
fi
- insinto /usr/share/icons/
- newins "${WORKDIR}"/"${P}"/source_assets/image/icon_regular_72.png ppsspp-icon.png
- domenu "${FILESDIR}"/ppsspp.desktop
-}
-
-pkg_postinst() {
- elog "Remember, in order to play games, you have to "
- elog "be in the 'games' group. "
- elog "Just run 'gpasswd -a <USER> games', then have <USER> re-login. "
}