linamh/dev-java/jbig2/jbig2-20090114.ebuild

52 lines
1.1 KiB
Bash
Raw Normal View History

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
JAVA_PKG_IUSE="source"
inherit java-pkg-2 java-ant-2
DESCRIPTION="JPedal JBIG2 Image Decoder"
HOMEPAGE="http://idrsolutions.fogbugzhosting.com/default.asp?W80"
SRC_URI="http://www.jpedal.org/download/jbig2_src.zip -> jbig2_src-${PV}.zip"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"
RDEPEND=">=virtual/jre-1.5"
DEPEND=">=virtual/jdk-1.5
app-arch/unzip"
S="${WORKDIR}"
src_unpack() {
unpack ${A}
cd "${S}"
mkdir ant
cp "${FILESDIR}/build.xml" "${S}"/ant
echo > ${S}/ant/build.properties
echo "build.dir=${S}/build" >> ${S}/ant/build.properties
echo "libs.dir=${S}" >> ${S}/ant/build.properties
echo "jbig2.jar.name=jbig2" >> ${S}/ant/build.properties
}
src_compile() {
eant ${antflags} -buildfile ant/build.xml || die "build failed"
use doc && eant ${antflags} -buildfile ant/build.xml javadoc || die "doc build failed"
}
src_install() {
java-pkg_dojar build/jbig2/dist/jbig2.jar
use source && java-pkg_dosrc src/*
use doc && java-pkg_dojavadoc build/jbig2/javadoc
}