summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-01-26 18:26:34 +0100
committerMichał Górny <mgorny@gentoo.org>2017-01-26 18:54:16 +0100
commitfdcb46b955fa352f5a8070babd457a7a0cdc5880 (patch)
treeddcaf7fa64df262137720e29ef48d512e4f44fc6 /games-emulation/pcsxr
parentsys-apps/epoch: fix #607214 missing default config file (diff)
downloadgentoo-fdcb46b955fa352f5a8070babd457a7a0cdc5880.tar.gz
gentoo-fdcb46b955fa352f5a8070babd457a7a0cdc5880.tar.bz2
gentoo-fdcb46b955fa352f5a8070babd457a7a0cdc5880.zip
games-emulation/pcsxr: Fix building against recent zlib, #604382
Diffstat (limited to 'games-emulation/pcsxr')
-rw-r--r--games-emulation/pcsxr/files/pcsxr-1.9.94-zlib-uncompress2.patch47
-rw-r--r--games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild3
2 files changed, 49 insertions, 1 deletions
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 00000000000..b2691855b3a
--- /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/pcsxr/configure.ac
++++ b/pcsxr/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/pcsxr/libpcsxcore/cdriso.c
++++ b/pcsxr/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/pcsxr-1.9.94-r1.ebuild b/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
index 961fc5a3411..6636d04109d 100644
--- a/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
+++ b/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -54,6 +54,7 @@ S=${WORKDIR}/${PN}
src_prepare() {
local PATCHES=(
"${FILESDIR}"/${P}-disable-sdl2.patch
+ "${FILESDIR}"/${P}-zlib-uncompress2.patch
)
epatch "${PATCHES[@]}"