summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2012-12-14 13:08:28 +0000
committerRalph Sennhauser <sera@gentoo.org>2012-12-14 13:08:28 +0000
commit78b5383ee58c7b72c8c026432c53271ef7c224b3 (patch)
treeeba08b849d527e8c3a7fbe088e68b8bfc79dfdc2 /dev-java/ecj-gcj
parentStable for x86, wrt bug #447230 (diff)
downloadhistorical-78b5383ee58c7b72c8c026432c53271ef7c224b3.tar.gz
historical-78b5383ee58c7b72c8c026432c53271ef7c224b3.tar.bz2
historical-78b5383ee58c7b72c8c026432c53271ef7c224b3.zip
Respect LDFLAGS. #355057
Integrate prefix changes by Benda Xu <heroxbd@gentoo.org>. #416373 Stop using xargs, drop userland_GNU from IUSE and the dependency on findutils. Allow eselect-java be used instead of eselect-ecj. EAPI bump, cleanup, add missing die. Use same launcher for all slots, update rational for gcc-config lookup. Package-Manager: portage-2.1.11.31/cvs/Linux x86_64 Manifest-Sign-Key: 0x3C5CF75A
Diffstat (limited to 'dev-java/ecj-gcj')
-rw-r--r--dev-java/ecj-gcj/ChangeLog15
-rw-r--r--dev-java/ecj-gcj/Manifest19
-rw-r--r--dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild112
-rw-r--r--dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild112
-rwxr-xr-xdev-java/ecj-gcj/files/ecj-gcj.in23
5 files changed, 279 insertions, 2 deletions
diff --git a/dev-java/ecj-gcj/ChangeLog b/dev-java/ecj-gcj/ChangeLog
index 7413292fc481..06a319793b2b 100644
--- a/dev-java/ecj-gcj/ChangeLog
+++ b/dev-java/ecj-gcj/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for dev-java/ecj-gcj
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ChangeLog,v 1.5 2012/09/16 13:12:54 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/ecj-gcj/ChangeLog,v 1.6 2012/12/14 13:08:17 sera Exp $
+
+*ecj-gcj-3.6-r1 (14 Dec 2012)
+*ecj-gcj-3.5.2-r3 (14 Dec 2012)
+
+ 14 Dec 2012; Ralph Sennhauser <sera@gentoo.org> +ecj-gcj-3.5.2-r3.ebuild,
+ +ecj-gcj-3.6-r1.ebuild, +files/ecj-gcj.in:
+ Respect LDFLAGS. #355057
+ Integrate prefix changes by Benda Xu <heroxbd@gentoo.org>. #416373
+ Stop using xargs, drop userland_GNU from IUSE and the dependency on
+ findutils.
+ Allow eselect-java be used instead of eselect-ecj.
+ EAPI bump, cleanup, add missing die.
+ Use same launcher for all slots, update rational for gcc-config lookup.
16 Sep 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
ecj-gcj-3.6.ebuild:
diff --git a/dev-java/ecj-gcj/Manifest b/dev-java/ecj-gcj/Manifest
index af5ae7303e4a..5674e687807c 100644
--- a/dev-java/ecj-gcj/Manifest
+++ b/dev-java/ecj-gcj/Manifest
@@ -1,8 +1,25 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX ecj-gcj-3.5 723 SHA256 6272829cdc298abd20683a78d3d159bcd4c29f96478e20428d4214c743cce21b SHA512 5317d0e427543943d0dc725466bc31c7ba4e2cd3eaa45f898256ba67b982a830a4a2c96b2bf40216a48ea6471585b492bd35c0301471a51b17e1ee1e593af616 WHIRLPOOL 0d96fa8960059286251d191a408e09a683501a79ae0eb65ebaa4cc86976495ca0c0472b78257c46bf468e272cf69df173165120fc7f54d22461a27993b429c49
AUX ecj-gcj-3.6 723 SHA256 0c6993347ba1af785bec6920a0c9c473fee779fee31e7bacc41cd3696d3a6da3 SHA512 96c22c58d53fb797e589d07ea1a9b9a40e2f404b12cfebf61733c12d6dff1789b0688a05812c86d0f9cbf63b98a82ff90c0988cb5a3ab64485784b713cc1d236 WHIRLPOOL 7c75c608eb2c549703c40579d02d71027e3a5fb063642c7e6f96865c981e748c8bd6b557f4805ac594b24461e0186e10f62c7cffa177b9209931dd195f870bb2
+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
EBUILD ecj-gcj-3.5.2-r2.ebuild 2790 SHA256 4a93bf9d49d9ef0bb8c5272661601812b98884a33db39b7f51646ed459a759ca SHA512 c2e9121b8080d8536f95615195a924c86220b297437b6305f5e5b99489c0f473424594320b4b81cd84b8bd833bf187bd77aa594ba95d7b9a3565515148f2ff2a WHIRLPOOL d6b9feb569ad248450ed25facd53ef5db4a1b9caf363224b1e78e8668e0b65444c8977fbacc7527c9ee728c6d621316861363a5a0f9f21ea13087901e37a74ef
+EBUILD ecj-gcj-3.5.2-r3.ebuild 2980 SHA256 190901af868726db45868eeb7bbe618cee32331f093ce35846feb6dd43481b8e SHA512 caf92ef6567df07e3775d144652ae1fbd2d0071ad9429338f1d0986c1ad3a8b77528d7d37767e690dbe5be0241330e07a665ba7fa5a87fb674d2d3f1c05a40df WHIRLPOOL 652bb84e9d71720039a904d9175116a561daec97eaeea5d18e1ce2ac3d0a5f6a0be2ea3009213e4e20e1d69976c62d4c94379da13ddf547271219f692b73aff4
+EBUILD ecj-gcj-3.6-r1.ebuild 2983 SHA256 76dbd7e1e7a3c8c98d4b96631e835c8993d3d2be5e2243df80b2c7f2736ef8f7 SHA512 956a9039da573653ff3ad1f4523d4bb0935758babbaeab7f2425f62a4504a5eae522cbd1a82e288736242f99e770ff686e4959c1c3443d0756853017c6cb2af0 WHIRLPOOL 62111508bc2111ee4db922ab71c9fccf13e01553381381902cb5c86d79924fe0dd4d1acc7db136744f8a510c9a6edf9e9c696b485b4fd2bdf3ade2289ab6000e
EBUILD ecj-gcj-3.6.ebuild 2814 SHA256 faaa1228249c6368322ca5e091c478157391ff0d623c2197ee9b70a7f6577a46 SHA512 fda84702b33f3ccf71212af6e1b3ba4f010ab8ba89d80b473c5f2e30752df97c3ee739f392034cf65e67e1c901a836de1aeb500023fbe15a2bd05a44a9a375ab WHIRLPOOL 2c1d1ea0e503e5d09ec3672a45a7062a7d3d171a1258d965e47edc6a01818842479df7d7ba310b319b2fc52d1c54e3cbdd0f87991ce4d6475c0a06b8feae8366
-MISC ChangeLog 1922 SHA256 f602fa624c411a16a2b76cf4fad2dfdc4d56ef5c3a2f8c6aa100c33688dc1e93 SHA512 151a535603c065ea2d2857fdb4699d7858ed130b87262a2d5382b76dac4dc66ae49bd8a1c61ab555b372bbf21a2448e2f3c5d1b4356b88d3880a09bded6dba68 WHIRLPOOL c2989a31944e385e48b24507e4c7731f44be1a0b673a979403c016da3dd567a48c8718dad424db50410229bd2e7dd4c36c446f2298e5a8a67c5fada810e6a8d5
+MISC ChangeLog 2448 SHA256 2ec2eccea2432d780dd2d2824d3a788928491a11b99fcf0e5bb008fe1b08cb5f SHA512 5db64b5e322c1086b1ee753adce3b1c28d7a2fa7a1a0373bea0c9bbc0c45d9c44a5443cc30703ccd20064e5fe2380fc7ae68cda0b00ac6e64ea5224a605e8525 WHIRLPOOL 985b7ea312eae3dda026212b0c221e05cd0695b499971ae3e9e29abfde852f4b696b28d434de91bc7b257c712b8b6a559f50685124a45debe3b88aec251f103d
MISC metadata.xml 328 SHA256 11219fb9b559b3e9737938e679434957b00c212473c71995cc4deeb734e60399 SHA512 03e7d5b09b8347761e6dfad2bd0b8ae74962468cee5d0d16323ecf255e6bd9cd77380bc93bbb42f2af80fd460b0ef9b9de24fe528bb034ad741eedbd29f97e89 WHIRLPOOL c155e5aa02f4b66d56533716a258c394df176ea59b0dc8ccac00283418a6ecf36ef5a3cf48e4384b7d2ee5bda5b63f8e43d3ece0d8176f8dc3bbdde4c4a220a7
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQEcBAEBCAAGBQJQyyUfAAoJELjwI6Q8XPdaBYAH/061kAJ+G9Hu1ZvDVDXlTjgi
+ttDIbaN6DjcXBCDP41fK9CllOAjVDSgJ+CVXk+uPWBWlpJiomzyNyu1I09udQq+t
+M49DZ4dkYFMgnZzz+yGVf5W5TcpTIk9l0DaR1I18DHI6LbPEYdnsFzP5X+6Q3d+x
+3WRJsFUlvKC9MkmYkx3zUSKGEpC+9hYAJvspJLr1OFDvPz3nkh53cH6U7kJwzJHk
++rL8zRubfIw+cZ+iqFlzIXjdTCevstqFNI4iFtHElvHgSOCuAg/v5I46bN1AStyt
+UHkYxw2VL0ZejyRw/QWaQ13TNQwkIKONIUMFdHdm0gKRKfrIeliPCBCafdnADQo=
+=P3od
+-----END PGP SIGNATURE-----
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..5be798d85b2f
--- /dev/null
+++ b/dev-java/ecj-gcj/ecj-gcj-3.5.2-r3.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2012 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-r3.ebuild,v 1.1 2012/12/14 13:08:17 sera Exp $
+
+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 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="+native"
+
+COMMON_DEPEND="
+ sys-devel/gcc[gcj]
+ || ( app-admin/eselect-java >=app-admin/eselect-ecj-0.6 )"
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+ 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..87ed21a476c7
--- /dev/null
+++ b/dev-java/ecj-gcj/ecj-gcj-3.6-r1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2012 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.6-r1.ebuild,v 1.1 2012/12/14 13:08:17 sera Exp $
+
+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 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="+native"
+
+COMMON_DEPEND="
+ sys-devel/gcc[gcj]
+ || ( app-admin/eselect-java >=app-admin/eselect-ecj-0.6 )"
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+ 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/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 "${@}"