1 |
commit: 7621a65d7bbacc22afdeefbf647be9623f932104 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 29 23:50:19 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 29 23:52:38 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7621a65d |
7 |
|
8 |
media-libs/libextractor: Fix build with exiv2-0.27 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/674046 |
11 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
.../files/libextractor-1.8-exiv2-0.27.patch | 127 +++++++++++++++++++++ |
15 |
media-libs/libextractor/libextractor-1.8-r1.ebuild | 5 +- |
16 |
2 files changed, 131 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/media-libs/libextractor/files/libextractor-1.8-exiv2-0.27.patch b/media-libs/libextractor/files/libextractor-1.8-exiv2-0.27.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..cfdb6426408 |
21 |
--- /dev/null |
22 |
+++ b/media-libs/libextractor/files/libextractor-1.8-exiv2-0.27.patch |
23 |
@@ -0,0 +1,127 @@ |
24 |
+From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001 |
25 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
26 |
+Date: Sun, 30 Dec 2018 00:46:57 +0100 |
27 |
+Subject: [PATCH] Fix build with exiv2-0.27 |
28 |
+ |
29 |
+--- |
30 |
+ src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++------- |
31 |
+ 1 file changed, 28 insertions(+), 7 deletions(-) |
32 |
+ |
33 |
+diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc |
34 |
+index 8741d40..ef402a8 100644 |
35 |
+--- a/src/plugins/exiv2_extractor.cc |
36 |
++++ b/src/plugins/exiv2_extractor.cc |
37 |
+@@ -27,10 +27,7 @@ |
38 |
+ #include <cassert> |
39 |
+ #include <cstring> |
40 |
+ #include <math.h> |
41 |
+-#include <exiv2/exif.hpp> |
42 |
+-#include <exiv2/error.hpp> |
43 |
+-#include <exiv2/image.hpp> |
44 |
+-#include <exiv2/futils.hpp> |
45 |
++#include <exiv2/exiv2.hpp> |
46 |
+ |
47 |
+ /** |
48 |
+ * Enable debugging to get error messages. |
49 |
+@@ -180,7 +177,7 @@ public: |
50 |
+ * |
51 |
+ * @return -1 on error |
52 |
+ */ |
53 |
+-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0) |
54 |
++#if EXIV2_TEST_VERSION(0,26,0) |
55 |
+ virtual size_t size (void) const; |
56 |
+ #else |
57 |
+ virtual long int size (void) const; |
58 |
+@@ -316,7 +313,11 @@ ExtractorIO::getb () |
59 |
+ const unsigned char *r; |
60 |
+ |
61 |
+ if (1 != ec->read (ec->cls, &data, 1)) |
62 |
++#if EXIV2_TEST_VERSION(0,27,0) |
63 |
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); |
64 |
++#else |
65 |
+ throw Exiv2::BasicError<char> (42 /* error code */); |
66 |
++#endif |
67 |
+ r = (const unsigned char *) data; |
68 |
+ return *r; |
69 |
+ } |
70 |
+@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data) |
71 |
+ void |
72 |
+ ExtractorIO::transfer (Exiv2::BasicIo& src) |
73 |
+ { |
74 |
++#if EXIV2_TEST_VERSION(0,27,0) |
75 |
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); |
76 |
++#else |
77 |
+ throw Exiv2::BasicError<char> (42 /* error code */); |
78 |
++#endif |
79 |
+ } |
80 |
+ |
81 |
+ |
82 |
+@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset, |
83 |
+ Exiv2::byte * |
84 |
+ ExtractorIO::mmap (bool isWritable) |
85 |
+ { |
86 |
++#if EXIV2_TEST_VERSION(0,27,0) |
87 |
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); |
88 |
++#else |
89 |
+ throw Exiv2::BasicError<char> (42 /* error code */); |
90 |
++#endif |
91 |
+ } |
92 |
+ |
93 |
+ |
94 |
+@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const |
95 |
+ * |
96 |
+ * @return -1 on error |
97 |
+ */ |
98 |
+-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0) |
99 |
++#if EXIV2_TEST_VERSION(0,26,0) |
100 |
+ size_t |
101 |
+ #else |
102 |
+ long int |
103 |
+@@ -504,7 +513,11 @@ ExtractorIO::eof () const |
104 |
+ std::string |
105 |
+ ExtractorIO::path () const |
106 |
+ { |
107 |
++#if EXIV2_TEST_VERSION(0,27,0) |
108 |
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); |
109 |
++#else |
110 |
+ throw Exiv2::BasicError<char> (42 /* error code */); |
111 |
++#endif |
112 |
+ } |
113 |
+ |
114 |
+ |
115 |
+@@ -517,7 +530,11 @@ ExtractorIO::path () const |
116 |
+ std::wstring |
117 |
+ ExtractorIO::wpath () const |
118 |
+ { |
119 |
++#if EXIV2_TEST_VERSION(0,27,0) |
120 |
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); |
121 |
++#else |
122 |
+ throw Exiv2::BasicError<char> (42 /* error code */); |
123 |
++#endif |
124 |
+ } |
125 |
+ #endif |
126 |
+ |
127 |
+@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr |
128 |
+ ExtractorIO::temporary () const |
129 |
+ { |
130 |
+ fprintf (stderr, "throwing temporary error\n"); |
131 |
++#if EXIV2_TEST_VERSION(0,27,0) |
132 |
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); |
133 |
++#else |
134 |
+ throw Exiv2::BasicError<char> (42 /* error code */); |
135 |
++#endif |
136 |
+ } |
137 |
+ |
138 |
+ |
139 |
+@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec) |
140 |
+ { |
141 |
+ try |
142 |
+ { |
143 |
+-#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION |
144 |
++#if !EXIV2_TEST_VERSION(0,24,0) |
145 |
+ Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute); |
146 |
+ #endif |
147 |
+ std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec)); |
148 |
+-- |
149 |
+2.20.1 |
150 |
+ |
151 |
|
152 |
diff --git a/media-libs/libextractor/libextractor-1.8-r1.ebuild b/media-libs/libextractor/libextractor-1.8-r1.ebuild |
153 |
index d63f5cb7945..d9044a2c01d 100644 |
154 |
--- a/media-libs/libextractor/libextractor-1.8-r1.ebuild |
155 |
+++ b/media-libs/libextractor/libextractor-1.8-r1.ebuild |
156 |
@@ -58,7 +58,10 @@ RDEPEND="${DEPEND} |
157 |
!sci-biology/glimmer |
158 |
" |
159 |
|
160 |
-PATCHES=( "${FILESDIR}"/${P}-CVE-2018-2043{0,1}.patch ) |
161 |
+PATCHES=( |
162 |
+ "${FILESDIR}"/${P}-CVE-2018-2043{0,1}.patch # bug #673742 |
163 |
+ "${FILESDIR}"/${P}-exiv2-0.27.patch # bug #674046 |
164 |
+) |
165 |
|
166 |
src_prepare() { |
167 |
default |