diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-java/ecj-gcj |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-java/ecj-gcj')
-rw-r--r-- | dev-java/ecj-gcj/Manifest | 12 | ||||
-rw-r--r-- | dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild | 109 | ||||
-rw-r--r-- | dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild | 109 | ||||
-rw-r--r-- | dev-java/ecj-gcj/ecj-gcj-4.2.1-r2.ebuild | 109 | ||||
-rw-r--r-- | dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild | 93 | ||||
-rw-r--r-- | dev-java/ecj-gcj/files/ecj-gcj.in | 23 | ||||
-rw-r--r-- | dev-java/ecj-gcj/metadata.xml | 11 |
7 files changed, 466 insertions, 0 deletions
diff --git a/dev-java/ecj-gcj/Manifest b/dev-java/ecj-gcj/Manifest new file mode 100644 index 000000000000..64b2fabe4243 --- /dev/null +++ b/dev-java/ecj-gcj/Manifest @@ -0,0 +1,12 @@ +AUX ecj-gcj.in 840 SHA256 da96a9d9ddfd1d62e05c34df073c5e9ca96a7950e3ce3f8e3a3fd2e908de9c3d SHA512 7ed6620090643f31f33762a1fe8f0024518bb808bf8aa2e8bfc8f9c0475e41f699670939bfa945a48aa5f5fad61b557a9e315c2781103717c2a6a1bd67a048a1 WHIRLPOOL db068d94d11555a28fca40bc8d5600baf75791224011b4f87895b5a9780e39674cecd238ffc86364487aab7d63fa58060b5e5c220fa4ba9dc372d8f50627c8f3 +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 +EBUILD ecj-gcj-3.5.2-r3.ebuild 2782 SHA256 27e484f1e5db9480a5ed3f998a1f2a793968c276572ca944d6eba0c48ef5fa21 SHA512 1b566121acf1174645ca7ddffabd1d2ca522d6b94c0eb544949f6a6b3c5a5ba68eb53de6b23baf03c6852a1aaff910ab50f7dd215c24fc932183fedaacb09c51 WHIRLPOOL ba6fdc8f4633289d3787dfa6a9be681cd660e0cf6ed8e436ea20d9067919f6d74c340295be7b58cb6277cbcc52ddaa05ee29bf56e76704a752ea40ba74e2a905 +EBUILD ecj-gcj-3.6-r1.ebuild 2787 SHA256 9435e9668ea21fec53d267f90b6ba4825fa58c60eff89f8a414165ee7a3f017a SHA512 083d05750b4a323db9f1a0e0f8d28a7471fb323a344e5f6edf09471cf94d691ac6ae520c33ea25da7f119506312f347c536ebaeaf6d3cbd8688c822c1e23df9b WHIRLPOOL 2e2127630ff763250702bd471a6187348a3c6c97d1006a62a2feac727036adc958c686b742258d35c526c0053dfa49881bcbd79f6f675cb03201e2d951bc77b1 +EBUILD ecj-gcj-4.2.1-r2.ebuild 2860 SHA256 64cd3913a4f261f110912fae6f3ff0d48461b13d34871136e5b5b1050bdee030 SHA512 d5ec66f550fdfea1c79180eff6b16f5a4efe056896892862d10c8dde0324c6738c6bdcd5e34b82cd8cdd02f8bff42a1ccd303be366d48f675eb343c744dcbaa7 WHIRLPOOL 9b3542584b76f556bd61b11122431ce676b2ca4d70a36d1913b9b1e946224bc32cb21499df13fb5f7ffa594f3c1e35f30d62411ea7195277adcb3fa8e6925aac +EBUILD ecj-gcj-4.4.2.ebuild 2433 SHA256 e242b2bdd5918a7b669d686ec39a57204dd3a3217bffd4ffb8c674602b611d67 SHA512 7e84f812d8549a2893acd7494cc5004100810244debf556591029cecfddb3e8c69a232b951e8d3bccebc4932c14ac6155ea2f37fbf758a12baf5db246776b6c7 WHIRLPOOL 6b0d96c6437544a5ea14ade014f666975191b87d00d8bf931df2ecc8572c99e684e32cd96a1ca4b01f23a5e84a4b3af8b6bbb2638ef92394b0b19b30f3aaa516 +MISC ChangeLog 2950 SHA256 094365578017a3c51a7475828bd9ed1ec1d9548cc9835dc3428c3e70f5487cc0 SHA512 cedeef1d21920adf491ed45eadd7c2a4519500aa52b582f546c7d04411c1925c68e346128fb7c4491c2115fd9c658ca85f26506dbd9b654714c597535bd55b1c WHIRLPOOL c8c167f41d545896f0dd58971c9cbc2d1c5c5fd495116cf1f8f03dc57f2e6bfb6057e9772953a68415fa05469ad13a0f9bb9085d72d05281b46ba1017e6e4d3b +MISC ChangeLog-2015 3929 SHA256 71b5f8329c5cdd43496a92b6db42b2cc29ca6b081914165862205c5b58a04833 SHA512 3d2febbb68b6985a2752527613094f6742cb6251102e9a3775d0ada58ca03eb07514cbb43a0d77387b0166ac276c1590a7ce01f4743e1d2895d261577f36d866 WHIRLPOOL 8bb8aa0546e4c0222723980723325c90afd2b4d270e9144ddd1432eafc3e9275f4d64915638f342df4c02bb594cabd7bfd4f4e8ca2f1c6247e9149f27c845a78 +MISC metadata.xml 403 SHA256 67bce4916230db6b4155803d3f6357993eaa256d7b7901abdc556edea15a53f4 SHA512 9a887b9b4ae389bddf88e08c0a9ad145dc3fb69340822938fe7fd6fdb02c55c5b87c34742dc4349dae880ea48fd00161ac70d6c5289c23336c1301c561d0c90c WHIRLPOOL 55c025242c114653dc7299b8f43f4a0cb6dff4513c5e8f28b3072e909c1645db52f031c3b345a30d1543623c2aaa036add857da6a5d5577810eb358c7770d50f 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..c2dd06855a54 --- /dev/null +++ b/dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit java-pkg-2 prefix toolchain-funcs + +MY_PN="ecj" +DMF="R-${PV}-201002111343" + +DESCRIPTION="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 ~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..828b293af310 --- /dev/null +++ b/dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit java-pkg-2 prefix toolchain-funcs + +MY_PN="ecj" +DMF="R-${PV}-201006080911" + +DESCRIPTION="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 ~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..d29d172ca10f --- /dev/null +++ b/dev-java/ecj-gcj/ecj-gcj-4.2.1-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit java-pkg-2 prefix toolchain-funcs + +MY_PN="ecj" +DMF="R-${PV}-201209141800" + +DESCRIPTION="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 ~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..9f3ec5665c73 --- /dev/null +++ b/dev-java/ecj-gcj/ecj-gcj-4.4.2.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit java-pkg-2 prefix toolchain-funcs + +MY_PN="ecj" +DMF="R-${PV}-201502041700" + +DESCRIPTION="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 ~arm64 ~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 100644 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..0c0a51809582 --- /dev/null +++ b/dev-java/ecj-gcj/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> +</maintainer> +<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> |