blob: 7ff3a2357e4b551493f8cd87d8f51087398704d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="2"
JAVA_PKG_IUSE="doc source"
WANT_ANT_TASKS="ant-antlr"
inherit eutils java-pkg-2 java-ant-2
MY_PV="${PV/_beta/b}"
S_PV="${PV/_beta/.b}"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="A Java template engine"
HOMEPAGE="http://www.stringtemplate.org/"
SRC_URI="http://www.stringtemplate.org/download/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-solaris"
IUSE=""
# no junit targets in build.xml, but unconditional compile and jar of test
# classes, oh well
COMMON_DEPEND=">=dev-java/antlr-2.7.7:0[java]
dev-java/junit:0"
RDEPEND=">=virtual/jre-1.4
${COMMON_DEPEND}"
DEPEND=">=virtual/jdk-1.4
${COMMON_DEPEND}"
S="${WORKDIR}/${PN}-${S_PV}"
java_prepare() {
# fix <javadoc> call
epatch "${FILESDIR}/${PN}-3.1_beta1-javadoc.patch"
java-ant_rewrite-classpath
rm -v lib/*.jar || die
# force regeneration with our antlr2
touch src/org/antlr/stringtemplate/language/*.g || die
}
EANT_GENTOO_CLASSPATH="antlr,junit"
EANT_DOC_TARGET="javadocs"
src_install() {
java-pkg_dojar build/${PN}.jar
dodoc README.txt CHANGES.txt || die
use doc && java-pkg_dojavadoc docs/api
use source && java-pkg_dosrc src/org
}
|