Gentoo Archives: gentoo-musl

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

Replies

Subject Author
Re: [gentoo-musl] [PATCH] Fix build for media-gfx/exiv2 "Anthony G. Basile" <basile@××××××××××××××.edu>