Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: media-gfx/exiv2/, media-gfx/exiv2/files/
Date: Thu, 02 Jun 2016 05:22:32
Message-Id: 1464844824.51f22520006e88a96e279b557919b698ad7998ba.blueness@gentoo
1 commit: 51f22520006e88a96e279b557919b698ad7998ba
2 Author: Laine Gholson <laine.gholson <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 2 01:05:34 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 2 05:20:24 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=51f22520
7
8 media-gfx/exiv2: fix build
9
10 This patch adds a dependency on dev-libs/icu for uconv.
11
12 media-gfx/exiv2/Manifest | 10 ++
13 media-gfx/exiv2/exiv2-0.25-r2.ebuild | 130 +++++++++++++++++++++
14 media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch | 71 +++++++++++
15 .../exiv2/files/exiv2-0.25-fix-install-dirs.patch | 64 ++++++++++
16 .../exiv2/files/exiv2-0.25-fix-without-zlib.patch | 22 ++++
17 .../files/exiv2-0.25-fvisibility-hidden.patch | 19 +++
18 .../exiv2/files/exiv2-0.25-hide-symbols.patch | 97 +++++++++++++++
19 media-gfx/exiv2/files/exiv2-0.25-musl.patch | 12 ++
20 .../exiv2/files/exiv2-0.25-tools-optional.patch | 27 +++++
21 media-gfx/exiv2/metadata.xml | 20 ++++
22 10 files changed, 472 insertions(+)
23
24 diff --git a/media-gfx/exiv2/Manifest b/media-gfx/exiv2/Manifest
25 new file mode 100644
26 index 0000000..8cb47a4
27 --- /dev/null
28 +++ b/media-gfx/exiv2/Manifest
29 @@ -0,0 +1,10 @@
30 +AUX exiv2-0.25-fix-docs.patch 2164 SHA256 8d50b058fcaefc15455cae9c5e5edb2a5217acfe1c8de7f4d572bc3cfa2f17cd SHA512 be4e2077a52f54384ef6660e045c6eedda06bdacc3ca804cc6b9554b47be717bf50c4ac1ca42fa452f204e784a2f863ffba7276b17342bde67f9a53db5749d8b WHIRLPOOL 60f86dddcbe67f63ddb7d0332be05505024878c5cbbee99c8a4c9567906e9da94b95b64a7655f913f5e86a4e0917c849840f8d9e91eb1864cdfb095d7c844412
31 +AUX exiv2-0.25-fix-install-dirs.patch 2415 SHA256 a627484a3960071f01eb6f656f9af0f9a0b2771d9d9f6cd8a3429f378823a48a SHA512 402f9aacb8b6af95e94ea3d31f0c438da4407fc037004a3e99408ba5cce8cde5dd1d0c98d1e619fff56b0051516e20610a98899e5ff22d00b3827384f82e7493 WHIRLPOOL f58aa8122e207f0271a7f3a0fb6ff0297b630e187a65622ea55b0159d03acbbf09132f8a6c836485730ec5a4d085ad55e53dfe86fe08e47b449f44b68bb28a5f
32 +AUX exiv2-0.25-fix-without-zlib.patch 662 SHA256 66618de00ba07ec660675e2dff99138ba56fb0a8cbdab6a8a024b4f3ca93db3c SHA512 c15173bc687c2008a1e3cd04623167dd085f3e9f7655107fc75880df3d5bb51688572d2d3fc7a722763eaa5ff45bcb769f4090c615f8b3ffbf6d0417dccab8d0 WHIRLPOOL d2842c00569f578b41f543f944757b72963ac4d521017701db75c630ead80295bbb8fc39091f6ac34661e21b6910ef78d12db6f35659d79e1c25ec437d0ef7d7
33 +AUX exiv2-0.25-fvisibility-hidden.patch 700 SHA256 2d0eb374e3df7dd58a513b616786e9421f63e575c2812d0b3980e0af29d03d96 SHA512 7dd251fa6e09ecc0493899fdc24431f636e56bf86d33fd4cf4b46fc27b14ce7a68cb4021a3799260398f48b256f403e00b86d143a012d3871e0de5bf57db9205 WHIRLPOOL af10468fad08e51f16141e70409e5ec718d5d669db8203df6a09de2fd824eb46376f87195cf1e744c60c567943c24d54afe388d54eeb5c240f876ebbcbd59514
34 +AUX exiv2-0.25-hide-symbols.patch 4098 SHA256 b6fe63951717360caad547275c3810c42803ef2d8dea25c75e02b45b9d7add9e SHA512 aed6746329b12769d8084ca79a99eccd6b52449b80c0b3d1c1d6b22294c2b62398366f0715efa207e2ace0ed52740a8eb81af58d17322d42a4674336fd24e725 WHIRLPOOL ac8e900303ac0b19f24b5eff13791dd42459395763d4c8795ff978c1f2c05431b3f3586dedd2b7df375452d3826d7356fc190c4ba3bc8fc4713792bc9d31d033
35 +AUX exiv2-0.25-musl.patch 464 SHA256 c32333fa1d157bd2b14aaf18e19c2a67511baad89a9b526d6f984bb955dbf9ee SHA512 25e7d53fd2840d1166795a0a27c07de9370f493b1c8a047a020b73fe9330303d97a48414937c25e5aa5961fa7d416b10e4e3ea6b35008e4d9705ed19d71bb85d WHIRLPOOL 0e71a59b5fa87633c98e46385260835077e3a93c7a9aad9022c58060efbfecba295c37726d248580b9a79ee7cecdc8f0e23f24cfcaa1085ab33e44f33bbc5d49
36 +AUX exiv2-0.25-tools-optional.patch 1332 SHA256 6c9a3ed5c2b9acff10c3b2f2dd2ca639936beaf6263526b9d85ede579a1d67e1 SHA512 14a8703b86dc4a7a1f210e26bd6532c529f850dd1b25ef116c703a576c389a120e3f8b1087e289cd8b44073071ac88a97503dc2c0cf72f21d32094b2cabbc58c WHIRLPOOL dc7efa7ddcaf1be665cd79aff0b36a0f2b135a87a3a93f9cb6091105b965b4b009e569c447d54d602482410ec59d674d99a71bee2699e8007575b8e2cc727998
37 +DIST exiv2-0.25.tar.gz 5434325 SHA256 c80bfc778a15fdb06f71265db2c3d49d8493c382e516cb99b8c9f9cbde36efa4 SHA512 08d4e655ffdde715e0214f4bef01d55aba9b8ba517456a60e254a0f8541c20479e407545db28ca90a69dee8def6941fdd88f9a557fb382ebebe49e363aca8e8e WHIRLPOOL f9e7a6947dac5870e0574253b8c1cb1e7d31a916a9e1c4417c73168046c0b4bed90b9c77253444604163bcf6dca204dab92a52cb03bdcb0f85c807327623f8ac
38 +EBUILD exiv2-0.25-r2.ebuild 3155 SHA256 b3569ae890ba2384377c8bc2ec221803ccf20ca78e3abf77214c41f69ef9bc55 SHA512 239e31fe5fb441be56ad222fb780fae13a05b9cd6a09f5807f05a3c5879c5b2f28292389b225fa37e63053be8c3093befaf0f7a854038be4f2d37600c9a0ef06 WHIRLPOOL f17501613b331d99001c0e36d565d261d432946cde5d030d8cb82dcfb585c3aa3965bd470f03997f82f1c8df81de4cfe5212fd92ee635fb1499dd860fd79d8fe
39 +MISC metadata.xml 678 SHA256 08fd0d664529713f492576de434fa7e9927918229013eb4ec7c88b195ca0e9eb SHA512 7c5d5e3f23671d316d8deb97d5d3b8e012ff14fb340a71c6cb5fb9e0b76c5c4e6e3b9ce86a613c7bfc6326828bcf0a14d3bd13182aad2a7e51bb0cf4dab26497 WHIRLPOOL c8606b9365f06230c7effdb719bbcbd84e5bfdfdce85b0d57b000434db9426fdc6cee9c7b77f7d1bd44057d177494f1456ac5158e37397e47598c6fb5048e3bc
40
41 diff --git a/media-gfx/exiv2/exiv2-0.25-r2.ebuild b/media-gfx/exiv2/exiv2-0.25-r2.ebuild
42 new file mode 100644
43 index 0000000..cef5555
44 --- /dev/null
45 +++ b/media-gfx/exiv2/exiv2-0.25-r2.ebuild
46 @@ -0,0 +1,130 @@
47 +# Copyright 1999-2015 Gentoo Foundation
48 +# Distributed under the terms of the GNU General Public License v2
49 +# $Id$
50 +
51 +EAPI=5
52 +PYTHON_COMPAT=( python{2_7,3_3,3_4} )
53 +
54 +inherit eutils cmake-multilib python-any-r1
55 +
56 +DESCRIPTION="EXIF, IPTC and XMP metadata C++ library and command line utility"
57 +HOMEPAGE="http://www.exiv2.org/"
58 +SRC_URI="http://www.exiv2.org/${P}.tar.gz"
59 +
60 +LICENSE="GPL-2"
61 +SLOT="0/14"
62 +KEYWORDS="amd64 arm ~mips ppc x86"
63 +IUSE_LINGUAS="bs de es fi fr gl ms pl pt ru sk sv ug uk vi"
64 +IUSE="doc examples nls png webready xmp $(printf 'linguas_%s ' ${IUSE_LINGUAS})"
65 +
66 +RDEPEND="
67 + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
68 + dev-libs/icu[${MULTILIB_USEDEP}]
69 + nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
70 + png? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
71 + webready? (
72 + net-libs/libssh[${MULTILIB_USEDEP}]
73 + net-misc/curl[${MULTILIB_USEDEP}]
74 + )
75 + xmp? ( >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] )
76 +"
77 +
78 +DEPEND="${RDEPEND}
79 + doc? (
80 + app-doc/doxygen
81 + dev-libs/libxslt
82 + virtual/pkgconfig
83 + media-gfx/graphviz
84 + ${PYTHON_DEPS}
85 + )
86 + nls? ( sys-devel/gettext )
87 +"
88 +
89 +DOCS=( README doc/ChangeLog doc/cmd.txt )
90 +
91 +PATCHES=(
92 + "${FILESDIR}/${PN}-0.25-fix-install-dirs.patch"
93 + "${FILESDIR}/${PN}-0.25-fix-without-zlib.patch"
94 + "${FILESDIR}/${PN}-0.25-hide-symbols.patch"
95 + "${FILESDIR}/${PN}-0.25-fvisibility-hidden.patch"
96 + "${FILESDIR}/${PN}-0.25-musl.patch"
97 + # TODO: Take to upstream
98 + "${FILESDIR}/${PN}-0.25-fix-docs.patch"
99 + "${FILESDIR}/${PN}-0.25-tools-optional.patch"
100 +)
101 +
102 +pkg_setup() {
103 + use doc && python-any-r1_pkg_setup
104 +}
105 +
106 +src_prepare() {
107 + rm -r msvc* build || die "Failed to remove msvc dirs"
108 +
109 + if [[ ${PV} != *9999 ]] ; then
110 + if [[ -d po ]] ; then
111 + pushd po > /dev/null || die
112 + for lang in *.po; do
113 + if ! has ${lang%.po} ${LINGUAS} ; then
114 + rm -rf ${lang} || die
115 + fi
116 + done
117 + popd > /dev/null || die
118 + else
119 + die "Failed to prepare LINGUAS - po directory moved?"
120 + fi
121 + fi
122 +
123 + # convert docs to UTF-8
124 + local i
125 + for i in doc/cmd.txt; do
126 + einfo "Converting "${i}" to UTF-8"
127 + uconv -f LATIN1 -t UTF-8 "${i}" > "${i}.tmp" || die
128 + mv -f "${i}.tmp" "${i}" || die
129 + done
130 +
131 + if use doc; then
132 + einfo "Updating doxygen config"
133 + doxygen &>/dev/null -u config/Doxyfile || die
134 + fi
135 +
136 + cmake-utils_src_prepare
137 +}
138 +
139 +multilib_src_configure() {
140 + local mycmakeargs=(
141 + -DEXIV2_ENABLE_BUILD_PO=YES
142 + -DEXIV2_ENABLE_BUILD_SAMPLES=NO
143 + -DEXIV2_ENABLE_CURL=$(usex webready)
144 + -DEXIV2_ENABLE_NLS=$(usex nls)
145 + -DEXIV2_ENABLE_PNG=$(usex png)
146 + -DEXIV2_ENABLE_SSH=$(usex webready)
147 + -DEXIV2_ENABLE_WEBREADY=$(usex webready)
148 + -DEXIV2_ENABLE_XMP=$(usex xmp)
149 + -DEXIV2_ENABLE_LIBXMP=NO
150 + $(multilib_is_native_abi || \
151 + echo -DEXIV2_ENABLE_TOOLS=NO)
152 + )
153 +
154 + cmake-utils_src_configure
155 +}
156 +
157 +multilib_src_compile() {
158 + cmake-utils_src_compile
159 +
160 + if multilib_is_native_abi; then
161 + use doc && emake -j1 doc
162 + fi
163 +}
164 +
165 +multilib_src_install_all() {
166 + einstalldocs
167 + prune_libtool_files --all
168 +
169 + use xmp && dodoc doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt}
170 + use doc && dodoc -r "${S}"/doc/html
171 +
172 + if use examples; then
173 + docinto examples
174 + dodoc samples/*.cpp
175 + fi
176 +}
177
178 diff --git a/media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch b/media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch
179 new file mode 100644
180 index 0000000..e2bf677
181 --- /dev/null
182 +++ b/media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch
183 @@ -0,0 +1,71 @@
184 +--- a/CMakeLists.txt 2015-07-19 16:04:35.363628707 +0200
185 ++++ b/CMakeLists.txt 2015-07-19 16:28:31.051680136 +0200
186 +@@ -216,9 +216,7 @@
187 + ADD_SUBDIRECTORY( xmpsdk )
188 + ADD_SUBDIRECTORY( src )
189 +
190 +-IF( EXIV2_ENABLE_BUILD_SAMPLES )
191 +- ADD_SUBDIRECTORY( samples )
192 +-ENDIF( EXIV2_ENABLE_BUILD_SAMPLES )
193 ++ADD_SUBDIRECTORY( samples )
194 +
195 + IF( EXIV2_ENABLE_BUILD_PO )
196 + ADD_SUBDIRECTORY( po )
197 +--- a/samples/CMakeLists.txt 2015-07-19 16:04:35.360628744 +0200
198 ++++ b/samples/CMakeLists.txt 2015-07-19 16:30:46.415987850 +0200
199 +@@ -20,7 +20,11 @@
200 + endif()
201 + include_directories("${CMAKE_SOURCE_DIR}/include" "${CMAKE_SOURCE_DIR}/src")
202 +
203 +-SET( SAMPLES addmoddel.cpp
204 ++SET( SAMPLES taglist.cpp )
205 ++
206 ++IF( EXIV2_ENABLE_BUILD_SAMPLES )
207 ++ SET( SAMPLES ${SAMPLES}
208 ++ addmoddel.cpp
209 + convert-test.cpp
210 + easyaccess-test.cpp
211 + exifcomment.cpp
212 +@@ -38,7 +42,6 @@
213 + mmap-test.cpp
214 + prevtest.cpp
215 + stringto-test.cpp
216 +- taglist.cpp
217 + tiff-test.cpp
218 + werror-test.cpp
219 + write-test.cpp
220 +@@ -47,6 +50,7 @@
221 + xmpparser-test.cpp
222 + xmpsample.cpp
223 + )
224 ++ENDIF()
225 +
226 + FOREACH(entry ${SAMPLES})
227 + STRING( REPLACE ".cpp" "" target ${entry})
228 +@@ -63,6 +67,7 @@
229 + SET( MC_SRC ${MC_SRC} ../src/getopt_win32.c )
230 + ENDIF( MSVC )
231 +
232 ++IF( EXIV2_ENABLE_BUILD_SAMPLES )
233 + SET( MC_SRC ${MC_SRC} metacopy.cpp ../src/utils.cpp )
234 + ADD_EXECUTABLE( metacopy ${MC_SRC} )
235 + TARGET_LINK_LIBRARIES( metacopy exiv2lib )
236 +@@ -79,6 +84,7 @@
237 + SET_TARGET_PROPERTIES( exiv2json PROPERTIES OUTPUT_NAME exiv2json )
238 + TARGET_LINK_LIBRARIES( exiv2json exiv2lib )
239 + INSTALL( TARGETS exiv2json ${INSTALL_TARGET_STANDARD_ARGS} )
240 ++ENDIF()
241 +
242 + # That's all Folks!
243 + ##
244 +--- a/doc/templates/Makefile 2015-07-19 16:50:50.589933604 +0200
245 ++++ b/doc/templates/Makefile 2015-07-19 16:51:07.686719864 +0200
246 +@@ -143,7 +143,7 @@
247 + xmp_mwg-rs \
248 + xmp_mwg-kw
249 +
250 +-TAGLIST = ../../bin/taglist
251 ++TAGLIST = ../../src/bin/taglist
252 +
253 + # **********************************************************************
254 + # ======================================================================
255
256 diff --git a/media-gfx/exiv2/files/exiv2-0.25-fix-install-dirs.patch b/media-gfx/exiv2/files/exiv2-0.25-fix-install-dirs.patch
257 new file mode 100644
258 index 0000000..bca79dd
259 --- /dev/null
260 +++ b/media-gfx/exiv2/files/exiv2-0.25-fix-install-dirs.patch
261 @@ -0,0 +1,64 @@
262 +USE GNUInstallDirs to fix man page and multilib install
263 +
264 +See also: http://dev.exiv2.org/issues/1125
265 +Patch based on: http://pkgs.fedoraproject.org/cgit/exiv2.git/tree/exiv2-0.25-cmake_LIB_SUFFIX.patch
266 +
267 +--- b/config/CMakeChecks.txt 2015-07-19 14:23:11.606686135 +0200
268 ++++ b/config/CMakeChecks.txt 2015-06-22 08:41:22.913094633 -0500
269 +@@ -37,6 +37,8 @@
270 + INCLUDE( CheckCSourceCompiles )
271 + INCLUDE( CheckCXXSourceCompiles )
272 +
273 ++INCLUDE( GNUInstallDirs )
274 ++
275 + INCLUDE( FindIconv )
276 +
277 + SET( STDC_HEADERS ON )
278 +@@ -289,9 +291,9 @@
279 +
280 + IF( NOT MSVC )
281 + CONFIGURE_FILE( config/exiv2.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc @ONLY )
282 +- INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION lib/pkgconfig )
283 ++ INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
284 + CONFIGURE_FILE( config/exiv2.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm)
285 +- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION lib/pkgconfig )
286 ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
287 + ENDIF( NOT MSVC )
288 +
289 + # ******************************************************************************
290 +--- a/src/CMakeLists.txt 2015-07-19 14:06:54.104906589 +0200
291 ++++ b/src/CMakeLists.txt 2015-07-19 14:12:37.982607526 +0200
292 +@@ -321,7 +321,7 @@
293 +
294 + # ******************************************************************************
295 + # Man page
296 +-INSTALL( FILES exiv2.1 DESTINATION man/man1 )
297 ++INSTALL( FILES exiv2.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
298 +
299 + # That's all Folks!
300 + ##
301 +--- a/CMakeLists.txt 2015-06-15 10:32:21.000000000 -0500
302 ++++ b/CMakeLists.txt 2015-06-22 08:48:19.486245765 -0500
303 +@@ -25,7 +25,7 @@ if( POLICY CMP0042 )
304 + else()
305 + SET(CMAKE_MACOSX_RPATH 1)
306 + endif()
307 +-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
308 ++#SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
309 +
310 +
311 + SET( PACKAGE_COPYRIGHT "Andreas Huggel" )
312 +@@ -156,10 +156,10 @@ INCLUDE( config/CMakeChecks.txt )
313 +
314 + SET( INSTALL_TARGET_STANDARD_ARGS
315 + RUNTIME DESTINATION bin
316 +- LIBRARY DESTINATION lib
317 +- ARCHIVE DESTINATION lib
318 ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
319 ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
320 + )
321 +-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
322 ++#SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
323 +
324 + ##
325 + # add sources from XMPSDK directory
326
327 diff --git a/media-gfx/exiv2/files/exiv2-0.25-fix-without-zlib.patch b/media-gfx/exiv2/files/exiv2-0.25-fix-without-zlib.patch
328 new file mode 100644
329 index 0000000..c6d435d
330 --- /dev/null
331 +++ b/media-gfx/exiv2/files/exiv2-0.25-fix-without-zlib.patch
332 @@ -0,0 +1,22 @@
333 +Fix exiv2.hpp if built with PNG support disabled (--without-zlib)
334 +
335 +Fixed upstream in >=0.26
336 +
337 +See also: http://dev.exiv2.org/issues/1103
338 +Gentoo bug 1: https://bugs.gentoo.org/show_bug.cgi?id=552046
339 +Gentoo bug 2: https://bugs.gentoo.org/show_bug.cgi?id=535836
340 +
341 +Index: exiv2.hpp
342 +===================================================================
343 +--- a/include/exiv2/exiv2.hpp (revision 3887)
344 ++++ b/include/exiv2/exiv2.hpp (revision 3888)
345 +@@ -52,7 +52,9 @@
346 + #include "mrwimage.hpp"
347 + #include "orfimage.hpp"
348 + #include "pgfimage.hpp"
349 ++#ifdef EXV_HAVE_LIBZ
350 + #include "pngimage.hpp"
351 ++#endif
352 + #include "preview.hpp"
353 + #include "properties.hpp"
354 + #include "psdimage.hpp"
355
356 diff --git a/media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch b/media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch
357 new file mode 100644
358 index 0000000..26c5c1d
359 --- /dev/null
360 +++ b/media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch
361 @@ -0,0 +1,19 @@
362 +Index: CMakeLists.txt
363 +===================================================================
364 +--- a/xmpsdk/CMakeLists.txt (revision 3974)
365 ++++ b/xmpsdk/CMakeLists.txt (revision 3975)
366 +@@ -20,6 +20,14 @@
367 + ENDIF(NOT MSVC AND NOT CYGWIN AND NOT MSYS)
368 + ENDFOREACH()
369 +
370 ++if(NOT MSVC)
371 ++ # http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
372 ++ if ( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang")
373 ++ # 1123 - hide xmpsdk symbols
374 ++ add_definitions( -fvisibility=hidden -fvisibility-inlines-hidden )
375 ++ endif()
376 ++endif()
377 ++
378 + IF( EXIV2_ENABLE_XMP AND EXIV2_ENABLE_LIBXMP )
379 + ADD_LIBRARY( xmp STATIC ${XMPSRC} )
380 + GET_TARGET_PROPERTY( XMPLIB xmp LOCATION )
381
382 diff --git a/media-gfx/exiv2/files/exiv2-0.25-hide-symbols.patch b/media-gfx/exiv2/files/exiv2-0.25-hide-symbols.patch
383 new file mode 100644
384 index 0000000..7c8613d
385 --- /dev/null
386 +++ b/media-gfx/exiv2/files/exiv2-0.25-hide-symbols.patch
387 @@ -0,0 +1,97 @@
388 +Index: a/samples/CMakeLists.txt
389 +===================================================================
390 +--- a/samples/CMakeLists.txt (revision 3972)
391 ++++ b/samples/CMakeLists.txt (revision 3973)
392 +@@ -52,7 +52,7 @@
393 + STRING( REPLACE ".cpp" "" target ${entry})
394 + ADD_EXECUTABLE( ${target} ${target}.cpp )
395 + ADD_TEST( ${target}_test ${target} )
396 +- TARGET_LINK_LIBRARIES( ${target} exiv2lib )
397 ++ TARGET_LINK_LIBRARIES( ${target} PRIVATE exiv2lib ${EXPAT_LIBRARIES})
398 + #INSTALL( TARGETS ${target} ${INSTALL_TARGET_STANDARD_ARGS} )
399 + ENDFOREACH(entry ${SAMPLES})
400 +
401 +Index: a/src/CMakeLists.txt
402 +===================================================================
403 +--- a/src/CMakeLists.txt (revision 3972)
404 ++++ b/src/CMakeLists.txt (revision 3973)
405 +@@ -240,20 +240,20 @@
406 +
407 + if ( MSVC )
408 + source_group("Header Files" FILES ${LIBEXIV2_HDR} )
409 +- TARGET_LINK_LIBRARIES( exiv2lib ${EXPAT_LIBRARIES} )
410 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${EXPAT_LIBRARIES} )
411 + source_group("Header Files" FILES ${LIBCURL_HDR} )
412 +- TARGET_LINK_LIBRARIES( exiv2lib ${CURL_LIBRARIES} )
413 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${CURL_LIBRARIES} )
414 + source_group("Header Files" FILES ${SSH_HDR} )
415 +- TARGET_LINK_LIBRARIES( exiv2lib ${SSH_LIBRARIES} )
416 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${SSH_LIBRARIES} )
417 + else()
418 + if ( NOT MINGW )
419 +- TARGET_LINK_LIBRARIES( exiv2lib dl ${EXPAT_LIBRARIES} )
420 +- TARGET_LINK_LIBRARIES( exiv2lib dl ${CURL_LIBRARIES} )
421 +- TARGET_LINK_LIBRARIES( exiv2lib dl ${SSH_LIBRARIES} )
422 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE dl ${EXPAT_LIBRARIES} )
423 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE dl ${CURL_LIBRARIES} )
424 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE dl ${SSH_LIBRARIES} )
425 + else()
426 +- TARGET_LINK_LIBRARIES( exiv2lib ${EXPAT_LIBRARIES} )
427 +- TARGET_LINK_LIBRARIES( exiv2lib ${CURL_LIBRARIES} )
428 +- TARGET_LINK_LIBRARIES( exiv2lib ${SSH_LIBRARIES} )
429 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${EXPAT_LIBRARIES} )
430 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${CURL_LIBRARIES} )
431 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${SSH_LIBRARIES} )
432 + endif()
433 + endif()
434 +
435 +@@ -262,33 +262,33 @@
436 + if ( MSVC )
437 + LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}/$(ConfigurationName))
438 + endif(MSVC)
439 +- TARGET_LINK_LIBRARIES( exiv2lib xmp )
440 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE xmp )
441 + ENDIF()
442 +
443 + IF( EXIV2_ENABLE_PNG )
444 + IF( ZLIB_FOUND )
445 + IF( MSVC )
446 + if ( EXIV2_ENABLE_SHARED )
447 +- TARGET_LINK_LIBRARIES( exiv2lib optimized ${ZLIB_LIBRARIES} debug ${ZLIB_LIBRARIES}d )
448 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE optimized ${ZLIB_LIBRARIES}.lib debug ${ZLIB_LIBRARIES}d.lib )
449 + else()
450 +- TARGET_LINK_LIBRARIES( exiv2lib optimized zlibstatic.lib debug zlibstaticd.lib )
451 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE optimized zlibstatic.lib debug zlibstaticd.lib )
452 + endif()
453 + ELSE()
454 +- TARGET_LINK_LIBRARIES( exiv2lib ${ZLIB_LIBRARIES} )
455 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${ZLIB_LIBRARIES} )
456 + ENDIF()
457 + ENDIF()
458 + ENDIF()
459 +
460 + IF( EXIV2_ENABLE_NLS )
461 +- TARGET_LINK_LIBRARIES( exiv2lib ${LIBINTL_LIBRARIES} )
462 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${LIBINTL_LIBRARIES} )
463 + ENDIF( EXIV2_ENABLE_NLS )
464 +
465 + IF( ICONV_FOUND )
466 +- TARGET_LINK_LIBRARIES( exiv2lib ${ICONV_LIBRARIES} )
467 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${ICONV_LIBRARIES} )
468 + ENDIF( ICONV_FOUND )
469 +
470 + IF (CYGWIN OR MINGW)
471 +- TARGET_LINK_LIBRARIES( exiv2lib psapi )
472 ++ TARGET_LINK_LIBRARIES( exiv2lib PRIVATE psapi )
473 + ENDIF(CYGWIN OR MINGW)
474 +
475 +
476 +@@ -303,7 +303,7 @@
477 + # ******************************************************************************
478 + # connection test application
479 + ADD_EXECUTABLE( conntest ${CONNTEST} )
480 +-TARGET_LINK_LIBRARIES( conntest exiv2lib )
481 ++TARGET_LINK_LIBRARIES( conntest PRIVATE exiv2lib ${CURL_LIBRARIES} ${SSH_LIBRARIES})
482 +
483 + # ******************************************************************************
484 + # exifprint application
485
486 diff --git a/media-gfx/exiv2/files/exiv2-0.25-musl.patch b/media-gfx/exiv2/files/exiv2-0.25-musl.patch
487 new file mode 100644
488 index 0000000..a44e255
489 --- /dev/null
490 +++ b/media-gfx/exiv2/files/exiv2-0.25-musl.patch
491 @@ -0,0 +1,12 @@
492 +--- a/src/futils.cpp 2016-06-01 18:29:06.629998810 -0500
493 ++++ b/src/futils.cpp 2016-06-01 18:29:22.209998806 -0500
494 +@@ -332,8 +332,7 @@
495 + std::ostringstream os;
496 + #ifdef EXV_HAVE_STRERROR_R
497 + const size_t n = 1024;
498 +-// _GNU_SOURCE: See Debian bug #485135
499 +-# if defined EXV_STRERROR_R_CHAR_P && defined _GNU_SOURCE
500 ++# if defined EXV_STRERROR_R_CHAR_P && defined __GLIBC__
501 + char *buf = 0;
502 + char buf2[n];
503 + std::memset(buf2, 0x0, n)
504
505 diff --git a/media-gfx/exiv2/files/exiv2-0.25-tools-optional.patch b/media-gfx/exiv2/files/exiv2-0.25-tools-optional.patch
506 new file mode 100644
507 index 0000000..2bb030a
508 --- /dev/null
509 +++ b/media-gfx/exiv2/files/exiv2-0.25-tools-optional.patch
510 @@ -0,0 +1,27 @@
511 +--- a/CMakeLists.txt 2015-06-15 17:32:21.000000000 +0200
512 ++++ b/CMakeLists.txt 2015-10-04 14:37:05.319679836 +0200
513 +@@ -55,6 +55,7 @@
514 + OPTION( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF )
515 + OPTION( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" ON )
516 + OPTION( EXIV2_ENABLE_SSH "USE Libssh for SshIo" ON )
517 ++OPTION( EXIV2_ENABLE_TOOLS "Build exiv2 executable" ON )
518 +
519 + IF( MINGW OR UNIX )
520 + IF ( CMAKE_CXX_COMPILER STREQUAL "g++" OR CMAKE_C_COMPILER STREQUAL "gcc" )
521 +--- a/src/CMakeLists.txt 2015-06-14 11:12:19.000000000 +0200
522 ++++ b/src/CMakeLists.txt 2015-10-04 14:33:27.784399402 +0200
523 +@@ -296,9 +296,11 @@
524 +
525 + # ******************************************************************************
526 + # exiv2 application
527 +-ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} )
528 +-TARGET_LINK_LIBRARIES( exiv2 exiv2lib )
529 +-INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
530 ++IF( EXIV2_ENABLE_TOOLS )
531 ++ ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} )
532 ++ TARGET_LINK_LIBRARIES( exiv2 exiv2lib )
533 ++ INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
534 ++ENDIF( EXIV2_ENABLE_TOOLS )
535 +
536 + # ******************************************************************************
537 + # connection test application
538
539 diff --git a/media-gfx/exiv2/metadata.xml b/media-gfx/exiv2/metadata.xml
540 new file mode 100644
541 index 0000000..3d5537f
542 --- /dev/null
543 +++ b/media-gfx/exiv2/metadata.xml
544 @@ -0,0 +1,20 @@
545 +<?xml version="1.0" encoding="UTF-8"?>
546 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
547 +<pkgmetadata>
548 + <maintainer type="project">
549 + <email>graphics@g.o</email>
550 + <name>Gentoo Graphics Project</name>
551 + </maintainer>
552 + <maintainer type="project">
553 + <email>kde@g.o</email>
554 + <name>Gentoo KDE Project</name>
555 + </maintainer>
556 + <longdescription lang="en">
557 + Exiv2 is a C++ library and command line utility to read and
558 + write EXIF, IPTC and XMP image metadata.
559 + </longdescription>
560 + <use>
561 + <flag name="contrib">Build additional contrib components</flag>
562 + <flag name="webready">Support reading metadata over the internet</flag>
563 + </use>
564 +</pkgmetadata>