games-emulation/ppsspp:new ebuild
authorRobinDX <robin9800xt@gmail.com>
Tue, 19 Jan 2016 11:10:43 +0000 (19:10 +0800)
committerRobinDX <robin9800xt@gmail.com>
Tue, 19 Jan 2016 11:11:15 +0000 (19:11 +0800)
games-emulation/ppsspp/Manifest [new file with mode: 0644]
games-emulation/ppsspp/files/ppsspp [new file with mode: 0644]
games-emulation/ppsspp/files/ppsspp-cmake.patch [new file with mode: 0644]
games-emulation/ppsspp/files/ppsspp-ffmpeg-x86.patch [new file with mode: 0644]
games-emulation/ppsspp/files/ppsspp-ffmpeg-x86_64.patch [new file with mode: 0644]
games-emulation/ppsspp/files/ppsspp-qt.patch [new file with mode: 0644]
games-emulation/ppsspp/files/ppsspp.desktop [new file with mode: 0644]
games-emulation/ppsspp/metadata.xml [new file with mode: 0644]
games-emulation/ppsspp/ppsspp-1.1.0.ebuild [new file with mode: 0644]
games-emulation/ppsspp/ppsspp-1.1.1.ebuild [new file with mode: 0644]
games-emulation/ppsspp/ppsspp-9999.ebuild [new file with mode: 0644]

diff --git a/games-emulation/ppsspp/Manifest b/games-emulation/ppsspp/Manifest
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/games-emulation/ppsspp/files/ppsspp b/games-emulation/ppsspp/files/ppsspp
new file mode 100644 (file)
index 0000000..7e3da13
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+cd /usr/share/games/ppsspp
+./PPSSPPSDL
diff --git a/games-emulation/ppsspp/files/ppsspp-cmake.patch b/games-emulation/ppsspp/files/ppsspp-cmake.patch
new file mode 100644 (file)
index 0000000..4a0a036
--- /dev/null
@@ -0,0 +1,32 @@
+--- CMakeLists.txt.orig        2016-01-04 20:44:44.010023206 +0800
++++ CMakeLists.txt     2016-01-04 20:45:34.910024088 +0800
+@@ -219,11 +219,11 @@
+ if(NOT MSVC)
+       set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -D_DEBUG")
+       set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
+-      set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -D_NDEBUG")
++      set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -D_NDEBUG")
+       set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")
+       set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -D_DEBUG")
+       set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
+-      set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -D_NDEBUG")
++      set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -D_NDEBUG")
+       set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")
+ 
+       # Disable some warnings
+@@ -634,12 +634,12 @@
+ if (NOT MSVC)
+       # These can be fast even for debug.
+       if(NOT SNAPPY_FOUND)
+-              set_target_properties(snappy PROPERTIES COMPILE_FLAGS "-O3")
++              set_target_properties(snappy PROPERTIES COMPILE_FLAGS "-O2")
+       endif()
+-      set_target_properties(udis86 PROPERTIES COMPILE_FLAGS "-O3")
+-      set_target_properties(cityhash PROPERTIES COMPILE_FLAGS "-O3")
++      set_target_properties(udis86 PROPERTIES COMPILE_FLAGS "-O2")
++      set_target_properties(cityhash PROPERTIES COMPILE_FLAGS "-O2")
+       if(NOT ZLIB_FOUND)
+-              set_target_properties(zlib PROPERTIES COMPILE_FLAGS "-O3")
++              set_target_properties(zlib PROPERTIES COMPILE_FLAGS "-O2")
+       endif()
+ endif()
diff --git a/games-emulation/ppsspp/files/ppsspp-ffmpeg-x86.patch b/games-emulation/ppsspp/files/ppsspp-ffmpeg-x86.patch
new file mode 100644 (file)
index 0000000..c9e755d
--- /dev/null
@@ -0,0 +1,11 @@
+--- ffmpeg/linux_x86.sh.orig   2016-01-04 21:44:11.540084990 +0800
++++ ffmpeg/linux_x86.sh        2016-01-04 21:44:56.560085770 +0800
+@@ -72,7 +72,7 @@
+ ./configure \
+     --prefix=./linux/${ARCH} \
+     ${GENERAL} \
+-    --extra-cflags="-D__STDC_CONSTANT_MACROS -O3" \
++    --extra-cflags="-D__STDC_CONSTANT_MACROS -O2" \
+     --enable-zlib \
+       --disable-yasm \
+     --disable-everything \
diff --git a/games-emulation/ppsspp/files/ppsspp-ffmpeg-x86_64.patch b/games-emulation/ppsspp/files/ppsspp-ffmpeg-x86_64.patch
new file mode 100644 (file)
index 0000000..45bd877
--- /dev/null
@@ -0,0 +1,11 @@
+--- ffmpeg/linux_x86-64.sh.orig        2016-01-04 21:42:14.220082959 +0800
++++ ffmpeg/linux_x86-64.sh     2016-01-04 21:42:31.940083265 +0800
+@@ -71,7 +71,7 @@
+ ./configure \
+     --prefix=./linux/${ARCH} \
+     ${GENERAL} \
+-    --extra-cflags="-D__STDC_CONSTANT_MACROS -O3" \
++    --extra-cflags="-D__STDC_CONSTANT_MACROS -O2" \
+     --enable-zlib \
+     --enable-pic \
+       --disable-yasm \
diff --git a/games-emulation/ppsspp/files/ppsspp-qt.patch b/games-emulation/ppsspp/files/ppsspp-qt.patch
new file mode 100644 (file)
index 0000000..e372f15
--- /dev/null
@@ -0,0 +1,11 @@
+--- Qt/Settings.pri.orig       2016-01-04 21:37:36.600078151 +0800
++++ Qt/Settings.pri    2016-01-04 21:37:57.430078511 +0800
+@@ -64,7 +64,7 @@
+       else: QMAKE_CXXFLAGS += -std=c++11
+       QMAKE_CFLAGS_RELEASE ~= s/-O.*/
+       QMAKE_CXXFLAGS_RELEASE ~= s/-O.*/
+-      QMAKE_ALLFLAGS_RELEASE += -O3 -ffast-math
++      QMAKE_ALLFLAGS_RELEASE += -O2 -ffast-math
+ }
+ 
+ contains(QT_CONFIG, opengles.) {
diff --git a/games-emulation/ppsspp/files/ppsspp.desktop b/games-emulation/ppsspp/files/ppsspp.desktop
new file mode 100644 (file)
index 0000000..a50ed06
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=PPSSPP
+Comment=A PSP emulator
+Exec=/usr/games/bin/ppsspp
+Icon=ppsspp-icon
+Categories=Game;
diff --git a/games-emulation/ppsspp/metadata.xml b/games-emulation/ppsspp/metadata.xml
new file mode 100644 (file)
index 0000000..51a6852
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd>proxy-maintainers</herd>
+       <maintainer>
+               <email>robin9800xt@gmail.com</email>
+               <name>RobinDX</name>
+       </maintainer>
+       <use>
+               <flag name='qt4'>Adds support for the Qt GUI/Application Toolkit version 4.x</flag>
+               <flag name='sdl'>Adds support for Simple Direct Layer (media library)</flag>
+       </use>
+       <upstream>
+               <bugs-to>https://github.com/hrydgard/ppsspp/issues</bugs-to>
+               <remote-id type="github">hrydgard/ppsspp</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/games-emulation/ppsspp/ppsspp-1.1.0.ebuild b/games-emulation/ppsspp/ppsspp-1.1.0.ebuild
new file mode 100644 (file)
index 0000000..458c26c
--- /dev/null
@@ -0,0 +1,92 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils cmake-utils qt4-r2 git-r3
+
+DESCRIPTION="A PSP emulator for Android, Windows, Mac, Linux and Blackberry 10, written in C++."
+HOMEPAGE="http://www.ppsspp.org/"
+EGIT_REPO_URI="git://github.com/hrydgard/ppsspp.git"
+EGIT_COMMIT="v${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="qt4 +sdl"
+REQUIRED_USE="
+       ?? ( qt4 sdl )
+"
+
+RDEPEND=""
+DEPEND="sys-libs/zlib
+       sdl? ( media-libs/libsdl )
+       sdl? ( media-libs/libsdl2 )
+       sdl? ( dev-util/cmake )
+       qt4? ( dev-qt/qtcore:4 )
+       qt4? ( dev-qt/qtgui:4 )
+       qt4? ( dev-qt/qtmultimedia:4 )
+       qt4? ( dev-qt/qtopengl:4 )
+       qt4? ( dev-qt/qtsvg:4 )
+       qt4? ( dev-qt/qt-mobility[multimedia] )"
+
+src_unpack() {
+       git-r3_fetch
+       git-r3_checkout
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_unpack
+       fi
+       cp /usr/portage/distfiles/ppsspp-icon.png  "${WORKDIR}"/"${P}"/
+}
+
+src_prepare() {
+       epatch "$FILESDIR"/ppsspp-cmake.patch
+       epatch "$FILESDIR"/ppsspp-ffmpeg-x86_64.patch
+       epatch "$FILESDIR"/ppsspp-ffmpeg-x86.patch
+       epatch "$FILESDIR"/ppsspp-qt.patch
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_prepare
+       else
+               cmake-utils_src_prepare
+       fi
+}
+
+src_configure() {
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_configure
+               eqmake4 "${WORKDIR}"/"${P}"/Qt/PPSSPPQt.pro
+       else
+               cmake-utils_src_configure
+       fi
+}
+
+src_compile() {
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_compile
+       else
+               cmake-utils_src_compile
+       fi
+}
+
+src_install() {
+       if use qt4 ; then
+               exeinto /usr/games/bin
+               newexe "${WORKDIR}"/"${P}"/Qt/ppsspp ppsspp
+       else
+               /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
+       fi
+       insinto /usr/share/icons/
+       newins "${WORKDIR}"/"${P}"/source_assets/image/icon_regular_72.png ppsspp-icon.png
+       domenu "${FILESDIR}"/ppsspp.desktop
+}
diff --git a/games-emulation/ppsspp/ppsspp-1.1.1.ebuild b/games-emulation/ppsspp/ppsspp-1.1.1.ebuild
new file mode 100644 (file)
index 0000000..bd20d86
--- /dev/null
@@ -0,0 +1,92 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils cmake-utils qt4-r2 git-r3
+
+DESCRIPTION="A PSP emulator for Android, Windows, Mac, Linux and Blackberry 10, written in C++."
+HOMEPAGE="http://www.ppsspp.org/"
+EGIT_REPO_URI="git://github.com/hrydgard/ppsspp.git"
+EGIT_COMMIT="v${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="qt4 +sdl"
+REQUIRED_USE="
+       ?? ( qt4 sdl )
+"
+
+RDEPEND=""
+DEPEND="sys-libs/zlib
+       sdl? ( media-libs/libsdl )
+       sdl? ( media-libs/libsdl2 )
+       sdl? ( dev-util/cmake )
+       qt4? ( dev-qt/qtcore:4 )
+       qt4? ( dev-qt/qtgui:4 )
+       qt4? ( dev-qt/qtmultimedia:4 )
+       qt4? ( dev-qt/qtopengl:4 )
+       qt4? ( dev-qt/qtsvg:4 )
+       qt4? ( dev-qt/qt-mobility[multimedia] )"
+
+src_unpack() {
+       git-r3_fetch
+       git-r3_checkout
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_unpack
+       fi
+       cp /usr/portage/distfiles/ppsspp-icon.png  "${WORKDIR}"/"${P}"/
+}
+
+src_prepare() {
+       epatch "$FILESDIR"/ppsspp-cmake.patch
+       epatch "$FILESDIR"/ppsspp-ffmpeg-x86_64.patch
+       epatch "$FILESDIR"/ppsspp-ffmpeg-x86.patch
+       epatch "$FILESDIR"/ppsspp-qt.patch
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_prepare
+       else
+               cmake-utils_src_prepare
+       fi
+}
+
+src_configure() {
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_configure
+               eqmake4 "${WORKDIR}"/"${P}"/Qt/PPSSPPQt.pro
+       else
+               cmake-utils_src_configure
+       fi
+}
+
+src_compile() {
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_compile
+       else
+               cmake-utils_src_compile
+       fi
+}
+
+src_install() {
+       if use qt4 ; then
+               exeinto /usr/games/bin
+               newexe "${WORKDIR}"/"${P}"/Qt/ppsspp ppsspp
+       else
+               /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
+       fi
+       insinto /usr/share/icons/
+       newins "${WORKDIR}"/"${P}"/source_assets/image/icon_regular_72.png ppsspp-icon.png
+       domenu "${FILESDIR}"/ppsspp.desktop
+}
diff --git a/games-emulation/ppsspp/ppsspp-9999.ebuild b/games-emulation/ppsspp/ppsspp-9999.ebuild
new file mode 100644 (file)
index 0000000..742b19c
--- /dev/null
@@ -0,0 +1,92 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils cmake-utils qt4-r2 git-r3
+
+DESCRIPTION="A PSP emulator for Android, Windows, Mac, Linux and Blackberry 10, written in C++."
+HOMEPAGE="http://www.ppsspp.org/"
+EGIT_REPO_URI="git://github.com/hrydgard/ppsspp.git"
+#EGIT_COMMIT="v${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="qt4 +sdl"
+REQUIRED_USE="
+       ?? ( qt4 sdl )
+"
+
+RDEPEND=""
+DEPEND="sys-libs/zlib
+       sdl? ( media-libs/libsdl )
+       sdl? ( media-libs/libsdl2 )
+       sdl? ( dev-util/cmake )
+       qt4? ( dev-qt/qtcore:4 )
+       qt4? ( dev-qt/qtgui:4 )
+       qt4? ( dev-qt/qtmultimedia:4 )
+       qt4? ( dev-qt/qtopengl:4 )
+       qt4? ( dev-qt/qtsvg:4 )
+       qt4? ( dev-qt/qt-mobility[multimedia] )"
+
+src_unpack() {
+       git-r3_fetch
+       git-r3_checkout
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_unpack
+       fi
+       cp /usr/portage/distfiles/ppsspp-icon.png  "${WORKDIR}"/"${P}"/
+}
+
+src_prepare() {
+       epatch "$FILESDIR"/ppsspp-cmake.patch
+       epatch "$FILESDIR"/ppsspp-ffmpeg-x86_64.patch
+       epatch "$FILESDIR"/ppsspp-ffmpeg-x86.patch
+       epatch "$FILESDIR"/ppsspp-qt.patch
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_prepare
+       else
+               cmake-utils_src_prepare
+       fi
+}
+
+src_configure() {
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_configure
+               eqmake4 "${WORKDIR}"/"${P}"/Qt/PPSSPPQt.pro
+       else
+               cmake-utils_src_configure
+       fi
+}
+
+src_compile() {
+       if use qt4 ; then
+               cd "${WORKDIR}"/"${P}"/Qt
+               qt4-r2_src_compile
+       else
+               cmake-utils_src_compile
+       fi
+}
+
+src_install() {
+       if use qt4 ; then
+               exeinto /usr/games/bin
+               newexe "${WORKDIR}"/"${P}"/Qt/ppsspp ppsspp
+       else
+               /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
+       fi
+       insinto /usr/share/icons/
+       newins "${WORKDIR}"/"${P}"/source_assets/image/icon_regular_72.png ppsspp-icon.png
+       domenu "${FILESDIR}"/ppsspp.desktop
+}