1 |
pesa 14/07/04 00:04:15 |
2 |
|
3 |
Added: qtgui-4.8.5-libjpeg-9.patch |
4 |
Log: |
5 |
Backport patch to fix build with media-libs/jpeg-9 (bug 480182). |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xDADED6B2671CB57D!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-qt/qtgui/files/qtgui-4.8.5-libjpeg-9.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-qt/qtgui/files/qtgui-4.8.5-libjpeg-9.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-qt/qtgui/files/qtgui-4.8.5-libjpeg-9.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: qtgui-4.8.5-libjpeg-9.patch |
16 |
=================================================================== |
17 |
From 2a9ea11f4dea51f9e75036aab8e7a23f0eb4bd1f Mon Sep 17 00:00:00 2001 |
18 |
From: aavit <eirik.aavitsland@×××××.com> |
19 |
Date: Tue, 10 Sep 2013 11:46:51 +0200 |
20 |
Subject: Compilation fix for libjpeg release 9 |
21 |
MIME-Version: 1.0 |
22 |
Content-Type: text/plain; charset=UTF-8 |
23 |
Content-Transfer-Encoding: 8bit |
24 |
|
25 |
In the latest libjpeg version, the "boolean" type is changed so that |
26 |
true and false no longer can be used instead of TRUE and FALSE. |
27 |
|
28 |
Also, purge some ancient code remains meant to support a now defunct |
29 |
OS´s idea about the boolean type. |
30 |
|
31 |
Task-number: QTBUG-33166 |
32 |
Change-Id: Iebbdf300cfdc22775954de65f985358424ed2b49 |
33 |
Reviewed-by: Gunnar Sletta <gunnar.sletta@×××××.com> |
34 |
(cherry picked from qtbase/fad6aa619bf6eb048821a58065433f6b598c10e4) |
35 |
--- |
36 |
src/gui/image/qjpeghandler.cpp | 27 +++++---------------------- |
37 |
1 file changed, 5 insertions(+), 22 deletions(-) |
38 |
|
39 |
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp |
40 |
index a8700b7..ba5c469 100644 |
41 |
--- a/src/gui/image/qjpeghandler.cpp |
42 |
+++ b/src/gui/image/qjpeghandler.cpp |
43 |
@@ -157,11 +157,7 @@ static boolean qt_fill_input_buffer(j_decompress_ptr cinfo) |
44 |
} else { |
45 |
src->bytes_in_buffer = num_read; |
46 |
} |
47 |
-#if defined(Q_OS_UNIXWARE) |
48 |
- return B_TRUE; |
49 |
-#else |
50 |
- return true; |
51 |
-#endif |
52 |
+ return TRUE; |
53 |
} |
54 |
|
55 |
static void qt_skip_input_data(j_decompress_ptr cinfo, long num_bytes) |
56 |
@@ -489,11 +485,7 @@ static boolean qt_empty_output_buffer(j_compress_ptr cinfo) |
57 |
dest->next_output_byte = dest->buffer; |
58 |
dest->free_in_buffer = max_buf; |
59 |
|
60 |
-#if defined(Q_OS_UNIXWARE) |
61 |
- return B_TRUE; |
62 |
-#else |
63 |
- return true; |
64 |
-#endif |
65 |
+ return TRUE; |
66 |
} |
67 |
|
68 |
static void qt_term_destination(j_compress_ptr cinfo) |
69 |
@@ -584,13 +576,8 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, int sourceQ |
70 |
|
71 |
|
72 |
int quality = sourceQuality >= 0 ? qMin(sourceQuality,100) : 75; |
73 |
-#if defined(Q_OS_UNIXWARE) |
74 |
- jpeg_set_quality(&cinfo, quality, B_TRUE /* limit to baseline-JPEG values */); |
75 |
- jpeg_start_compress(&cinfo, B_TRUE); |
76 |
-#else |
77 |
- jpeg_set_quality(&cinfo, quality, true /* limit to baseline-JPEG values */); |
78 |
- jpeg_start_compress(&cinfo, true); |
79 |
-#endif |
80 |
+ jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); |
81 |
+ jpeg_start_compress(&cinfo, TRUE); |
82 |
|
83 |
row_pointer[0] = new uchar[cinfo.image_width*cinfo.input_components]; |
84 |
int w = cinfo.image_width; |
85 |
@@ -751,11 +738,7 @@ bool QJpegHandlerPrivate::readJpegHeader(QIODevice *device) |
86 |
err.error_exit = my_error_exit; |
87 |
|
88 |
if (!setjmp(err.setjmp_buffer)) { |
89 |
- #if defined(Q_OS_UNIXWARE) |
90 |
- (void) jpeg_read_header(&info, B_TRUE); |
91 |
- #else |
92 |
- (void) jpeg_read_header(&info, true); |
93 |
- #endif |
94 |
+ (void) jpeg_read_header(&info, TRUE); |
95 |
|
96 |
int width = 0; |
97 |
int height = 0; |
98 |
-- |
99 |
2.0.0 |