Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/pcsxr/, games-emulation/pcsxr/files/
Date: Thu, 26 Jan 2017 17:54:31
Message-Id: 1485453256.fdcb46b955fa352f5a8070babd457a7a0cdc5880.mgorny@gentoo
1 commit: fdcb46b955fa352f5a8070babd457a7a0cdc5880
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 26 17:26:34 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 26 17:54:16 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdcb46b9
7
8 games-emulation/pcsxr: Fix building against recent zlib, #604382
9
10 .../files/pcsxr-1.9.94-zlib-uncompress2.patch | 47 ++++++++++++++++++++++
11 games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild | 3 +-
12 2 files changed, 49 insertions(+), 1 deletion(-)
13
14 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
15 new file mode 100644
16 index 00000000..b269185
17 --- /dev/null
18 +++ b/games-emulation/pcsxr/files/pcsxr-1.9.94-zlib-uncompress2.patch
19 @@ -0,0 +1,47 @@
20 +From dabb671947ae26942c7ef8a71fef9831e0c1884d Mon Sep 17 00:00:00 2001
21 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
22 +Date: Thu, 26 Jan 2017 18:14:01 +0100
23 +Subject: [PATCH] Fix build against zlib-1.2.9+ (having uncompress2)
24 +
25 +---
26 + pcsxr/configure.ac | 3 +++
27 + pcsxr/libpcsxcore/cdriso.c | 2 ++
28 + 2 files changed, 5 insertions(+)
29 +
30 +diff --git a/pcsxr/configure.ac b/pcsxr/configure.ac
31 +index 300bb185..128b4f97 100644
32 +--- a/pcsxr/configure.ac
33 ++++ b/pcsxr/configure.ac
34 +@@ -113,6 +113,9 @@ if test "x$have_xtest" = xno; then
35 + AC_MSG_ERROR([unable to find xtest headers])
36 + fi
37 +
38 ++AC_CHECK_LIB(z, uncompress2,
39 ++[ AC_DEFINE([HAVE_UNCOMPRESS2], [1], [Define if libz supports uncompress2]) ])
40 ++
41 + AM_CONDITIONAL(USE_LIBCDIO, false)
42 +
43 + AC_ARG_ENABLE(libcdio, [ --enable-libcdio use GNU libcdio for CD-ROM support (default=no)],
44 +diff --git a/pcsxr/libpcsxcore/cdriso.c b/pcsxr/libpcsxcore/cdriso.c
45 +index 04e866d9..fb7f28a5 100644
46 +--- a/pcsxr/libpcsxcore/cdriso.c
47 ++++ b/pcsxr/libpcsxcore/cdriso.c
48 +@@ -1219,6 +1219,7 @@ static int cdread_sub_mixed(FILE *f, unsigned int base, void *dest, int sector)
49 + return ret;
50 + }
51 +
52 ++#ifndef HAVE_UNCOMPRESS2
53 + static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
54 + {
55 + static z_stream z;
56 +@@ -1249,6 +1250,7 @@ static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned lo
57 + *out_size -= z.avail_out;
58 + return ret == 1 ? 0 : ret;
59 + }
60 ++#endif
61 +
62 + static int cdread_compressed(FILE *f, unsigned int base, void *dest, int sector)
63 + {
64 +--
65 +2.11.0
66 +
67
68 diff --git a/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild b/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
69 index 961fc5a..6636d04 100644
70 --- a/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
71 +++ b/games-emulation/pcsxr/pcsxr-1.9.94-r1.ebuild
72 @@ -1,4 +1,4 @@
73 -# Copyright 1999-2014 Gentoo Foundation
74 +# Copyright 1999-2017 Gentoo Foundation
75 # Distributed under the terms of the GNU General Public License v2
76 # $Id$
77
78 @@ -54,6 +54,7 @@ S=${WORKDIR}/${PN}
79 src_prepare() {
80 local PATCHES=(
81 "${FILESDIR}"/${P}-disable-sdl2.patch
82 + "${FILESDIR}"/${P}-zlib-uncompress2.patch
83 )
84
85 epatch "${PATCHES[@]}"