1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit flag-o-matic git-r3 toolchain-funcs
7 DESCRIPTION="tools to create and extract Squashfs filesystems"
9 http://squashfs.sourceforge.net
10 https://github.com/plougher/squashfs-tools
12 EGIT_REPO_URI="https://github.com/plougher/${PN}"
15 IUSE="debug lz4 lzma lzo static xattr +xz zstd"
19 !xz? ( !lzo? ( sys-libs/zlib[static-libs(+)] ) )
20 lz4? ( app-arch/lz4[static-libs(+)] )
21 lzma? ( app-arch/xz-utils[static-libs(+)] )
22 lzo? ( dev-libs/lzo[static-libs(+)] )
23 sys-libs/zlib[static-libs(+)]
24 xattr? ( sys-apps/attr[static-libs(+)] )
25 xz? ( app-arch/xz-utils[static-libs(+)] )
26 zstd? ( app-arch/zstd[static-libs(+)] )
29 !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
33 static? ( ${LIB_DEPEND} )
35 use10() { usex $1 1 0 ; }
39 # set up make command line variables in EMAKE_SQUASHFS_CONF
41 LZ4_SUPPORT=$(use10 lz4)
42 LZMA_XZ_SUPPORT=$(use10 lzma)
43 LZO_SUPPORT=$(use10 lzo)
44 XATTR_SUPPORT=$(use10 xattr)
45 XZ_SUPPORT=$(use10 xz)
46 ZSTD_SUPPORT=$(use10 zstd)
50 use debug && append-cppflags -DSQUASHFS_TRACE
51 use static && append-ldflags -static
55 emake "${EMAKE_SQUASHFS_CONF[@]}" -C ${PN}
59 dobin ${PN}/{mksquashfs,unsquashfs}
60 dodoc CHANGES README RELEASE-READMEs/*