summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-java/ecj-gcj
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-java/ecj-gcj')
-rw-r--r--dev-java/ecj-gcj/Manifest4
-rw-r--r--dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild110
-rw-r--r--dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild110
-rw-r--r--dev-java/ecj-gcj/ecj-gcj-4.2.1-r2.ebuild110
-rw-r--r--dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild94
-rwxr-xr-xdev-java/ecj-gcj/files/ecj-gcj.in23
-rw-r--r--dev-java/ecj-gcj/metadata.xml8
7 files changed, 459 insertions, 0 deletions
diff --git a/dev-java/ecj-gcj/Manifest b/dev-java/ecj-gcj/Manifest
new file mode 100644
index 000000000000..336699623f8e
--- /dev/null
+++ b/dev-java/ecj-gcj/Manifest
@@ -0,0 +1,4 @@
+DIST ecjsrc-3.5.2.zip 1298691 SHA256 4ae91449962b1e2781b70713e299f9fa16fb1ce25a4d2bb335c13b55c08d6d74 SHA512 5fb3a38358511c92c12dfebbb4beb91581de25e2a3e3b4593d0388531dea5bae469f677e5154b69d634ede7395375992ae9f043be36f6b5a0fcfa873dbc98558 WHIRLPOOL 54860dd40254521cecd38d6dff645443ce61edd4b5eba036ebc002401560b313d3db26eca24b601f66ff78e288246e76b6db219379a65a88c5e16728a4f31c1d
+DIST ecjsrc-3.6.zip 1310484 SHA256 bc2d624c5ca135d593c71a677674509f5801998ffe98c386749d15a46ee69242 SHA512 23f5be36de85f8a95bf029e42df632aa417ffa58a84b50ab5f6c78dd1fa1882316c61165b4d0d7be2c2568226f1e1c352ea45e391759ca6c5c1fef97e8c5fada WHIRLPOOL d2ea8c0ad3eb34e0d0a09b06d87a5dc89b79b106d0d68bec9e19a627f7e1732348c559ff0b4dc1558eeebbb4822ad68b8f0b59b46db84b5c6a7162e7a12f06c3
+DIST ecjsrc-4.2.1.jar 1417043 SHA256 d261b2158f598640f1923805d2e9bf47eb21d8333f4e1b37f59f847ad00d48f4 SHA512 967b47a722893ea1f9eb17e69d386881dc87516e93c1d7a2a119d6fb2e053faa0d9d6455b6e4b89c3f23a3ec7ae33686f4acc305d7c6e51929ce7837c9c93eaf WHIRLPOOL 3f91bbf654d8ce0621e3ce21b5a1fce5058c86ad1dd24f89269aba6716945bff8686b6e1829c602864c15f62b45c65f5d5fe0430052dd2419da7e0c0225c95d5
+DIST ecjsrc-4.4.2.jar 1764959 SHA256 ad3daf77ab710268f88c41fba87218dcdf502b423217a3799b5227ddf03b5858 SHA512 53e850fc64994b104d45f58c22f1302ceb1f23bcf69300940be5689dfa6278bea14b4506746fec7b14db6f48c24ccbee16755943fffcdd7f6ad4fe5d9ddc1f20 WHIRLPOOL 5c4e40e482b8c30143bb7043822935eac9ff6f425a9d4f175ef5968ebe0bf0cf219f0f5d8046bfc9b77e067a6ff62166bdb7f7c51f887e5675064a2ca85fe721
diff --git a/dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild b/dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild
new file mode 100644
index 000000000000..f972c2e690c9
--- /dev/null
+++ b/dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-2 prefix toolchain-funcs
+
+MY_PN="ecj"
+DMF="R-${PV}-201002111343"
+
+DESCRIPTION="A subset of Eclipse Compiler for Java compiled by gcj, serving as javac in gcj-jdk"
+HOMEPAGE="http://www.eclipse.org/"
+SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/${DMF}/${MY_PN}src-${PV}.zip"
+
+LICENSE="EPL-1.0"
+SLOT="3.5"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="+native"
+
+RDEPEND="sys-devel/gcc:*[gcj]
+ app-eselect/eselect-java"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ !dev-java/eclipse-ecj:3.5[gcj]"
+
+S="${WORKDIR}"
+
+# for compatibility with java eclass functions
+JAVA_PKG_WANT_SOURCE=1.4
+JAVA_PKG_WANT_TARGET=1.4
+
+MY_PS="${MY_PN}-${SLOT}"
+
+java_prepare() {
+ # We don't need the ant adapter here
+ rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java || die
+ rm -fr org/eclipse/jdt/internal/antadapter || die
+
+ # upstream build.xml excludes this
+ rm -f META-INF/eclipse.inf || die
+
+ # these java6 specific classes cannot compile with ecj
+ rm -fr org/eclipse/jdt/internal/compiler/{apt,tool}/ || die
+}
+
+src_compile() {
+ local javac_opts javac java jar
+
+ local gccbin=$(gcc-config -B)
+ local gccver=$(gcc-fullversion)
+
+ local gcj="${gccbin}/gcj"
+ javac="${gcj} -C --encoding=ISO-8859-1"
+ jar="${gccbin}/gjar"
+ java="${gccbin}/gij"
+
+ mkdir -p bootstrap || die
+ cp -pPR org bootstrap || die
+ cd "${S}/bootstrap" || die
+
+ einfo "bootstrapping ${MY_PN} with ${javac} ..."
+ ${javac} ${javac_opts} $(find org/ -name '*.java') || die
+ find org/ \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' \) \
+ -exec ${jar} cf ${MY_PN}.jar {} + || die
+
+ cd "${S}" || die
+
+ einfo "building ${MY_PN} with bootstrapped ${MY_PN} ..."
+ ${java} -classpath bootstrap/${MY_PN}.jar \
+ org.eclipse.jdt.internal.compiler.batch.Main \
+ ${javac_opts} -nowarn org || die
+ find org/ \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' \) \
+ -exec ${jar} cf ${MY_PN}.jar {} + || die
+
+ if use native; then
+ einfo "Building native ${MY_PS} library, patience needed ..."
+ ${gcj} ${CFLAGS} ${LDFLAGS} -findirect-dispatch -shared -fPIC -Wl,-Bsymbolic \
+ -o ${MY_PS}.so ${MY_PN}.jar || die
+ fi
+}
+
+src_install() {
+ java-pkg_dojar ${MY_PN}.jar
+
+ sed -e "s|@SLOT@|${SLOT}|" \
+ "${FILESDIR}/${PN}.in" \
+ > "${T}"/${PN}-${SLOT} || die
+ eprefixify "${T}/${PN}-${SLOT}"
+ dobin "${T}/${PN}-${SLOT}"
+
+ use native && dolib.so ${MY_PS}.so
+}
+
+pkg_postinst() {
+ if use native; then
+ $(gcc-config -B)/gcj-dbtool -a $(gcj-dbtool -p) \
+ "${EPREFIX}"/usr/share/${PN}-${SLOT}/lib/ecj.jar \
+ "${EPREFIX}"/usr/$(get_libdir)/${MY_PN}-${SLOT}.so
+ fi
+
+ einfo "To select between slots of ECJ..."
+ einfo " # eselect ecj"
+
+ eselect ecj update ${PN}-${SLOT}
+}
+
+pkg_postrm() {
+ eselect ecj update
+}
diff --git a/dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild b/dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild
new file mode 100644
index 000000000000..b52411139980
--- /dev/null
+++ b/dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-2 prefix toolchain-funcs
+
+MY_PN="ecj"
+DMF="R-${PV}-201006080911"
+
+DESCRIPTION="A subset of Eclipse Compiler for Java compiled by gcj, serving as javac in gcj-jdk"
+HOMEPAGE="http://www.eclipse.org/"
+SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/${DMF}/${MY_PN}src-${PV}.zip"
+
+LICENSE="EPL-1.0"
+SLOT="3.6"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="+native"
+
+RDEPEND="sys-devel/gcc:*[gcj]
+ app-eselect/eselect-java"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ !dev-java/eclipse-ecj:3.5[gcj]"
+
+S="${WORKDIR}"
+
+# for compatibility with java eclass functions
+JAVA_PKG_WANT_SOURCE=1.4
+JAVA_PKG_WANT_TARGET=1.4
+
+MY_PS="${MY_PN}-${SLOT}"
+
+java_prepare() {
+ # We don't need the ant adapter here
+ rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java || die
+ rm -fr org/eclipse/jdt/internal/antadapter || die
+
+ # upstream build.xml excludes this
+ rm -f META-INF/eclipse.inf || die
+
+ # these java6 specific classes cannot compile with ecj
+ rm -fr org/eclipse/jdt/internal/compiler/{apt,tool}/ || die
+}
+
+src_compile() {
+ local javac_opts javac java jar
+
+ local gccbin=$(gcc-config -B)
+ local gccver=$(gcc-fullversion)
+
+ local gcj="${gccbin}/gcj"
+ javac="${gcj} -C --encoding=ISO-8859-1"
+ jar="${gccbin}/gjar"
+ java="${gccbin}/gij"
+
+ mkdir -p bootstrap || die
+ cp -pPR org bootstrap || die
+ cd "${S}/bootstrap" || die
+
+ einfo "bootstrapping ${MY_PN} with ${javac} ..."
+ ${javac} ${javac_opts} $(find org/ -name '*.java') || die
+ find org/ \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' \) \
+ -exec ${jar} cf ${MY_PN}.jar {} + || die
+
+ cd "${S}" || die
+
+ einfo "building ${MY_PN} with bootstrapped ${MY_PN} ..."
+ ${java} -classpath bootstrap/${MY_PN}.jar \
+ org.eclipse.jdt.internal.compiler.batch.Main \
+ ${javac_opts} -nowarn org || die
+ find org/ \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' \) \
+ -exec ${jar} cf ${MY_PN}.jar {} + || die
+
+ if use native; then
+ einfo "Building native ${MY_PS} library, patience needed ..."
+ ${gcj} ${CFLAGS} ${LDFLAGS} -findirect-dispatch -shared -fPIC -Wl,-Bsymbolic \
+ -o ${MY_PS}.so ${MY_PN}.jar || die
+ fi
+}
+
+src_install() {
+ java-pkg_dojar ${MY_PN}.jar
+
+ sed -e "s|@SLOT@|${SLOT}|" \
+ "${FILESDIR}/${PN}.in" \
+ > "${T}"/${PN}-${SLOT} || die
+ eprefixify "${T}/${PN}-${SLOT}"
+ dobin "${T}/${PN}-${SLOT}"
+
+ use native && dolib.so ${MY_PS}.so
+}
+
+pkg_postinst() {
+ if use native; then
+ $(gcc-config -B)/gcj-dbtool -a $(gcj-dbtool -p) \
+ "${EPREFIX}"/usr/share/${PN}-${SLOT}/lib/ecj.jar \
+ "${EPREFIX}"/usr/$(get_libdir)/${MY_PN}-${SLOT}.so
+ fi
+
+ einfo "To select between slots of ECJ..."
+ einfo " # eselect ecj"
+
+ eselect ecj update ${PN}-${SLOT}
+}
+
+pkg_postrm() {
+ eselect ecj update
+}
diff --git a/dev-java/ecj-gcj/ecj-gcj-4.2.1-r2.ebuild b/dev-java/ecj-gcj/ecj-gcj-4.2.1-r2.ebuild
new file mode 100644
index 000000000000..9b8687c05489
--- /dev/null
+++ b/dev-java/ecj-gcj/ecj-gcj-4.2.1-r2.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-2 prefix toolchain-funcs
+
+MY_PN="ecj"
+DMF="R-${PV}-201209141800"
+
+DESCRIPTION="A subset of Eclipse Compiler for Java compiled by gcj, serving as javac in gcj-jdk"
+HOMEPAGE="http://www.eclipse.org/"
+SRC_URI="http://download.eclipse.org/eclipse/downloads/drops4/${DMF}/${MY_PN}src-${PV}.jar"
+
+LICENSE="EPL-1.0"
+SLOT="4.2"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="+native"
+
+RDEPEND="sys-devel/gcc:*[gcj]
+ app-eselect/eselect-java"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ !dev-java/eclipse-ecj:3.5[gcj]"
+
+S="${WORKDIR}"
+
+# for compatibility with java eclass functions
+JAVA_PKG_WANT_SOURCE=1.4
+JAVA_PKG_WANT_TARGET=1.4
+
+MY_PS="${MY_PN}-${SLOT}"
+
+java_prepare() {
+ # We don't need the ant adapter here
+ rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java || die
+ rm -fr org/eclipse/jdt/internal/antadapter || die
+
+ # upstream build.xml excludes this
+ rm -f META-INF/eclipse.inf || die
+
+ # these java6 specific classes cannot compile with gcj
+ rm -fr org/eclipse/jdt/internal/compiler/{apt,tool}/ || die
+}
+
+src_compile() {
+ local javac_opts javac java jar
+
+ local gccbin=$(gcc-config -B)
+ local gccver=$(gcc-fullversion)
+
+ local gcj="${gccbin}/gcj"
+ javac="${gcj} -C --encoding=ISO-8859-1"
+ jar="${gccbin}/gjar"
+ java="${gccbin}/gij"
+
+ mkdir -p bootstrap || die
+ cp -pPR org bootstrap || die
+ cd "${S}/bootstrap" || die
+
+ einfo "bootstrapping ${MY_PN} with ${javac} ..."
+ ${javac} ${javac_opts} $(find org/ -name '*.java') || die
+ find org/ \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' -o -name '*.inf' -o -name '*.props' \) \
+ -exec ${jar} cf ${MY_PN}.jar {} + || die
+
+ cd "${S}" || die
+
+ einfo "building ${MY_PN} with bootstrapped ${MY_PN} ..."
+ ${java} -classpath bootstrap/${MY_PN}.jar \
+ org.eclipse.jdt.internal.compiler.batch.Main \
+ ${javac_opts} -nowarn org || die
+ find org/ \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' -o -name '*.inf' -o -name '*.props' \) \
+ -exec ${jar} cf ${MY_PN}.jar {} + || die
+
+ if use native; then
+ einfo "Building native ${MY_PS} library, patience needed ..."
+ ${gcj} ${CFLAGS} ${LDFLAGS} -findirect-dispatch -shared -fPIC -Wl,-Bsymbolic \
+ -o ${MY_PS}.so ${MY_PN}.jar || die
+ fi
+}
+
+src_install() {
+ java-pkg_dojar ${MY_PN}.jar
+
+ sed -e "s|@SLOT@|${SLOT}|" \
+ "${FILESDIR}/${PN}.in" \
+ > "${T}"/${PN}-${SLOT} || die
+ eprefixify "${T}/${PN}-${SLOT}"
+ dobin "${T}/${PN}-${SLOT}"
+
+ use native && dolib.so ${MY_PS}.so
+}
+
+pkg_postinst() {
+ if use native; then
+ $(gcc-config -B)/gcj-dbtool -a $(gcj-dbtool -p) \
+ "${EPREFIX}"/usr/share/${PN}-${SLOT}/lib/ecj.jar \
+ "${EPREFIX}"/usr/$(get_libdir)/${MY_PN}-${SLOT}.so
+ fi
+
+ einfo "To select between slots of ECJ..."
+ einfo " # eselect ecj"
+
+ eselect ecj update ${PN}-${SLOT}
+}
+
+pkg_postrm() {
+ eselect ecj update
+}
diff --git a/dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild b/dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild
new file mode 100644
index 000000000000..6b3405c76e98
--- /dev/null
+++ b/dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-2 prefix toolchain-funcs
+
+MY_PN="ecj"
+DMF="R-${PV}-201502041700"
+
+DESCRIPTION="A subset of Eclipse Compiler for Java compiled by gcj, serving as javac in gcj-jdk"
+HOMEPAGE="http://www.eclipse.org/"
+SRC_URI="http://download.eclipse.org/eclipse/downloads/drops4/${DMF}/${MY_PN}src-${PV}.jar"
+
+LICENSE="EPL-1.0"
+SLOT="4.4"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="+native"
+
+RDEPEND="sys-devel/gcc:*[gcj]
+ app-eselect/eselect-java"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ !dev-java/eclipse-ecj:3.5[gcj]"
+
+JAVA_PKG_WANT_SOURCE=1.6
+JAVA_PKG_WANT_TARGET=1.6
+
+MY_PS="${MY_PN}-${SLOT}"
+S="${WORKDIR}"
+
+java_prepare() {
+ # We don't need the ant adapter here
+ rm org/eclipse/jdt/core/JDTCompilerAdapter.java || die
+ rm -r org/eclipse/jdt/internal/antadapter || die
+
+ # upstream build.xml excludes this
+ rm META-INF/eclipse.inf || die
+
+ # these java6 specific classes cannot compile with gcj
+ rm -r org/eclipse/jdt/internal/compiler/{apt,tool}/ || die
+}
+
+src_compile() {
+ local gccbin=$(gcc-config -B)
+ local gcj="${gccbin}/gcj"
+
+ find org/ -name "*.java" > sources.lst || die
+
+ einfo "bootstrapping ${MY_PN} with gcj ..."
+ "${gcj}" -w -C -fsource=${JAVA_PKG_WANT_SOURCE} -d bootstrap @sources.lst || die
+
+ einfo "building ${MY_PN} with bootstrapped ${MY_PN} ..."
+ "${gccbin}/gij" -cp bootstrap:. org.eclipse.jdt.internal.compiler.batch.Main -nowarn $(java-pkg_javac-args) @sources.lst || die
+ find org/ META-INF/ -type f ! -name "*.java" -exec "${gccbin}/gjar" cf ${MY_PN}.jar {} + || die
+
+ if use native; then
+ einfo "building native ${MY_PS} library, patience needed ..."
+ "${gcj}" ${CFLAGS} ${LDFLAGS} -findirect-dispatch -shared -fPIC -Wl,-Bsymbolic \
+ -o ${MY_PS}.so ${MY_PN}.jar || die
+ fi
+}
+
+src_install() {
+ java-pkg_dojar ${MY_PN}.jar
+
+ sed -e "s|@SLOT@|${SLOT}|" \
+ "${FILESDIR}/${PN}.in" \
+ > "${T}"/${PN}-${SLOT} || die
+ eprefixify "${T}/${PN}-${SLOT}"
+ dobin "${T}/${PN}-${SLOT}"
+
+ use native && dolib.so ${MY_PS}.so
+}
+
+pkg_postinst() {
+ if use native; then
+ local dbtool="$(gcc-config -B)/gcj-dbtool"
+
+ "${dbtool}" -a $("${dbtool}" -p) \
+ "${EROOT}usr/share/${PN}-${SLOT}/lib/ecj.jar" \
+ "${EROOT}usr/$(get_libdir)/${MY_PN}-${SLOT}.so"
+ fi
+
+ einfo "To select between slots of ECJ..."
+ einfo " # eselect ecj"
+
+ eselect ecj update ${PN}-${SLOT}
+}
+
+pkg_postrm() {
+ eselect ecj update
+}
diff --git a/dev-java/ecj-gcj/files/ecj-gcj.in b/dev-java/ecj-gcj/files/ecj-gcj.in
new file mode 100755
index 000000000000..4f838d5de240
--- /dev/null
+++ b/dev-java/ecj-gcj/files/ecj-gcj.in
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# /usr/bin/gij was installed by gcj-jdk in the past and is now handled by
+# gcc-config, fall back to gcc-config to locate the binary should the
+# symlink/wrapper-binary not yet exists.
+GIJ_BIN="@GENTOO_PORTAGE_EPREFIX@/usr/bin/gij"
+if [[ ! -f ${GIJ_BIN} ]]; then
+ GIJ_BIN="$(gcc-config -B)/gij"
+fi
+if [[ ! -f ${GIJ_BIN} ]]; then
+ echo "gij not found! check that gcc is compiled with gcj flag"
+ exit 1
+fi
+# calling java-config would be an unnecessary slowdown here
+
+# we need to append user CLASSPATH otherwise it will be overriden by the -classpath parameter
+# this breaks e.g. bootstrap of ant-core
+ecj_cp="@GENTOO_PORTAGE_EPREFIX@/usr/share/ecj-gcj-@SLOT@/lib/ecj.jar"
+if [[ -n "${CLASSPATH}" ]]; then
+ ecj_cp="${ecj_cp}:${CLASSPATH}"
+fi
+
+${GIJ_BIN} -classpath "${ecj_cp}" org.eclipse.jdt.internal.compiler.batch.Main "${@}"
diff --git a/dev-java/ecj-gcj/metadata.xml b/dev-java/ecj-gcj/metadata.xml
new file mode 100644
index 000000000000..b16b316310ca
--- /dev/null
+++ b/dev-java/ecj-gcj/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>java</herd>
+<use>
+ <flag name="native">Build a native binary along with the jar. Provides faster execution time, but needs about 1G memory and some patience to compile.</flag>
+</use>
+</pkgmetadata>