summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-12-30 00:50:19 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2018-12-30 00:52:38 +0100
commit7621a65d7bbacc22afdeefbf647be9623f932104 (patch)
tree11110286397e254722c9e3a22ac7d75d2a31e1d3 /media-libs/libextractor
parentsci-geosciences/merkaartor: Patch for USE webengine; drop Qt5WebKit (diff)
downloadgentoo-7621a65d7bbacc22afdeefbf647be9623f932104.tar.gz
gentoo-7621a65d7bbacc22afdeefbf647be9623f932104.tar.bz2
gentoo-7621a65d7bbacc22afdeefbf647be9623f932104.zip
media-libs/libextractor: Fix build with exiv2-0.27
Closes: https://bugs.gentoo.org/674046 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs/libextractor')
-rw-r--r--media-libs/libextractor/files/libextractor-1.8-exiv2-0.27.patch127
-rw-r--r--media-libs/libextractor/libextractor-1.8-r1.ebuild5
2 files changed, 131 insertions, 1 deletions
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
new file mode 100644
index 000000000000..cfdb6426408d
--- /dev/null
+++ b/media-libs/libextractor/files/libextractor-1.8-exiv2-0.27.patch
@@ -0,0 +1,127 @@
+From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 30 Dec 2018 00:46:57 +0100
+Subject: [PATCH] Fix build with exiv2-0.27
+
+---
+ src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
+ 1 file changed, 28 insertions(+), 7 deletions(-)
+
+diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
+index 8741d40..ef402a8 100644
+--- a/src/plugins/exiv2_extractor.cc
++++ b/src/plugins/exiv2_extractor.cc
+@@ -27,10 +27,7 @@
+ #include <cassert>
+ #include <cstring>
+ #include <math.h>
+-#include <exiv2/exif.hpp>
+-#include <exiv2/error.hpp>
+-#include <exiv2/image.hpp>
+-#include <exiv2/futils.hpp>
++#include <exiv2/exiv2.hpp>
+
+ /**
+ * Enable debugging to get error messages.
+@@ -180,7 +177,7 @@ public:
+ *
+ * @return -1 on error
+ */
+-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
++#if EXIV2_TEST_VERSION(0,26,0)
+ virtual size_t size (void) const;
+ #else
+ virtual long int size (void) const;
+@@ -316,7 +313,11 @@ ExtractorIO::getb ()
+ const unsigned char *r;
+
+ if (1 != ec->read (ec->cls, &data, 1))
++#if EXIV2_TEST_VERSION(0,27,0)
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
++#else
+ throw Exiv2::BasicError<char> (42 /* error code */);
++#endif
+ r = (const unsigned char *) data;
+ return *r;
+ }
+@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
+ void
+ ExtractorIO::transfer (Exiv2::BasicIo& src)
+ {
++#if EXIV2_TEST_VERSION(0,27,0)
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
++#else
+ throw Exiv2::BasicError<char> (42 /* error code */);
++#endif
+ }
+
+
+@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
+ Exiv2::byte *
+ ExtractorIO::mmap (bool isWritable)
+ {
++#if EXIV2_TEST_VERSION(0,27,0)
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
++#else
+ throw Exiv2::BasicError<char> (42 /* error code */);
++#endif
+ }
+
+
+@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
+ *
+ * @return -1 on error
+ */
+-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
++#if EXIV2_TEST_VERSION(0,26,0)
+ size_t
+ #else
+ long int
+@@ -504,7 +513,11 @@ ExtractorIO::eof () const
+ std::string
+ ExtractorIO::path () const
+ {
++#if EXIV2_TEST_VERSION(0,27,0)
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
++#else
+ throw Exiv2::BasicError<char> (42 /* error code */);
++#endif
+ }
+
+
+@@ -517,7 +530,11 @@ ExtractorIO::path () const
+ std::wstring
+ ExtractorIO::wpath () const
+ {
++#if EXIV2_TEST_VERSION(0,27,0)
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
++#else
+ throw Exiv2::BasicError<char> (42 /* error code */);
++#endif
+ }
+ #endif
+
+@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
+ ExtractorIO::temporary () const
+ {
+ fprintf (stderr, "throwing temporary error\n");
++#if EXIV2_TEST_VERSION(0,27,0)
++ throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
++#else
+ throw Exiv2::BasicError<char> (42 /* error code */);
++#endif
+ }
+
+
+@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
+ {
+ try
+ {
+-#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
++#if !EXIV2_TEST_VERSION(0,24,0)
+ Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
+ #endif
+ std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
+--
+2.20.1
+
diff --git a/media-libs/libextractor/libextractor-1.8-r1.ebuild b/media-libs/libextractor/libextractor-1.8-r1.ebuild
index d63f5cb79453..d9044a2c01d5 100644
--- a/media-libs/libextractor/libextractor-1.8-r1.ebuild
+++ b/media-libs/libextractor/libextractor-1.8-r1.ebuild
@@ -58,7 +58,10 @@ RDEPEND="${DEPEND}
!sci-biology/glimmer
"
-PATCHES=( "${FILESDIR}"/${P}-CVE-2018-2043{0,1}.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-CVE-2018-2043{0,1}.patch # bug #673742
+ "${FILESDIR}"/${P}-exiv2-0.27.patch # bug #674046
+)
src_prepare() {
default