diff options
author | Vlastimil Babka <caster@gentoo.org> | 2010-10-31 17:29:24 +0000 |
---|---|---|
committer | Vlastimil Babka <caster@gentoo.org> | 2010-10-31 17:29:24 +0000 |
commit | 65ccc76b7f18318676e6e8a0d479081816e6e89a (patch) | |
tree | 276477e9da48815472c0eb6b243a0db57797a716 /dev-java | |
parent | alpha/ia64/m68k/s390/sh/sparc stable wrt #340919 (diff) | |
download | historical-65ccc76b7f18318676e6e8a0d479081816e6e89a.tar.gz historical-65ccc76b7f18318676e6e8a0d479081816e6e89a.tar.bz2 historical-65ccc76b7f18318676e6e8a0d479081816e6e89a.zip |
Move from java-overlay.
Package-Manager: portage-2.2.0_alpha2/cvs/Linux x86_64
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/ecj-gcj/ChangeLog | 31 | ||||
-rw-r--r-- | dev-java/ecj-gcj/Manifest | 5 | ||||
-rw-r--r-- | dev-java/ecj-gcj/ecj-gcj-3.5.2-r2.ebuild | 109 | ||||
-rwxr-xr-x | dev-java/ecj-gcj/files/ecj-gcj-3.5 | 21 | ||||
-rw-r--r-- | dev-java/ecj-gcj/metadata.xml | 8 |
5 files changed, 174 insertions, 0 deletions
diff --git a/dev-java/ecj-gcj/ChangeLog b/dev-java/ecj-gcj/ChangeLog new file mode 100644 index 000000000000..a04ccd30ec93 --- /dev/null +++ b/dev-java/ecj-gcj/ChangeLog @@ -0,0 +1,31 @@ +# ChangeLog for dev-java/ecj-gcj +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ChangeLog,v 1.1 2010/10/31 17:29:23 caster Exp $ + +*ecj-gcj-3.5.2-r2 (31 Oct 2010) + + 31 Oct 2010; Vlastimil Babka <caster@gentoo.org> +files/ecj-gcj-3.5, + +ecj-gcj-3.5.2-r2.ebuild, +metadata.xml: + Move from java-overlay. + + 14 Sep 2010; Vlastimil Babka <caster@gentoo.org> +files/ecj-gcj-3.5-r1, + +ecj-gcj-3.5.2-r2.ebuild: + Revbump to fix CLASSPATH handling, fixes e.g. build of ant-core. + + 01 Apr 2010; Vlastimil Babka <caster@gentoo.org> ecj-gcj-3.5.2-r1.ebuild: + Block the former eclipse-ecj:3.5[gcj] ebuild to prevent file collisions. + Downgrade eclipse-ecj:3.5 to the main tree version if you hit the block. + + 01 Apr 2010; Vlastimil Babka <caster@gentoo.org> +ecj-gcj-3.5.2-r1.ebuild: + Revbump to ensure everyone gets the changes. Remove dependencies on jdk/jre + and use gcj manually to compile, to break circular deps. Put back the native + flag (enabled by default) for troubleshooting / low memory cases. + + 01 Apr 2010; Andrew John Hughes <andrew@gentoo.org> -ecj-gcj-3.5.2.ebuild: + Use new ecj-3.5 ebuild as basis, not old native binary version. + + 22 Mar 2010; Vlastimil Babka <caster@gentoo.org> +ecj-gcj-3.5.2.ebuild, + +files/ecj-gcj, +metadata.xml: + New package, a subset of eclipse-ecj that can be compiled and used with + gcj-jdk. + diff --git a/dev-java/ecj-gcj/Manifest b/dev-java/ecj-gcj/Manifest new file mode 100644 index 000000000000..76d39f26de66 --- /dev/null +++ b/dev-java/ecj-gcj/Manifest @@ -0,0 +1,5 @@ +AUX ecj-gcj-3.5 723 RMD160 fb62d5bf35ef27f96c574b774410a0a1931d0e2d SHA1 713b2a237296af6d6745d31bf21447a0f4faeeb6 SHA256 6272829cdc298abd20683a78d3d159bcd4c29f96478e20428d4214c743cce21b +DIST ecjsrc-3.5.2.zip 1298691 RMD160 f6dc987418682dd9d776a692383a37497656fc04 SHA1 7d79ac9602ffa825f6f3ea8ab5a3387b687f5215 SHA256 4ae91449962b1e2781b70713e299f9fa16fb1ce25a4d2bb335c13b55c08d6d74 +EBUILD ecj-gcj-3.5.2-r2.ebuild 2784 RMD160 dd5f8ac26eea21b71d56e9e9e0d0344c20c99fab SHA1 a503a80bed9db08b926532bc89cff67f63555341 SHA256 a8ae68bf4647ad48e54a75a10b12711a1ddf3dfe925e5a9a64d6ce6ebbb6afbc +MISC ChangeLog 1416 RMD160 edfc87301de8d3336a5ae878ba4d05414e70ea7f SHA1 f8b9c790889d0110f0a7795857844114099394d8 SHA256 b6478a8d0eb865853ea874e699f1f914235e0105bcbf964b4159440168cc33c8 +MISC metadata.xml 328 RMD160 d09d8ec2e29ba96d03ede0ce6ddfc93c07c3436f SHA1 3a1c230643120b795fa9e2d835bb817b44dd560e SHA256 11219fb9b559b3e9737938e679434957b00c212473c71995cc4deeb734e60399 diff --git a/dev-java/ecj-gcj/ecj-gcj-3.5.2-r2.ebuild b/dev-java/ecj-gcj/ecj-gcj-3.5.2-r2.ebuild new file mode 100644 index 000000000000..f2d0f3b709f4 --- /dev/null +++ b/dev-java/ecj-gcj/ecj-gcj-3.5.2-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ecj-gcj-3.5.2-r2.ebuild,v 1.1 2010/10/31 17:29:23 caster Exp $ + +EAPI=2 + +inherit java-pkg-2 toolchain-funcs + +MY_PN="ecj" +DMF="R-${PV}-201002111343" +S="${WORKDIR}" + +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" + +IUSE="+native userland_GNU" + +LICENSE="EPL-1.0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +SLOT="3.5" + +MY_PS="${MY_PN}-${SLOT}" + +# for compatibility with java eclass functions +JAVA_PKG_WANT_SOURCE=1.4 +JAVA_PKG_WANT_TARGET=1.4 + +CDEPEND="sys-devel/gcc[gcj] + >=app-admin/eselect-ecj-0.6" +DEPEND="${CDEPEND} + app-arch/unzip + userland_GNU? ( sys-apps/findutils ) + !dev-java/eclipse-ecj:3.5[gcj]" +RDEPEND="${CDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + # 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" + 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' |\ + xargs ${jar} cf ${MY_PN}.jar + + 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' |\ + xargs ${jar} cf ${MY_PN}.jar + + if use native; then + einfo "Building native ${MY_PS} library, patience needed ..." + ${gcj} ${CFLAGS} -findirect-dispatch -shared -fPIC -Wl,-Bsymbolic \ + -o ${MY_PS}.so ${MY_PN}.jar || die + fi +} + +src_install() { + java-pkg_dojar ${MY_PN}.jar + dobin "${FILESDIR}/${PN}-${SLOT}" + use native && dolib.so ${MY_PS}.so +} + +pkg_postinst() { + if use native; then + $(gcc-config -B)/gcj-dbtool -a $(gcj-dbtool -p) \ + /usr/share/${PN}-${SLOT}/lib/ecj.jar \ + /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-3.5 b/dev-java/ecj-gcj/files/ecj-gcj-3.5 new file mode 100755 index 000000000000..bbb3225da88a --- /dev/null +++ b/dev-java/ecj-gcj/files/ecj-gcj-3.5 @@ -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.5/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> |