1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 COMMIT=269370863ecd61dd038eed3b96ecd65898d3bb6e
7 LINGUAS="bs de es fi fr gl ms pl pt ru sk sv ug uk vi"
8 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
9 inherit cmake-multilib python-any-r1 vcs-snapshot
11 DESCRIPTION="EXIF, IPTC and XMP metadata C++ library and command line utility"
12 HOMEPAGE="http://www.exiv2.org/"
13 SRC_URI="https://github.com/Exiv2/${PN}/tarball/${COMMIT} -> ${P}.tar.gz"
17 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
18 IUSE="doc examples nls png webready xmp $(printf 'linguas_%s ' ${LINGUAS})"
21 >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
22 nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
23 png? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
25 net-libs/libssh[${MULTILIB_USEDEP}]
26 net-misc/curl[${MULTILIB_USEDEP}]
28 xmp? ( >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] )
39 nls? ( sys-devel/gettext )
42 DOCS=( README.md doc/ChangeLog doc/cmd.txt )
45 "${FILESDIR}/${P}-cmake.patch"
46 "${FILESDIR}/${P}-ccache.patch" # bug 634302
50 use doc && python-any-r1_pkg_setup
54 if [[ ${PV} != *9999 ]] ; then
56 pushd po > /dev/null || die
59 if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
63 *) rm -r ${lang} || die ;;
67 popd > /dev/null || die
69 die "Failed to prepare LINGUAS - po directory moved?"
74 einfo "Converting doc/cmd.txt to UTF-8"
75 iconv -f LATIN1 -t UTF-8 doc/cmd.txt > doc/cmd.txt.tmp || die
76 mv -f doc/cmd.txt.tmp doc/cmd.txt || die
79 einfo "Updating doxygen config"
80 doxygen &>/dev/null -u config/Doxyfile || die
83 cmake-utils_src_prepare
86 multilib_src_configure() {
88 -DBUILD_WITH_CCACHE=OFF
89 -DEXIV2_BUILD_SAMPLES=OFF
90 -DEXIV2_BUILD_PO=$(usex nls)
91 -DEXIV2_ENABLE_NLS=$(usex nls)
92 -DEXIV2_ENABLE_PNG=$(usex png)
93 -DEXIV2_ENABLE_CURL=$(usex webready)
94 -DEXIV2_ENABLE_SSH=$(usex webready)
95 -DEXIV2_ENABLE_WEBREADY=$(usex webready)
96 -DEXIV2_ENABLE_XMP=$(usex xmp)
97 $(multilib_is_native_abi || echo -DEXIV2_BUILD_EXIV2_COMMAND=NO)
100 cmake-utils_src_configure
103 multilib_src_compile() {
104 cmake-utils_src_compile
106 if multilib_is_native_abi; then
107 use doc && emake -j1 doc
111 multilib_src_install_all() {
112 use xmp && DOCS+=( doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt} )
113 use doc && HTML_DOCS=( "${S}"/doc/html/. )
116 find "${D}" -name '*.la' -delete || die
118 if use examples; then