Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/exiv2/files/, media-gfx/exiv2/
Date: Sun, 04 Oct 2015 14:52:01
Message-Id: 1443968511.3e09d75a96b8f864847a96daee2e255bda10f0d2.mgorny@gentoo
1 commit: 3e09d75a96b8f864847a96daee2e255bda10f0d2
2 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
3 AuthorDate: Sun Aug 16 11:21:38 2015 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 4 14:21:51 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e09d75a
7
8 media-gfx/exiv2: Version bump
9
10 Switch to cmake
11 Add patch based on Fedora to fix multilib
12
13 Package-Manager: portage-2.2.20.1
14
15 media-gfx/exiv2/Manifest | 1 +
16 media-gfx/exiv2/exiv2-0.25.ebuild | 124 +++++++++++++++++++++
17 media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch | 71 ++++++++++++
18 .../exiv2/files/exiv2-0.25-fix-install-dirs.patch | 64 +++++++++++
19 .../exiv2/files/exiv2-0.25-tools-optional.patch | 27 +++++
20 media-gfx/exiv2/metadata.xml | 9 +-
21 6 files changed, 291 insertions(+), 5 deletions(-)
22
23 diff --git a/media-gfx/exiv2/Manifest b/media-gfx/exiv2/Manifest
24 index f3ef648..5cd1ff1 100644
25 --- a/media-gfx/exiv2/Manifest
26 +++ b/media-gfx/exiv2/Manifest
27 @@ -1 +1,2 @@
28 DIST exiv2-0.24.tar.gz 4635028 SHA256 f4a443e6c7fb9d9f5e787732f76969a64c72c4c04af69b10ed57f949c2dfef8e SHA512 e2d5d076c09a36d88472485c9d9d99b5a50aea1ab59b1e5c9301b1ce9fe2b2af02acae2662c9ff56b4c749a224688387ba58334d31b74f04f3d2d3d3c0e387e9 WHIRLPOOL b5b7eb544975d8e14739b39fc294279b58369944172684c0f881348ebf47ef0f9ccd18e8bc41113d9da3a72f8d6c048641f547a7071a7ca6d93d1d30ea2d7aed
29 +DIST exiv2-0.25.tar.gz 5434325 SHA256 c80bfc778a15fdb06f71265db2c3d49d8493c382e516cb99b8c9f9cbde36efa4 SHA512 08d4e655ffdde715e0214f4bef01d55aba9b8ba517456a60e254a0f8541c20479e407545db28ca90a69dee8def6941fdd88f9a557fb382ebebe49e363aca8e8e WHIRLPOOL f9e7a6947dac5870e0574253b8c1cb1e7d31a916a9e1c4417c73168046c0b4bed90b9c77253444604163bcf6dca204dab92a52cb03bdcb0f85c807327623f8ac
30
31 diff --git a/media-gfx/exiv2/exiv2-0.25.ebuild b/media-gfx/exiv2/exiv2-0.25.ebuild
32 new file mode 100644
33 index 0000000..252166b
34 --- /dev/null
35 +++ b/media-gfx/exiv2/exiv2-0.25.ebuild
36 @@ -0,0 +1,124 @@
37 +# Copyright 1999-2015 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI=5
42 +PYTHON_COMPAT=( python{2_7,3_3,3_4} )
43 +
44 +inherit eutils cmake-multilib python-any-r1
45 +
46 +DESCRIPTION="EXIF, IPTC and XMP metadata C++ library and command line utility"
47 +HOMEPAGE="http://www.exiv2.org/"
48 +SRC_URI="http://www.exiv2.org/${P}.tar.gz"
49 +
50 +LICENSE="GPL-2"
51 +SLOT="0/14"
52 +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"
53 +IUSE_LINGUAS="bs de es fi fr gl ms pl pt ru sk sv ug uk vi"
54 +IUSE="doc examples nls png webready xmp $(printf 'linguas_%s ' ${IUSE_LINGUAS})"
55 +
56 +RDEPEND="
57 + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
58 + nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
59 + png? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
60 + webready? (
61 + net-libs/libssh[${MULTILIB_USEDEP}]
62 + net-misc/curl[${MULTILIB_USEDEP}]
63 + )
64 + xmp? ( >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] )
65 +"
66 +
67 +DEPEND="${RDEPEND}
68 + doc? (
69 + app-doc/doxygen
70 + dev-libs/libxslt
71 + virtual/pkgconfig
72 + media-gfx/graphviz
73 + ${PYTHON_DEPS}
74 + )
75 + nls? ( sys-devel/gettext )
76 +"
77 +
78 +DOCS=( README doc/ChangeLog doc/cmd.txt )
79 +
80 +PATCHES=(
81 + "${FILESDIR}/${PN}-0.25-fix-docs.patch"
82 + "${FILESDIR}/${PN}-0.25-fix-install-dirs.patch"
83 + "${FILESDIR}/${PN}-0.25-tools-optional.patch"
84 +)
85 +
86 +pkg_setup() {
87 + use doc && python-any-r1_pkg_setup
88 +}
89 +
90 +src_prepare() {
91 + rm -r msvc* build || die "Failed to remove msvc dirs"
92 +
93 + if [[ ${PV} != *9999 ]] ; then
94 + if [[ -d po ]] ; then
95 + pushd po > /dev/null || die
96 + for lang in *.po; do
97 + if ! has ${lang%.po} ${LINGUAS} ; then
98 + rm -rf ${lang} || die
99 + fi
100 + done
101 + popd > /dev/null || die
102 + else
103 + die "Failed to prepare LINGUAS - po directory moved?"
104 + fi
105 + fi
106 +
107 + # convert docs to UTF-8
108 + local i
109 + for i in doc/cmd.txt; do
110 + einfo "Converting "${i}" to UTF-8"
111 + iconv -f LATIN1 -t UTF-8 "${i}" > "${i}.tmp" || die
112 + mv -f "${i}.tmp" "${i}" || die
113 + done
114 +
115 + if use doc; then
116 + einfo "Updating doxygen config"
117 + doxygen &>/dev/null -u config/Doxyfile || die
118 + fi
119 +
120 + cmake-utils_src_prepare
121 +}
122 +
123 +multilib_src_configure() {
124 + local mycmakeargs=(
125 + -DEXIV2_ENABLE_BUILD_PO=YES
126 + -DEXIV2_ENABLE_BUILD_SAMPLES=NO
127 + -DEXIV2_ENABLE_CURL=$(usex webready)
128 + -DEXIV2_ENABLE_NLS=$(usex nls)
129 + -DEXIV2_ENABLE_PNG=$(usex png)
130 + -DEXIV2_ENABLE_SSH=$(usex webready)
131 + -DEXIV2_ENABLE_WEBREADY=$(usex webready)
132 + -DEXIV2_ENABLE_XMP=$(usex xmp)
133 + -DEXIV2_ENABLE_LIBXMP=NO
134 + $(multilib_is_native_abi || \
135 + echo -DEXIV2_ENABLE_TOOLS=NO)
136 + )
137 +
138 + cmake-utils_src_configure
139 +}
140 +
141 +multilib_src_compile() {
142 + cmake-utils_src_compile
143 +
144 + if multilib_is_native_abi; then
145 + use doc && emake -j1 doc
146 + fi
147 +}
148 +
149 +multilib_src_install_all() {
150 + einstalldocs
151 + prune_libtool_files --all
152 +
153 + use xmp && dodoc doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt}
154 + use doc && dodoc -r "${S}"/doc/html
155 +
156 + if use examples; then
157 + docinto examples
158 + dodoc samples/*.cpp
159 + fi
160 +}
161
162 diff --git a/media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch b/media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch
163 new file mode 100644
164 index 0000000..e2bf677
165 --- /dev/null
166 +++ b/media-gfx/exiv2/files/exiv2-0.25-fix-docs.patch
167 @@ -0,0 +1,71 @@
168 +--- a/CMakeLists.txt 2015-07-19 16:04:35.363628707 +0200
169 ++++ b/CMakeLists.txt 2015-07-19 16:28:31.051680136 +0200
170 +@@ -216,9 +216,7 @@
171 + ADD_SUBDIRECTORY( xmpsdk )
172 + ADD_SUBDIRECTORY( src )
173 +
174 +-IF( EXIV2_ENABLE_BUILD_SAMPLES )
175 +- ADD_SUBDIRECTORY( samples )
176 +-ENDIF( EXIV2_ENABLE_BUILD_SAMPLES )
177 ++ADD_SUBDIRECTORY( samples )
178 +
179 + IF( EXIV2_ENABLE_BUILD_PO )
180 + ADD_SUBDIRECTORY( po )
181 +--- a/samples/CMakeLists.txt 2015-07-19 16:04:35.360628744 +0200
182 ++++ b/samples/CMakeLists.txt 2015-07-19 16:30:46.415987850 +0200
183 +@@ -20,7 +20,11 @@
184 + endif()
185 + include_directories("${CMAKE_SOURCE_DIR}/include" "${CMAKE_SOURCE_DIR}/src")
186 +
187 +-SET( SAMPLES addmoddel.cpp
188 ++SET( SAMPLES taglist.cpp )
189 ++
190 ++IF( EXIV2_ENABLE_BUILD_SAMPLES )
191 ++ SET( SAMPLES ${SAMPLES}
192 ++ addmoddel.cpp
193 + convert-test.cpp
194 + easyaccess-test.cpp
195 + exifcomment.cpp
196 +@@ -38,7 +42,6 @@
197 + mmap-test.cpp
198 + prevtest.cpp
199 + stringto-test.cpp
200 +- taglist.cpp
201 + tiff-test.cpp
202 + werror-test.cpp
203 + write-test.cpp
204 +@@ -47,6 +50,7 @@
205 + xmpparser-test.cpp
206 + xmpsample.cpp
207 + )
208 ++ENDIF()
209 +
210 + FOREACH(entry ${SAMPLES})
211 + STRING( REPLACE ".cpp" "" target ${entry})
212 +@@ -63,6 +67,7 @@
213 + SET( MC_SRC ${MC_SRC} ../src/getopt_win32.c )
214 + ENDIF( MSVC )
215 +
216 ++IF( EXIV2_ENABLE_BUILD_SAMPLES )
217 + SET( MC_SRC ${MC_SRC} metacopy.cpp ../src/utils.cpp )
218 + ADD_EXECUTABLE( metacopy ${MC_SRC} )
219 + TARGET_LINK_LIBRARIES( metacopy exiv2lib )
220 +@@ -79,6 +84,7 @@
221 + SET_TARGET_PROPERTIES( exiv2json PROPERTIES OUTPUT_NAME exiv2json )
222 + TARGET_LINK_LIBRARIES( exiv2json exiv2lib )
223 + INSTALL( TARGETS exiv2json ${INSTALL_TARGET_STANDARD_ARGS} )
224 ++ENDIF()
225 +
226 + # That's all Folks!
227 + ##
228 +--- a/doc/templates/Makefile 2015-07-19 16:50:50.589933604 +0200
229 ++++ b/doc/templates/Makefile 2015-07-19 16:51:07.686719864 +0200
230 +@@ -143,7 +143,7 @@
231 + xmp_mwg-rs \
232 + xmp_mwg-kw
233 +
234 +-TAGLIST = ../../bin/taglist
235 ++TAGLIST = ../../src/bin/taglist
236 +
237 + # **********************************************************************
238 + # ======================================================================
239
240 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
241 new file mode 100644
242 index 0000000..bca79dd
243 --- /dev/null
244 +++ b/media-gfx/exiv2/files/exiv2-0.25-fix-install-dirs.patch
245 @@ -0,0 +1,64 @@
246 +USE GNUInstallDirs to fix man page and multilib install
247 +
248 +See also: http://dev.exiv2.org/issues/1125
249 +Patch based on: http://pkgs.fedoraproject.org/cgit/exiv2.git/tree/exiv2-0.25-cmake_LIB_SUFFIX.patch
250 +
251 +--- b/config/CMakeChecks.txt 2015-07-19 14:23:11.606686135 +0200
252 ++++ b/config/CMakeChecks.txt 2015-06-22 08:41:22.913094633 -0500
253 +@@ -37,6 +37,8 @@
254 + INCLUDE( CheckCSourceCompiles )
255 + INCLUDE( CheckCXXSourceCompiles )
256 +
257 ++INCLUDE( GNUInstallDirs )
258 ++
259 + INCLUDE( FindIconv )
260 +
261 + SET( STDC_HEADERS ON )
262 +@@ -289,9 +291,9 @@
263 +
264 + IF( NOT MSVC )
265 + CONFIGURE_FILE( config/exiv2.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc @ONLY )
266 +- INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION lib/pkgconfig )
267 ++ INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
268 + CONFIGURE_FILE( config/exiv2.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm)
269 +- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION lib/pkgconfig )
270 ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
271 + ENDIF( NOT MSVC )
272 +
273 + # ******************************************************************************
274 +--- a/src/CMakeLists.txt 2015-07-19 14:06:54.104906589 +0200
275 ++++ b/src/CMakeLists.txt 2015-07-19 14:12:37.982607526 +0200
276 +@@ -321,7 +321,7 @@
277 +
278 + # ******************************************************************************
279 + # Man page
280 +-INSTALL( FILES exiv2.1 DESTINATION man/man1 )
281 ++INSTALL( FILES exiv2.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
282 +
283 + # That's all Folks!
284 + ##
285 +--- a/CMakeLists.txt 2015-06-15 10:32:21.000000000 -0500
286 ++++ b/CMakeLists.txt 2015-06-22 08:48:19.486245765 -0500
287 +@@ -25,7 +25,7 @@ if( POLICY CMP0042 )
288 + else()
289 + SET(CMAKE_MACOSX_RPATH 1)
290 + endif()
291 +-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
292 ++#SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
293 +
294 +
295 + SET( PACKAGE_COPYRIGHT "Andreas Huggel" )
296 +@@ -156,10 +156,10 @@ INCLUDE( config/CMakeChecks.txt )
297 +
298 + SET( INSTALL_TARGET_STANDARD_ARGS
299 + RUNTIME DESTINATION bin
300 +- LIBRARY DESTINATION lib
301 +- ARCHIVE DESTINATION lib
302 ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
303 ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
304 + )
305 +-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
306 ++#SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
307 +
308 + ##
309 + # add sources from XMPSDK directory
310
311 diff --git a/media-gfx/exiv2/files/exiv2-0.25-tools-optional.patch b/media-gfx/exiv2/files/exiv2-0.25-tools-optional.patch
312 new file mode 100644
313 index 0000000..2bb030a
314 --- /dev/null
315 +++ b/media-gfx/exiv2/files/exiv2-0.25-tools-optional.patch
316 @@ -0,0 +1,27 @@
317 +--- a/CMakeLists.txt 2015-06-15 17:32:21.000000000 +0200
318 ++++ b/CMakeLists.txt 2015-10-04 14:37:05.319679836 +0200
319 +@@ -55,6 +55,7 @@
320 + OPTION( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF )
321 + OPTION( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" ON )
322 + OPTION( EXIV2_ENABLE_SSH "USE Libssh for SshIo" ON )
323 ++OPTION( EXIV2_ENABLE_TOOLS "Build exiv2 executable" ON )
324 +
325 + IF( MINGW OR UNIX )
326 + IF ( CMAKE_CXX_COMPILER STREQUAL "g++" OR CMAKE_C_COMPILER STREQUAL "gcc" )
327 +--- a/src/CMakeLists.txt 2015-06-14 11:12:19.000000000 +0200
328 ++++ b/src/CMakeLists.txt 2015-10-04 14:33:27.784399402 +0200
329 +@@ -296,9 +296,11 @@
330 +
331 + # ******************************************************************************
332 + # exiv2 application
333 +-ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} )
334 +-TARGET_LINK_LIBRARIES( exiv2 exiv2lib )
335 +-INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
336 ++IF( EXIV2_ENABLE_TOOLS )
337 ++ ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} )
338 ++ TARGET_LINK_LIBRARIES( exiv2 exiv2lib )
339 ++ INSTALL( TARGETS exiv2 ${INSTALL_TARGET_STANDARD_ARGS} )
340 ++ENDIF( EXIV2_ENABLE_TOOLS )
341 +
342 + # ******************************************************************************
343 + # connection test application
344
345 diff --git a/media-gfx/exiv2/metadata.xml b/media-gfx/exiv2/metadata.xml
346 index 0bb7de6..795480e 100644
347 --- a/media-gfx/exiv2/metadata.xml
348 +++ b/media-gfx/exiv2/metadata.xml
349 @@ -4,12 +4,11 @@
350 <herd>graphics</herd>
351 <herd>kde</herd>
352 <longdescription lang="en">
353 - Exiv2 is a C++ library and a command line utility to read and
354 - write EXIF and IPTC image metadata.
355 + Exiv2 is a C++ library and command line utility to read and
356 + write EXIF, IPTC and XMP image metadata.
357 </longdescription>
358 <use>
359 - <flag name='contrib'>
360 - Build additional contrib components
361 - </flag>
362 + <flag name='contrib'>Build additional contrib components</flag>
363 + <flag name='webready'>Support reading metadata over the internet</flag>
364 </use>
365 </pkgmetadata>