blob: 9b232210697ac2f469d4b673dfa5ee58ecb6af78 (
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
|
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
inherit meson python-single-r1
DESCRIPTION="C Library for manipulating Fedora Modularity metadata files"
HOMEPAGE="https://github.com/fedora-modularity/libmodulemd"
if [[ ${PV} = 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/fedora-modularity/libmodulemd.git"
else
SRC_URI="https://github.com/fedora-modularity/libmodulemd/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="MIT"
SLOT="0"
IUSE="gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="
${PYTHON_DEPS}
app-arch/rpm
sys-apps/file
dev-libs/glib:2
dev-libs/libyaml
$(python_gen_cond_dep '
dev-python/pygobject:3[${PYTHON_USEDEP}]
')
"
RDEPEND="${DEPEND}"
BDEPEND="
${PYTHON_DEPS}
dev-libs/gobject-introspection
dev-util/glib-utils
gtk-doc? (
dev-libs/glib[gtk-doc]
dev-util/gtk-doc
)
test? (
sys-libs/libmodulemd
)
"
src_configure() {
local emesonargs=(
$(meson_use gtk-doc with_docs)
)
meson_src_configure
}
src_test() {
meson_src_test --no-suite ci_valgrind
}
src_install() {
meson_src_install
# We need to compile the gobject introspection overrides to prevent QA warnings
local PYTHON_GI_OVERRIDESDIR=$("${EPYTHON}" -c 'import gi;print(gi._overridesdir)' || die)
python_optimize "${D}${PYTHON_GI_OVERRIDESDIR}/"
}
|