blob: f62a5720df2b631df6018ef0fe64f74b196f7782 (
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
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
inherit cmake python-r1
DESCRIPTION="Library for working with RPM manifests"
HOMEPAGE="https://github.com/rpm-software-management/libpkgmanifest"
SRC_URI="https://github.com/rpm-software-management/libpkgmanifest/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="python test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
RDEPEND="
dev-cpp/yaml-cpp:=
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
python? ( dev-lang/swig )
test? ( dev-cpp/gtest )
"
src_configure() {
local mycmakeargs=(
-DWITH_TESTS=$(usex test)
-DWITH_DOCS=NO
-DWITH_PYTHON=$(usex python)
)
if use python; then
python_foreach_impl cmake_src_configure
else
cmake_src_configure
fi
}
src_compile() {
if use python; then
python_foreach_impl cmake_src_compile
else
cmake_src_compile
fi
}
src_test() {
if use python; then
python_foreach_impl cmake_src_test
else
cmake_src_test
fi
}
src_install() {
if use python; then
python_foreach_impl cmake_src_install
python_foreach_impl python_optimize
else
cmake_src_install
fi
}
|