Skip to content

Commit

Permalink
sasquatch: support gcc 10
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmwaters committed Jun 3, 2021
1 parent 5f0781b commit 4d1f418
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-fs/sasquatch/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST sasquatch-20160119.patch 1128943 BLAKE2B f0917a6369a58d9dee648a5ac4fb0083353c2263a9fb3c55ac84d386e485a99052df32536570bdc7c4532580e0b715b6222d5609a32885b49b0325bbcb53daa8 SHA512 ffc53ceeccc7ad3b58879030f91996db540cf184675ea1009672a0457f7c18d812f36c639fb1cc5d182a14e35f0dfe4a8f7b04fa47b0c8260dfffb6b6bc04f21
DIST sasquatch-20180522.squashfs4.3.tar.gz 182550 BLAKE2B f56ff33a505f7d60cced11224526bfce003bc06184ad7e8cb9cd08b14854164da8d2ecc64694d44085c46bcfa3aaa85939c97820415345053f7956af04066fdb SHA512 854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79
DIST sasquatch-20210325.squashfs4.3.tar.gz 182550 BLAKE2B f56ff33a505f7d60cced11224526bfce003bc06184ad7e8cb9cd08b14854164da8d2ecc64694d44085c46bcfa3aaa85939c97820415345053f7956af04066fdb SHA512 854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79
DIST squashfs4.3.tar.gz 182550 BLAKE2B f56ff33a505f7d60cced11224526bfce003bc06184ad7e8cb9cd08b14854164da8d2ecc64694d44085c46bcfa3aaa85939c97820415345053f7956af04066fdb SHA512 854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79
78 changes: 78 additions & 0 deletions sys-fs/sasquatch/sasquatch-20210325.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
SQSHFS_P="squashfs4.3"

inherit eutils flag-o-matic git-r3 toolchain-funcs

DESCRIPTION="The sasquatch project is a set of patches to the standard unsquashfs utility"
HOMEPAGE="https://github.com/devttys0/sasquatch http://squashfs.sourceforge.net"
SRC_URI="mirror://sourceforge/squashfs/${SQSHFS_P}.tar.gz -> ${P}.${SQSHFS_P}.tar.gz"

EGIT_REPO_URI="https://github.com/devttys0/sasquatch"
if [[ "${PV}" != *9999 ]]; then
EGIT_COMMIT="bd864a1b037bf57ca7d64a292a60ba0d6459611f"
KEYWORDS="~amd64 ~arm ~x86"
fi

LICENSE="GPL-2"
SLOT="0"
RESTRICT="mirror"
IUSE="debug lz4 lzo static xattr +xz"

LIB_DEPEND="
sys-libs/zlib[static-libs(+)]
!xz? ( !lzo? ( sys-libs/zlib[static-libs(+)] ) )
lz4? ( app-arch/lz4[static-libs(+)] )
lzo? ( dev-libs/lzo[static-libs(+)] )
xattr? ( sys-apps/attr[static-libs(+)] )
xz? ( app-arch/xz-utils[static-libs(+)] )"

RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
DEPEND="${RDEPEND}
static? ( ${LIB_DEPEND} )"

S="${WORKDIR}/${SQSHFS_P}/squashfs-tools"

src_unpack() {
git-r3_src_unpack
unpack ${A}
}

src_prepare() {
# Apply debian patches and using upstream...
# eapply -p2 "${FILESDIR}"/*.patch
eapply "${WORKDIR}/${P}"/patches/patch0.txt

# Enable target toolchain/params for child "make" process
sed -e "s/make -C \$(/make CC=$(tc-getCXX) ${MAKEOPTS} -C \$(/" \
-e "s/-Wall -Werror/-Wall/" \
-i Makefile || die 'sed failed!'

eapply_user
}

src_compile() {
append-cflags -std=gnu89
use debug && append-cppflags -DSQUASHFS_TRACE
use static && append-ldflags -static

tc-export CC
emake \
EXTRA_CFLAGS=-fcommon \
LZMA_SUPPORT=1 \
$(usex lzo LZO_SUPPORT=1 LZO_SUPPORT=0) \
$(usex lz4 LZ4_SUPPORT=1 LZ4_SUPPORT=0) \
$(usex xattr XATTR_SUPPORT=1 XATTR_SUPPORT=0) \
$(usex xz XZ_SUPPORT=1 XZ_SUPPORT=0)
}

src_install() {
dobin sasquatch
dodoc \
../CHANGES \
../ACKNOWLEDGEMENTS \
../PERFORMANCE.README \
"${WORKDIR}/${P}"/README.md
}

0 comments on commit 4d1f418

Please sign in to comment.