summary refs log tree commit diff
path: root/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-09-30 12:01:32 +0200
committerLudovic Courtès <ludo@gnu.org>2016-09-30 12:05:27 +0200
commit79355ae3e84359716f5135cc7083e72246bc8bf9 (patch)
tree6b61851e2153581578bb78ef0f177b8841ee5db7 /gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
parent39d6b9c99f297e14fc4f47f002be3d40556726be (diff)
parent86d8f6d3efb8300a3354735cbf06be6c01e23243 (diff)
downloadguix-79355ae3e84359716f5135cc7083e72246bc8bf9.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch')
-rw-r--r--gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch b/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
new file mode 100644
index 0000000000..cd8136b701
--- /dev/null
+++ b/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
@@ -0,0 +1,38 @@
+Make it possible to build MuPDF with OpenJPEG 2.1, which is the latest
+release series and contains many important bug fixes.
+
+Patch adapted from Debian:
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745246
+
+And related to this upstream commit:
+
+http://git.ghostscript.com/?p=mupdf.git;a=commit;h=f88bfe2e62dbadb96d4f52d7aa025f0a516078da
+
+diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
+index 6b92e5c..72dea50 100644
+--- a/source/fitz/load-jpx.c
++++ b/source/fitz/load-jpx.c
+@@ -1,13 +1,5 @@
+ #include "mupdf/fitz.h"
+ 
+-/* Without the definition of OPJ_STATIC, compilation fails on windows
+- * due to the use of __stdcall. We believe it is required on some
+- * linux toolchains too. */
+-#define OPJ_STATIC
+-#ifndef _MSC_VER
+-#define OPJ_HAVE_STDINT_H
+-#endif
+-
+ #include <openjpeg.h>
+ 
+ static void fz_opj_error_callback(const char *msg, void *client_data)
+@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs
+ 	opj_stream_set_read_function(stream, fz_opj_stream_read);
+ 	opj_stream_set_skip_function(stream, fz_opj_stream_skip);
+ 	opj_stream_set_seek_function(stream, fz_opj_stream_seek);
+-	opj_stream_set_user_data(stream, &sb);
++	opj_stream_set_user_data(stream, &sb, NULL);
+ 	/* Set the length to avoid an assert */
+ 	opj_stream_set_user_data_length(stream, size);
+