diff options
Diffstat (limited to 'games-emulation/pcsxr')
-rw-r--r-- | games-emulation/pcsxr/Manifest | 6 | ||||
-rw-r--r-- | games-emulation/pcsxr/files/pcsxr-1.9.94-disable-sdl2.patch | 28 | ||||
-rw-r--r-- | games-emulation/pcsxr/files/pcsxr-1.9.94-ffmpeg3.patch | 62 | ||||
-rw-r--r-- | games-emulation/pcsxr/files/pcsxr-1.9.94-zlib-uncompress2.patch | 47 | ||||
-rw-r--r-- | games-emulation/pcsxr/metadata.xml | 12 | ||||
-rw-r--r-- | games-emulation/pcsxr/pcsxr-1.9.94-r2.ebuild | 115 |
6 files changed, 270 insertions, 0 deletions
diff --git a/games-emulation/pcsxr/Manifest b/games-emulation/pcsxr/Manifest new file mode 100644 index 000000000000..e8f69e37dbc2 --- /dev/null +++ b/games-emulation/pcsxr/Manifest @@ -0,0 +1,6 @@ +AUX pcsxr-1.9.94-disable-sdl2.patch 1059 BLAKE2B 6421cbf6f2df49c2c61cc83602c13b4189781b30ecf3a1f605e537ad0b1c97205c65cd1c51fd58c1b6c0fa4027b7163e9d82228136ccd7bcc508f5917ab46248 SHA512 aa010d8203a45ddd7f93fcc74d3ec9010dcdf6a79d36bb72aa434caccac650c2dee5a74e52e11e40b35356ca30d9a37a52b5e76dcacba64634988b9e57c74171 +AUX pcsxr-1.9.94-ffmpeg3.patch 1890 BLAKE2B 74bd342c5ffb1cd8cc280add5b89aee448d180356e5cf7eb8252414d933c83ee5e0045146e3953f219b4330c2df2e5a4f68c0e07c4d5c1060d1708c2229455ad SHA512 091c435337468aa958c5b6e87a0ce5730675d9f8d109474c92d5e1d61830a8b4c525f8e3208e86654baca5ae602a39bc234a0c54b24b4f51a1297fb123852dc3 +AUX pcsxr-1.9.94-zlib-uncompress2.patch 1522 BLAKE2B c872121a676d42f6855359eafa50be57e42a573ae2b470463fb25322cc5e7004c443de7bb214a55bfb9a99c4f88026892313301fe1c4960e823c842889f28966 SHA512 28350e042810a8f1c3829891d68b028b4c464b75e614f8451f8708bbff0ee47e94146a05cf5e6e3fdfe6ca7eae2e839fc8cbf95df8458e28e3d025feb728c310 +DIST pcsxr-1.9.94.zip 2631125 BLAKE2B 686503faffccc820bcac73bc69056ffe05176779ee49b834ce0da84c40a047b7882ca7b91a7b7f95ab153329ca6368ae545bbe567cac6a9bdba1a434c397862c SHA512 c49471c27692fbf22da32d2f5697a1dfed3dbdbfdb86cb789b0ea6cddb2a7da4f3390e4568f4e9385bf30d6baff0f2a591a80f424cf0c640cae0035ba81dce39 +EBUILD pcsxr-1.9.94-r2.ebuild 2675 BLAKE2B 475bdfe5e53828f78b434cb6c1ea7b86deb7bfbfe83b470f4f6e54fc4ce6f0308e4329883d8564734fc1d1e178179e8e47aeeb8f6a4280078131149b59599f90 SHA512 1210b0fac40c7f310efefaea9342ac4a9a89e6eb366ac7de4db87385627a297947e2cc0d3cbfc3b00104f0c58c41f3aebb2bc6222a7d10f489969f3efcc6960c +MISC metadata.xml 410 BLAKE2B 43f3920798ece05509e24b693d5b8de55a87337e637bc9b1c6f57ebd79d7c67e3d47c2d8c695cfc3386c733396a7c59e2fcb1f4087fd8b926b30c8962b698d99 SHA512 4c7e8a04412bd0851f4422bd646423558cc7e67ad956b518104285eb537a7a3cbf492239a11a582be65c45229299d0309823f3a6064717704d2fab4c15d2ee52 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-r2.ebuild b/games-emulation/pcsxr/pcsxr-1.9.94-r2.ebuild new file mode 100644 index 000000000000..b58d16a4d360 --- /dev/null +++ b/games-emulation/pcsxr/pcsxr-1.9.94-r2.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2018 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-base/xorg-proto + 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 +} |