Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwebengine/files/, dev-qt/qtwebengine/
Date: Wed, 07 Feb 2018 02:04:57
Message-Id: 1517969045.f340edd950eb281bb73bf51ab95b5eb5012ab3b5.asturm@gentoo
1 commit: f340edd950eb281bb73bf51ab95b5eb5012ab3b5
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 6 21:30:21 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 7 02:04:05 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f340edd9
7
8 dev-qt/qtwebengine: Fix build with jpeg-9
9
10 Closes: https://bugs.gentoo.org/607424
11 Closes: https://bugs.gentoo.org/646456
12 Package-Manager: Portage-2.3.24, Repoman-2.3.6
13
14 .../files/qtwebengine-5.9.4-jpeg-9-1.patch | 70 ++++++++++++++++++++++
15 .../files/qtwebengine-5.9.4-jpeg-9-2.patch | 46 ++++++++++++++
16 dev-qt/qtwebengine/qtwebengine-5.9.4.ebuild | 7 ++-
17 3 files changed, 122 insertions(+), 1 deletion(-)
18
19 diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.9.4-jpeg-9-1.patch b/dev-qt/qtwebengine/files/qtwebengine-5.9.4-jpeg-9-1.patch
20 new file mode 100644
21 index 00000000000..8b739680f68
22 --- /dev/null
23 +++ b/dev-qt/qtwebengine/files/qtwebengine-5.9.4-jpeg-9-1.patch
24 @@ -0,0 +1,70 @@
25 +From 560a4a616f2a1307385e5e7a7d2e99b0b41775c8 Mon Sep 17 00:00:00 2001
26 +From: Viktor Engelmann <viktor.engelmann@××.io>
27 +Date: Fri, 18 Aug 2017 14:50:20 +0200
28 +Subject: [PATCH] Fix improper boolean values
29 +
30 +jpeg_codec.cc contained some implicit conversions to boolean, which
31 +is apparently problematic for some versions of libjpeg. Patch
32 +taken from https://bugs.chromium.org/p/chromium/issues/detail?id=686191
33 +but not backported, since it has not been accepted into chromium yet.
34 +
35 +Task-Number: QTBUG-58482
36 +
37 +Change-Id: I2c5d5894493d6a7d0698a4e5a7191288a2fdfeb4
38 +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@××.io>
39 +---
40 + src/3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc | 10 +++++-----
41 + 1 file changed, 5 insertions(+), 5 deletions(-)
42 +
43 +diff --git a/src/3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc b/src/3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc
44 +index 6d92637..85c7bec 100644
45 +--- a/src/3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc
46 ++++ b/src/3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc
47 +@@ -121,7 +121,7 @@ boolean EmptyOutputBuffer(jpeg_compress_struct* cinfo) {
48 + // tell libjpeg where to write the next data
49 + cinfo->dest->next_output_byte = &(*state->out)[state->image_buffer_used];
50 + cinfo->dest->free_in_buffer = state->out->size() - state->image_buffer_used;
51 +- return 1;
52 ++ return TRUE;
53 + }
54 +
55 + // Cleans up the JpegEncoderState to prepare for returning in the final form.
56 +@@ -262,7 +262,7 @@ bool JPEGCodec::Encode(const unsigned char* input, ColorFormat format,
57 + cinfo.data_precision = 8;
58 +
59 + jpeg_set_defaults(&cinfo);
60 +- jpeg_set_quality(&cinfo, quality, 1); // quality here is 0-100
61 ++ jpeg_set_quality(&cinfo, quality, TRUE); // quality here is 0-100
62 +
63 + // set up the destination manager
64 + jpeg_destination_mgr destmgr;
65 +@@ -274,7 +274,7 @@ bool JPEGCodec::Encode(const unsigned char* input, ColorFormat format,
66 + JpegEncoderState state(output);
67 + cinfo.client_data = &state;
68 +
69 +- jpeg_start_compress(&cinfo, 1);
70 ++ jpeg_start_compress(&cinfo, TRUE);
71 +
72 + // feed it the rows, doing necessary conversions for the color format
73 + #ifdef JCS_EXTENSIONS
74 +@@ -360,7 +360,7 @@ void InitSource(j_decompress_ptr cinfo) {
75 + // set to a positive value if TRUE is returned. A FALSE return should only
76 + // be used when I/O suspension is desired."
77 + boolean FillInputBuffer(j_decompress_ptr cinfo) {
78 +- return false;
79 ++ return FALSE;
80 + }
81 +
82 + // Skip data in the buffer. Since we have all the data at once, this operation
83 +@@ -488,7 +488,7 @@ bool JPEGCodec::Decode(const unsigned char* input, size_t input_size,
84 + cinfo.client_data = &state;
85 +
86 + // fill the file metadata into our buffer
87 +- if (jpeg_read_header(&cinfo, true) != JPEG_HEADER_OK)
88 ++ if (jpeg_read_header(&cinfo, TRUE) != JPEG_HEADER_OK)
89 + return false;
90 +
91 + // we want to always get RGB data out
92 +--
93 +2.7.4
94 +
95
96 diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.9.4-jpeg-9-2.patch b/dev-qt/qtwebengine/files/qtwebengine-5.9.4-jpeg-9-2.patch
97 new file mode 100644
98 index 00000000000..ef5f44efcf2
99 --- /dev/null
100 +++ b/dev-qt/qtwebengine/files/qtwebengine-5.9.4-jpeg-9-2.patch
101 @@ -0,0 +1,46 @@
102 +Fix build with jpeg-9. Bug #646456
103 +
104 +--- a/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/codec/fx_codec_jpeg.cpp 2018-01-15 12:39:43.000000000 +0100
105 ++++ b/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/codec/fx_codec_jpeg.cpp 2018-02-06 20:55:37.455912163 +0100
106 +@@ -57,12 +57,12 @@
107 + };
108 + extern "C" {
109 + static boolean _src_fill_buffer(j_decompress_ptr cinfo) {
110 +- return 0;
111 ++ return FALSE;
112 + }
113 + };
114 + extern "C" {
115 + static boolean _src_resync(j_decompress_ptr cinfo, int desired) {
116 +- return 0;
117 ++ return FALSE;
118 + }
119 + };
120 + extern "C" {
121 +@@ -126,7 +126,7 @@
122 + jpeg_destroy_decompress(&cinfo);
123 + return false;
124 + }
125 +- int ret = jpeg_read_header(&cinfo, true);
126 ++ int ret = jpeg_read_header(&cinfo, TRUE);
127 + if (ret != JPEG_HEADER_OK) {
128 + jpeg_destroy_decompress(&cinfo);
129 + return false;
130 +@@ -210,7 +210,7 @@
131 + }
132 + cinfo.image_width = m_OrigWidth;
133 + cinfo.image_height = m_OrigHeight;
134 +- int ret = jpeg_read_header(&cinfo, true);
135 ++ int ret = jpeg_read_header(&cinfo, TRUE);
136 + if (ret != JPEG_HEADER_OK)
137 + return false;
138 +
139 +@@ -433,7 +433,7 @@
140 + if (setjmp(ctx->m_JumpMark) == -1)
141 + return 1;
142 +
143 +- int ret = jpeg_read_header(&ctx->m_Info, true);
144 ++ int ret = jpeg_read_header(&ctx->m_Info, TRUE);
145 + if (ret == JPEG_SUSPENDED)
146 + return 2;
147 + if (ret != JPEG_HEADER_OK)
148
149 diff --git a/dev-qt/qtwebengine/qtwebengine-5.9.4.ebuild b/dev-qt/qtwebengine/qtwebengine-5.9.4.ebuild
150 index e36ea1ca7b3..6545b759d29 100644
151 --- a/dev-qt/qtwebengine/qtwebengine-5.9.4.ebuild
152 +++ b/dev-qt/qtwebengine/qtwebengine-5.9.4.ebuild
153 @@ -77,7 +77,12 @@ DEPEND="${RDEPEND}
154 pax_kernel? ( sys-apps/elfix )
155 "
156
157 -PATCHES=( "${FILESDIR}/${PN}-5.9.3-icu-60.1.patch" )
158 +PATCHES=(
159 + "${FILESDIR}/${PN}-5.9.3-icu-60.1.patch"
160 + "${FILESDIR}/${P}-jpeg-9-1.patch" # bug 607424
161 + # TODO upstream:
162 + "${FILESDIR}/${P}-jpeg-9-2.patch" # bug 646456
163 +)
164
165 src_prepare() {
166 use pax_kernel && PATCHES+=( "${FILESDIR}/${PN}-5.9.3-paxmark-mksnapshot.patch" )