aboutsummaryrefslogtreecommitdiff
path: root/emulators/pcsxr
diff options
context:
space:
mode:
authorGanael LAPLANCHE <martymac@FreeBSD.org>2017-01-25 19:59:50 +0000
committerGanael LAPLANCHE <martymac@FreeBSD.org>2017-01-25 19:59:50 +0000
commitca7e23155c8766eb13b48577451280f7cfd05773 (patch)
tree404db6b928426d6825ba85cefe9d2197c854a5a9 /emulators/pcsxr
parentfbaf26c24a78eea365f7cdbeee021223abc6eaf7 (diff)
downloadports-ca7e23155c8766eb13b48577451280f7cfd05773.tar.gz
ports-ca7e23155c8766eb13b48577451280f7cfd05773.zip
Use zlib's uncompress() function and remove local uncompress2() definition.
Pcsxr's uncompress2() is similar to zlib's uncompress() but clashes with zlib's new uncompress2() function, available in 12-CURRENT since zlib v1.2.10 (svn r311285).
Notes
Notes: svn path=/head/; revision=432459
Diffstat (limited to 'emulators/pcsxr')
-rw-r--r--emulators/pcsxr/Makefile2
-rw-r--r--emulators/pcsxr/files/patch-libpcsxcore-cdriso.c29
2 files changed, 30 insertions, 1 deletions
diff --git a/emulators/pcsxr/Makefile b/emulators/pcsxr/Makefile
index 83090126441b..dec3734df0c2 100644
--- a/emulators/pcsxr/Makefile
+++ b/emulators/pcsxr/Makefile
@@ -3,7 +3,7 @@
PORTNAME= pcsxr
PORTVERSION= 1.9.94.r87113
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= emulators
MASTER_SITES= http://contribs.martymac.org/FreeBSD-ports/distfiles/ \
LOCAL/martymac
diff --git a/emulators/pcsxr/files/patch-libpcsxcore-cdriso.c b/emulators/pcsxr/files/patch-libpcsxcore-cdriso.c
new file mode 100644
index 000000000000..762117b0a291
--- /dev/null
+++ b/emulators/pcsxr/files/patch-libpcsxcore-cdriso.c
@@ -0,0 +1,29 @@
+Use zlib's uncompress() function
+
+--- libpcsxcore/cdriso.c.orig 2017-01-21 13:51:48.486985000 +0000
++++ libpcsxcore/cdriso.c 2017-01-21 13:53:55.623314000 +0000
+@@ -1210,6 +1210,7 @@
+ return ret;
+ }
+
++#if 0
+ static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
+ {
+ static z_stream z;
+@@ -1240,6 +1241,7 @@
+ *out_size -= z.avail_out;
+ return ret == 1 ? 0 : ret;
+ }
++#endif
+
+ static int cdread_compressed(FILE *f, unsigned int base, void *dest, int sector)
+ {
+@@ -1289,7 +1291,7 @@
+ if (is_compressed) {
+ cdbuffer_size_expect = sizeof(compr_img->buff_raw[0]) << compr_img->block_shift;
+ cdbuffer_size = cdbuffer_size_expect;
+- ret = uncompress2(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
++ ret = uncompress(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
+ if (ret != 0) {
+ SysPrintf("uncompress failed with %d for block %d, sector %d\n",
+ ret, block, sector);