chewi       15/03/17 12:30:29

  Modified:             ChangeLog
  Added:                ecj-gcj-4.4.2.ebuild
  Log:
  Version bump and general clean up. gcj doesn't support the
  recently-added @Override annotations so strip these out for the
  bootstrap stage. Creating a jar at the bootstrap stage is not
  necessary. The new annotations mean that -source 1.6 is now needed
  when building with ecj so use java-pkg_javac-args.
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
9C6D7DE4)

Revision  Changes    Path
1.8                  dev-java/ecj-gcj/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/ecj-gcj/ChangeLog?rev=1.8&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/ecj-gcj/ChangeLog?rev=1.8&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/ecj-gcj/ChangeLog?r1=1.7&r2=1.8

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ChangeLog,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ChangeLog   14 Jul 2014 18:10:59 -0000      1.7
+++ ChangeLog   17 Mar 2015 12:30:29 -0000      1.8
@@ -1,6 +1,14 @@
 # ChangeLog for dev-java/ecj-gcj
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ChangeLog,v 1.7 2014/07/14 
18:10:59 sera Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ChangeLog,v 1.8 2015/03/17 
12:30:29 chewi Exp $
+
+*ecj-gcj-4.4.2 (17 Mar 2015)
+
+  17 Mar 2015; James Le Cuirot <[email protected]> +ecj-gcj-4.4.2.ebuild:
+  Version bump and general clean up. gcj doesn't support the recently-added
+  @Override annotations so strip these out for the bootstrap stage. Creating a
+  jar at the bootstrap stage is not necessary. The new annotations mean that
+  -source 1.6 is now needed when building with ecj so use java-pkg_javac-args.
 
 *ecj-gcj-4.2.1-r2 (14 Jul 2014)
 



1.1                  dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild?rev=1.1&content-type=text/plain

Index: ecj-gcj-4.4.2.ebuild
===================================================================
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild,v 1.1 
2015/03/17 12:30:29 chewi Exp $

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 ~ia64 ~ppc ~ppc64 ~x86"
IUSE="+native"

RDEPEND="sys-devel/gcc:*[gcj]
        || ( app-admin/eselect-java >=app-admin/eselect-ecj-0.6 )"
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

        # Strip Java 6 annotations that gcj doesn't support
        # Put these modifications in bootstrap and build a sources list
        find org/ -name "*.java" -print -exec sh -c "mkdir -p \$(dirname 
bootstrap/{}) && sed '/^\s*@Override\s*$/d' {} > bootstrap/{}" \; > sources.lst 
|| die
}

src_compile() {
        local gccbin=$(gcc-config -B)
        local gcj="${gccbin}/gcj"

        einfo "bootstrapping ${MY_PN} with gcj ..."
        cd bootstrap || die
        "${gcj}" -w -C @../sources.lst || die
        cd .. || 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
}




Reply via email to