1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
7 if [[ ${PV} = *9999 ]]; then
8 EGIT_REPO_URI="https://github.com/Exiv2/exiv2.git"
12 COMMIT=900d2417dbeb46e14cbf65fc2798ed1d043ab76d
13 SRC_URI="https://github.com/Exiv2/${PN}/tarball/${COMMIT} -> ${P}.tar.gz"
14 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"
16 inherit cmake-multilib python-any-r1 vcs-snapshot
18 DESCRIPTION="EXIF, IPTC and XMP metadata C++ library and command line utility"
19 HOMEPAGE="http://www.exiv2.org/"
23 IUSE="doc examples nls png webready xmp"
26 >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
27 nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
28 png? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
30 net-libs/libssh[${MULTILIB_USEDEP}]
31 net-misc/curl[${MULTILIB_USEDEP}]
33 xmp? ( >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] )
43 nls? ( sys-devel/gettext )
46 DOCS=( README doc/ChangeLog doc/cmd.txt )
49 # TODO: Take to upstream
50 "${FILESDIR}"/${PN}-0.26-fix-docs.patch
51 "${FILESDIR}"/${PN}-0.26-tools-optional.patch
52 "${FILESDIR}"/${PN}-0.26-pentaxnikon-crash.patch
56 use doc && python-any-r1_pkg_setup
60 if [[ ${PV} != *9999 ]] ; then
62 pushd po > /dev/null || die
66 && ! has ${lang/.po/} ${LINGUAS-${lang/.po/}} ; then
70 *) rm -r ${lang} || die ;;
74 popd > /dev/null || die
76 die "Failed to prepare LINGUAS - po directory moved?"
81 einfo "Converting doc/cmd.txt to UTF-8"
82 iconv -f LATIN1 -t UTF-8 doc/cmd.txt > doc/cmd.txt.tmp || die
83 mv -f doc/cmd.txt.tmp doc/cmd.txt || die
86 einfo "Updating doxygen config"
87 doxygen &>/dev/null -u config/Doxyfile || die
90 cmake-utils_src_prepare
93 multilib_src_configure() {
95 -DEXIV2_ENABLE_BUILD_SAMPLES=NO
96 -DEXIV2_ENABLE_BUILD_PO=$(usex nls)
97 -DEXIV2_ENABLE_NLS=$(usex nls)
98 -DEXIV2_ENABLE_PNG=$(usex png)
99 -DEXIV2_ENABLE_CURL=$(usex webready)
100 -DEXIV2_ENABLE_SSH=$(usex webready)
101 -DEXIV2_ENABLE_WEBREADY=$(usex webready)
102 -DEXIV2_ENABLE_XMP=$(usex xmp)
103 -DEXIV2_ENABLE_LIBXMP=NO
104 $(multilib_is_native_abi || echo -DEXIV2_ENABLE_TOOLS=NO)
107 cmake-utils_src_configure
110 multilib_src_compile() {
111 cmake-utils_src_compile
113 if multilib_is_native_abi; then
114 use doc && emake -j1 doc
118 multilib_src_install_all() {
119 use xmp && DOCS+=( doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt} )
120 use doc && HTML_DOCS=( "${S}"/doc/html/. )
123 find "${D}" -name '*.la' -delete || die
125 if use examples; then