summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-11-06 00:23:07 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-11-06 00:23:07 +0300
commita4945df3f139cfbfe9ab229233baa96f07564cce (patch)
treefe0e4cd03151feb710afd7b3860933e7158baab0
parent15ee734594baac1e83c8bcb8d0c8888ad4dfd2c3 (diff)
новый файл: dev-libs/libebml/libebml-scm.ebuild
новый файл: dev-libs/libebml/metadata.xml новый файл: games-emulation/ppsspp/files/ppsspp-1.4-O2.patch новый файл: games-emulation/ppsspp/files/ppsspp-1.4-assets-lookup.patch новый файл: games-emulation/ppsspp/metadata.xml новый файл: games-emulation/ppsspp/ppsspp-scm.ebuild новый файл: net-vpn/tor/files/tor.initd-r8
-rw-r--r--dev-libs/libebml/libebml-scm.ebuild35
-rw-r--r--dev-libs/libebml/metadata.xml10
-rw-r--r--games-emulation/ppsspp/files/ppsspp-1.4-O2.patch32
-rw-r--r--games-emulation/ppsspp/files/ppsspp-1.4-assets-lookup.patch13
-rw-r--r--games-emulation/ppsspp/metadata.xml24
-rw-r--r--games-emulation/ppsspp/ppsspp-scm.ebuild96
-rw-r--r--net-vpn/tor/files/tor.initd-r837
7 files changed, 247 insertions, 0 deletions
diff --git a/dev-libs/libebml/libebml-scm.ebuild b/dev-libs/libebml/libebml-scm.ebuild
new file mode 100644
index 0000000..b11da91
--- /dev/null
+++ b/dev-libs/libebml/libebml-scm.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools git-r3
+
+DESCRIPTION="Extensible binary format library (kinda like XML)"
+HOMEPAGE="https://www.matroska.org/ https://github.com/Matroska-Org/libebml/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/Matroska-Org/libebml.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0/4" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="debug static-libs"
+
+src_prepare() {
+ default
+ sed -i '/^AM_CXXFLAGS += -g/d' Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable static-libs static)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/dev-libs/libebml/metadata.xml b/dev-libs/libebml/metadata.xml
new file mode 100644
index 0000000..b4e118e
--- /dev/null
+++ b/dev-libs/libebml/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Matroska-Org/libebml</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-emulation/ppsspp/files/ppsspp-1.4-O2.patch b/games-emulation/ppsspp/files/ppsspp-1.4-O2.patch
new file mode 100644
index 0000000..55954c7
--- /dev/null
+++ b/games-emulation/ppsspp/files/ppsspp-1.4-O2.patch
@@ -0,0 +1,32 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 19038c88a436..bf50f5cf52fb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -195,11 +195,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")
+ #TODO: Remove this and include the file properly everywhere it makes sense
+ # First step is too use the macros everywhere
+@@ -509,10 +509,10 @@ include_directories(ext/cityhash)
+
+ if (NOT MSVC)
+ # These can be fast even for debug.
+- 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-1.4-assets-lookup.patch b/games-emulation/ppsspp/files/ppsspp-1.4-assets-lookup.patch
new file mode 100644
index 0000000..6f75d5e
--- /dev/null
+++ b/games-emulation/ppsspp/files/ppsspp-1.4-assets-lookup.patch
@@ -0,0 +1,13 @@
+diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp
+index 8452d4d61d5f..3d5a4bbd2aa4 100644
+--- a/UI/NativeApp.cpp
++++ b/UI/NativeApp.cpp
+@@ -316,7 +316,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
+
+ // We want this to be FIRST.
+ #ifdef USING_QT_UI
+- VFSRegister("", new AssetsAssetReader());
++ VFSRegister("", new DirectoryAssetReader("/usr/share/ppsspp/assets/"));
+ #elif defined(IOS)
+ // Packed assets are included in app
+ VFSRegister("", new DirectoryAssetReader(external_dir));
diff --git a/games-emulation/ppsspp/metadata.xml b/games-emulation/ppsspp/metadata.xml
new file mode 100644
index 0000000..83e3a6d
--- /dev/null
+++ b/games-emulation/ppsspp/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robin9800xt@gmail.com</email>
+ <name>RobinDX</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>fdsfgs@krutt.org</email>
+ <name>soredake</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="headless">Build headless version of the PPSSPP</flag>
+ <flag name="system-ffmpeg">Use the system-wide media-video/ffmpeg instead of bundled</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-scm.ebuild b/games-emulation/ppsspp/ppsspp-scm.ebuild
new file mode 100644
index 0000000..94088d6
--- /dev/null
+++ b/games-emulation/ppsspp/ppsspp-scm.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils cmake-utils git-r3
+
+DESCRIPTION="A PSP emulator written in C++."
+HOMEPAGE="https://www.ppsspp.org/"
+EGIT_REPO_URI="https://github.com/hrydgard/${PN}.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+qt5 sdl +egl +ffmpeg headless libav +system-ffmpeg"
+REQUIRED_USE="
+ !headless? ( || ( qt5 sdl ) )
+ ?? ( qt5 sdl )
+"
+EGIT_SUBMODULES=( '*' )
+
+RDEPEND="sys-libs/zlib
+ ffmpeg? (
+ system-ffmpeg? (
+ !libav? ( media-video/ffmpeg:= )
+ libav? ( media-video/libav:= )
+ )
+ )
+ sdl? (
+ media-libs/libsdl
+ media-libs/libsdl2
+ )
+ qt5? (
+ dev-db/sqlite
+ dev-qt/assistant:5
+ dev-qt/qtcore: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
+ )
+ egl? ( media-libs/mesa[egl] )
+ "
+
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ use ffmpeg && use system-ffmpeg && EGIT_SUBMODULES+=( '-ffmpeg' )
+ git-r3_src_unpack
+}
+
+src_prepare() {
+ # 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"
+
+ sed -i -e "s#-O3#-O2#g;" "${S}"/CMakeLists.txt || die
+ if ! use system-ffmpeg; then
+ sed -i -e "s#-O3#-O2#g;" "${S}"/ffmpeg/linux_*.sh || die
+ fi
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSING_QT_UI=$(usex qt5)
+ -DUSE_FFMPEG=$(usex ffmpeg)
+ -DUSE_SYSTEM_FFMPEG=$(usex system-ffmpeg)
+ -DUSING_EGL=$(usex egl)
+ -DHEADLESS=$(usex headless)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ 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
+}
+
+pkg_postinst() {
+ if use system-ffmpeg; then
+ ewarn "system-ffmpeg USE flag is enabled, some bugs might arise due to it."
+ ewarn "See https://github.com/hrydgard/ppsspp/issues/9026 for more informations."
+ fi
+}
diff --git a/net-vpn/tor/files/tor.initd-r8 b/net-vpn/tor/files/tor.initd-r8
new file mode 100644
index 0000000..de9b66e
--- /dev/null
+++ b/net-vpn/tor/files/tor.initd-r8
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/bin/tor
+pidfile=/var/run/tor/tor.pid
+command_args="--hush --runasdaemon 1 --pidfile \"${pidfile}\""
+retry=${GRACEFUL_TIMEOUT:-60}
+stopsig=INT
+command_progress=yes
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+description="Anonymizing overlay network for TCP"
+description_checkconfig="Check for valid config file"
+description_reload="Reload the configuration"
+
+checkconfig() {
+ ${command} --verify-config --hush > /dev/null 2>&1
+ if [ $? -ne 0 ] ; then
+ eerror "Tor configuration (/etc/tor/torrc) is not valid."
+ eerror "Example is in /etc/tor/torrc.sample"
+ return 1
+ fi
+}
+
+start_pre() {
+ checkconfig || return 1
+ checkpath -d -m 0755 -o tor:tor /var/run/tor
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading Tor configuration"
+ start-stop-daemon -s HUP --pidfile ${pidfile}
+ eend $?
+}