Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/
Date: Sun, 30 Oct 2016 08:17:10
Message-Id: 1477815412.7b987bb0143edbbf0f7e34512c1e90d78db8e692.pacho@gentoo
1 commit: 7b987bb0143edbbf0f7e34512c1e90d78db8e692
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 30 08:12:13 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 08:16:52 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b987bb0
7
8 app-text/mupdf: Fix openjpeg-2.1 patch (#595406 by Oleg)
9
10 Package-Manager: portage-2.3.2
11
12 app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch | 50 ++++++++++++++++++++---
13 1 file changed, 45 insertions(+), 5 deletions(-)
14
15 diff --git a/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch b/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch
16 index 7048140..f3b09eb 100644
17 --- a/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch
18 +++ b/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch
19 @@ -1,11 +1,51 @@
20 ---- mupdf-1.5/source/fitz/load-jpx.c
21 -+++ mupdf-1.5/source/fitz/load-jpx.c
22 -@@ -116,7 +116,7 @@
23 +From: =?utf-8?q?=22Kan-Ru_Chen_=28=E9=99=B3=E4=BE=83=E5=A6=82=29=22?=
24 + <koster@××××××.org>
25 +Date: Sat, 20 Sep 2014 12:33:08 +0800
26 +Subject: Fix build with libopenjp2
27 +
28 +---
29 + Makerules | 4 ++--
30 + source/fitz/load-jpx.c | 10 +---------
31 + 2 files changed, 3 insertions(+), 11 deletions(-)
32 +
33 +diff --git a/Makerules b/Makerules
34 +index 766ad53..a93b9cf 100644
35 +--- a/Makerules
36 ++++ b/Makerules
37 +@@ -105,8 +105,8 @@ SYS_HARFBUZZ_CFLAGS = $(shell pkg-config --cflags harfbuzz)
38 + SYS_HARFBUZZ_LIBS = $(shell pkg-config --libs harfbuzz)
39 + SYS_FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
40 + SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2)
41 +-SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjp2)
42 +-SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjp2)
43 ++SYS_OPENJPEG_CFLAGS = -I/usr/include/openjpeg-2.1
44 ++SYS_OPENJPEG_LIBS = -lopenjp2
45 + SYS_JBIG2DEC_LIBS = -ljbig2dec
46 + SYS_JPEG_LIBS = -ljpeg
47 + SYS_ZLIB_LIBS = -lz
48 +diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
49 +index 6b92e5c..72dea50 100644
50 +--- a/source/fitz/load-jpx.c
51 ++++ b/source/fitz/load-jpx.c
52 +@@ -1,13 +1,5 @@
53 + #include "mupdf/fitz.h"
54 +
55 +-/* Without the definition of OPJ_STATIC, compilation fails on windows
56 +- * due to the use of __stdcall. We believe it is required on some
57 +- * linux toolchains too. */
58 +-#define OPJ_STATIC
59 +-#ifndef _MSC_VER
60 +-#define OPJ_HAVE_STDINT_H
61 +-#endif
62 +-
63 + #include <openjpeg.h>
64 +
65 + static void fz_opj_error_callback(const char *msg, void *client_data)
66 +@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs
67 opj_stream_set_read_function(stream, fz_opj_stream_read);
68 opj_stream_set_skip_function(stream, fz_opj_stream_skip);
69 opj_stream_set_seek_function(stream, fz_opj_stream_seek);
70 - opj_stream_set_user_data(stream, &sb);
71 + opj_stream_set_user_data(stream, &sb, NULL);
72 /* Set the length to avoid an assert */
73 - opj_stream_set_user_data_length(stream, size);
74 -
75 + opj_stream_set_user_data_length(stream, size);
76 \ No newline at end of file