summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/eclipse-ecj/eclipse-ecj-3.2.2.ebuild')
-rw-r--r--dev-java/eclipse-ecj/eclipse-ecj-3.2.2.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-java/eclipse-ecj/eclipse-ecj-3.2.2.ebuild b/dev-java/eclipse-ecj/eclipse-ecj-3.2.2.ebuild
new file mode 100644
index 000000000000..6065f43945b8
--- /dev/null
+++ b/dev-java/eclipse-ecj/eclipse-ecj-3.2.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/eclipse-ecj/eclipse-ecj-3.2.2.ebuild,v 1.1 2007/04/25 23:12:21 caster Exp $
+
+inherit eutils java-pkg-2
+
+DESCRIPTION="Eclipse Compiler for Java"
+HOMEPAGE="http://www.eclipse.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="EPL-1.0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+SLOT="3.2"
+IUSE="doc"
+
+RDEPEND=">=virtual/jre-1.4"
+DEPEND="${RDEPEND}
+ >=virtual/jdk-1.4
+ dev-java/ant-core"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # remove unzip, add javadoc target, put final ecj.jar and javadocs in dist/ and not ../
+ epatch "${FILESDIR}/${PN}-${SLOT}-build-gentoo.patch"
+}
+
+src_compile() {
+ # we don't use eant because the compile*.xml files specifically set -source -target and used compiler
+
+ # bootstrap build with JDK's javac
+ ant -f compilejdtcorewithjavac.xml || die "Failed to bootstrap build with javac"
+
+ local ant_flags=""
+
+ # for some weird reason, with kaffe it fails the build.xml's check for ecj.jar present (which it is)
+ # which if successful sets this property, then checks if it was set and fails if not
+ java-pkg_current-vm-matches kaffe && ant_flags="-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter"
+
+ # recompile with ecj.jar made in first step, to get dist/ecj.jar
+ ant ${ant_flags} -lib ecj.jar -f compilejdtcore.xml compile $(use_doc) || die "Failed to rebuild with ecj"
+}
+
+src_install() {
+ java-pkg_dojar dist/ecj.jar
+
+ java-pkg_dolauncher ecj-${SLOT} --main org.eclipse.jdt.internal.compiler.batch.Main
+
+ use doc && java-pkg_dojavadoc dist/doc/api
+
+ insinto /usr/share/java-config-2/compiler
+ newins ${FILESDIR}/compiler-settings-${SLOT} ecj-${SLOT}
+}
+