summaryrefslogtreecommitdiff
blob: 73b79ece0ee9b664e44abd8b52902f5e778cec98 (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
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{7,8,9} )
inherit distutils-r1 toolchain-funcs

DESCRIPTION="ease the development of portable automated build systems"
HOMEPAGE="https://www.adacore.com/"
SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
	-> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="!test? ( test )"

RDEPEND="dev-python/colorama[${PYTHON_USEDEP}]
	dev-python/stevedore[${PYTHON_USEDEP}]
	dev-python/distro[${PYTHON_USEDEP}]
	!app-editors/e3"
DEPEND="${RDEPEND}"
BDEPEND="
	test? (
		dev-python/requests-toolbelt[${PYTHON_USEDEP}]
		dev-python/httpretty[${PYTHON_USEDEP}]
		dev-vcs/subversion
		dev-python/tqdm[${PYTHON_USEDEP}]
		dev-python/tomlkit[${PYTHON_USEDEP}]
		dev-python/pyyaml[${PYTHON_USEDEP}]
		dev-python/python-dateutil[${PYTHON_USEDEP}]
		dev-python/mock[${PYTHON_USEDEP}]
		dev-python/psutil[${PYTHON_USEDEP}]
	)"
REQUIRED_USE="x86? ( !test )"

PATCHES=(
	"${FILESDIR}"/${P}-distro.patch
	"${FILESDIR}"/${P}-test.patch
)

distutils_enable_tests --install pytest

src_prepare() {
	distutils-r1_src_prepare
}

src_compile() {
	local PLATFORM=x86_64-linux
	rm src/e3/os/data/rlimit* || die
	$(tc-getCC) ${CFLAGS} -o src/e3/os/data/rlimit-${PLATFORM} tools/rlimit/rlimit.c ${LDFLAGS}
	distutils-r1_src_compile
}