# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="A multi-threaded bzip2/bunzip2 filter that doesn't depend on the lseek() system call and so isn't restricted to regular files." HOMEPAGE="http://phptest11.atw.hu/" SRC_URI="http://lacos.web.elte.hu/pub/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="test" RDEPEND="app-arch/bzip2" DEPEND="${RDEPEND} app-shells/dash test? ( sys-process/time )" S="${WORKDIR}/${PN}" src_unpack() { unpack ${A} cd "${S}" sed -i.orig -e 's/$(CFLAGS)/& $(CPPFLAGS)/' -e 's/FLAGS=/FLAGS+=/' \ -e '/^CFLAGS/,/^[^[:space:]]/s/-O2//' -e '/^LDFLAGS/s/-s //' \ Makefile } src_compile() { emake SHELL=/bin/dash || die "emake failed" } src_test() { if [ -t 0 ]; then rm -rf "${T}/scratch" "${T}/results" "${T}/rnd" hexdump -n 10485760 /dev/urandom > "${T}/rnd" emake -j1 SHELL=/bin/dash PATH="${S}:${PATH}" TESTFILE="${T}/rnd" check \ || die "make check failed" else ewarn "make check must be run attached to a terminal" fi } src_install() { dobin lbzip2 doman lbzip2.1 exeinto "/usr/share/${PN}" doexe corr-perf.sh malloc_trace.pl test.sh lfs.sh dodoc ChangeLog README }