diff options
Diffstat (limited to 'dev-java/jsr305')
-rw-r--r-- | dev-java/jsr305/Manifest | 1 | ||||
-rw-r--r-- | dev-java/jsr305/jsr305-1.0-r1.ebuild | 64 | ||||
-rw-r--r-- | dev-java/jsr305/metadata.xml | 5 |
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-java/jsr305/Manifest b/dev-java/jsr305/Manifest new file mode 100644 index 000000000000..fbbe8d7d9afc --- /dev/null +++ b/dev-java/jsr305/Manifest @@ -0,0 +1 @@ +DIST jsr-305-source.tar.gz 36865 SHA256 87bcc526872fb430a8f02a1e0445175b38e73b809392398601570158373aa9b6 SHA512 7821865ade33e1ca4f59da3e6c8b888f26c21853aa0f8578299a4205cd931900be294aaf85036ba54646a66efe3d9ae0a5653ef756710521be03882b9e0b82e5 WHIRLPOOL 0768571aeef2ae0758ed70c8569f06567ac45ad7900808ad7843ee01e1311c0521f76ff750e45983cbdf585ab9e4df5eb3a1ffd8bdf27d9fb7afd02cae424007 diff --git a/dev-java/jsr305/jsr305-1.0-r1.ebuild b/dev-java/jsr305/jsr305-1.0-r1.ebuild new file mode 100644 index 000000000000..7e21ac5cda9d --- /dev/null +++ b/dev-java/jsr305/jsr305-1.0-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +JAVA_PKG_IUSE="doc examples source test" +inherit eutils java-pkg-2 java-ant-2 +MY_PN=jsr-305 + +DESCRIPTION="Reference implementation for JSR 305: Annotations for Software Defect Detection in Java" +SRC_URI="mirror://gentoo/${MY_PN}-source.tar.gz" +HOMEPAGE="http://code.google.com/p/jsr-305/" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" +IUSE="" + +DEPEND=">=virtual/jdk-1.5 + app-arch/unzip + test? ( dev-java/ant-junit )" +RDEPEND=">=virtual/jre-1.5" + +S="${WORKDIR}/${MY_PN}" + +src_compile() { + # create jar + cd ri + mkdir -p build/classes + ejavac -sourcepath src/main/java -d build/classes $(find src/main/java -name "*.java") \ + || die "Cannot compile sources" + mkdir dist + cd build/classes + jar -cvf "${S}"/ri/dist/${PN}.jar javax || die "Cannot create JAR" + + # generate javadoc + if use doc ; then + cd "${S}"/ri + mkdir javadoc + javadoc -d javadoc -sourcepath src/main/java -subpackages javax \ + || die "Javadoc creation failed" + fi +} + +src_install() { + cd ri + java-pkg_dojar dist/${PN}.jar + + if use examples; then + dodir /usr/share/doc/${PF}/examples/ + cp -r "${S}"/sampleUses/* "${D}"/usr/share/doc/${PF}/examples/ || die "Could not install examples" + fi + + if use source ; then + cd "${S}"/ri/src/main/java + java-pkg_dosrc javax + fi + + if use doc ; then + cd "${S}"/ri + java-pkg_dojavadoc javadoc + fi +} diff --git a/dev-java/jsr305/metadata.xml b/dev-java/jsr305/metadata.xml new file mode 100644 index 000000000000..250f2d1940ea --- /dev/null +++ b/dev-java/jsr305/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> +</pkgmetadata> |