# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart/bootchart-0.9-r4.ebuild,v 1.4 2012/04/03 21:35:09 jer Exp $ EAPI="2" JAVA_PKG_IUSE="source" inherit multilib eutils java-pkg-opt-2 java-ant-2 DESCRIPTION="Performance analysis and visualization of the system boot process" HOMEPAGE="http://www.bootchart.org/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 hppa ~x86" IUSE="acct debug doc java" DEPEND=" java? ( >=virtual/jdk-1.4 dev-java/commons-cli ) " RDEPEND=" java? ( >=virtual/jre-1.4 dev-java/commons-cli ) acct? ( sys-process/acct ) " src_prepare() { epatch "${FILESDIR}/${P}"-gentoo.patch epatch "${FILESDIR}/${P}"-sh.patch epatch "${FILESDIR}/${P}"-dev-null.patch # bug #317451 epatch "${FILESDIR}/accton.patch" # delete the included commons-cli and use gentoo's instead # The rest of lib is also bundled but a bit problematic to # package https://bugs.gentoo.org/show_bug.cgi?id=162788 rm -rf lib/org/apache/commons/cli lib/org/apache/commons/lang if use java ; then java-ant_rewrite-classpath sed -i -e 's,AUTO_RENDER="no",AUTO_RENDER="yes",g' \ script/bootchartd.conf || die fi if use acct ; then sed -i -e 's,PROCESS_ACCOUNTING="no",PROCESS_ACCOUNTING="yes",g' \ script/bootchartd.conf || die fi java-pkg-opt-2_src_prepare } src_compile() { if use java ; then local antflags="jar -Dcompiler.nowarn=true $(use_doc)" use debug || antflags="${antflags} -Dbuild.debug=false" eant ${antflags} \ -Dgentoo.classpath="$(java-pkg_getjars commons-cli-1):./build" fi } src_install() { dodoc README README.logger ChangeLog TODO || die # No need for this with baselayout-2 if has_version "