*/*: Discontinue Gentoo SuperH port
[gentoo.git] / app-arch / pigz / pigz-2.4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs flag-o-matic
7
8 DESCRIPTION="A parallel implementation of gzip"
9 HOMEPAGE="https://www.zlib.net/pigz/"
10 SRC_URI="https://www.zlib.net/pigz/${P}.tar.gz"
11
12 LICENSE="ZLIB"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~ppc-macos ~sparc64-solaris"
15 IUSE="static symlink test"
16 RESTRICT="!test? ( test )"
17
18 LIB_DEPEND="sys-libs/zlib[static-libs(+)]"
19 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
20 DEPEND="${RDEPEND}
21         static? ( ${LIB_DEPEND} )
22         test? ( app-arch/ncompress )"
23
24 src_compile() {
25         use static && append-ldflags -static
26         emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
27 }
28
29 src_install() {
30         dobin ${PN}
31         dosym ${PN} /usr/bin/un${PN}
32         dodoc README
33         doman ${PN}.1
34
35         if use symlink; then
36                 dosym ${PN} /usr/bin/gzip
37                 dosym un${PN} /usr/bin/gunzip
38         fi
39 }