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 )
44 PATCHES=( "${FILESDIR}/${P}-cmake.patch" )
47 use doc && python-any-r1_pkg_setup
51 if [[ ${PV} != *9999 ]] ; then
53 pushd po > /dev/null || die
56 if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
60 *) rm -r ${lang} || die ;;
64 popd > /dev/null || die
66 die "Failed to prepare LINGUAS - po directory moved?"
71 einfo "Converting doc/cmd.txt to UTF-8"
72 iconv -f LATIN1 -t UTF-8 doc/cmd.txt > doc/cmd.txt.tmp || die
73 mv -f doc/cmd.txt.tmp doc/cmd.txt || die
76 einfo "Updating doxygen config"
77 doxygen &>/dev/null -u config/Doxyfile || die
80 cmake-utils_src_prepare
83 multilib_src_configure() {
85 -DEXIV2_BUILD_SAMPLES=NO
86 -DEXIV2_BUILD_PO=$(usex nls)
87 -DEXIV2_ENABLE_NLS=$(usex nls)
88 -DEXIV2_ENABLE_PNG=$(usex png)
89 -DEXIV2_ENABLE_CURL=$(usex webready)
90 -DEXIV2_ENABLE_SSH=$(usex webready)
91 -DEXIV2_ENABLE_WEBREADY=$(usex webready)
92 -DEXIV2_ENABLE_XMP=$(usex xmp)
93 $(multilib_is_native_abi || echo -DEXIV2_BUILD_EXIV2_COMMAND=NO)
96 cmake-utils_src_configure
99 multilib_src_compile() {
100 cmake-utils_src_compile
102 if multilib_is_native_abi; then
103 use doc && emake -j1 doc
107 multilib_src_install_all() {
108 use xmp && DOCS+=( doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt} )
109 use doc && HTML_DOCS=( "${S}"/doc/html/. )
112 find "${D}" -name '*.la' -delete || die
114 if use examples; then