blob: 1ed7f55f7ab7256be4e8894fb632dc56384ebce1 (
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
55
56
57
58
59
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-ant-2
DESCRIPTION="Guice is a lightweight dependency injection framework for Java 5 and above."
HOMEPAGE="http://code.google.com/p/google-guice/"
SRC_URI="http://google-guice.googlecode.com/files/${P}-src.zip"
LICENSE="Apache-2.0"
SLOT="2"
#wasn't tested: IUSE="servletapi"
IUSE=""
KEYWORDS="~amd64"
COMMON_DEPEND="dev-java/aopalliance:1
dev-java/asm:3
dev-java/cglib:2.2"
RDEPEND=">=virtual/jre-1.5
${COMMON_DEPEND}"
DEPEND=">=virtual/jdk-1.5
test? ( dev-java/junit )
${COMMON_DEPEND}"
S="${WORKDIR}"
# TODO make these work
RESTRICT="test"
JAVA_PKG_BSFIX_NAME="build.xml common.xml servlet/build.xml"
JAVA_ANT_CLASSPATH_TAGS="${JAVA_ANT_CLASSPATH_TAGS} javadoc"
S="${WORKDIR}/${P}-src/"
JAVA_ANT_REWRITE_CLASSPATH="yes"
EANT_GENTOO_CLASSPATH="aopalliance-1,asm-3,cglib-2.2"
java_prepare() {
find . -name '*.jar' -exec rm -v {} +
find . -name '*.class' -exec rm -v {} +
epatch "${FILESDIR}"/${P}-common.xml.patch
epatch "${FILESDIR}"/${P}-build.xml.patch
}
src_install() {
java-pkg_dojar build/${PN}.jar
use doc && java-pkg_dojavadoc javadoc/
use source && java-pkg_dosrc src/com
}
src_test() {
EANT_BUILD_XML="common.xml"
java-pkg-2_src_test
}
|