Gentoo Archives: gentoo-musl

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