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

EAPI=7

DESCRIPTION="A new set of tools for working with SquashFS images"
HOMEPAGE="https://github.com/AgentD/squashfs-tools-ng"
if [[ ${PV} = 9999* ]]; then
	inherit autotools git-r3
	EGIT_REPO_URI="https://github.com/AgentD/${PN}.git"
else
	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
	SRC_URI="https://infraroot.at/pub/squashfs/${P}.tar.xz"
fi

LICENSE="GPL-3+"
SLOT="0"
IUSE="lz4 lzo selinux +xz +zlib zstd"
REQUIRED_USE="|| ( lz4 lzo xz zlib zstd )"

DEPEND="
	lz4?     ( app-arch/lz4:= )
	lzo?     ( dev-libs/lzo:= )
	xz?      ( app-arch/xz-utils:= )
	selinux? ( sys-libs/libselinux:= )
	zlib?    ( sys-libs/zlib:= )
	zstd?    ( app-arch/zstd:= )
"
RDEPEND="${DEPEND}"

src_prepare() {
	default
	[[ ${PV} == "9999" ]] && eautoreconf
}

src_configure() {
	local myconf=(
		$(use_with lz4)
		$(use_with lzo)
		$(use_with selinux)
		$(use_with xz)
		$(use_with zlib gzip)
		$(use_with zstd)
	)
	econf "${myconf[@]}"
}