blob: da19ee9ac2f3fd7ace69484c0e6a75d41b8cbc7b (
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
|
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="C implementation of createrepo"
HOMEPAGE="https://github.com/rpm-software-management/createrepo_c"
if [[ ${PV} = 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/rpm-software-management/createrepo_c.git"
else
SRC_URI="https://github.com/rpm-software-management/createrepo_c/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="legacy test"
RESTRICT="!test? ( test )"
DEPEND="
app-arch/bzip2:=
app-arch/drpm
app-arch/rpm
app-arch/xz-utils
app-arch/zchunk
dev-db/sqlite:3
dev-libs/glib:2
dev-libs/libxml2
dev-libs/openssl:=
net-misc/curl
sys-apps/file
sys-libs/libmodulemd
sys-libs/zlib:=
"
RDEPEND="${DEPEND}"
src_configure() {
local mycmakeargs=(
-DENABLE_DRPM=ON
# As best I can tell, this enables distribution as a wheel. No need for this on gentoo!
-DENABLE_PYTHON=OFF
# Upstream enables some 'Legacy' stuff by default, let's put that behind a USE flag
-DENABLE_LEGACY_WEAKDEPS=$(usex legacy ON OFF)
-DWITH_LEGACY_HASHES=$(usex legacy ON OFF)
-DWITH_LIBMODULEMD=ON
-DWITH_ZCHUNK=ON
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
# Tests have a magic target!
use test && cmake_src_compile tests
}
src_test() {
"${S}"_build/tests/run_tests.sh || die "Failed to run C library tests"
}
|