1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI="7"
|
|
4 |
EAPI="8"
|
5 |
5 |
|
6 |
6 |
inherit toolchain-funcs
|
7 |
7 |
|
8 |
|
MY_PV="v${PV}"
|
9 |
|
SRC_URI="https://github.com/linux-sunxi/sunxi-tools/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
|
|
8 |
if [[ ${PV} = *9999* ]]; then
|
|
9 |
inherit git-r3
|
|
10 |
EGIT_REPO_URI="https://github.com/linux-sunxi/sunxi-tools"
|
|
11 |
PROPERTIES="test_network"
|
|
12 |
RESTRICT="test"
|
|
13 |
RDEPEND="sys-apps/dtc
|
|
14 |
sys-libs/zlib"
|
|
15 |
else
|
|
16 |
KEYWORDS="~amd64"
|
|
17 |
# We need this as zip, it is used during src_test
|
|
18 |
SRC_URI="https://github.com/linux-sunxi/sunxi-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
|
19 |
test? ( https://github.com/linux-sunxi/sunxi-boards/archive/bc7410fed9e5d9b31cd1d6ae90462d06b513660e.zip \
|
|
20 |
-> ${P}-test.zip )"
|
|
21 |
RESTRICT="!test? ( test )"
|
|
22 |
|
|
23 |
PATCHES=(
|
|
24 |
"${FILESDIR}/${PN}-1.4.1-fix-strncpy-compiler-warning.patch"
|
|
25 |
)
|
|
26 |
fi
|
10 |
27 |
|
11 |
|
DESCRIPTION="Tools for Allwinner A10 devices."
|
12 |
|
HOMEPAGE="http://linux-sunxi.org/"
|
|
28 |
DESCRIPTION="A collection of command line tools for ARM devices with Allwinner SoCs"
|
|
29 |
HOMEPAGE="https://linux-sunxi.org/Main_Page"
|
13 |
30 |
|
14 |
31 |
LICENSE="GPL-2"
|
15 |
32 |
SLOT="0"
|
16 |
|
IUSE=""
|
17 |
|
KEYWORDS="~amd64"
|
|
33 |
IUSE="test"
|
18 |
34 |
|
19 |
|
RDEPEND="acct-group/plugdev
|
|
35 |
RDEPEND+=" acct-group/plugdev
|
20 |
36 |
virtual/libusb:1
|
21 |
37 |
virtual/udev"
|
22 |
38 |
|
23 |
39 |
DEPEND="${RDEPEND}
|
24 |
|
virtual/pkgconfig"
|
|
40 |
"
|
25 |
41 |
|
26 |
|
PATCHES=(
|
27 |
|
"${FILESDIR}/${P}-respect-user-supplied-cflags.patch"
|
28 |
|
"${FILESDIR}/${P}-fix-strncpy-compiler-warning.patch"
|
29 |
|
)
|
|
42 |
BDEPEND="virtual/pkgconfig
|
|
43 |
test? ( app-arch/unzip )"
|
|
44 |
|
|
45 |
src_unpack() {
|
|
46 |
if [[ ${PV} = *9999* ]]; then
|
|
47 |
git-r3_src_unpack
|
|
48 |
else
|
|
49 |
unpack ${P}.tar.gz
|
|
50 |
# No need to unpack testdata twice
|
|
51 |
fi
|
|
52 |
}
|
|
53 |
|
|
54 |
src_prepare() {
|
|
55 |
default
|
|
56 |
|
|
57 |
if [[ ${PV} != *9999* ]] && use test; then
|
|
58 |
cp "${DISTDIR}/${P}-test.zip" "${S}/tests/sunxi-boards.zip" || die
|
|
59 |
sed -i 's$sunxi-boards-master$sunxi-boards-bc7410fed9e5d9b31cd1d6ae90462d06b513660e$' tests/Makefile || die
|
|
60 |
sed -i 's|^coverage:.*|coverage: $(BOARDS_DIR)/README|' tests/Makefile || die
|
|
61 |
fi
|
|
62 |
}
|
30 |
63 |
|
31 |
64 |
src_compile() {
|
32 |
65 |
tc-export PKG_CONFIG
|