blob: cedbe3c1639ef775e6bf29ec869a65e2ae0a0e9f (
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
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
DESCRIPTION="MTD userspace tools (NFTL, JFFS2, NAND, FTL, UBI)"
HOMEPAGE="https://git.infradead.org/?p=mtd-utils.git;a=summary"
SRC_URI="https://infraroot.at/pub/mtd/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
IUSE="+lzo +ssl test xattr +zstd ubifs"
REQUIRED_USE="ubifs? ( lzo ssl xattr zstd )"
RESTRICT="!test? ( test )"
DEPEND="
sys-apps/util-linux:=
sys-libs/zlib:=
lzo? ( dev-libs/lzo:= )
ssl? ( dev-libs/openssl:0= )
xattr? ( sys-apps/acl )
zstd? ( app-arch/zstd:= )
"
RDEPEND="${DEPEND}"
BDEPEND="test? ( dev-util/cmocka )"
DOCS=( jffsX-utils/device_table.txt ubifs-utils/mkfs.ubifs/README )
src_prepare() {
default
sed -i '/if test.*then/s: == : = :' configure || die
}
src_configure() {
# --with-tests is for test programs that are installed; was --enable-tests in earlier versions
local myeconfargs=(
--with-tests
--with-zlib
--enable-ubihealthd
--with-lsmtd
--with-jffs
$(use_enable test unit-tests)
$(use_with lzo)
$(use_with xattr)
$(use_with zstd)
$(use_with ubifs)
$(use_with ubifs crypto) # UBIFS-specific crypto support
)
econf "${myeconfargs[@]}"
}
src_compile() {
emake AR="$(tc-getAR)"
}
src_install() {
default
doman \
jffsX-utils/mkfs.jffs2.1 \
ubi-utils/ubinize.8
}
|