blob: d043c92b131f7b724e51f89be82924dbf86f2c12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
inherit autotools distutils-r1
DESCRIPTION="Library for International Press Telecommunications Council (IPTC) metadata"
HOMEPAGE="https://github.com/ianw/libiptcdata https://libiptcdata.sourceforge.net/"
SRC_URI="https://github.com/ianw/${PN}/releases/download/release_1_0_5/${P}.tar.gz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
IUSE="doc examples nls python"
RDEPEND="
nls? ( virtual/libintl )
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-build/gtk-doc-am
virtual/pkgconfig
doc? ( >=dev-util/gtk-doc-1 )
nls? ( >=sys-devel/gettext-0.13.1 )
python? (
${DISTUTILS_DEPS}
${PYTHON_DEPS}
)
"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
src_prepare() {
default
eautoreconf
if use python; then
cd python || die
# Bug #936589: compiling from inside the 'python' sub-directory
# might set that as the top source directory, and not ${S}, but
# "${S}/libiptcdata" is required to find headers and libraries.
# Symbolic linking "../libiptcdata" is a possible fix. Another
# way is adding in python/setup.py, under iptcdata's Extension,
# "include_dirs=['..']" and "library_dirs=['../libiptcdata']".
ln -s "../${PN}" . || die
distutils-r1_src_prepare
fi
}
src_configure () {
local myeconfargs=(
$(use_enable nls)
$(use_enable python)
$(use_enable doc gtk-doc)
)
econf "${myeconfargs[@]}"
if use python; then
cd python || die
distutils-r1_src_configure
fi
}
src_compile() {
default
if use python; then
cd python || die
distutils-r1_src_compile
fi
}
src_install () {
default
find "${D}" -name '*.la' -delete || die "failed to remove *.la files"
if use python; then
cd python || die
distutils-r1_src_install
fi
if use examples; then
dodoc python/README
dodoc -r python/examples
fi
}
|