# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit toolchain-funcs java-pkg-2 PV_TYPE="${PV##*_}" PV_NUM="${PV%%_*}" MY_PV="${PV_TYPE}_${PV_NUM}" MY_PN="${PN}gui" MY_P="${MY_PN}_${MY_PV}" DESCRIPTION="Probalign uses partition function posterior probability estimates to compute maximum expected accuracy multiple sequence alignments" HOMEPAGE="http://www.cs.njit.edu/usman/probalign/" SRC_URI="http://www.cs.njit.edu/usman/probalign/${MY_P}.tar.gz" LICENSE="" SLOT="0" KEYWORDS="~amd64" IUSE="" RDEPEND=">=virtual/jre-1.4 dev-java/itext" DEPEND=">=virtual/jdk-1.4 dev-java/itext" S=${WORKDIR}/${MY_P} src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/1.3-look-in-usr-bin-for-probalign.patch epatch "${FILESDIR}"/gcc-4.3.patch # This doesn't use randomized locations in TMPDIR, so it is insecure. epatch "${FILESDIR}"/use-tmpdir.patch } src_compile() { pushd probalign/src emake \ CXX=$(tc-getCXX) \ CXXFLAGS="${CXXFLAGS} ${LDFLAGS}" \ || die "emake failed" popd pushd javagui ejavac \ -d classes \ -classpath $(java-pkg_getjars itext) \ src/*.java \ || die pushd classes jar cvf \ probaligngui.jar \ probalign/*.class -C ../ images/about.png -C ../ images/a.gif \ || die popd popd } src_install() { dobin probalign/bin/probalign || die java-pkg_dojar javagui/classes/probaligngui.jar java-pkg_dolauncher probaligngui --main probalign.gui newdoc probalign/README README.probalign newdoc probalign/RELEASE_NOTES RELEASE_NOTES.probalign newdoc README README.probaligngui }