# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-arch/pigz/pigz-2.3.ebuild,v 1.2 2013/03/07 18:09:20 steev Exp $ EAPI=4 inherit eutils toolchain-funcs flag-o-matic DESCRIPTION="A parallel implementation of gzip" HOMEPAGE="http://www.zlib.net/pigz/" SRC_URI="http://www.zlib.net/pigz/${P}.tar.gz" LICENSE="ZLIB" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~mips ~sparc ~x86 ~amd64-linux ~sparc64-solaris" IUSE="static symlink test" LIB_DEPEND="sys-libs/zlib[static-libs(+)]" RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" DEPEND="${RDEPEND} static? ( ${LIB_DEPEND} ) test? ( app-arch/ncompress )" src_prepare() { epatch "${FILESDIR}"/${P}-make.patch sed -i -e '1,3d' -e '5s/$(CC)/$(CC) $(LDFLAGS)/' Makefile || die use static && append-ldflags -static tc-export CC } src_install() { dobin ${PN} dosym ${PN} /usr/bin/un${PN} dodoc README doman ${PN}.1 if use symlink; then dosym ${PN} /usr/bin/gzip dosym un${PN} /usr/bin/gunzip fi }