diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-08-24 22:13:36 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-08-24 23:25:39 +0200 |
commit | 2cb81e1ebedc49a5af549d1bcd520add38d9062d (patch) | |
tree | 751db051c484dc2d71c80dc8bf09b856fb899050 /gnu | |
parent | 0908f93149dd97702ba638701724ac9177cca80b (diff) | |
download | patches-2cb81e1ebedc49a5af549d1bcd520add38d9062d.tar patches-2cb81e1ebedc49a5af549d1bcd520add38d9062d.tar.gz |
gnu: libextractor: Adapt to exiv2 0.27.
This fixes a compilation error.
* gnu/packages/patches/libextractor-exiv2.patch: New file.
* gnu/packages/gnunet.scm (libextractor)[sources]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/gnunet.scm | 3 | ||||
-rw-r--r-- | gnu/packages/patches/libextractor-exiv2.patch | 124 |
3 files changed, 127 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index aab29beb0a..8b1b5ce6b4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1016,6 +1016,7 @@ dist_patch_DATA = \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ %D%/packages/patches/libexif-CVE-2018-20030.patch \ + %D%/packages/patches/libextractor-exiv2.patch \ %D%/packages/patches/libgcrypt-make-yat2m-reproducible.patch \ %D%/packages/patches/libgit2-avoid-python.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index 2653645c5d..2d82f47d99 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -75,7 +75,8 @@ version ".tar.gz")) (sha256 (base32 - "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh")))) + "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh")) + (patches (search-patches "libextractor-exiv2.patch")))) (build-system gnu-build-system) ;; WARNING: Checks require /dev/shm to be in the build chroot, especially ;; not to be a symbolic link to /run/shm. diff --git a/gnu/packages/patches/libextractor-exiv2.patch b/gnu/packages/patches/libextractor-exiv2.patch new file mode 100644 index 0000000000..b92fef3ca1 --- /dev/null +++ b/gnu/packages/patches/libextractor-exiv2.patch @@ -0,0 +1,124 @@ +This patch allows us to build libextractor against exiv2 0.27.x. +Adapted from this upstream commit: + + commit 1ecee9a47717e36cb8a3925d011d1a6de11d631c + Author: Christian Grothoff <christian@grothoff.org> + Date: Mon Jul 29 17:58:18 2019 +0200 + + importing patch from Gentoo/AS to address exiv2 build issue (#5820) + +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)); |