proj/gentoo: Initial commit
[gentoo.git] / dev-java / janino / janino-2.7.0.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 JAVA_PKG_IUSE="doc source examples"
8
9 inherit java-pkg-2 java-pkg-simple
10
11 DESCRIPTION="An embedded compiler for run-time compilation purposes"
12 HOMEPAGE="http://janino.net/"
13 SRC_URI="http://janino.net/download/${P}.zip"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18
19 IUSE=""
20
21 CDEPEND="dev-java/ant-core:0
22         dev-java/unkrig-nullanalysis:0"
23 RDEPEND=">=virtual/jre-1.6
24         ${CDEPEND}"
25 DEPEND=">=virtual/jdk-1.6
26         app-arch/unzip
27         ${CDEPEND}"
28
29 S="${WORKDIR}/${P}"
30 JAVA_SRC_DIR="src"
31 JAVA_GENTOO_CLASSPATH="ant-core,unkrig-nullanalysis"
32
33 java_prepare() {
34         unzip "${S}"/janino-src.zip -d ${JAVA_SRC_DIR} && \
35         unzip "${S}"/commons-compiler-src.zip -d ${JAVA_SRC_DIR} || die
36         find -iname '*.jar' -delete || die
37
38         mkdir -p target/classes && \
39                 mv src/org.codehaus.commons.compiler.properties target/classes || die
40
41         mkdir examples || die
42         mv src/org/codehaus/commons/compiler/samples/* examples/ || die
43 }
44
45 src_install() {
46         java-pkg-simple_src_install
47         use examples && java-pkg_doexamples examples/
48 }