Diff squashfs-tools-4.3_p6-r1 with a squashfs-tools-4.5.1-r1

/usr/portage/sys-fs/squashfs-tools/squashfs-tools-4.5.1-r1.ebuild 2023-10-09 14:52:35.524368502 +0300
1
# Copyright 1999-2018 Gentoo Foundation
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=8
5 5
inherit flag-o-matic toolchain-funcs
6 6

  
7
DESCRIPTION="Tool for creating compressed filesystem type squashfs"
8
HOMEPAGE="http://squashfs.sourceforge.net"
7
DESCRIPTION="tools to create and extract Squashfs filesystems"
8
HOMEPAGE="https://github.com/plougher/squashfs-tools/"
9 9
SRC_URI="
10
	mirror://sourceforge/squashfs/squashfs${PV/_p*}.tar.gz
11
	mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz
12
"
10
	https://github.com/plougher/squashfs-tools/archive/${PV}.tar.gz
11
		-> ${P}.tar.gz"
13 12

  
14 13
LICENSE="GPL-2"
15 14
SLOT="0"
16
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
17
IUSE="debug lz4 lzma lzo static xattr +xz zstd"
15
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
16
IUSE="debug lz4 lzma lzo xattr zstd"
18 17

  
19
LIB_DEPEND="
20
	sys-libs/zlib[static-libs(+)]
21
	!xz? ( !lzo? ( sys-libs/zlib[static-libs(+)] ) )
22
	lz4? ( app-arch/lz4[static-libs(+)] )
23
	lzma? ( app-arch/xz-utils[static-libs(+)] )
24
	lzo? ( dev-libs/lzo[static-libs(+)] )
25
	xattr? ( sys-apps/attr[static-libs(+)] )
26
	xz? ( app-arch/xz-utils[static-libs(+)] )
27
	zstd? ( app-arch/zstd[static-libs(+)] )
28
"
29 18
RDEPEND="
30
	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
31
"
32
DEPEND="
33
	${RDEPEND}
34
	static? ( ${LIB_DEPEND} )
19
	sys-libs/zlib
20
	lz4? ( app-arch/lz4 )
21
	lzma? ( app-arch/xz-utils )
22
	lzo? ( dev-libs/lzo )
23
	xattr? ( sys-apps/attr )
24
	zstd? ( app-arch/zstd )
35 25
"
36
PATCHES=(
37
	"${FILESDIR}"/${P/_p*}-sysmacros.patch
38
	"${FILESDIR}"/${P/_p*}-aligned-data.patch
39
	"${FILESDIR}"/${P/_p*}-local-cve-fix.patch
40
	"${FILESDIR}"/${P/_p*}-mem-overflow.patch
41
	"${FILESDIR}"/${P/_p*}-extmatch.patch
42
	"${FILESDIR}"/${P/_p*}-musl.patch
43
	"${FILESDIR}"/${P/_p*}-zstd.patch
44
)
45

  
46
S="${WORKDIR}/squashfs${PV/_p*}/${PN}"
47

  
48
src_prepare() {
49
	eapply -p2 "${WORKDIR}"/debian/patches/*.patch
50
	eapply -p2 ${PATCHES[@]}
51
	eapply_user
52
}
26
DEPEND=${RDEPEND}
53 27

  
54
use10() { usex $1 1 0 ; }
28
use10() { usex "${1}" 1 0; }
55 29

  
56 30
src_configure() {
57
	# restore GNU89 inline semantics to
58
	# emit function symbols, bug 595290
59
	append-cflags -std=gnu89
60

  
61 31
	# set up make command line variables in EMAKE_SQUASHFS_CONF
62 32
	EMAKE_SQUASHFS_CONF=(
63 33
		LZMA_XZ_SUPPORT=$(use10 lzma)
64 34
		LZO_SUPPORT=$(use10 lzo)
65 35
		LZ4_SUPPORT=$(use10 lz4)
66 36
		XATTR_SUPPORT=$(use10 xattr)
67
		XZ_SUPPORT=$(use10 xz)
37
		XZ_SUPPORT=$(use10 lzma)
68 38
		ZSTD_SUPPORT=$(use10 zstd)
69 39
	)
70 40

  
71 41
	tc-export CC
72 42
	use debug && append-cppflags -DSQUASHFS_TRACE
73
	use static && append-ldflags -static
74 43
}
75 44

  
76 45
src_compile() {
77
	emake "${EMAKE_SQUASHFS_CONF[@]}"
46
	emake "${EMAKE_SQUASHFS_CONF[@]}" -C squashfs-tools
78 47
}
79 48

  
80 49
src_install() {
81
	dobin mksquashfs unsquashfs
82
	cd ..
83
	dodoc CHANGES PERFORMANCE.README pseudo-file.example README* OLD-READMEs/*
84
	doman "${WORKDIR}"/debian/manpages/*.[0-9]
50
	dobin squashfs-tools/{mksquashfs,unsquashfs}
51
	dodoc ACKNOWLEDGEMENTS CHANGES README*
52
	dodoc -r RELEASE-READMEs
53
	doman manpages/*.1
54

  
55
	dosym unsquashfs /usr/bin/sqfscat
56
	dosym mksquashfs /usr/bin/sqfstar
85 57
}
Thank you!