summaryrefslogtreecommitdiff
path: root/sys-apps/uutils-findutils/uutils-findutils-0.8.0.ebuild
blob: a55bc6f0dc7e6fd8973e46ffe7367ae14ca2455b (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.6.2

EAPI=8

CRATES="
"

LLVM_COMPAT=( {17..20} )
inherit cargo llvm-r1

DESCRIPTION="GNU findutils rewritten in Rust"
HOMEPAGE="https://uutils.github.io/findutils/ https://github.com/uutils/findutils"

if [[ ${PV} == 9999 ]] ; then
	EGIT_REPO_URI="https://github.com/uutils/findutils"
	inherit git-r3
elif [[ ${PV} == *_p* ]] ; then
	FINDUTILS_COMMIT="59301c788aa610bd9b35d8715af72d87528d07dc"
	SRC_URI="https://github.com/uutils/findutils/archive/${FINDUTILS_COMMIT}.tar.gz -> ${P}.tar.gz"
	SRC_URI+=" ${CARGO_CRATE_URIS}"
	S="${WORKDIR}"/findutils-${FINDUTILS_COMMIT}
else
	SRC_URI="https://github.com/uutils/findutils/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
	SRC_URI+=" ${CARGO_CRATE_URIS}"
	S="${WORKDIR}"/findutils-${PV}
fi

SRC_URI+="
	https://github.com/gentoo-crate-dist/findutils/releases/download/${PV}/findutils-${PV}-crates.tar.xz
"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+=" Apache-2.0 MIT Unicode-DFS-2016"
SLOT="0"
if [[ ${PV} != 9999 ]] ; then
	KEYWORDS="~amd64 ~arm64"
fi

RDEPEND=">=dev-libs/oniguruma-6.9.9:="
DEPEND="${RDEPEND}"
BDEPEND="
	$(llvm_gen_dep '
		llvm-core/clang:${LLVM_SLOT}
	')
"

QA_FLAGS_IGNORED=".*"

pkg_setup() {
	llvm-r1_pkg_setup
	rust_pkg_setup
}

src_unpack() {
	if [[ ${PV} == 9999 ]] ; then
		git-r3_src_unpack
		cargo_live_src_unpack
	else
		cargo_src_unpack
	fi
}

src_configure() {
	export RUSTONIG_SYSTEM_LIBONIG=1
	export PKG_CONFIG_ALLOW_CROSS=1

	cargo_src_configure
}

src_install() {
	cargo_src_install

	rm "${ED}"/usr/bin/testing-commandline || die

	local binary
	for binary in find xargs ; do
		mv "${ED}"/usr/bin/${binary} "${ED}"/usr/bin/uutils-${binary} || die
	done
}