diff options
author | Ralph Sennhauser <sera@gentoo.org> | 2012-05-12 12:12:13 +0000 |
---|---|---|
committer | Ralph Sennhauser <sera@gentoo.org> | 2012-05-12 12:12:13 +0000 |
commit | 2ecdfaf799067660c3f835d921f71793a96698e5 (patch) | |
tree | a5a9d0abdd06992ff56457a365b3c07324a42f32 /dev-java/ecj-gcj/files | |
parent | Stable on alpha, bug #415435 (diff) | |
download | gentoo-2-2ecdfaf799067660c3f835d921f71793a96698e5.tar.gz gentoo-2-2ecdfaf799067660c3f835d921f71793a96698e5.tar.bz2 gentoo-2-2ecdfaf799067660c3f835d921f71793a96698e5.zip |
Add missing ecj-gcj-3.6. Thanks to genstorm
(Portage version: 2.1.10.58/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/ecj-gcj/files')
-rwxr-xr-x | dev-java/ecj-gcj/files/ecj-gcj-3.6 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dev-java/ecj-gcj/files/ecj-gcj-3.6 b/dev-java/ecj-gcj/files/ecj-gcj-3.6 new file mode 100755 index 000000000000..a9725e55b4bd --- /dev/null +++ b/dev-java/ecj-gcj/files/ecj-gcj-3.6 @@ -0,0 +1,21 @@ +#!/bin/bash +# gcj-jdk installs /usr/bin/gcj-jdk symlink, depending on it would be circular +# so we fallback to gcc-config discovery +GIJ_BIN="/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="/usr/share/ecj-gcj-3.6/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 "${@}" |