summaryrefslogtreecommitdiff
path: root/games-emulation/pcsxr
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/pcsxr')
-rw-r--r--games-emulation/pcsxr/Manifest9
-rw-r--r--games-emulation/pcsxr/files/pcsxr-1.9.94-disable-sdl2.patch28
-rw-r--r--games-emulation/pcsxr/files/pcsxr-1.9.94-ffmpeg3.patch62
-rw-r--r--games-emulation/pcsxr/files/pcsxr-1.9.94-zlib-uncompress2.patch47
-rw-r--r--games-emulation/pcsxr/metadata.xml12
-rw-r--r--games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild111
-rw-r--r--games-emulation/pcsxr/pcsxr-1.9.94-r2.ebuild115
7 files changed, 384 insertions, 0 deletions
diff --git a/games-emulation/pcsxr/Manifest b/games-emulation/pcsxr/Manifest
new file mode 100644
index 000000000000..61ad62639076
--- /dev/null
+++ b/games-emulation/pcsxr/Manifest
@@ -0,0 +1,9 @@
+AUX pcsxr-1.9.94-disable-sdl2.patch 1059 SHA256 7be3baa643513cee92fa908c6ae529c5f953a24f0ce7a01fc602fbba0381897e SHA512 aa010d8203a45ddd7f93fcc74d3ec9010dcdf6a79d36bb72aa434caccac650c2dee5a74e52e11e40b35356ca30d9a37a52b5e76dcacba64634988b9e57c74171 WHIRLPOOL 6cd5224095001b48ac922ffa8bcb3f3a749edb4540e8b1a4d404835b4f391a3b63c2fa1d25725c01bf83c9b919fdf78d16b2f2fc1f404c37c9d96848f6f8bfce
+AUX pcsxr-1.9.94-ffmpeg3.patch 1890 SHA256 87f5144baf233c013e03b419b1fad2f945c388f5bfab7e8767ee0cd0c2c8c76f SHA512 091c435337468aa958c5b6e87a0ce5730675d9f8d109474c92d5e1d61830a8b4c525f8e3208e86654baca5ae602a39bc234a0c54b24b4f51a1297fb123852dc3 WHIRLPOOL 00eed01b165f1b989faff9154bdaddc5d14bfcf94d368af80b99969de05078c9877dca11513329a5344ef459890285760ba5464375eb541435654dc904de19cb
+AUX pcsxr-1.9.94-zlib-uncompress2.patch 1522 SHA256 b49aa3b619decb2d1659928ea345cdc682592ee6749432a79c3d8a18a66333d0 SHA512 28350e042810a8f1c3829891d68b028b4c464b75e614f8451f8708bbff0ee47e94146a05cf5e6e3fdfe6ca7eae2e839fc8cbf95df8458e28e3d025feb728c310 WHIRLPOOL fb39c5858da9590bc7d60fd1b3cd95d801a31697660cd73d629b0b558e2c21c55f2c54ffdc15383ce6644ea8686cc8f647cc179c389e3c23cd83e4f894f94c93
+DIST pcsxr-1.9.94.zip 2631125 SHA256 291941eebe695d9133539783dee208fce9d7419f0042964f96bf10ce3eee9fa3 SHA512 c49471c27692fbf22da32d2f5697a1dfed3dbdbfdb86cb789b0ea6cddb2a7da4f3390e4568f4e9385bf30d6baff0f2a591a80f424cf0c640cae0035ba81dce39 WHIRLPOOL 8095fda6821cb7549574f8ff97d75d34350317f0e71ce27f9c540244ca66d3419c1aa4bdac91142cd7304daa7d56689565417f7203eb67f605c81727859a7cea
+EBUILD pcsxr-1.9.94-r1.ebuild 2621 SHA256 cbaf8816e8904fb1b15229ea8353a5ab2391dd2314253b27011957bda2ca52af SHA512 1bd5e95baaf82473638cf2b644d46d52976a1b14f13c40e8d49037ac3fedbe09012e77334420a3fce29eff06f8044f270f0068c13d56fd449e7d3e2f43123d3a WHIRLPOOL ca640c4ad75a468abfae438f0aed991e9938ca755f537172964d8b596ccc7fcbc005fae9a4c71fb267f08fe28c914f3d924175da6f43a858db64629ef9ce2dac
+EBUILD pcsxr-1.9.94-r2.ebuild 2676 SHA256 38b3c4d82ec36613759288106d643e735d9e4d6d22be530aa574945b0aa21629 SHA512 6c7a1ca717619d0faacfb435269b05906f043b04a73bcdf07a918d7deeca5513946bb921af0728b92b06bfa74547748412c3d530c565c3b616ad7c58b2e055b4 WHIRLPOOL a70b8956143442b3104b8dd4ceb9df8ce947e9c58f0e1cae771adcc80adc61905a98121baf5757e581ea8f0f91deb6c0746d4cf5d89e362c55058fc1634b9ce2
+MISC ChangeLog 2760 SHA256 4693b33eb6dcd68e428a69fe7447ae9950c7bea516d1eb651f875e89da0bc3d7 SHA512 30e842752a4db39ef72e6d8b0c17da9d058c40e774da2d7b7d54a1ff0d4765ddb9e02e0c9e4b9577b843a2bcc39a5a746df02b22101b313b298409256c0e0c22 WHIRLPOOL b3ac29453eeead6dc320488f875c66046d62197b2f6bbca4f11b1553679e9e13cd91bfc07b6155330787782761658cc1dbd95cef81d46fb493110d004878cc6c
+MISC ChangeLog-2015 966 SHA256 93c544d8377f180ed84b735fb60c382610bd3af682e4bccad70f18b273928962 SHA512 7aa2c1fc7d448a2c97876b2143b52388c3d24f92d83573ddb694cc96f55994d3d850de24e9f6c5bed8f1d70b4a0273f2be9dc0923e6b13a7a9141485f08ac8fa WHIRLPOOL cc818bf03f6524acb6f59ac9d6e7cb646e9d3a44469e1f50f32e1e57e37afa269774b0e4f93e4cebf75acfb4cc4e937426cec67090cf050fef9a1d8d64d6cffb
+MISC metadata.xml 410 SHA256 725adf8a73076e30ca64c182ea35af95c5fb6312da6ef2621ce8072b79ccd3fb SHA512 4c7e8a04412bd0851f4422bd646423558cc7e67ad956b518104285eb537a7a3cbf492239a11a582be65c45229299d0309823f3a6064717704d2fab4c15d2ee52 WHIRLPOOL b89a93adbc4474f9829958b9ea7a30bf877648c9992554ebfa16176e1159df43571b418e55c542838342ace7324105ff6db3d58990438682babebf2496a0d229
diff --git a/games-emulation/pcsxr/files/pcsxr-1.9.94-disable-sdl2.patch b/games-emulation/pcsxr/files/pcsxr-1.9.94-disable-sdl2.patch
new file mode 100644
index 000000000000..483ea56660e6
--- /dev/null
+++ b/games-emulation/pcsxr/files/pcsxr-1.9.94-disable-sdl2.patch
@@ -0,0 +1,28 @@
+From b7864d1b8db75eda19a7601f3e2402a885bb251d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 11 Dec 2013 17:19:09 +0100
+Subject: [PATCH] Disable SDL2 check for Gentoo.
+
+The SDL2 support seems immature at the moment, so we'd prefer pcsxr
+using SDL1 even if SDL2 is installed.
+---
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f79cee0..0c79cff 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,8 +26,7 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain])
+ PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.20, [], AC_MSG_ERROR([*** glib2 >= 2.20 not found!]))
+ PKG_CHECK_MODULES(GTK3, gtk+-3.0 , [], AC_MSG_ERROR([*** libgtk3 >= 3.0 not found!]))
+
+-PKG_CHECK_MODULES([SDL2], [sdl2 >= 2.0.0],
+- [AC_DEFINE([HAVE_SDL2], [1], [Use SDL2])],
++AS_IF([true],
+ [PKG_CHECK_MODULES([SDL], [sdl >= 1.2.12],
+ [AC_DEFINE([HAVE_SDL], [1], [Use SDL])
+ ], AC_MSG_ERROR([*** SDL >= 1.2.12 not found!]))
+--
+1.8.5.1
+
diff --git a/games-emulation/pcsxr/files/pcsxr-1.9.94-ffmpeg3.patch b/games-emulation/pcsxr/files/pcsxr-1.9.94-ffmpeg3.patch
new file mode 100644
index 000000000000..345ed9993ea4
--- /dev/null
+++ b/games-emulation/pcsxr/files/pcsxr-1.9.94-ffmpeg3.patch
@@ -0,0 +1,62 @@
+--- a/libpcsxcore/cdriso.c 2013-11-09 16:24:14.000000000 +0100
++++ b/libpcsxcore/cdriso.c 2016-12-12 01:02:25.652521029 +0100
+@@ -266,14 +266,14 @@
+ }
+
+ if (!decoded_frame) {
+- if (!(decoded_frame = avcodec_alloc_frame())) {
++ if (!(decoded_frame = av_frame_alloc())) {
+ SysMessage(_(" -> Error allocating audio frame buffer. This track will not be available."));
+ avformat_close_input(&inAudioFormat);
+- avcodec_free_frame(&decoded_frame);
++ av_frame_free(&decoded_frame);
+ return 1; // error decoding frame
+ }
+ } else {
+- avcodec_get_frame_defaults(decoded_frame);
++ av_frame_unref(decoded_frame);
+ }
+ len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt);
+ if (len > 0 && got_frame) {
+@@ -285,7 +285,7 @@
+ fwrite(decoded_frame->data[0], 1, data_size, outfile);
+ }
+ av_free_packet(&avpkt);
+- //avcodec_free_frame(&decoded_frame);
++ //av_frame_free(&decoded_frame);
+ } while (moreFrames >= 0); // TODO: check for possible leaks
+
+ // file will be closed later on, now just flush it
+@@ -294,7 +294,7 @@
+ avformat_close_input(&inAudioFormat);
+ //avcodec_close(c);
+ //av_free(c);
+- avcodec_free_frame(&decoded_frame);
++ av_frame_free(&decoded_frame);
+ return 0;
+ }
+ #endif
+@@ -340,12 +340,12 @@
+ while (avpkt.size > 0) {
+ int got_frame = 0;
+ if (!decoded_frame) {
+- if (!(decoded_frame = avcodec_alloc_frame())) {
++ if (!(decoded_frame = av_frame_alloc())) {
+ SysPrintf(" -> Error allocating audio frame buffer. Track will not be available.");
+ return 1; // error decoding frame
+ }
+ } else {
+- avcodec_get_frame_defaults(decoded_frame);
++ av_frame_unref(decoded_frame);
+ }
+
+ len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt);
+@@ -383,7 +383,7 @@
+
+ avcodec_close(c);
+ av_free(c);
+- avcodec_free_frame(&decoded_frame);
++ av_frame_free(&decoded_frame);
+ return 0;
+ }
+ #endif
diff --git a/games-emulation/pcsxr/files/pcsxr-1.9.94-zlib-uncompress2.patch b/games-emulation/pcsxr/files/pcsxr-1.9.94-zlib-uncompress2.patch
new file mode 100644
index 000000000000..616084b797cd
--- /dev/null
+++ b/games-emulation/pcsxr/files/pcsxr-1.9.94-zlib-uncompress2.patch
@@ -0,0 +1,47 @@
+From dabb671947ae26942c7ef8a71fef9831e0c1884d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 26 Jan 2017 18:14:01 +0100
+Subject: [PATCH] Fix build against zlib-1.2.9+ (having uncompress2)
+
+---
+ pcsxr/configure.ac | 3 +++
+ pcsxr/libpcsxcore/cdriso.c | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/pcsxr/configure.ac b/pcsxr/configure.ac
+index 300bb185..128b4f97 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -113,6 +113,9 @@ if test "x$have_xtest" = xno; then
+ AC_MSG_ERROR([unable to find xtest headers])
+ fi
+
++AC_CHECK_LIB(z, uncompress2,
++[ AC_DEFINE([HAVE_UNCOMPRESS2], [1], [Define if libz supports uncompress2]) ])
++
+ AM_CONDITIONAL(USE_LIBCDIO, false)
+
+ AC_ARG_ENABLE(libcdio, [ --enable-libcdio use GNU libcdio for CD-ROM support (default=no)],
+diff --git a/pcsxr/libpcsxcore/cdriso.c b/pcsxr/libpcsxcore/cdriso.c
+index 04e866d9..fb7f28a5 100644
+--- a/libpcsxcore/cdriso.c
++++ b/libpcsxcore/cdriso.c
+@@ -1219,6 +1219,7 @@ static int cdread_sub_mixed(FILE *f, unsigned int base, void *dest, int sector)
+ return ret;
+ }
+
++#ifndef HAVE_UNCOMPRESS2
+ static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
+ {
+ static z_stream z;
+@@ -1249,6 +1250,7 @@ static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned lo
+ *out_size -= z.avail_out;
+ return ret == 1 ? 0 : ret;
+ }
++#endif
+
+ static int cdread_compressed(FILE *f, unsigned int base, void *dest, int sector)
+ {
+--
+2.11.0
+
diff --git a/games-emulation/pcsxr/metadata.xml b/games-emulation/pcsxr/metadata.xml
new file mode 100644
index 000000000000..04c9bdf246b4
--- /dev/null
+++ b/games-emulation/pcsxr/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="cdio">Use libcdio for CD support</flag>
+ <flag name="sdl">Use SDL sound backend (other parts of SDL are used unconditionally)</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild b/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
new file mode 100644
index 000000000000..da469d9a7611
--- /dev/null
+++ b/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib versionator
+
+DESCRIPTION="PCSX-Reloaded: a fork of PCSX, the discontinued Playstation emulator"
+HOMEPAGE="http://pcsxr.codeplex.com"
+# codeplex doesn't support direct downloads but GPL-2 doesn't mind me
+# mirroring it.
+SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.zip"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="alsa cdio ffmpeg nls openal opengl oss pulseaudio +sdl"
+
+# pcsxr supports both SDL1 and SDL2 but uses the newer version installed
+# since SDL is not properly slotted in Gentoo, just fix it on SDL2
+
+RDEPEND="dev-libs/glib:2=
+ media-libs/libsdl:0=[joystick]
+ sys-libs/zlib:0=
+ x11-libs/gtk+:3=
+ x11-libs/libX11:0=
+ x11-libs/libXext:0=
+ x11-libs/libXtst:0=
+ x11-libs/libXv:0=
+ alsa? ( media-libs/alsa-lib:0= )
+ cdio? ( dev-libs/libcdio:0= )
+ ffmpeg? ( virtual/ffmpeg:0= )
+ nls? ( virtual/libintl:0= )
+ openal? ( media-libs/openal:0= )
+ opengl? ( virtual/opengl:0=
+ x11-libs/libXxf86vm:0= )
+ pulseaudio? ( media-sound/pulseaudio:0= )
+ sdl? ( media-libs/libsdl:0=[sound] )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/intltool
+ x11-proto/videoproto
+ nls? ( sys-devel/gettext:0 )
+ x86? ( dev-lang/nasm )"
+
+REQUIRED_USE="?? ( alsa openal oss pulseaudio sdl )"
+
+# it's only the .po file check that fails :)
+RESTRICT=test
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${P}-disable-sdl2.patch
+ "${FILESDIR}"/${P}-zlib-uncompress2.patch
+ )
+
+ epatch "${PATCHES[@]}"
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ local sound_backend
+
+ if use alsa; then
+ sound_backend=alsa
+ elif use oss; then
+ sound_backend=oss
+ elif use pulseaudio; then
+ sound_backend=pulseaudio
+ elif use sdl; then
+ sound_backend=sdl
+ elif use openal; then
+ sound_backend=openal
+ else
+ sound_backend=null
+ fi
+
+ local myconf=(
+ $(use_enable nls)
+ $(use_enable cdio libcdio)
+ $(use_enable opengl)
+ $(use_enable ffmpeg ccdda)
+ --enable-sound=${sound_backend}
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ dodoc doc/{keys,tweaks}.txt
+}
+
+pkg_postinst() {
+ local vr
+ for vr in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.94-r1 ${vr}; then
+ ewarn "Starting with pcsxr-1.9.94-r1, the plugin install path has changed."
+ ewarn "In order for pcsxr to find plugins, you will need to remove stale"
+ ewarn "symlinks from ~/.pcsxr/plugins. You can do this using the following"
+ ewarn "command (as your regular user):"
+ ewarn
+ ewarn " $ find ~/.pcsxr/plugins/ -type l -delete"
+ fi
+ done
+}
diff --git a/games-emulation/pcsxr/pcsxr-1.9.94-r2.ebuild b/games-emulation/pcsxr/pcsxr-1.9.94-r2.ebuild
new file mode 100644
index 000000000000..319b46f2fd2e
--- /dev/null
+++ b/games-emulation/pcsxr/pcsxr-1.9.94-r2.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools ltprune versionator
+
+DESCRIPTION="PCSX-Reloaded: a fork of PCSX, the discontinued Playstation emulator"
+HOMEPAGE="http://pcsxr.codeplex.com"
+# codeplex doesn't support direct downloads but GPL-2 doesn't mind me
+# mirroring it.
+SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.zip"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="alsa cdio ffmpeg libav nls openal opengl oss pulseaudio +sdl"
+REQUIRED_USE="?? ( alsa openal oss pulseaudio sdl )"
+
+# pcsxr supports both SDL1 and SDL2 but uses the newer version installed
+# since SDL is not properly slotted in Gentoo, just fix it on SDL2
+
+RDEPEND="
+ dev-libs/glib:2=
+ media-libs/libsdl:0=[joystick]
+ sys-libs/zlib:0=
+ x11-libs/gtk+:3=
+ x11-libs/libX11:0=
+ x11-libs/libXext:0=
+ x11-libs/libXtst:0=
+ x11-libs/libXv:0=
+ alsa? ( media-libs/alsa-lib:0= )
+ cdio? ( dev-libs/libcdio:0= )
+ ffmpeg? (
+ !libav? ( >=media-video/ffmpeg-3:0= )
+ libav? ( media-video/libav:0= ) )
+ nls? ( virtual/libintl:0= )
+ openal? ( media-libs/openal:0= )
+ opengl? ( virtual/opengl:0=
+ x11-libs/libXxf86vm:0= )
+ pulseaudio? ( media-sound/pulseaudio:0= )
+ sdl? ( media-libs/libsdl:0=[sound] )
+"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/intltool
+ x11-proto/videoproto
+ nls? ( sys-devel/gettext:0 )
+ x86? ( dev-lang/nasm )
+"
+
+# it's only the .po file check that fails :)
+RESTRICT=test
+
+PATCHES=(
+ "${FILESDIR}"/${P}-disable-sdl2.patch
+ "${FILESDIR}"/${P}-zlib-uncompress2.patch
+ "${FILESDIR}"/${P}-ffmpeg3.patch
+)
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local sound_backend
+
+ if use alsa; then
+ sound_backend=alsa
+ elif use oss; then
+ sound_backend=oss
+ elif use pulseaudio; then
+ sound_backend=pulseaudio
+ elif use sdl; then
+ sound_backend=sdl
+ elif use openal; then
+ sound_backend=openal
+ else
+ sound_backend=null
+ fi
+
+ local myconf=(
+ $(use_enable nls)
+ $(use_enable cdio libcdio)
+ $(use_enable opengl)
+ $(use_enable ffmpeg ccdda)
+ --enable-sound=${sound_backend}
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ dodoc doc/{keys,tweaks}.txt
+}
+
+pkg_postinst() {
+ local vr
+ for vr in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.94-r1 ${vr}; then
+ ewarn "Starting with pcsxr-1.9.94-r1, the plugin install path has changed."
+ ewarn "In order for pcsxr to find plugins, you will need to remove stale"
+ ewarn "symlinks from ~/.pcsxr/plugins. You can do this using the following"
+ ewarn "command (as your regular user):"
+ ewarn
+ ewarn " $ find ~/.pcsxr/plugins/ -type l -delete"
+ fi
+ done
+}