| 1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
inherit toolchain-funcs
|
|
6 |
inherit flag-o-matic toolchain-funcs
|
| 7 |
7 |
|
| 8 |
8 |
DESCRIPTION="MTD userspace tools (NFTL, JFFS2, NAND, FTL, UBI)"
|
| 9 |
|
HOMEPAGE="https://git.infradead.org/?p=mtd-utils.git;a=summary"
|
|
9 |
HOMEPAGE="http://www.linux-mtd.infradead.org/ https://git.infradead.org/?p=mtd-utils.git;a=summary"
|
| 10 |
10 |
SRC_URI="https://infraroot.at/pub/mtd/${P}.tar.bz2"
|
| 11 |
11 |
|
| 12 |
12 |
LICENSE="GPL-2"
|
| 13 |
13 |
SLOT="0"
|
| 14 |
|
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv x86"
|
| 15 |
|
IUSE="+lzo +ssl test xattr +zstd"
|
|
14 |
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ~ppc64 ~riscv x86"
|
|
15 |
IUSE="+lzo selinux +ssl test ubifs xattr +zstd"
|
|
16 |
REQUIRED_USE="ubifs? ( lzo ssl xattr zstd )"
|
| 16 |
17 |
RESTRICT="!test? ( test )"
|
| 17 |
18 |
|
| 18 |
19 |
DEPEND="
|
| 19 |
20 |
sys-apps/util-linux:=
|
| 20 |
21 |
virtual/zlib:=
|
| 21 |
22 |
lzo? ( dev-libs/lzo:= )
|
| 22 |
|
ssl? ( dev-libs/openssl:0= )
|
|
23 |
selinux? ( sys-libs/libselinux )
|
|
24 |
ssl? ( dev-libs/openssl:= )
|
| 23 |
25 |
xattr? ( sys-apps/acl )
|
| 24 |
26 |
zstd? ( app-arch/zstd:= )
|
| 25 |
27 |
"
|
| 26 |
28 |
RDEPEND="${DEPEND}"
|
| 27 |
29 |
BDEPEND="test? ( dev-util/cmocka )"
|
| 28 |
30 |
|
| 29 |
|
DOCS=( jffsX-utils/device_table.txt ubifs-utils/mkfs.ubifs/README )
|
|
31 |
DOCS=( jffsX-utils/device_table.txt )
|
| 30 |
32 |
|
| 31 |
33 |
src_configure() {
|
| 32 |
|
# --enable-tests is for test programs that are installed
|
|
34 |
# Tests fail with LTO (cmocka, bug #943725)
|
|
35 |
filter-lto
|
|
36 |
|
| 33 |
37 |
local myeconfargs=(
|
| 34 |
|
--enable-tests
|
|
38 |
--enable-ubihealthd
|
|
39 |
# --with-tests is for test programs that are installed; was --enable-tests in earlier versions
|
|
40 |
--with-tests
|
|
41 |
--with-jffs
|
|
42 |
--with-lsmtd
|
|
43 |
--with-zlib
|
| 35 |
44 |
$(use_enable test unit-tests)
|
| 36 |
45 |
$(use_with lzo)
|
| 37 |
|
$(use_with ssl ubifs)
|
| 38 |
|
$(use_with xattr)
|
|
46 |
$(use_with selinux)
|
|
47 |
$(use_with ubifs)
|
|
48 |
# UBIFS-specific crypto support
|
|
49 |
$(use_with ubifs crypto)
|
| 39 |
50 |
$(use_with zstd)
|
|
51 |
$(use_with xattr)
|
| 40 |
52 |
)
|
|
53 |
|
| 41 |
54 |
econf "${myeconfargs[@]}"
|
| 42 |
55 |
}
|
| 43 |
56 |
|
| ... | ... | |
| 47 |
60 |
|
| 48 |
61 |
src_install() {
|
| 49 |
62 |
default
|
|
63 |
|
| 50 |
64 |
doman \
|
| 51 |
65 |
jffsX-utils/mkfs.jffs2.1 \
|
| 52 |
66 |
ubi-utils/ubinize.8
|