summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul de Vrieze <pauldv@gentoo.org>2009-01-07 20:49:08 +0000
committerPaul de Vrieze <pauldv@gentoo.org>2009-01-07 20:49:08 +0000
commit9b61fcad7b08831035a95677e9c03ed31370892b (patch)
tree19cc0d94f8fc863a99d3db4a9a59ebc9e73dd7e9
parentGet proper version in the osgi package (diff)
downloadpauldv-9b61fcad7b08831035a95677e9c03ed31370892b.tar.gz
pauldv-9b61fcad7b08831035a95677e9c03ed31370892b.tar.bz2
pauldv-9b61fcad7b08831035a95677e9c03ed31370892b.zip
Get the eclipse ebuild from the java overlay, and clean it up just a little
svn path=/trunk/overlay/; revision=77
-rw-r--r--dev-java/sat4j-core/ChangeLog12
-rw-r--r--dev-java/sat4j-core/Manifest4
-rw-r--r--dev-java/sat4j-core/sat4j-core-2.0.1.ebuild52
-rw-r--r--dev-java/sat4j-pseudo/ChangeLog13
-rw-r--r--dev-java/sat4j-pseudo/Manifest4
-rw-r--r--dev-java/sat4j-pseudo/sat4j-pseudo-2.0.1.ebuild66
-rw-r--r--dev-util/eclipse-sdk/Manifest5
-rw-r--r--dev-util/eclipse-sdk/eclipse-sdk-3.4.1.ebuild569
-rw-r--r--dev-util/eclipse-sdk/files/3.4/eclipse-3.411
-rw-r--r--dev-util/eclipse-sdk/files/3.4/eclipserc-3.420
10 files changed, 495 insertions, 261 deletions
diff --git a/dev-java/sat4j-core/ChangeLog b/dev-java/sat4j-core/ChangeLog
new file mode 100644
index 0000000..ba15fd3
--- /dev/null
+++ b/dev-java/sat4j-core/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-java/sat4j-core
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 03 Sep 2008; Alistair Bush <ali_bush@gentoo.org> sat4j-core-2.0.1.ebuild:
+ Fixing doc installation.
+
+*sat4j-core-2.0.1 (25 Jul 2008)
+
+ 25 Jul 2008; James Le Cuirot <chewi@aura-online.co.uk>
+ +sat4j-core-2.0.1.ebuild:
+ Added.
diff --git a/dev-java/sat4j-core/Manifest b/dev-java/sat4j-core/Manifest
new file mode 100644
index 0000000..a9c998d
--- /dev/null
+++ b/dev-java/sat4j-core/Manifest
@@ -0,0 +1,4 @@
+DIST build-2.4.xml 9458 RMD160 a42173b5390cbf8027d180eb8d857cbae124e29b SHA1 70ce855116615e1e13283e00dd2e20eeae2d5447 SHA256 f0d05ae4fa0485b0dacc3627120b6d7053e24356127a12733a95f85f30bca2d8
+DIST sat4j-core-v20080622.zip 351856 RMD160 1dd050afc4f871e5c183f5df5ccf035928e7b34f SHA1 411c3a89bb07782b3b75f32292d4609a41827326 SHA256 3248597350666f919fa488c113a124530acb55af44bcdd35e93098c7b9b72221
+EBUILD sat4j-core-2.0.1.ebuild 1340 RMD160 3683d87d9db7dfb42b4575eb230a14d434519d57 SHA1 3cdbf2544c974bc427d9cd22829a099f35b424c3 SHA256 26c17a12e26229b8824de7e6f1bd2c4123062bb175910132d6e90fc012b59030
+MISC ChangeLog 351 RMD160 f23c17ef5cb077b147558211f1dec889939779f8 SHA1 058a7d7e17e84d898866c0764a8acedc03f8663b SHA256 6ae0aeaae2196387135a27c10efed81e1af2962c1e83d971f248f5bef069614f
diff --git a/dev-java/sat4j-core/sat4j-core-2.0.1.ebuild b/dev-java/sat4j-core/sat4j-core-2.0.1.ebuild
new file mode 100644
index 0000000..12aa87b
--- /dev/null
+++ b/dev-java/sat4j-core/sat4j-core-2.0.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+MY_PN="org.${PN//-/.}"
+MY_PV="20080622"
+BUILD_PV="2.4"
+
+JAVA_PKG_IUSE="doc source"
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Lightweight constraint programming with a SAT solver"
+HOMEPAGE="http://www.sat4j.org/"
+SRC_URI="http://download.forge.objectweb.org/sat4j/${PN}-v${MY_PV}.zip
+ http://download.forge.objectweb.org/sat4j/build-${BUILD_PV}.xml"
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.4"
+DEPEND=">=virtual/jdk-1.5"
+
+S="${WORKDIR}"
+EANT_BUILD_TARGET="core"
+EANT_DOC_TARGET="javadoc -Dmodule=core -Dlib=core/lib"
+
+src_unpack() {
+ unpack ${PN}-v${MY_PV}.zip
+ mkdir -p core/{lib,src} || die
+
+ # Don't complain about missing javadoc stylesheet.
+ touch core/lib/stylesheet.css
+
+ # Grab build.xml. Don't fetch from CVS.
+ sed 's/depends="prepare,getsource"/depends="prepare"/g' \
+ "${DISTDIR}/build-${BUILD_PV}.xml" > build.xml || die
+
+ # Unpack manifest.
+ cd core || die
+ $(java-config -j) xf "${WORKDIR}/${MY_PN}.jar" META-INF || die
+
+ # Unpack sources.
+ cd src || die
+ $(java-config -j) xf "${WORKDIR}/${MY_PN}-src.jar" || die
+}
+
+src_install() {
+ java-pkg_dojar dist/CUSTOM/${MY_PN}.jar
+ use doc && java-pkg_dojavadoc api/core
+ use source && java-pkg_dosrc core/src/org
+}
diff --git a/dev-java/sat4j-pseudo/ChangeLog b/dev-java/sat4j-pseudo/ChangeLog
new file mode 100644
index 0000000..974060d
--- /dev/null
+++ b/dev-java/sat4j-pseudo/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for dev-java/sat4j-pseudo
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 03 Sep 2008; Alistair Bush <ali_bush@gentoo.org>
+ sat4j-pseudo-2.0.1.ebuild:
+ Fixing doc installation.
+
+*sat4j-pseudo-2.0.1 (25 Jul 2008)
+
+ 25 Jul 2008; James Le Cuirot <chewi@aura-online.co.uk>
+ +sat4j-pseudo-2.0.1.ebuild:
+ Added.
diff --git a/dev-java/sat4j-pseudo/Manifest b/dev-java/sat4j-pseudo/Manifest
new file mode 100644
index 0000000..3f90ff3
--- /dev/null
+++ b/dev-java/sat4j-pseudo/Manifest
@@ -0,0 +1,4 @@
+DIST build-2.4.xml 9458 RMD160 a42173b5390cbf8027d180eb8d857cbae124e29b SHA1 70ce855116615e1e13283e00dd2e20eeae2d5447 SHA256 f0d05ae4fa0485b0dacc3627120b6d7053e24356127a12733a95f85f30bca2d8
+DIST sat4j-pb-v20080622.zip 178075 RMD160 7f6bab474e4c6c8337938cc4dd84aff6beea149a SHA1 5c12525cbaca1fe3dd99c0dd2fa46dfad9ea9a4a SHA256 852fffdd6568ff98045b54507ee7829d8c5e63f23dffd2ebe9034fd277099bad
+EBUILD sat4j-pseudo-2.0.1.ebuild 1606 RMD160 474c4882a27a494664b764bf98d371f3d83a22fb SHA1 0d85a96de5d00213add39c71c1daa773a7a3220e SHA256 db827ca3951c70a160e949178ec2f8c1b8b0272ac3c92f657d26de26998c7501
+MISC ChangeLog 361 RMD160 1c2230ca7e3211f67456164c8b30617651a336c5 SHA1 3a629660f0d75fa4d673ad099de669bef890fd1c SHA256 cbd1994d85ae5f6476864c097ce18714535847385b634e1e64fa0c34bc2e5a77
diff --git a/dev-java/sat4j-pseudo/sat4j-pseudo-2.0.1.ebuild b/dev-java/sat4j-pseudo/sat4j-pseudo-2.0.1.ebuild
new file mode 100644
index 0000000..70b3056
--- /dev/null
+++ b/dev-java/sat4j-pseudo/sat4j-pseudo-2.0.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="1"
+
+MY_PN="org.sat4j.pb"
+MY_PV="20080622"
+BUILD_PV="2.4"
+
+JAVA_PKG_IUSE="doc source"
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Pseudo Boolean solvers"
+HOMEPAGE="http://www.sat4j.org/"
+SRC_URI="http://download.forge.objectweb.org/sat4j/sat4j-pb-v${MY_PV}.zip
+ http://download.forge.objectweb.org/sat4j/build-${BUILD_PV}.xml"
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CDEPEND="dev-java/sat4j-core:2"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.4"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.5"
+
+S="${WORKDIR}"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_BUILD_TARGET="pseudo"
+EANT_GENTOO_CLASSPATH="sat4j-core:2"
+EANT_DOC_TARGET="javadoc -Dmodule=pb -Dlib=pb/lib"
+
+src_unpack() {
+ unpack sat4j-pb-v${MY_PV}.zip
+ mkdir -p {core,pb}/{lib,src} || die
+
+ # Don't complain about missing javadoc stylesheet.
+ touch core/lib/stylesheet.css
+
+ # Grab build.xml. Don't fetch from CVS. Don't build core.
+ sed -e 's/depends="core"//g' \
+ -e 's/depends="prepare,getsource"/depends="prepare"/g' \
+ "${DISTDIR}/build-${BUILD_PV}.xml" > build.xml || die
+
+ # This is the version identifier used for custom builds.
+ echo 'CUSTOM' > core/src/sat4j.version || die
+
+ # Unpack manifest.
+ cd pb || die
+ $(java-config -j) xf "${WORKDIR}/${MY_PN}.jar" META-INF || die
+
+ # Unpack sources.
+ cd src || die
+ $(java-config -j) xf "${WORKDIR}/${MY_PN}-src.jar" || die
+}
+
+src_install() {
+ java-pkg_dojar dist/CUSTOM/${MY_PN}.jar
+ use doc && java-pkg_dojavadoc api/pb
+ use source && java-pkg_dosrc pb/src/org
+}
diff --git a/dev-util/eclipse-sdk/Manifest b/dev-util/eclipse-sdk/Manifest
index 25266e6..0f523cd 100644
--- a/dev-util/eclipse-sdk/Manifest
+++ b/dev-util/eclipse-sdk/Manifest
@@ -1,11 +1,12 @@
AUX 3.4/ant-osgi-manifest.mf 3165 RMD160 75444432268c9eef06cd4bb18352b77e426ed116 SHA1 c09dd82dee4708e8726b52569e25da0edda641df SHA256 1df8d7283d6f8fa3d1c3bbbbd832a5fd091f39b52d27d88b131064aeb81ab542
-AUX 3.4/eclipse-3.4 1287 RMD160 aa2b164c3e51d2813f00e1cbcbf3471de3732298 SHA1 f12f6643ffcfe2040c354c81db4d7073c9366906 SHA256 e834ada06a933ab9eb42c78b378b302f2a78150c911b7e6e324e2ccfc3dfcf60
+AUX 3.4/eclipse-3.4 1378 RMD160 8e99b71258a5c047e3094b2ec941924871b9b147 SHA1 99cf45921276ed70f1123cc2c0655ec37944a0d4 SHA256 ba99d0d956d53d5f8f801c7f8aa9a805bb32c0a4e64262eac39bfc176c46ebbe
AUX 3.4/eclipse-c-warning.patch 1763 RMD160 a12e5c00d93534a0baff4b100e9ba08d6503da9c SHA1 7ccb60e0085e1fdb166e48613088454276b563d3 SHA256 3fdcad1d066200d276648b5cb6f6a7d10de89ca7a2ff6397edc0eda4128050cc
AUX 3.4/eclipse_build-libs.diff 2054 RMD160 0d74a889ecfb10d62e7cb20bad73c956e8225503 SHA1 3c570014221537debd8ac568d7ab94da18d8ebb4 SHA256 ce181b5dd7dc47bbb60b965c0241b126a4b5edfdddae762596ed882fdbd637bf
AUX 3.4/eclipse_buildfix-pde.diff 470 RMD160 f5868f6da880e6e930051893cba3e4277e927fb5 SHA1 f6ca5a75a40cff1d132af2b0d32367de744d4c62 SHA256 99450b348f6d41a489adfd51e1132f640eb8c43dfc4e9dd8e026aec66b41e30a
AUX 3.4/eclipserc 1001 RMD160 a008502defce8739022f3e4333cde1fb7f3de0f5 SHA1 b712b8b53e27214b0b51f01206b6252c9ef4ab9c SHA256 c1d66404893b11b5c4d743a974a61277508c5d3fcec0aad96f50f620d42c6191
+AUX 3.4/eclipserc-3.4 858 RMD160 f911438aa661be9ca8fc352dd372c9485d163ddb SHA1 abb1c369326be455d16bc42cf0a1b035aa145dc0 SHA256 0aea733c968ca064ad5ca95d5895778ecf7387826198b512e98d0cbb7dd353f1
AUX 3.4/fedora/eclipse-libupdatebuild2.patch 722 RMD160 6baa55ab7545f02e808ed05c901f77fb1d6709d4 SHA1 29f86a88e8ddc048e1fb4206a73824b2a4ed742d SHA256 ba7af44c1751b749591a53cb2c80852ef08f2f003917a5914042937e2d05b464
AUX 3.4/fedora/eclipse-pde.build-add-package-build.patch 11604 RMD160 ba63781fa77452e4c36eae7e07d81b7d39f5ec29 SHA1 7ee30f8fc2732125e1f2ba01038922d995b21456 SHA256 d361930896c940c09a7faf41f2c8d7843d56be9b90391e91538890062e5d7803
DIST eclipse-sourceBuild-srcIncluded-3.4.1.zip 106290656 RMD160 b5244cd94199b2d359e7e4d1f93018c9050e29de SHA1 484cdf90c05fab47492f7d2ce1fff64422373a9b SHA256 cb451bcc8866ab289b3a322e17eda7d20429463e8b3f329f66626b45b0fd6824
-EBUILD eclipse-sdk-3.4.1.ebuild 13048 RMD160 50b762a53ced24db46c9f3909ab5cf61f7dacf60 SHA1 5fcd93c318353d742a17875bf4be1d0d75aac61a SHA256 90bdd3859f43b34f52a3a4ed15afdf22c9b056c2b00d56dcf98d04be7237731b
+EBUILD eclipse-sdk-3.4.1.ebuild 15735 RMD160 26b43faaea8c807e46adf55654f5704ff450db42 SHA1 bb12d29fc093b15b96214ad7510eb2d3738d5409 SHA256 ec34ab066aeb204d6fa0ae11b16137d29fafe54a271840cd904dee972af4770f
MISC NOTES 109 RMD160 46488535b78316726bcd68db93ba92f6660dce66 SHA1 e329071628cc4ac1401faa44c8e7976597cba2c6 SHA256 c914208f0ac7675bd3b6c9d306387dca733554bb771eb1add872c7b9c929dfba
diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.4.1.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.4.1.ebuild
index 31217af..8e59daf 100644
--- a/dev-util/eclipse-sdk/eclipse-sdk-3.4.1.ebuild
+++ b/dev-util/eclipse-sdk/eclipse-sdk-3.4.1.ebuild
@@ -1,15 +1,12 @@
-# Copyright 2007-2008 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.4-r2.ebuild,v 1.1 2008/08/05 08:07:53 elvanor Exp $
+# $Header: $
-# To unbundle a jar, do the following:
-# 1) Rewrite the ebuild so it uses OSGi packaging
-# 2) Add the dependency and add it to gentoo_jars/system_jars
-# 3) Remove it from the build directory, and don't forget to modify the main Ant file
-# so that it does *NOT* copy the file at the end
-# 4) Install the symlink itself via java-pkg_jarfrom
+# Jetty and Jasper have to stay bundled for now, until someone does some work on them.
-# Jetty, Tomcat-jasper have to stay bundled for now, until someone does some work on them.
+# ECF also has to stay bundled due to a chicken and egg situation. We could use
+# the bundled version to build Eclipse and then build ECF later but it's still
+# a pain to build without using chewi-overlay.
# Current patches are hard to maintain when revbumping.
# Two solutions:
@@ -17,7 +14,10 @@
# 2) Use sed, better solution I would say.
EAPI="1"
-JAVA_PKG_IUSE="doc"
+
+JAVA_ANT_DISABLE_ANT_CORE_DEP="true"
+WANT_ANT_TASKS="ant-nodeps"
+
inherit java-pkg-2 java-ant-2 check-reqs
DMF="R-${PV}-200809111700"
@@ -29,36 +29,43 @@ SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/${DMF}/${MY_A}"
SLOT="3.4"
LICENSE="EPL-1.0"
-IUSE="java6"
-KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc java6 source"
+KEYWORDS="~amd64 ~x86"
-S=${WORKDIR}
+S="${WORKDIR}"
PATCHDIR="${FILESDIR}/${SLOT}"
-FEDORA="${PATCHDIR}/fedora"
-ECLIPSE_DIR="/usr/lib/eclipse-${SLOT}"
-
-CDEPEND="dev-java/ant-eclipse-ecj:${SLOT}
- dev-java/ant-core
- dev-java/ant-nodeps
- dev-java/junit:0
- dev-java/junit:4
- dev-java/swt:${SLOT}
+ECLIPSE_DIR="/usr/$(get_libdir)/eclipse-${SLOT}"
+BUILDPARSER="/usr/$(get_libdir)/javatoolkit/bin/buildparser"
+
+CDEPEND="dev-java/swt:${SLOT}
+ dev-java/ant-eclipse-ecj:${SLOT}
+ >=dev-java/ant-1.7.1
+ >=dev-java/ant-core-1.7.1
+ >=dev-java/asm-3.1:3
>=dev-java/jsch-0.1.36-r1
>=dev-java/icu4j-3.8.1:0
>=dev-java/commons-el-1.0-r2
>=dev-java/commons-logging-1.1-r6
+ >=dev-java/lucene-analyzers-1.9.1-r1:1.9
>=dev-java/tomcat-servlet-api-5.5.25-r1:2.4
+ dev-java/cldc-api:1.1
+ dev-java/junit:0
+ dev-java/junit:4
dev-java/lucene:1.9
- >=dev-java/lucene-analyzers-1.9.1-r1:1.9"
-RDEPEND="java6? ( >=virtual/jre-1.6 )
- !java6? ( >=virtual/jre-1.5 )
- ${CDEPEND}"
-DEPEND="!java6? ( >=virtual/jdk-1.5 )
+ dev-java/sat4j-core:2
+ dev-java/sat4j-pseudo:2"
+
+RDEPEND="${CDEPEND}
+ ${JAVA_ANT_E_DEPEND}
+ java6? ( >=virtual/jre-1.6 )
+ !java6? ( >=virtual/jre-1.5 )"
+
+DEPEND="${CDEPEND}
+ !java6? ( >=virtual/jdk-1.5 )
java6? ( >=virtual/jdk-1.6 )
- dev-java/cldc-api:1.1
+ >=dev-java/javatoolkit-0.3
app-arch/unzip
- app-arch/zip
- ${CDEPEND}"
+ app-arch/zip"
JAVA_PKG_BSFIX="off"
@@ -68,6 +75,11 @@ pkg_setup() {
CHECKREQS_MEMORY="512"
check_reqs
+ if use doc ; then
+ ewarn "Having the doc USE flag enabled greatly increases the build time. You might"
+ ewarn "want to disable it for ${PN} if you don't need it."
+ fi
+
eclipsearch=${ARCH}
use amd64 && eclipsearch="x86_64"
}
@@ -77,270 +89,317 @@ src_unpack() {
patch-apply
remove-bundled-stuff
- # Specific Gentoo tweaks for the build
- if use java6; then
- find "${S}" -type f -name '*.xml' -exec \
- sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" \
- -e "s:(\"compilerArg\" value=\"):\1-nowarn :g" \
- -e "s:output=\".*(txt|log).*\"::g" -i {} \;
-# -e "s:(<property name=\"javacSource\" value=)\".*\":\1\"1.6\":g" \
-# -e "s:(<property name=\"javacTarget\" value=)\".*\":\1\"1.6\":g" \
- else
- find "${S}" -type f -name '*.xml' -exec \
- sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" \
- -e "s:(\"compilerArg\" value=\"):\1-nowarn :g" \
- -e "s:(<property name=\"javacSource\" value=)\".*\":\1\"1.5\":g" \
- -e "s:(<property name=\"javacTarget\" value=)\".*\":\1\"1.5\":g" \
- -e "s:output=\".*(txt|log).*\"::g" -i {} \;
- fi
-
- # JDK home
- sed -r -e "s:^(OPT_FLAGS *= *)(.*)-O (.*)$:\1\2${CFLAGS} \3:" \
- -e "s:^(JAVA_HOME =) .*:\1 $(java-config --jdk-home):" \
- -i plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile \
- || die "sed Makefile failed"
-
while read line; do
java-ant_rewrite-classpath "${line}" > /dev/null
done < <(find "${S}" -type f -name "build.xml")
}
src_compile() {
- # Figure out correct boot classpath
- local bootclasspath=$(java-config --runtime)
- einfo "Using boot classpath ${bootclasspath}"
-
java-pkg_force-compiler ecj-${SLOT}
- # system_jars will be used when compiling (javac)
- # gentoo_jars will be used when building JSPs and other ant tasks (not javac)
- local system_jars="$(java-pkg_getjars swt-${SLOT},icu4j,ant-core,jsch,junit-4,tomcat-servlet-api-2.4,\
-lucene-1.9,lucene-analyzers-1.9):$(java-pkg_getjars --build-only ant-nodeps,cldc-api-1.1)"
- local gentoo_jars="$(java-pkg_getjars ant-core,icu4j,jsch,commons-logging,commons-el,tomcat-servlet-api-2.4)"
+ local bootclasspath=$(java-config --runtime)
local options="-q -Dnobootstrap=true -Dlibsconfig=true -Dbootclasspath=${bootclasspath} -DinstallOs=linux \
-DinstallWs=gtk -DinstallArch=${eclipsearch} -Djava5.home=$(java-config --jdk-home)"
+
use java6 && options="${options} -DJavaSE-1.6=${bootclasspath}"
- use doc && options="${options} -Dgentoo.javadoc=true"
- ANT_OPTS=-Xmx512M ANT_TASKS="ant-nodeps" \
- eant ${options} \
- -Dgentoo.classpath="${bootclasspath}:${system_jars}" \
- -Dgentoo.jars="${gentoo_jars//:/,}"
+ ANT_OPTS="-Xmx512M" eant ${options}
+
+ # Generate P2 metadata.
+ `java-config -J` -jar eclipse/plugins/org.eclipse.equinox.launcher_*.jar -data workspace \
+ -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator -flavor tooling \
+ -metadataRepositoryName "Gentoo Eclipse" -artifactRepositoryName "Gentoo Eclipse" \
+ -metadataRepository "file:eclipse/metadata" -artifactRepository "file:eclipse/metadata" \
+ -root "Gentoo Eclipse SDK" -rootVersion "${SLOT}" -source eclipse -append -publishArtifacts || die
}
src_install() {
- dodir "/usr/lib"
-
- [ -f "result/linux-gtk-${eclipsearch}-sdk.tar.gz" ] \
- || die "tar.gz bundle was not built properly!"
- tar xzf "result/linux-gtk-${eclipsearch}-sdk.tar.gz" -C "${D}/usr/lib" \
- || die "Failed to extract the built package"
-
- mv "${D}/usr/lib/eclipse" "${D}/${ECLIPSE_DIR}"
-
- # Install startup script
- dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}"
- chmod +x "${D}/${ECLIPSE_DIR}/eclipse"
-
- insinto "/etc"
- doins "${FILESDIR}/${SLOT}/eclipserc"
-
- make_desktop_entry "eclipse-${SLOT}" "Eclipse ${PV}" "${ECLIPSE_DIR}/icon.xpm"
-
- cd "${D}/${ECLIPSE_DIR}"
- install-link-system-jars
+ # Root files don't get included by P2.
+ insinto "${ECLIPSE_DIR}"
+ doins -r features/org.eclipse.platform/rootfiles/{.eclipseproduct,*}
+
+ # Workaround https://bugs.eclipse.org/bugs/show_bug.cgi?id=241430...
+ rm -rf eclipse/configuration/.settings || die
+
+ # Install using P2.
+ `java-config -J` -Declipse.p2.data.area="file:${D}/${ECLIPSE_DIR}/p2" \
+ -jar eclipse/plugins/org.eclipse.equinox.launcher_*.jar -data workspace \
+ -application org.eclipse.equinox.p2.director.app.application -flavor tooling \
+ -metadataRepository "file:eclipse/metadata" -artifactRepository "file:eclipse/metadata" \
+ -installIU "Gentoo Eclipse SDK" -version "${SLOT}" -p2.os linux -p2.ws gtk -p2.arch ${eclipsearch} \
+ -profile SDKProfile -profileProperties org.eclipse.update.install.features=true \
+ -destination "${D}/${ECLIPSE_DIR}" -bundlepool "${D}/${ECLIPSE_DIR}" -roaming || die
+
+ cd "${D}/${ECLIPSE_DIR}" || die
+
+ # Delete unneeded files.
+ rm -rf p2/org.eclipse.equinox.p2.core || die
+
+ # Restore symlinks. P2 has ignored them.
+ rm -rf plugins/org.apache.ant_*/{bin,lib} || die
+ ln -snf /usr/share/ant/bin plugins/org.apache.ant_*/ || die
+ ln -snf /usr/share/ant/lib plugins/org.apache.ant_*/ || die
+ cp -af "${S}"/plugins/org.junit_*/*.jar plugins/org.junit_*/ || die
+ cp -af "${S}"/plugins/org.junit4/*.jar plugins/org.junit4_*/ || die
+
+ # Install startup script.
+ dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}" || die
+
+ # Install global rc script.
+ insinto /etc
+ doins "${FILESDIR}/${SLOT}/eclipserc-${SLOT}" || die
+
+ # Install icon and make desktop entry.
+ newicon "${S}/features/org.eclipse.equinox.executable/bin/gtk/linux/x86/icon.xpm" eclipse.xpm || die
+ make_desktop_entry eclipse-${SLOT} "Eclipse ${PV}" eclipse.xpm || die
}
pkg_postinst() {
einfo "Welcome to Eclipse ${PV} (Ganymede)!"
- einfo
+ einfo " "
einfo "You can now install plugins via Update Manager without any"
einfo "tweaking. This is the recommended way to install new features for Eclipse."
- einfo
+ einfo " "
einfo "Please read http://gentoo-wiki.com/Eclipse"
einfo "It contains a lot of useful information and help about Eclipse on Gentoo."
- einfo
- einfo "The FileInitializer Plugin is no more integrated."
+ einfo " "
+ einfo "The FileInitializer Plugin is no longer integrated."
einfo "If you need it, get org.eclipse.equinox.initializer_x.y.z.jar from:"
einfo " http://download.eclipse.org/eclipse/equinox/"
- echo
- ewarn "The new Update Manager (P2) is not yet supported under Gentoo."
- ewarn "Please enable the 'Classic Update' under:"
- ewarn "Window > Preferences > General > Capabilities"
}
# -----------------------------------------------------------------------------
# Helper functions
# -----------------------------------------------------------------------------
-install-link-system-jars() {
- pushd plugins/ > /dev/null
-
- mkdir "org.apache.ant"
- mkdir "org.apache.ant/META-INF/"
- mkdir "org.apache.ant/lib"
- cp "${FILESDIR}/${SLOT}/ant-osgi-manifest.mf" "org.apache.ant/META-INF/MANIFEST.MF"
- pushd org.apache.ant/lib > /dev/null
- java-pkg_jarfrom ant-core
- java-pkg_jarfrom ant-nodeps
- popd > /dev/null
-
- java-pkg_jarfrom swt-${SLOT}
- java-pkg_jarfrom icu4j
- java-pkg_jarfrom jsch
- java-pkg_jarfrom commons-el
- java-pkg_jarfrom commons-logging
- java-pkg_jarfrom lucene-1.9
- java-pkg_jarfrom lucene-analyzers-1.9
- java-pkg_jarfrom tomcat-servlet-api-2.4
- java-pkg_jarfrom --into org.junit_*/ junit
- java-pkg_jarfrom --into org.junit4*/ junit-4
- popd > /dev/null
-}
-
patch-apply() {
- # optimize launcher build
- mkdir launchertmp
- unzip -qq -d launchertmp plugins/org.eclipse.platform/launchersrc.zip \
- || die "unzip failed"
- pushd launchertmp/ > /dev/null
- sed -r -e "s/CFLAGS = -O -s -Wall/CFLAGS = ${CFLAGS} -Wall/" \
- -i library/gtk/make_linux.mak || die "Failed to tweak make_linux.mak"
- zip -q -6 -r ../launchersrc.zip * || die "zip failed"
- popd > /dev/null
- mv launchersrc.zip plugins/org.eclipse.platform/launchersrc.zip
- rm -rf launchertmp
-
- # disable swt, jdk6
- # use sed where possible => ease bump :)
- sed -e "/..\/..\/plugins\/org.eclipse.ui.win32/,/<\/ant>/d" \
- -i features/org.eclipse.platform/build.xml
- sed -e "/dir=\"..\/..\/plugins\/org.eclipse.swt/,/<\/ant>/d" \
- -i features/org.eclipse.rcp/build.xml \
- -i features/org.eclipse.rcp.source/build.xml
- sed -e "/dir=\"..\/..\/plugins\/org.eclipse.ui.carbon\"/,/<\/ant>/d" \
- -i features/org.eclipse.rcp/build.xml
-
- sed -e "/dir=\"plugins\/org.eclipse.swt.gtk.linux.${eclipsearch}\"/d" \
- -e "/value=\"org.eclipse.swt.gtk.linux.${eclipsearch}_/,/eclipse.plugins/d" \
- -i assemble.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml
- sed -e "s:\${basedir}/swt.jar:$(java-pkg_getjars --build-only swt-${SLOT}):" \
- -i plugins/org.eclipse.swt.gtk.linux.${eclipsearch}/build.xml
+ # Optimize launcher build.
+ unzip -q plugins/org.eclipse.platform/launchersrc.zip library/gtk/make_linux.mak || die
+ sed -i -r "s/CFLAGS = -g -s\b/CFLAGS =/;/CFLAGS =/a\\\\t${CFLAGS}\\\\" library/gtk/make_linux.mak || die
+ zip -qrm plugins/org.eclipse.platform/launchersrc.zip library || die
+
+ # Avoid doing any unnecessary copying or archiving at the end of the build.
+ sed -r -i '/<exec .*\bexecutable="tar"/,/<delete /d' {assemble,package}.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml || die
+ sed -r -i '/<delete /,/<delete .*\bdir=/d' build.xml || die
+ mkdir -p tmp/eclipse || die
+ ln -snf tmp/eclipse eclipse || die
if ! use java6; then
- sed -e "/..\/..\/plugins\/org.eclipse.jdt.apt.pluggable.core/,/<\/ant>/d" \
- -e "/..\/..\/plugins\/org.eclipse.jdt.compiler.apt/,/<\/ant>/d" \
- -e "/..\/..\/plugins\/org.eclipse.jdt.compiler.tool/,/<\/ant>/d" \
- -i features/org.eclipse.jdt/build.xml
-
- sed -e "/id=\"org.eclipse.jdt.apt.pluggable.core\"/,/<plugin/d" \
- -e "/id=\"org.eclipse.jdt.compiler.apt\"/,/<plugin/d" \
- -e "/id=\"org.eclipse.jdt.compiler.tool\"/,/<plugin/d" \
- -i features/org.eclipse.jdt/feature.xml
-
- sed -e "/dir=\"plugins\/org.eclipse.jdt.apt.pluggable.core\"/d" \
- -e "/dir=\"plugins\/org.eclipse.jdt.compiler.apt/d" \
- -e "/dir=\"plugins\/org.eclipse.jdt.compiler.tool\"/d" \
- -e "/value=\"org.eclipse.jdt.apt.pluggable.core/,/eclipse.plugins/d" \
- -e "/value=\"org.eclipse.jdt.compiler.apt/,/eclipse.plugins/d" \
- -e "/value=\"org.eclipse.jdt.compiler.tool/,/eclipse.plugins/d" \
- -i assemble.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml
+ sed -r '/<ant .*\/org\.eclipse\.jdt\.(apt\.pluggable\.core|compiler\.(apt|tool))(\.source)?"/,/<\/ant>/d' \
+ -i features/org.eclipse.jdt{,.source}/build.xml || die
+ sed -r '/id="org\.eclipse\.jdt\.(apt\.pluggable\.core|compiler\.(apt|tool))"/,/<plugin /d' \
+ -i features/org.eclipse.jdt/feature.xml || die
+ sed -r '/id="org\.eclipse\.jdt\.(apt\.pluggable\.core|compiler\.(apt|tool))\.source"/d' \
+ -i features/org.eclipse.jdt.source/feature.xml || die
+ sed -r -e '/<customGather .*\/org\.eclipse\.jdt\.(apt\.pluggable\.core|compiler\.(apt|tool))(\.source)?"/d' \
+ -e '/value="org\.eclipse\.jdt\.(apt\.pluggable\.core|compiler\.(apt|tool))(\.source)?_/,/eclipse\.plugins/d' \
+ -i assemble.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml || die
fi
- epatch "${PATCHDIR}/eclipse-c-warning.patch"
+ # Miscellaneous patches.
epatch "${PATCHDIR}/eclipse_build-libs.diff"
- epatch "${PATCHDIR}/eclipse_buildfix-pde.diff"
-
- # JNI
- epatch "${FEDORA}/eclipse-libupdatebuild2.patch"
-
- # Generic releng plugins that can be used to build plugins
- # https://www.redhat.com/archives/fedora-devel-java-list/2006-April/msg00048.html
- pushd plugins/org.eclipse.pde.build > /dev/null
- # %patch53
- epatch "${FEDORA}/eclipse-pde.build-add-package-build.patch"
- sed -e "s:@eclipse_base@:${ECLIPSE_DIR}:g" \
- -i templates/package-build/build.properties
- popd > /dev/null
-
- # Following adds an additional classpath when building JSPs
- sed '/<path id="@dot\.classpath">/ a\
- <filelist dir="" files="${gentoo.jars}" />' \
- -i plugins/org.eclipse.help.webapp/build.xml
-
- # Following allows the doc USE flag to be honored
- sed -e '/<target name="generateJavadoc" depends="getJavadocPath"/ c\
- <target name="generateJavadoc" depends="getJavadocPath" if="gentoo.javadoc">' \
- -e '/<replace file="\${basedir}\/\${optionsFile}" token="@rt@" value="\${bootclasspath}/ c\
- <replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}:${gentoo.classpath}" />' \
- -i plugins/org.eclipse.platform.doc.isv/buildDoc.xml
-
- # This allows to compile osgi.util and osgi.service, and fixes IPluginDescriptor.class which is present compiled
- sed -e 's/<src path="\."/<src path="org"/' \
- -e '/<include name="org\/"\/>/d' \
- -e '/<subant antfile="\${customBuildCallbacks}" target="pre\.gather\.bin\.parts" failonerror="false" buildpath="\.">/ { n;n;n; a\
- <copy todir="${destination.temp.folder}/org.eclipse.osgi.services_3.1.200.v20071203" failonerror="true" overwrite="false"> \
- <fileset dir="${build.result.folder}/@dot"> \
- <include name="**"/> \
- </fileset> \
- </copy>
- }' \
- -i plugins/org.eclipse.osgi.services/build.xml
-
- sed -e 's/<src path="\."/<src path="org"/' \
- -e '/<include name="org\/"\/>/d' \
- -e '/<subant antfile="\${customBuildCallbacks}" target="pre\.gather\.bin\.parts" failonerror="false" buildpath="\.">/ { n;n;n; a\
- <copy todir="${destination.temp.folder}/org.eclipse.osgi.util_3.1.200.v20071203" failonerror="true" overwrite="false"> \
- <fileset dir="${build.result.folder}/@dot"> \
- <include name="**"/> \
- </fileset> \
- </copy>
- }' \
- -i plugins/org.eclipse.osgi.util/build.xml
-
- sed '/<mkdir dir="${temp\.folder}\/runtime_registry_compatibility\.jar\.bin"\/>/ a\
- <mkdir dir="classes"/> \
- <copy todir="classes" failonerror="true" overwrite="false"> \
- <fileset dir="${build.result.folder}/../org.eclipse.core.runtime/@dot/" includes="**/IPluginDescriptor.class" /> \
- </copy>' \
- -i plugins/org.eclipse.core.runtime.compatibility.registry/build.xml
-
- # This removes the copying operation for bundled jars
- sed -e "s/<copy.*com\.jcraft\.jsch_.*\/>//" \
- -e "s/<copy.*com\.ibm\.icu_.*\/>//" \
- -e "s/<copy.*org\.apache\.commons\.el_.*\/>//" \
- -e "s/<copy.*org\.apache\.commons\.logging_.*\/>//" \
- -e "s/<copy.*javax\.servlet\.jsp_.*\/>//" \
- -e "s/<copy.*javax\.servlet_.*\/>//" \
- -e "s/<copy.*org\.apache\.lucene_.*\/>//" \
- -e "s/<copy.*org\.apache\.lucene\.analysis_.*\/>//" \
- -i package.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml
+ epatch "${PATCHDIR}/eclipse-c-warning.patch"
+
+ # JNI.
+ sed -i '/value="x86"/d' plugins/org.eclipse.update.core.linux/src/build.xml || die
+
+ # Following adds an additional classpath when building JSPs.
+ sed -i '/<path id="@dot\.classpath".*/a<pathelement path="${gentoo.classpath}" />' \
+ plugins/org.eclipse.help.webapp/build{,JSPs}.xml || die
+
+ # No warnings. Java5. Direct output to stdout.
+ find -type f -name '*.xml' -exec \
+ sed -r -e 's:"compilerArg" value=":\0-nowarn :g' \
+ -e 's:(<property name="javac(Source|Target)" value=)"1.[0-4]":\1"1.5":g' \
+ -e 's:output="[^"]+\.(txt|log)"::g' -i {} \; || die
+
+ # JDK home and CFLAGS.
+ sed -r -e "s:^(JAVA_HOME ?=).*:\1 $(java-config --jdk-home):" -e "s:^(OPT_FLAGS ?=).*:\0 ${CFLAGS}:" \
+ -i plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile || die "sed Makefile failed"
+
+ # Don't build plugins for other archs or GUI toolkits. Don't gather their sources either.
+ sed -r -e '/<ant .*\.(aix|carbon|hpux|macosx|motif|qnx|solaris|win32)[".]/,/<\/ant>/d' \
+ -e '/<ant .*\/org\.eclipse\.swt\..+(\.source)?"/,/<\/ant>/d' \
+ -i features/org.eclipse.{platform,rcp}{,.source}/build.xml || die
+
+ if ! use doc ; then
+ # Don't reference the docs. Slightly evil but it works.
+ sed -r '/<plugin/{:x;/id="[^"]*\.doc\./{:y;/\/>/d;N;by};/\/>/b;N;bx}' \
+ -i features/*/feature.xml || die
+
+ # Don't install the docs.
+ sed -r '/<customGather .*\.doc\./d' \
+ -i assemble.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml || die
+
+ # Don't build the docs.
+ sed -i '/<antcall .*\btarget="build.doc.plugins"/d' build.xml || die
+ sed -i '/<ant .*\/.*\.doc\./,/<\/ant>/d' features/*/build.xml || die
+
+ # Don't reference the doc plugins in the sources. These feature.xml files
+ # thankfully have their plugins on one line. Let's hope they stay that way.
+ sed -r '/<plugin id="[^"]*\.doc\./d' \
+ -i features/*.source/feature.xml || die
+ fi
+
+ if ! use source ; then
+ # Don't reference the sources. Slightly evil but it works.
+ sed -r '/<includes/{:x;/id="[^"]*\.source"/{:y;/\/>/d;N;by};/\/>/b;N;bx}' \
+ -i features/org.eclipse.sdk/feature.xml || die
+
+ # Don't install the sources.
+ sed -r '/<(copy|customGather) .*\.source/d' \
+ -i {assemble,package}.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml || die
+ fi
+
+ # In 3.4.1, bootclasspath was removed from here. Not sure why.
+ sed -r '/\bname="bundleBootClasspath"/s:value=":\0${bootclasspath};:' \
+ -i plugins/org.eclipse.osgi/build.xml || die
}
remove-bundled-stuff() {
- # Remove pre-built eclipse binaries
- find "${S}" -type f -name eclipse | xargs rm
- # ... .so libraries
- find "${S}" -type f -name '*.so' | xargs rm
- # ... .jar files
- pushd plugins/ >/dev/null
- rm org.eclipse.osgi/osgi/osgi*.jar \
- org.eclipse.osgi/supplement/osgi/osgi.jar \
- org.eclipse.swt/extra_jars/exceptions.jar
-
- rm -rf org.apache.ant_*/*
- rm org.apache.commons.el_*.jar org.apache.commons.logging_*.jar \
- com.jcraft.jsch_*.jar com.ibm.icu_*.jar org.junit_*/*.jar \
- org.junit4*/*.jar javax.servlet.jsp_*.jar javax.servlet_*.jar \
- org.apache.lucene_*.jar org.apache.lucene.analysis_*.jar
-
- # Remove bundled classes
- rm -rf org.eclipse.osgi.services/org
- unzip -q org.eclipse.osgi.services/src.zip -d org.eclipse.osgi.services/
- rm -rf org.eclipse.osgi.util/org
- unzip -q org.eclipse.osgi.util/src.zip -d org.eclipse.osgi.util/
-
- rm -rf org.eclipse.jdt.core/scripts/*.class
- rm -rf org.eclipse.core.runtime.compatibility.registry/classes
+ local x
+ pushd plugins >/dev/null
+
+ # Remove pre-built binaries.
+ find "${S}/features/org.eclipse.equinox.executable" -type f -name eclipse -delete || die
+ # ..and libraries.
+ find "${S}" -type f -name '*.so' -delete || die
+ # ..and JAR files.
+ rm -f org.eclipse.osgi/{,supplement}/osgi/osgi*.jar \
+ org.eclipse.swt/extra_jars/exceptions.jar || die
+ # ..and classes.
+ rm -rf org.eclipse.jdt.core/scripts/*.class \
+ org.eclipse.osgi.{services,util}/org || die
+
+ # Unpack zipped sources for removed classes. If we unpack the sources to
+ # src like the other plugins, the build order seems to change and things
+ # break. Very bizarre. Consequently we have to adjust build.xml to
+ # install the classes and not the sources. Ugly but it works.
+ for x in services util ; do
+ unzip -q org.eclipse.osgi.${x}/src.zip -d org.eclipse.osgi.${x}/ || die
+ x=org.eclipse.osgi.${x}/build.xml
+ { rm ${x} && awk '/<target .*name="gather\.bin\.parts"/ { inside = 1 } { if (inside) { if ($0 ~ /"org\/"/) next; \
+ if ($0 ~ /<\/fileset>/) { print; print "<fileset dir=\"${basedir}/@dot/\" includes=\"org/\"/>"; inside = 0; next } } } { print }' > ${x}; } < ${x} || die
+ done
+
+ # This prebuilt class actually comes from another plugin that will be
+ # built so we can just symlink to that.
+ ln -snf "${S}"/plugins/org.eclipse.core.runtime/@dot/org/eclipse/core/runtime/IPluginDescriptor.class \
+ org.eclipse.core.runtime.compatibility.registry/classes/org/eclipse/core/runtime/IPluginDescriptor.class || die
+
+ # Reset the list of system packages to use when building.
+ EANT_GENTOO_CLASSPATH="swt:${SLOT} cldc-api:1.1"
+
+ unbundle-jar org.apache.commons.el commons-el
+ unbundle-jar org.apache.commons.logging commons-logging
+ unbundle-jar com.jcraft.jsch jsch
+ unbundle-jar com.ibm.icu icu4j
+ unbundle-jar javax.servlet tomcat-servlet-api:2.4
+ unbundle-jar javax.servlet.jsp tomcat-servlet-api:2.4
+ unbundle-jar org.apache.lucene lucene:1.9
+ unbundle-jar org.apache.lucene.analysis lucene-analyzers:1.9
+ unbundle-jar org.objectweb.asm asm:3
+ unbundle-jar org.sat4j.core sat4j-core:2
+ unbundle-jar org.sat4j.pb sat4j-pseudo:2
+
+ # Make the junit4 case easier.
+ ln -snf org.junit4 org.junit4_ || die
+
+ unbundle-dir org.apache.ant ant-core,ant-nodeps lib
+ unbundle-dir org.junit junit .
+ unbundle-dir org.junit4 junit-4 .
+
+ # Don't include sources for junit4.
+ sed -i '/junitsrc/d' org.junit4/customBuildCallbacks.xml || die
+
+ # Unbundle SWT and make @dot directory to keep build happy.
+ ${BUILDPARSER} -i Bundle-ClassPath "external:$(java-pkg_getjars swt-${SLOT})" org.eclipse.swt.gtk.linux.${eclipsearch}/META-INF/MANIFEST.MF || die
+ mkdir -p org.eclipse.swt.gtk.linux.${eclipsearch}/@dot || die
+ remove-plugin-sources org.eclipse.swt.gtk.linux.${eclipsearch}
+
+ # Mark the SWT plugins as unpacked. More evilness that works.
+ sed -r '/<plugin/{:x;/id="org\.eclipse\.swt\./{:y;/\/>/s/unpack="[^"]*"/unpack="true"/;t;N;by};/\/>/b;N;bx}' \
+ -i "${S}"/features/org.eclipse.rcp/feature.xml || die
+
+ # Prevent the SWT plugin from being JAR'd.
+ sed -r '/<param .*\bvalue="org.eclipse.swt.gtk.linux.'"${eclipsearch}"'_/d' \
+ -i "${S}"/assemble.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml || die
+
popd >/dev/null
}
+
+# Unbundle a directory plugin by removing its JAR files and replacing them
+# with symlinks. We don't modify the manifest because Eclipse's antRunner
+# doesn't seem to like external JARs.
+unbundle-dir() {
+ ebegin "Unbundling $1"
+ remove-plugin-sources $1
+
+ # Delete the bundled JARs and signing files.
+ rm -f "$1"_*/$3/*.jar "$1"_*/META-INF/ECLIPSE.{RSA,SF} || die
+
+ # Replace the bundled JARs with symlinks.
+ java-pkg_jar-from --into "$1"_*/$3 $2
+
+ eend 0
+}
+
+# Unbundle a JAR plugin by removing its class files and modifying its manifest
+# so that it points to external JARs instead. The plugin must remain unpacked
+# because OSGi cannot handle external JARs in packed plugins.
+unbundle-jar() {
+ ebegin "Unbundling $1"
+ remove-plugin-sources $1
+
+ # Find full plugin name and version.
+ local plugin=`echo $1_*`
+ plugin=${plugin%.jar}
+
+ # Make directory to replace JAR.
+ mkdir -p "${plugin}" || die
+ cd "${plugin}" || die
+ rm -rf * || die
+
+ # Extract what we need from the existing JAR.
+ `java-config -j` xf "../${plugin}.jar" META-INF/MANIFEST.MF plugin.{properties,xml} || die
+
+ # Apply our new classpath.
+ local classpath=$(java-pkg_getjars $2)
+ EANT_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} $2"
+ ${BUILDPARSER} -i Bundle-ClassPath "external:${classpath//:/,external:}" META-INF/MANIFEST.MF || die
+
+ # The javadoc options are stored in text files and so rewriting the classpath in
+ # the ant build files has no effect. Instead, we replace plugins paths with the
+ # paths to their external JARs. Passing gentoo.classpath is too RAM-intensive.
+ sed -i -r "s:^;\.\.\/${1//./\.}[_/].*\.jar$:;${classpath//:/\:}:" ../*/*Options.txt || die
+
+ # Delete unneeded manifest entries.
+ sed -i -r "/^Name:|^SHA1-Digest:/d" META-INF/MANIFEST.MF || die
+
+ # This plugin is now unpacked. More evilness that works.
+ sed -r '/<plugin/{:x;/id="'"${1//./\.}"'"/{:y;/\/>/s/unpack="[^"]*"/unpack="true"/;t;N;by};/\/>/b;N;bx}' \
+ -i "${S}"/features/*/feature.xml || die
+
+ # Copy the whole directory instead of just a JAR.
+ sed -r "/<copy .*\/${1//./\.}/{s/<copy\b/<copydir/;s/\.jar//g;s/\bfile=/src=/;s/\btofile=/dest=/}" \
+ -i "${S}"/package.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml || die
+
+ # Delete JAR and return to previous directory.
+ rm -f "../${plugin}.jar" || die
+ cd .. || die
+
+ eend 0
+}
+
+remove-plugin-sources() {
+ use source || return
+
+ # Don't reference the sources for this plugin. These feature.xml files
+ # thankfully have their plugins on one line. Let's hope they stay that way.
+ sed -r '/<plugin id="'"${1//./\.}"'\.source"/d' \
+ -i "${S}/features"/*.source/feature.xml || die
+
+ # Don't try to install the sources either.
+ sed -r '/<(copy|copydir|customGather) .*\/'"${1//./\.}"'\.source/d' \
+ -i "${S}"/{assemble,package}.org.eclipse.sdk.linux.gtk.${eclipsearch}.xml || die
+}
diff --git a/dev-util/eclipse-sdk/files/3.4/eclipse-3.4 b/dev-util/eclipse-sdk/files/3.4/eclipse-3.4
index 30beb77..1afe898 100644
--- a/dev-util/eclipse-sdk/files/3.4/eclipse-3.4
+++ b/dev-util/eclipse-sdk/files/3.4/eclipse-3.4
@@ -11,13 +11,13 @@
SLOT="3.4"
-[ -f "/etc/eclipserc" ] && source "/etc/eclipserc"
-[ -f "$HOME/.gentoo/.eclipserc" ] && source "$HOME/.gentoo/.eclipserc"
+[ -f "/etc/eclipserc-${SLOT}" ] && source "/etc/eclipserc-${SLOT}"
+[ -f "$HOME/gentoo/.eclipserc" ] && source "$HOME/gentoo/.eclipserc"
ECLIPSE_HOME=${ECLIPSE_HOME:="/usr/lib/eclipse-${SLOT}"}
ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse"
-if [ ! -x ${ECLIPSE_BIN} ] ; then
+if [ ! -x "${ECLIPSE_BIN}" ] ; then
echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr
exit -1
fi
@@ -37,4 +37,7 @@ eval $(gjl --package "swt-${SLOT}" --get-args)
[ -n "${ECLIPSE_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"
[ -n "${ECLIPSE_MAX_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"
-exec ${ECLIPSE_BIN} -vm $(java-config --java) "$@" "${ECLIPSE_USER_ARGS}" -vmargs ${VM_ARGS} \ No newline at end of file
+# Fix for JRE 1.5.
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib
+
+exec "${ECLIPSE_BIN}" -vm $(java-config --java) "$@" "${ECLIPSE_USER_ARGS}" -vmargs ${VM_ARGS}
diff --git a/dev-util/eclipse-sdk/files/3.4/eclipserc-3.4 b/dev-util/eclipse-sdk/files/3.4/eclipserc-3.4
new file mode 100644
index 0000000..703b649
--- /dev/null
+++ b/dev-util/eclipse-sdk/files/3.4/eclipserc-3.4
@@ -0,0 +1,20 @@
+# This file specifies some initial Eclipse settings, like memory allowed
+# These settings only affect Eclipse startup and overall configuration
+# Main Eclipse configuration should be done within Eclipse (with the GUI)
+
+# Following variables controls the minimal and maximum amounts of memory
+# allocated to Eclipse (respectively).
+# Increase those numbers if you get OutOfMemory errors.
+
+ECLIPSE_XMS=128m
+ECLIPSE_XMX=256m
+
+# Following variables controls the minimal and maximum amounts of memory
+# allocated to the permanent generation space.
+# This space contains data related to all classes.
+# Thus, if you use a lot of Eclipse plugins, it is recommended to uncomment
+# these variables and even increase it, if you have enough RAM.
+# Else you will get crashes related to OutOfMemory in PermGen exceptions.
+
+#ECLIPSE_PERMSIZE=64m
+#ECLIPSE_MAX_PERMSIZE=128m \ No newline at end of file