mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: mupdf: Update to 1.9a.
* gnu/packages/pdf.scm (mupdf): Update to 1.9a. [source]: Use "mupdf-build-with-openjpeg-2.1.patch". Adjust snippet to preserve bundled 'thirdparty/mujs'. [inputs]: Add harfbuzz. Replace openjpeg-2.0 with openjpeg. * gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
parent
4ce01773f3
commit
c41d97bed6
3 changed files with 59 additions and 6 deletions
38
gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
Normal file
38
gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
Normal file
|
@ -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);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue