Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/exiv2/files/, media-gfx/exiv2/
Date: Wed, 07 Jun 2017 06:11:04
Message-Id: 1496815791.30f7dfcd4f9710d6f01ec079cb9ed71424347e5b.asturm@gentoo
1 commit: 30f7dfcd4f9710d6f01ec079cb9ed71424347e5b
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 6 21:46:40 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 7 06:09:51 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30f7dfcd
7
8 media-gfx/exiv2: 0.26 version bump
9
10 Gentoo-bug: 621028
11
12 Package-Manager: Portage-2.3.5, Repoman-2.3.1
13
14 media-gfx/exiv2/Manifest | 1 +
15 media-gfx/exiv2/exiv2-0.26.ebuild | 133 +++++++++++++++++++++
16 .../exiv2/files/exiv2-0.26-CVE-2017-9239.patch | 22 ++++
17 media-gfx/exiv2/files/exiv2-0.26-cmake1.patch | 22 ++++
18 media-gfx/exiv2/files/exiv2-0.26-cmake2.patch | 65 ++++++++++
19 media-gfx/exiv2/files/exiv2-0.26-cmake3.patch | 53 ++++++++
20 media-gfx/exiv2/files/exiv2-0.26-cmake4.patch | 24 ++++
21 media-gfx/exiv2/files/exiv2-0.26-cmake5.patch | 33 +++++
22 media-gfx/exiv2/files/exiv2-0.26-cmake6.patch | 27 +++++
23 media-gfx/exiv2/files/exiv2-0.26-cmake7.patch | 38 ++++++
24 media-gfx/exiv2/files/exiv2-0.26-fix-docs.patch | 70 +++++++++++
25 .../exiv2/files/exiv2-0.26-tools-optional.patch | 27 +++++
26 12 files changed, 515 insertions(+)
27
28 diff --git a/media-gfx/exiv2/Manifest b/media-gfx/exiv2/Manifest
29 index 8fdb578e3db..d21df6ad91f 100644
30 --- a/media-gfx/exiv2/Manifest
31 +++ b/media-gfx/exiv2/Manifest
32 @@ -1 +1,2 @@
33 DIST exiv2-0.25.tar.gz 5434325 SHA256 c80bfc778a15fdb06f71265db2c3d49d8493c382e516cb99b8c9f9cbde36efa4 SHA512 08d4e655ffdde715e0214f4bef01d55aba9b8ba517456a60e254a0f8541c20479e407545db28ca90a69dee8def6941fdd88f9a557fb382ebebe49e363aca8e8e WHIRLPOOL f9e7a6947dac5870e0574253b8c1cb1e7d31a916a9e1c4417c73168046c0b4bed90b9c77253444604163bcf6dca204dab92a52cb03bdcb0f85c807327623f8ac
34 +DIST exiv2-0.26-trunk.tar.gz 5699163 SHA256 0c625cbeb494aa1b9221280a5b053b54d0c9720d48fa9120cef7c6f93efd4dc3 SHA512 d9f354f8458d7803140b442b2a8de3c8904b1e20916cf62d7176f51524e6ff7def26d3b6fa016abc49f8140295eea624151c54dbae0676a61529c2cf33335b0c WHIRLPOOL 0d36063ee659d0a798957e9a2478337f5e8061b467df8fb86b194830ac6ec751a75e1492ad7cbf4ed31c836b9c320f037af3708920b28b07c8970840e255d711
35
36 diff --git a/media-gfx/exiv2/exiv2-0.26.ebuild b/media-gfx/exiv2/exiv2-0.26.ebuild
37 new file mode 100644
38 index 00000000000..2b8fd2b3b26
39 --- /dev/null
40 +++ b/media-gfx/exiv2/exiv2-0.26.ebuild
41 @@ -0,0 +1,133 @@
42 +# Copyright 1999-2017 Gentoo Foundation
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +EAPI=6
46 +
47 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
48 +
49 +inherit cmake-multilib python-any-r1
50 +
51 +DESCRIPTION="EXIF, IPTC and XMP metadata C++ library and command line utility"
52 +HOMEPAGE="http://www.exiv2.org/"
53 +SRC_URI="http://www.exiv2.org/builds/${P}-trunk.tar.gz"
54 +
55 +LICENSE="GPL-2"
56 +SLOT="0/26"
57 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
58 +IUSE_LINGUAS="bs de es fi fr gl ms pl pt ru sk sv ug uk vi"
59 +IUSE="doc examples nls png webready xmp $(printf 'linguas_%s ' ${IUSE_LINGUAS})"
60 +
61 +RDEPEND="
62 + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
63 + nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
64 + png? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
65 + webready? (
66 + net-libs/libssh[${MULTILIB_USEDEP}]
67 + net-misc/curl[${MULTILIB_USEDEP}]
68 + )
69 + xmp? ( >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] )
70 +"
71 +
72 +DEPEND="${RDEPEND}
73 + doc? (
74 + app-doc/doxygen
75 + dev-libs/libxslt
76 + media-gfx/graphviz
77 + virtual/pkgconfig
78 + ${PYTHON_DEPS}
79 + )
80 + nls? ( sys-devel/gettext )
81 +"
82 +
83 +DOCS=( README doc/ChangeLog doc/cmd.txt )
84 +
85 +PATCHES=(
86 + "${FILESDIR}"/${P}-cmake{1,2,3,4,5,6,7}.patch
87 + "${FILESDIR}"/${P}-CVE-2017-9239.patch
88 + # TODO: Take to upstream
89 + "${FILESDIR}"/${P}-fix-docs.patch
90 + "${FILESDIR}"/${P}-tools-optional.patch
91 +)
92 +
93 +pkg_setup() {
94 + use doc && python-any-r1_pkg_setup
95 +}
96 +
97 +src_unpack() {
98 + # FIXME @upstream: MacOS cruft is breaking the buildsystem, so don't let it in...
99 + tar -C "${WORKDIR}" --exclude=.* -xpf "${DISTDIR}/${A}" --gz 2> /dev/null ||
100 + elog "${my_tar}: tar extract command failed at least partially - continuing"
101 + mv "${PN}-trunk" "${S}" || die "Failed to create source dir ${S}"
102 +}
103 +
104 +src_prepare() {
105 + if [[ ${PV} != *9999 ]] ; then
106 + if [[ -d po ]] ; then
107 + pushd po > /dev/null || die
108 + local lang
109 + for lang in *.po; do
110 + if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
111 + case ${lang} in
112 + CMakeLists.txt | \
113 + ${PN}.pot) ;;
114 + *) rm -r ${lang} || die ;;
115 + esac
116 + fi
117 + done
118 + popd > /dev/null || die
119 + else
120 + die "Failed to prepare LINGUAS - po directory moved?"
121 + fi
122 + fi
123 +
124 + # FIXME @upstream:
125 + einfo "Converting doc/cmd.txt to UTF-8"
126 + iconv -f LATIN1 -t UTF-8 doc/cmd.txt > doc/cmd.txt.tmp || die
127 + mv -f doc/cmd.txt.tmp doc/cmd.txt || die
128 +
129 + if use doc; then
130 + einfo "Updating doxygen config"
131 + doxygen &>/dev/null -u config/Doxyfile || die
132 + fi
133 +
134 + cmake-utils_src_prepare
135 +}
136 +
137 +multilib_src_configure() {
138 + local mycmakeargs=(
139 + -DEXIV2_ENABLE_BUILD_PO=YES
140 + -DEXIV2_ENABLE_BUILD_SAMPLES=NO
141 + -DEXIV2_ENABLE_NLS=$(usex nls)
142 + -DEXIV2_ENABLE_PNG=$(usex png)
143 + -DEXIV2_ENABLE_CURL=$(usex webready)
144 + -DEXIV2_ENABLE_SSH=$(usex webready)
145 + -DEXIV2_ENABLE_WEBREADY=$(usex webready)
146 + -DEXIV2_ENABLE_XMP=$(usex xmp)
147 + -DEXIV2_ENABLE_LIBXMP=NO
148 + $(multilib_is_native_abi || \
149 + echo -DEXIV2_ENABLE_TOOLS=NO)
150 + )
151 +
152 + cmake-utils_src_configure
153 +}
154 +
155 +multilib_src_compile() {
156 + cmake-utils_src_compile
157 +
158 + if multilib_is_native_abi; then
159 + use doc && emake -j1 doc
160 + fi
161 +}
162 +
163 +multilib_src_install_all() {
164 + use xmp && DOCS+=( doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt} )
165 + use doc && HTML_DOCS=( "${S}"/doc/html/. )
166 +
167 + einstalldocs
168 + find "${D}" -name '*.la' -delete || die
169 +
170 + if use examples; then
171 + docinto -r examples
172 + dodoc samples/*.cpp
173 + fi
174 +}
175
176 diff --git a/media-gfx/exiv2/files/exiv2-0.26-CVE-2017-9239.patch b/media-gfx/exiv2/files/exiv2-0.26-CVE-2017-9239.patch
177 new file mode 100644
178 index 00000000000..2a3e20c9fac
179 --- /dev/null
180 +++ b/media-gfx/exiv2/files/exiv2-0.26-CVE-2017-9239.patch
181 @@ -0,0 +1,22 @@
182 +From 2f8681e120d277e418941c4361c83b5028f67fd8 Mon Sep 17 00:00:00 2001
183 +From: clanmills <robin@×××××××××.com>
184 +Date: Sat, 27 May 2017 10:18:17 +0100
185 +Subject: [PATCH] #1296 Fix submitted.
186 +
187 +---
188 + src/tiffcomposite.cpp | 2 ++
189 + 1 file changed, 2 insertions(+)
190 +
191 +diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp
192 +index c6b860d8..0c9b9c4a 100644
193 +--- a/src/tiffcomposite.cpp
194 ++++ b/src/tiffcomposite.cpp
195 +@@ -1611,6 +1611,8 @@ namespace Exiv2 {
196 + uint32_t TiffImageEntry::doWriteImage(IoWrapper& ioWrapper,
197 + ByteOrder /*byteOrder*/) const
198 + {
199 ++ if ( !pValue() ) throw Error(21); // #1296
200 ++
201 + uint32_t len = pValue()->sizeDataArea();
202 + if (len > 0) {
203 + #ifdef DEBUG
204
205 diff --git a/media-gfx/exiv2/files/exiv2-0.26-cmake1.patch b/media-gfx/exiv2/files/exiv2-0.26-cmake1.patch
206 new file mode 100644
207 index 00000000000..672017e404b
208 --- /dev/null
209 +++ b/media-gfx/exiv2/files/exiv2-0.26-cmake1.patch
210 @@ -0,0 +1,22 @@
211 +From d5ae1a7502cc3a19f2ca45f5f17f1ee8fc6ad979 Mon Sep 17 00:00:00 2001
212 +From: Timo Gurr <timo.gurr@×××××.com>
213 +Date: Tue, 30 May 2017 20:25:28 +0200
214 +Subject: [PATCH] Use CMAKE_INSTALL_LOCALEDIR
215 +
216 +---
217 + config/CMakeChecks.txt | 2 +-
218 + 1 file changed, 1 insertion(+), 1 deletion(-)
219 +
220 +diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
221 +index 77922930..b3a888f2 100644
222 +--- a/config/CMakeChecks.txt
223 ++++ b/config/CMakeChecks.txt
224 +@@ -98,7 +98,7 @@ IF( EXIV2_ENABLE_NLS )
225 + #FIND_PACKAGE(Intl REQUIRED)
226 + #INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
227 + IF( NOT LOCALEDIR )
228 +- SET( LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale" )
229 ++ SET( LOCALEDIR "${CMAKE_INSTALL_LOCALEDIR}" )
230 + IF( WIN32 )
231 + STRING( REPLACE "/" "\\\\" LOCALEDIR ${LOCALEDIR} )
232 + ENDIF( WIN32 )
233
234 diff --git a/media-gfx/exiv2/files/exiv2-0.26-cmake2.patch b/media-gfx/exiv2/files/exiv2-0.26-cmake2.patch
235 new file mode 100644
236 index 00000000000..76a19442486
237 --- /dev/null
238 +++ b/media-gfx/exiv2/files/exiv2-0.26-cmake2.patch
239 @@ -0,0 +1,65 @@
240 +From 3af0d1a6b2c12b7f62a293d19bdf235db75d6b07 Mon Sep 17 00:00:00 2001
241 +From: Bernd Kuhls <bernd.kuhls@××××××××.de>
242 +Date: Sat, 3 Jun 2017 17:18:24 +0200
243 +Subject: [PATCH] cmake: fix gettext support
244 +
245 +Building exiv2 with uclibc and gettext fails currently as detected
246 +by the buildroot autobuilders:
247 +http://autobuild.buildroot.net/results/def/defcdd3dd57b031c31bb16c0075f079a482bf52d/build-end.log
248 +---
249 + config/CMakeChecks.txt | 12 ++++++++++--
250 + src/CMakeLists.txt | 6 +++---
251 + 2 files changed, 13 insertions(+), 5 deletions(-)
252 +
253 +diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
254 +index b3a888f2..f7621a92 100644
255 +--- a/config/CMakeChecks.txt
256 ++++ b/config/CMakeChecks.txt
257 +@@ -95,8 +95,16 @@ ELSE( EXIV2_ENABLE_SHARED )
258 + ENDIF( EXIV2_ENABLE_SHARED )
259 +
260 + IF( EXIV2_ENABLE_NLS )
261 +- #FIND_PACKAGE(Intl REQUIRED)
262 +- #INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
263 ++ FIND_PACKAGE(Intl)
264 ++ if(Intl_FOUND)
265 ++ INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
266 ++ find_library(LIBINTL_LIBRARY NAMES intl libintl)
267 ++ if(libintl_FOUND)
268 ++ SET(LIBINTL_LIBRARIES ${LIBINTL_LIBRARY})
269 ++ else(libintl_FOUND)
270 ++ SET(LIBINTL_LIBRARIES)
271 ++ endif()
272 ++ endif()
273 + IF( NOT LOCALEDIR )
274 + SET( LOCALEDIR "${CMAKE_INSTALL_LOCALEDIR}" )
275 + IF( WIN32 )
276 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
277 +index aecd6215..e2904c6f 100644
278 +--- a/src/CMakeLists.txt
279 ++++ b/src/CMakeLists.txt
280 +@@ -316,13 +316,13 @@ msvc_runtime_configure(${EXIV2_ENABLE_SHARED} ${EXIV2_ENABLE_DYNAMIC_RUNTIME})
281 + # ******************************************************************************
282 + # exiv2 application
283 + ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} ${EXIV2_HDR} )
284 +-TARGET_LINK_LIBRARIES( exiv2 exiv2lib )
285 ++TARGET_LINK_LIBRARIES( exiv2 exiv2lib ${LIBINTL_LIBRARIES} )
286 + INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
287 +
288 + # ******************************************************************************
289 + # connection test application
290 + ADD_EXECUTABLE( conntest ${CONNTEST} )
291 +-TARGET_LINK_LIBRARIES( conntest ${PRIVATE_VAR} exiv2lib ${CURL_LIBRARIES} ${SSH_LIBRARIES})
292 ++TARGET_LINK_LIBRARIES( conntest ${PRIVATE_VAR} exiv2lib ${CURL_LIBRARIES} ${SSH_LIBRARIES} ${LIBINTL_LIBRARIES} )
293 +
294 + # ******************************************************************************
295 + # exifprint application
296 +@@ -332,7 +332,7 @@ TARGET_LINK_LIBRARIES( conntest ${PRIVATE_VAR} exiv2lib ${CURL_LIBRARIES} ${SSH
297 + # ******************************************************************************
298 + # remotetest application
299 + ADD_EXECUTABLE( remotetest ${REMOTETEST} )
300 +-TARGET_LINK_LIBRARIES( remotetest exiv2lib )
301 ++TARGET_LINK_LIBRARIES( remotetest exiv2lib ${LIBINTL_LIBRARIES} )
302 +
303 + # ******************************************************************************
304 + # Headers
305
306 diff --git a/media-gfx/exiv2/files/exiv2-0.26-cmake3.patch b/media-gfx/exiv2/files/exiv2-0.26-cmake3.patch
307 new file mode 100644
308 index 00000000000..7a78d1c8bd8
309 --- /dev/null
310 +++ b/media-gfx/exiv2/files/exiv2-0.26-cmake3.patch
311 @@ -0,0 +1,53 @@
312 +From 8af901ce05aeeaa4f5033da99670091f857d5931 Mon Sep 17 00:00:00 2001
313 +From: Bernd Kuhls <bernd.kuhls@××××××××.de>
314 +Date: Sat, 3 Jun 2017 18:25:05 +0200
315 +Subject: [PATCH] cmake: always depend on threads, not only in the xmp case
316 +
317 +---
318 + CMakeLists.txt | 1 -
319 + config/CMakeChecks.txt | 2 ++
320 + src/CMakeLists.txt | 2 ++
321 + 3 files changed, 4 insertions(+), 1 deletion(-)
322 +
323 +diff --git a/CMakeLists.txt b/CMakeLists.txt
324 +index 7034bb67..64604c6f 100644
325 +--- a/CMakeLists.txt
326 ++++ b/CMakeLists.txt
327 +@@ -120,7 +120,6 @@ IF( EXIV2_ENABLE_XMP )
328 + IF (NOT MINGW)
329 + set(THREADS_PREFER_PTHREAD_FLAG ON)
330 + ENDIF()
331 +- find_package(Threads REQUIRED)
332 + ENDIF( EXIV2_ENABLE_XMP )
333 +
334 + INCLUDE( config/CMakeChecks.txt )
335 +diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
336 +index f7621a92..0dfe96b7 100644
337 +--- a/config/CMakeChecks.txt
338 ++++ b/config/CMakeChecks.txt
339 +@@ -51,6 +51,8 @@ INCLUDE_DIRECTORIES( ${CMAKE_INCLUDE_PATH} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_C
340 + LINK_DIRECTORIES( ${CMAKE_LIBRARY_PATH} )
341 + SET( CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} )
342 +
343 ++find_package(Threads REQUIRED)
344 ++
345 + IF( EXIV2_ENABLE_PNG )
346 + FIND_PACKAGE( ZLIB REQUIRED )
347 + INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} )
348 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
349 +index e2904c6f..dcfb37e1 100644
350 +--- a/src/CMakeLists.txt
351 ++++ b/src/CMakeLists.txt
352 +@@ -268,10 +268,12 @@ else()
353 + TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} dl ${EXPAT_LIBRARIES} )
354 + TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} dl ${CURL_LIBRARIES} )
355 + TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} dl ${SSH_LIBRARIES} )
356 ++ TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} dl ${CMAKE_THREAD_LIBS_INIT} )
357 + else()
358 + TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} ${EXPAT_LIBRARIES} )
359 + TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} ${CURL_LIBRARIES} )
360 + TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} ${SSH_LIBRARIES} )
361 ++ TARGET_LINK_LIBRARIES( exiv2lib ${PRIVATE_VAR} ${CMAKE_THREAD_LIBS_INIT} )
362 + endif()
363 + endif()
364 +
365
366 diff --git a/media-gfx/exiv2/files/exiv2-0.26-cmake4.patch b/media-gfx/exiv2/files/exiv2-0.26-cmake4.patch
367 new file mode 100644
368 index 00000000000..3824a574000
369 --- /dev/null
370 +++ b/media-gfx/exiv2/files/exiv2-0.26-cmake4.patch
371 @@ -0,0 +1,24 @@
372 +From 23ac3eeced6a4de0d34ae162ac7784ab9b7e4310 Mon Sep 17 00:00:00 2001
373 +From: clanmills <robin@×××××××××.com>
374 +Date: Sat, 3 Jun 2017 20:58:08 +0100
375 +Subject: [PATCH] #7 Fix for libintl
376 +
377 +---
378 + config/CMakeChecks.txt | 4 ++--
379 + 1 file changed, 2 insertions(+), 2 deletions(-)
380 +
381 +diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
382 +index 0dfe96b7..8c88aa27 100644
383 +--- a/config/CMakeChecks.txt
384 ++++ b/config/CMakeChecks.txt
385 +@@ -103,8 +103,8 @@ IF( EXIV2_ENABLE_NLS )
386 + find_library(LIBINTL_LIBRARY NAMES intl libintl)
387 + if(libintl_FOUND)
388 + SET(LIBINTL_LIBRARIES ${LIBINTL_LIBRARY})
389 +- else(libintl_FOUND)
390 +- SET(LIBINTL_LIBRARIES)
391 ++ else()
392 ++ SET(LIBINTL_LIBRARIES -lintl)
393 + endif()
394 + endif()
395 + IF( NOT LOCALEDIR )
396
397 diff --git a/media-gfx/exiv2/files/exiv2-0.26-cmake5.patch b/media-gfx/exiv2/files/exiv2-0.26-cmake5.patch
398 new file mode 100644
399 index 00000000000..0df4a19689f
400 --- /dev/null
401 +++ b/media-gfx/exiv2/files/exiv2-0.26-cmake5.patch
402 @@ -0,0 +1,33 @@
403 +From 4e86c1d61c4b8ab2cbbb31db0031b8e1d1872231 Mon Sep 17 00:00:00 2001
404 +From: clanmills <robin@×××××××××.com>
405 +Date: Sun, 4 Jun 2017 07:41:03 +0100
406 +Subject: [PATCH] Fix https://github.com/Exiv2/exiv2/pull/6 for
407 + Linux/Cygwin/MacOSX
408 +
409 +---
410 + config/CMakeChecks.txt | 7 +++++--
411 + 1 file changed, 5 insertions(+), 2 deletions(-)
412 +
413 +diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
414 +index 8c88aa27..e6100c0f 100644
415 +--- a/config/CMakeChecks.txt
416 ++++ b/config/CMakeChecks.txt
417 +@@ -98,13 +98,16 @@ ENDIF( EXIV2_ENABLE_SHARED )
418 +
419 + IF( EXIV2_ENABLE_NLS )
420 + FIND_PACKAGE(Intl)
421 +- if(Intl_FOUND)
422 ++ if(Intl_FOUND AND NOT MSVC)
423 + INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
424 + find_library(LIBINTL_LIBRARY NAMES intl libintl)
425 + if(libintl_FOUND)
426 + SET(LIBINTL_LIBRARIES ${LIBINTL_LIBRARY})
427 + else()
428 +- SET(LIBINTL_LIBRARIES -lintl)
429 ++ SET(LIBINTL_LIBRARIES)
430 ++ if ( APPLE OR CYGWIN )
431 ++ SET(LIBINTL_LIBRARIES -lintl)
432 ++ endif()
433 + endif()
434 + endif()
435 + IF( NOT LOCALEDIR )
436
437 diff --git a/media-gfx/exiv2/files/exiv2-0.26-cmake6.patch b/media-gfx/exiv2/files/exiv2-0.26-cmake6.patch
438 new file mode 100644
439 index 00000000000..105b5889fea
440 --- /dev/null
441 +++ b/media-gfx/exiv2/files/exiv2-0.26-cmake6.patch
442 @@ -0,0 +1,27 @@
443 +From 88cf58613ffde4c907011bea82f61daae6006c3c Mon Sep 17 00:00:00 2001
444 +From: clanmills <robin@×××××××××.com>
445 +Date: Sun, 4 Jun 2017 09:07:14 +0100
446 +Subject: [PATCH] #8 Adding INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
447 +
448 +---
449 + config/CMakeChecks.txt | 3 ++-
450 + 1 file changed, 2 insertions(+), 1 deletion(-)
451 +
452 +diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
453 +index e6100c0f..b90d4fde 100644
454 +--- a/config/CMakeChecks.txt
455 ++++ b/config/CMakeChecks.txt
456 +@@ -102,11 +102,12 @@ IF( EXIV2_ENABLE_NLS )
457 + INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
458 + find_library(LIBINTL_LIBRARY NAMES intl libintl)
459 + if(libintl_FOUND)
460 ++ INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
461 + SET(LIBINTL_LIBRARIES ${LIBINTL_LIBRARY})
462 + else()
463 + SET(LIBINTL_LIBRARIES)
464 + if ( APPLE OR CYGWIN )
465 +- SET(LIBINTL_LIBRARIES -lintl)
466 ++ SET(LIBINTL_LIBRARIES -lintl)
467 + endif()
468 + endif()
469 + endif()
470
471 diff --git a/media-gfx/exiv2/files/exiv2-0.26-cmake7.patch b/media-gfx/exiv2/files/exiv2-0.26-cmake7.patch
472 new file mode 100644
473 index 00000000000..0eff32a80d5
474 --- /dev/null
475 +++ b/media-gfx/exiv2/files/exiv2-0.26-cmake7.patch
476 @@ -0,0 +1,38 @@
477 +From 15e0b9052eacd3438c8b39bf3fdda5da69ec068a Mon Sep 17 00:00:00 2001
478 +From: Bernd Kuhls <bernd.kuhls@××××××××.de>
479 +Date: Sun, 4 Jun 2017 10:13:14 +0200
480 +Subject: [PATCH] cmake: simplify libintl check
481 +
482 +According to https://cmake.org/cmake/help/v3.4/module/FindIntl.html
483 +the FindIntl module already checks for libintl.so.
484 +---
485 + config/CMakeChecks.txt | 15 ++++-----------
486 + 1 file changed, 4 insertions(+), 11 deletions(-)
487 +
488 +diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt
489 +index b90d4fde..0cd28ec7 100644
490 +--- a/config/CMakeChecks.txt
491 ++++ b/config/CMakeChecks.txt
492 +@@ -98,18 +98,11 @@ ENDIF( EXIV2_ENABLE_SHARED )
493 +
494 + IF( EXIV2_ENABLE_NLS )
495 + FIND_PACKAGE(Intl)
496 +- if(Intl_FOUND AND NOT MSVC)
497 ++ if(Intl_FOUND)
498 + INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
499 +- find_library(LIBINTL_LIBRARY NAMES intl libintl)
500 +- if(libintl_FOUND)
501 +- INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
502 +- SET(LIBINTL_LIBRARIES ${LIBINTL_LIBRARY})
503 +- else()
504 +- SET(LIBINTL_LIBRARIES)
505 +- if ( APPLE OR CYGWIN )
506 +- SET(LIBINTL_LIBRARIES -lintl)
507 +- endif()
508 +- endif()
509 ++ SET(LIBINTL_LIBRARIES ${Intl_LIBRARIES})
510 ++ else()
511 ++ SET(LIBINTL_LIBRARIES)
512 + endif()
513 + IF( NOT LOCALEDIR )
514 + SET( LOCALEDIR "${CMAKE_INSTALL_LOCALEDIR}" )
515
516 diff --git a/media-gfx/exiv2/files/exiv2-0.26-fix-docs.patch b/media-gfx/exiv2/files/exiv2-0.26-fix-docs.patch
517 new file mode 100644
518 index 00000000000..a88867173df
519 --- /dev/null
520 +++ b/media-gfx/exiv2/files/exiv2-0.26-fix-docs.patch
521 @@ -0,0 +1,70 @@
522 +--- a/CMakeLists.txt 2015-07-19 16:04:35.363628707 +0200
523 ++++ b/CMakeLists.txt 2015-07-19 16:28:31.051680136 +0200
524 +@@ -216,9 +216,7 @@
525 + ADD_SUBDIRECTORY( xmpsdk )
526 + ADD_SUBDIRECTORY( src )
527 +
528 +-IF( EXIV2_ENABLE_BUILD_SAMPLES )
529 +- ADD_SUBDIRECTORY( samples )
530 +-ENDIF( EXIV2_ENABLE_BUILD_SAMPLES )
531 ++ADD_SUBDIRECTORY( samples )
532 +
533 + IF( EXIV2_ENABLE_BUILD_PO )
534 + ADD_SUBDIRECTORY( po )
535 +--- a/samples/CMakeLists.txt 2015-07-19 16:04:35.360628744 +0200
536 ++++ b/samples/CMakeLists.txt 2015-07-19 16:30:46.415987850 +0200
537 +@@ -21,6 +21,10 @@
538 + include_directories("${CMAKE_SOURCE_DIR}/include" "${CMAKE_SOURCE_DIR}/src")
539 +
540 +-SET( SAMPLES addmoddel.cpp
541 ++SET( SAMPLES taglist.cpp )
542 ++
543 ++IF( EXIV2_ENABLE_BUILD_SAMPLES )
544 ++ SET( SAMPLES ${SAMPLES}
545 ++ addmoddel.cpp
546 + convert-test.cpp
547 + easyaccess-test.cpp
548 + exifcomment.cpp
549 +@@ -38,7 +42,6 @@
550 + mmap-test.cpp
551 + prevtest.cpp
552 + stringto-test.cpp
553 +- taglist.cpp
554 + tiff-test.cpp
555 + werror-test.cpp
556 + write-test.cpp
557 +@@ -47,6 +50,7 @@
558 + xmpparser-test.cpp
559 + xmpsample.cpp
560 + )
561 ++ENDIF()
562 +
563 + FOREACH(entry ${SAMPLES})
564 + STRING( REPLACE ".cpp" "" target ${entry})
565 +@@ -63,6 +67,7 @@
566 + SET( MC_SRC ${MC_SRC} ../src/getopt_win32.c )
567 + ENDIF( MSVC )
568 +
569 ++IF( EXIV2_ENABLE_BUILD_SAMPLES )
570 + SET( MC_SRC ${MC_SRC} metacopy.cpp ../src/utils.cpp )
571 + ADD_EXECUTABLE( metacopy ${MC_SRC} )
572 + TARGET_LINK_LIBRARIES( metacopy exiv2lib )
573 +@@ -79,6 +84,7 @@
574 + # ******************************************************************************
575 + # Man page
576 + INSTALL( FILES exiv2samples.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
577 ++ENDIF()
578 +
579 + # That's all Folks!
580 + ##
581 +--- a/doc/templates/Makefile 2015-07-19 16:50:50.589933604 +0200
582 ++++ b/doc/templates/Makefile 2015-07-19 16:51:07.686719864 +0200
583 +@@ -143,7 +143,7 @@
584 + xmp_mwg-rs \
585 + xmp_mwg-kw
586 +
587 +-TAGLIST = ../../bin/taglist
588 ++TAGLIST = ../../src/bin/taglist
589 +
590 + # **********************************************************************
591 + # ======================================================================
592
593 diff --git a/media-gfx/exiv2/files/exiv2-0.26-tools-optional.patch b/media-gfx/exiv2/files/exiv2-0.26-tools-optional.patch
594 new file mode 100644
595 index 00000000000..045e9dc58f0
596 --- /dev/null
597 +++ b/media-gfx/exiv2/files/exiv2-0.26-tools-optional.patch
598 @@ -0,0 +1,27 @@
599 +--- a/CMakeLists.txt 2017-06-07 00:14:25.374608170 +0200
600 ++++ b/CMakeLists.txt 2017-06-07 00:17:00.680483299 +0200
601 +@@ -60,6 +60,7 @@
602 + OPTION( EXIV2_ENABLE_SSH "USE Libssh for SshIo" ON )
603 + SET ( EXIV2_ENABLE_DYNAMIC_RUNTIME OFF )
604 + ENDIF()
605 ++OPTION( EXIV2_ENABLE_TOOLS "Build exiv2 executable" ON )
606 +
607 + # set include path for FindXXX.cmake files
608 + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/")
609 +--- a/src/CMakeLists.txt 2017-06-07 00:14:25.368608098 +0200
610 ++++ b/src/CMakeLists.txt 2017-06-07 00:16:06.710831682 +0200
611 +@@ -317,9 +317,11 @@
612 +
613 + # ******************************************************************************
614 + # exiv2 application
615 +-ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} ${EXIV2_HDR} )
616 +-TARGET_LINK_LIBRARIES( exiv2 exiv2lib ${LIBINTL_LIBRARIES} )
617 +-INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
618 ++IF(EXIV2_ENABLE_TOOLS)
619 ++ ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} ${EXIV2_HDR} )
620 ++ TARGET_LINK_LIBRARIES( exiv2 exiv2lib ${LIBINTL_LIBRARIES} )
621 ++ INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
622 ++ENDIF( EXIV2_ENABLE_TOOLS )
623 +
624 + # ******************************************************************************
625 + # connection test application