Added ebuilds for eclipse-sdk 3.5 from gentoo-bugs

This commit is contained in:
2009-11-01 19:56:40 +00:00
parent ab73eab1c9
commit 648575cae5
27 changed files with 2025 additions and 0 deletions

5
dev-java/icu4j/Manifest Normal file
View File

@@ -0,0 +1,5 @@
AUX icu4j-4.0.1.1-manifest 793 RMD160 c7607a2515b0e746cc532a8034c286fe644e8298 SHA1 a0f2ec39f4f2df7a4370935c8afed00a8669ea77 SHA256 e19c4598e26fc89555031317b87431680d618f565976f444da8e974318a8f1b3
DIST icu4j-4_0_1_1-docs.jar 1553089 RMD160 e8304c27dc363ae99d2ddb6a0624e869c7c3a940 SHA1 167fcb43d5cd4059cd9e632720698e1ff676807f SHA256 44319c329b628c5e14e74eeb285ddb876c34e3529b06c69abd9a54799490cd8e
DIST icu4j-4_0_1_1-src.jar 15138020 RMD160 d6cd5163ebbf7bcb2bdfd8f65f83e9ec390c290d SHA1 daa3467983e6ecd735cd67e5920170702375bc7d SHA256 9d5484ccb3ad6849b6d3986ee2cf146984cbbb8adb2349dc79f6a4e006bc417e
EBUILD icu4j-4.0.1.1.ebuild 2253 RMD160 1a6878131be08f6f835319078d51bc92a164aedb SHA1 1c497b6f3aa818ea530eaead2c05992027e48d53 SHA256 17f3c5a3c8f14e02763f3639758a6709d6f02c9bfa18b8dde689292d9dc74ff8
MISC metadata.xml 158 RMD160 493079b5fb71d66863beea1b023901c90ba81be5 SHA1 77cd509a8b3c377b9a24480b48a5d5481b7874f1 SHA256 ea882ceccfd160b16cf7e79de423bdcc12b3fa000f124491a6df36f5783894fb

View File

@@ -0,0 +1,21 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-Vendor: %vendorName
Bundle-SymbolicName: com.ibm.icu; singleton:=true
Bundle-Version: determinedByPortage
Bundle-Localization: plugin
Export-Package: com.ibm.icu.lang;version="4.0.1",
com.ibm.icu.math;version="4.0.1",
com.ibm.icu.text;version="4.0.1",
com.ibm.icu.util;version="4.0.1",
com.ibm.icu.impl;x-internal:=true,
com.ibm.icu.impl.data;x-internal:=true,
com.ibm.icu.impl.data.icudt40b;x-internal:=true,
com.ibm.icu.impl.data.icudt40b.brkitr;x-internal:=true,
com.ibm.icu.impl.data.icudt40b.coll;x-internal:=true,
com.ibm.icu.impl.data.icudt40b.rbnf;x-internal:=true,
com.ibm.icu.impl.data.icudt40b.translit;x-internal:=true
Eclipse-LazyStart: true
Bundle-ClassPath: .
Eclipse-ExtensibleAPI: true

View File

@@ -0,0 +1,73 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/icu4j/icu4j-4.0.ebuild,v 1.2 2008/11/24 10:21:50 caster Exp $
# We currently download the Javadoc documentation.
# It could optionally be built using the Ant build file.
# testdata.jar and icudata.jar do not contain *.class files but *.res files
# These *.res data files are needed to built the final jar
# They do not need to be installed however as they will already be present in icu4j.jar
JAVA_PKG_IUSE="doc test source"
inherit java-pkg-2 java-ant-2 java-osgi
DESCRIPTION="ICU4J is a set of Java libraries providing Unicode and Globalization support."
MY_PV=${PV//./_}
SRC_URI="http://download.icu-project.org/files/${PN}/${PV}/${PN}-${MY_PV}-src.jar
doc? ( http://download.icu-project.org/files/${PN}/${PV}/${PN}-${MY_PV}-docs.jar )"
HOMEPAGE="http://www.icu-project.org/"
LICENSE="icu"
SLOT="4"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND=">=virtual/jre-1.4"
# build.xml does file version detection that fails for 1.7
# http://bugs.gentoo.org/show_bug.cgi?id=213555
DEPEND="test? ( =virtual/jdk-1.6* )
!test? ( || ( =virtual/jdk-1.6* =virtual/jdk-1.5* =virtual/jdk-1.4* ) )
app-arch/unzip"
RESTRICT="ia64? ( test )
x86-fbsd? ( test )"
JAVA_PKG_WANT_SOURCE="1.4"
JAVA_PKG_WANT_TARGET="1.4"
S="${WORKDIR}"
src_unpack() {
jar -xf "${DISTDIR}/${PN}-${MY_PV}-src.jar" || die "Failed to unpack"
if use doc; then
mkdir docs; cd docs
jar -xf "${DISTDIR}/${PN}-${MY_PV}-docs.jar" || die "Failed to unpack docs"
fi
}
src_compile() {
# Classes extending CharsetICU not implementing Comparable
# Breaks with ecj on jdk 1.5+, javac doesn't mind - Sun's hack?
# Restricting to javac (didn't even care to try jikes) is better
# than forcing 1.4
java-pkg_force-compiler javac
eant jar || die "Compile failed"
}
src_install() {
java-osgi_newjar-fromfile "${PN}.jar" "${FILESDIR}/icu4j-${PV}-manifest" \
"International Components for Unicode for Java (ICU4J)"
java-pkg_dojar "${PN}-charsets.jar"
use doc && dohtml -r readme.html docs/*
use source && java-pkg_dosrc src/*
}
# Tests only work with JDK-1.6, severe out of memory problems appear with 1.5
src_test() {
eant check
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>java</herd>
</pkgmetadata>

View File

@@ -0,0 +1,4 @@
DIST build-2.4.xml 9458 RMD160 a42173b5390cbf8027d180eb8d857cbae124e29b SHA1 70ce855116615e1e13283e00dd2e20eeae2d5447 SHA256 f0d05ae4fa0485b0dacc3627120b6d7053e24356127a12733a95f85f30bca2d8
DIST sat4j-core-v20090520.zip 362980 RMD160 23354d813052704209266f5954c45ccdfb6fee1e SHA1 102a118034faf4c7643d4675e729ca31e44dbfd2 SHA256 0022e009b76ed8ba861ccb2a5f8bad8ac534e3ad50ef0ef3e9e7aaa2d5185397
EBUILD sat4j-core-2.1.ebuild 1340 RMD160 0bb133d4236e3638e47b772cb32b47a048b59ba6 SHA1 a85316c155173c605b975bcdeec97e027346910f SHA256 94e1bdc7e8122882ad98d5fb40d4c7effb8d79b5d85bf68a45fd128ce83ba7f4
MISC metadata.xml 159 RMD160 5259d4be0ca7b74c28e711d45a289def9aeadbd9 SHA1 c4ec40cd8f19e0d780a5133941bc50043be198cf SHA256 1c070a909e96d9d193f84ad9304d196febbe33b60a724cc4b0d20634bb82255b

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>java</herd>
</pkgmetadata>

View File

@@ -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="20090520"
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
}

View File

@@ -0,0 +1,4 @@
DIST build-2.4.xml 9458 RMD160 a42173b5390cbf8027d180eb8d857cbae124e29b SHA1 70ce855116615e1e13283e00dd2e20eeae2d5447 SHA256 f0d05ae4fa0485b0dacc3627120b6d7053e24356127a12733a95f85f30bca2d8
DIST sat4j-pb-v20090520.zip 208044 RMD160 edf833e16a21e6f26b34b545a7db9e2118a7b16d SHA1 78d2516c564d8b5f9a0ba3d97f3a9f244ceb7227 SHA256 89f201e0fc365c7836fa3ab79182083a36f9c340a908fd8acf732f77ae2ccf83
EBUILD sat4j-pseudo-2.1.ebuild 1606 RMD160 cb4d775b9e47cfd706731ef7be6dea9008ac5df4 SHA1 dd49988f01eec98c10953194c857280e751eafcf SHA256 f4ddbc9ebc26b267992bcef06e20a2e2e75e947a49bee768b2afe565d5403c3d
MISC metadata.xml 159 RMD160 5259d4be0ca7b74c28e711d45a289def9aeadbd9 SHA1 c4ec40cd8f19e0d780a5133941bc50043be198cf SHA256 1c070a909e96d9d193f84ad9304d196febbe33b60a724cc4b0d20634bb82255b

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>java</herd>
</pkgmetadata>

View File

@@ -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="20090520"
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
}

13
dev-java/swt/Manifest Normal file
View File

@@ -0,0 +1,13 @@
AUX as-needed-and-flag-fixes.patch 7229 RMD160 dcd699249c0a1ecfeecc2f31acf584b6ee0501e1 SHA1 6faadbf3f7a5182f0cd950210794e7634e135e70 SHA256 016a810cc9649235fcab73467a056240b712d5557663b7756d4de64c939256ee
AUX build.xml 458 RMD160 a8eb69b723bdd8e5e25df8df26d28f4ea134fa87 SHA1 3d5befea18ba4c5bc20da80ed067488a16be6585 SHA256 bbac0fb3bf9454b81e6d27dae4ebb9538cf62f2be17adcf169538749230dc8e7
AUX swt-3.3-callback-pointer-dereferencing.patch 882 RMD160 dbdd182d3c5093a0a26994fc6cde4a3e597091ea SHA1 d703af14ca2c405304583fead0f06946c1f26a12 SHA256 27c4120bdcc4bb8f5a65d7c85343ee185c6270366c9f9a3cfc530838b5378cab
AUX swt-3.4.1-manifest 753 RMD160 d4bbe6e7a8f60da7fd02cc910d4eb68b5b60a6ba SHA1 6c58f31fe36e396ec88a1248d3c3b27dbf453289 SHA256 bd0023f4246114cf1119caa7187f65c5bb21966cb2fef8c430b6851a8095bf34
DIST swt-3.4.2-gtk-linux-ppc.zip 4632315 RMD160 208c5326f120aafcf45fb757f13d19a5192b2d32 SHA1 595f88f8782dec34e209e975c7b1f1ab04d25aca SHA256 b7322e096064e627fb6046a156fcfa0a30c4777ddf7084f2878fc0f4933a75c4
DIST swt-3.4.2-gtk-linux-x86.zip 4564830 RMD160 a7f47213d1ee45cc58ad0df0042be1cf6f39e969 SHA1 910e8796b459ea73e9bf8876508df42c4dd42dc5 SHA256 30c8c545faabae331420a6c37194470a4f74f508eab4e0463c65953d09cde6eb
DIST swt-3.4.2-gtk-linux-x86_64.zip 4747527 RMD160 799bbff1e7152b3e229ca6162f801103c5153f02 SHA1 e4062f61115ac12df45ac4cde8ffc302b3813992 SHA256 e6d3e3fb112edda5890bf5a6c237ebd733b01c1e4d7657c811e742602b9a1f09
DIST swt-3.5.1-gtk-linux-ppc.zip 4945691 RMD160 2bf8cecad4297c66d98cd1d6dd80a6a60429779c SHA1 59d1e8434e41b299b8c2ab4df557af4ebb64dcb6 SHA256 574d1f1f8f8a70f0f9df0d95d63477ec7fe8921e122b7d00b6ad7ae2c577d153
DIST swt-3.5.1-gtk-linux-x86.zip 4879027 RMD160 2b0723130751a700bbe14004587a5a4f801a07df SHA1 654744a3a2bc7eadfd807d2f1238580ac31571ee SHA256 83d1c457129c6722669ce9d7b4b1cb3511273e069c0dab5ae767b7d1c76e5815
DIST swt-3.5.1-gtk-linux-x86_64.zip 5067404 RMD160 e2468e864ff5da4d41834125f34adb616d4dfb41 SHA1 a2fadf02fad5553c37afb219daebbb4ccca2d6c4 SHA256 99bf7403e4f49ae56c073be582478a1bc4d9f79583f02e0d7a021f8ee71576ce
EBUILD swt-3.4.2.ebuild 5843 RMD160 1e1cd6e163364aa47d19e732fd122a90185d1e79 SHA1 da5b1ddf6563bfd76ede28d2688d61b27650b50e SHA256 e045c3c262a712550c746ab4c0fd2eba94cc029ea3a8e32489c3b5edab5e455e
EBUILD swt-3.5.1.ebuild 5902 RMD160 907e8862851758c1264abb96cd76995383a7c2ed SHA1 c5716060ec1fe6a3e7e363619b379d028827d7e7 SHA256 ba025ecc2c58e474c19bd30d39f45ba081e295d6b406da0265005c1e4282aaae
MISC metadata.xml 159 RMD160 5259d4be0ca7b74c28e711d45a289def9aeadbd9 SHA1 c4ec40cd8f19e0d780a5133941bc50043be198cf SHA256 1c070a909e96d9d193f84ad9304d196febbe33b60a724cc4b0d20634bb82255b

View File

@@ -0,0 +1,238 @@
--- make_linux.mak 2009-05-24 18:38:39.000000000 +0300
+++ make_linux.mak.fixed 2009-05-24 19:38:51.000000000 +0300
@@ -64,7 +64,7 @@
# Uncomment for Native Stats tool
#NATIVE_STATS = -DNATIVE_STATS
-MOZILLACFLAGS = -O \
+MOZILLACFLAGS = $(CXXFLAGS) \
-DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DMOZILLA_STRICT_API=1 \
@@ -92,15 +92,14 @@
XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o
GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o
-CFLAGS = -O -Wall \
- -DSWT_VERSION=$(SWT_VERSION) \
+CFLAGS += -DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DLINUX -DGTK \
-I$(JAVA_HOME)/include \
-I$(JAVA_HOME)/include/linux \
-fPIC \
${SWT_PTR_CFLAGS}
-LIBS = -shared -fPIC
+LIBS = -shared -fPIC $(LDFLAGS)
ifndef NO_STRIP
AWT_LIBS := $(AWT_LIBS) -s
@@ -122,7 +121,7 @@
$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
$(SWTPI_LIB): $(SWTPI_OBJECTS)
- $(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+ $(CC) $(LIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
swt.o: swt.c swt.h
$(CC) $(CFLAGS) -c swt.c
@@ -141,7 +140,7 @@
make_cairo: $(CAIRO_LIB)
$(CAIRO_LIB): $(CAIRO_OBJECTS)
- $(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+ $(CC) $(LIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
cairo.o: cairo.c cairo.h swt.h
$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -157,7 +156,7 @@
make_cde: $(CDE_LIB)
$(CDE_LIB): $(CDE_OBJECTS)
- $(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+ $(CC) $(LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
#
# AWT lib
@@ -165,7 +164,7 @@
make_awt:$(AWT_LIB)
$(AWT_LIB): $(AWT_OBJECTS)
- $(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+ $(CC) $(LDFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
#
# Atk lib
@@ -173,7 +172,7 @@
make_atk: $(ATK_LIB)
$(ATK_LIB): $(ATK_OBJECTS)
- $(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+ $(CC) $(LIBS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
atk.o: atk.c atk.h
$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -190,7 +189,7 @@
make_gnome: $(GNOME_LIB)
$(GNOME_LIB): $(GNOME_OBJECTS)
- $(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+ $(CC) $(LIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
gnome.o: gnome.c
$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -207,7 +206,7 @@
make_mozilla:$(MOZILLA_LIB)
$(MOZILLA_LIB): $(MOZILLA_OBJECTS)
- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
xpcom.o: xpcom.cpp
$(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -227,7 +226,7 @@
make_xulrunner:$(XULRUNNER_LIB)
$(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcomxul.o: xpcom.cpp
$(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -247,7 +246,7 @@
make_xpcominit:$(XPCOMINIT_LIB)
$(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcominit.o: xpcominit.cpp
$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -264,7 +263,7 @@
make_glx: $(GLX_LIB)
$(GLX_LIB): $(GLX_OBJECTS)
- $(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+ $(CC) $(LIBS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
glx.o: glx.c
$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
--- make_freebsd.mak 2009-05-24 20:09:55.000000000 +0300
+++ make_freebsd.mak.fixed 2009-05-24 20:15:03.000000000 +0300
@@ -64,7 +64,7 @@
# Uncomment for Native Stats tool
#NATIVE_STATS = -DNATIVE_STATS
-MOZILLACFLAGS = -O \
+MOZILLACFLAGS = $(CXXFLAGS) \
-DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DMOZILLA_STRICT_API=1 \
@@ -91,15 +91,14 @@
XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o
GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o
-CFLAGS = -O -Wall \
- -DSWT_VERSION=$(SWT_VERSION) \
+CFLAGS += -DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DFREEBSD -DGTK \
-I$(JAVA_HOME)/include \
-I$(JAVA_HOME)/include/freebsd \
-fPIC \
${SWT_PTR_CFLAGS}
-LIBS = -shared -fPIC
+LIBS = -shared -fPIC $(LDFLAGS)
ifndef NO_STRIP
AWT_LIBS := $(AWT_LIBS) -s
@@ -121,7 +120,7 @@
$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
$(SWTPI_LIB): $(SWTPI_OBJECTS)
- $(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+ $(CC) $(LIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
swt.o: swt.c swt.h
$(CC) $(CFLAGS) -c swt.c
@@ -140,7 +139,7 @@
make_cairo: $(CAIRO_LIB)
$(CAIRO_LIB): $(CAIRO_OBJECTS)
- $(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+ $(CC) $(LIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
cairo.o: cairo.c cairo.h swt.h
$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -156,7 +155,7 @@
make_cde: $(CDE_LIB)
$(CDE_LIB): $(CDE_OBJECTS)
- $(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+ $(CC) $(LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
#
# AWT lib
@@ -164,7 +163,7 @@
make_awt:$(AWT_LIB)
$(AWT_LIB): $(AWT_OBJECTS)
- $(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+ $(CC) $(LDFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
#
# Atk lib
@@ -172,7 +171,7 @@
make_atk: $(ATK_LIB)
$(ATK_LIB): $(ATK_OBJECTS)
- $(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+ $(CC) $(LIBS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
atk.o: atk.c atk.h
$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -189,7 +188,7 @@
make_gnome: $(GNOME_LIB)
$(GNOME_LIB): $(GNOME_OBJECTS)
- $(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+ $(CC) $(LIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
gnome.o: gnome.c
$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -206,7 +205,7 @@
make_mozilla:$(MOZILLA_LIB)
$(MOZILLA_LIB): $(MOZILLA_OBJECTS)
- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
xpcom.o: xpcom.cpp
$(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -226,7 +225,7 @@
make_xulrunner:$(XULRUNNER_LIB)
$(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcomxul.o: xpcom.cpp
$(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -252,7 +251,7 @@
make_xpcominit:$(XPCOMINIT_LIB)
$(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcominit.o: xpcominit.cpp
$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -269,7 +268,7 @@
make_glx: $(GLX_LIB)
$(GLX_LIB): $(GLX_OBJECTS)
- $(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+ $(CC) $(LIBS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
glx.o: glx.c
$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c

View File

@@ -0,0 +1,17 @@
<project name="SWT" default="jar" basedir=".">
<property name="src" location="."/>
<property name="build" location="build"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="Compile the SWT toolset">
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="jar">
<jar destfile="swt.jar" basedir="${build}"/>
</target>
</project>

View File

@@ -0,0 +1,23 @@
# patch from gcj-overlay, not sure if by geki himself
# removes QA warning about strict-aliasing
--- callback.c.orig 2006-12-12 17:25:26.000000000 +0100
+++ callback.c 2006-12-12 18:11:34.000000000 +0100
@@ -250,12 +250,16 @@
#ifdef JNI_VERSION_1_2
if (IS_JNI_1_2) {
- (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2);
+ /* http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html */
+ /* jint GetEnv(JavaVM *vm, void **env, jint version); */
+ (*jvm)->GetEnv(jvm, (void *)&env, JNI_VERSION_1_2);
}
#endif
if (env == NULL) {
- (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL);
+ /* http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html */
+ /* jint AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args); */
+ (*jvm)->AttachCurrentThread(jvm, (void *)&env, NULL);
if (IS_JNI_1_2) detach = 1;
}

View File

@@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
Bundle-SymbolicName: org.eclipse.swt.gtk.linux.SWT_ARCH; singleton:=true
Bundle-Version: 3.4.1
Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=SWT_ARCH))
Export-Package: org.eclipse.swt.internal.accessibility.gtk; x-internal:=true,
org.eclipse.swt.internal.cairo; x-internal:=true,
org.eclipse.swt.internal.cde; x-internal:=true,
org.eclipse.swt.internal.gnome; x-internal:=true,
org.eclipse.swt.internal.gtk; x-internal:=true,
org.eclipse.swt.internal.mozilla; x-internal:=true,
org.eclipse.swt.internal.opengl.glx; x-internal:=true

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>java</herd>
</pkgmetadata>

View File

@@ -0,0 +1,204 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4-r2.ebuild,v 1.1 2008/09/14 00:02:03 caster Exp $
EAPI="1"
inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
MY_PV="${PV/_pre/M}"
MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-200902111700"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="GTK based SWT Library"
HOMEPAGE="http://www.eclipse.org/"
SRC_URI="x86? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
)
x86-fbsd? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
)
amd64? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
)
ppc? (
http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip
)
ppc64? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
)"
SLOT="3.4"
LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
KEYWORDS="~amd64"
IUSE="cairo gnome opengl xulrunner"
COMMON=">=dev-libs/glib-2.6
>=x11-libs/gtk+-2.6.8
>=dev-libs/atk-1.10.2
cairo? ( >=x11-libs/cairo-1.4.14 )
gnome? (
=gnome-base/libgnome-2*
=gnome-base/gnome-vfs-2*
=gnome-base/libgnomeui-2*
)
xulrunner? ( net-libs/xulrunner:1.9 )
opengl? (
virtual/opengl
virtual/glu
)"
# Use a blocker to avoid file collisions when upgrading to the slotted version
# We cannot use slotmove, java packages are expected to be in /usr/share/PN-SLOT
# so this is the only way to prevent collisions
DEPEND=">=virtual/jdk-1.4
!=dev-java/swt-3.4*:3
app-arch/unzip
x11-libs/libX11
x11-libs/libXrender
x11-libs/libXt
x11-proto/xextproto
x11-proto/inputproto
${COMMON}"
RDEPEND=">=virtual/jre-1.4
x11-libs/libXtst
${COMMON}"
S="${WORKDIR}"
src_unpack() {
local DISTFILE=${A}
unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "Unable to extract distfile"
unpack "./src.zip"
# Cleanup the redirtied directory structure
rm -rf about_files/ || die
# Replace the build.xml to allow compilation without Eclipse tasks
cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml"
mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources"
# Apply all the patches, including arch-specific
# EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" epatch
sed -i "s/CFLAGS = -O -Wall/CFLAGS = ${CFLAGS} -Wall/" \
make_linux.mak || die "Failed to tweak make_linux.mak"
sed -i "s/MOZILLACFLAGS = -O/MOZILLACFLAGS = ${CXXFLAGS}/" \
make_linux.mak || die "Failed to tweak make_linux.mak"
# Kill some strict-aliasing warnings
epatch "${FILESDIR}/${PN}-3.3-callback-pointer-dereferencing.patch"
}
src_compile() {
# Drop jikes support as it seems to be unfriendly with SWT
java-pkg_filter-compiler jikes
local AWT_ARCH
local JAWTSO="libjawt.so"
if [[ $(tc-arch) == 'x86' ]] ; then
AWT_ARCH="i386"
elif [[ $(tc-arch) == 'ppc' ]] ; then
AWT_ARCH="ppc"
elif [[ $(tc-arch) == 'ppc64' ]] ; then
AWT_ARCH="ppc64"
else
AWT_ARCH="amd64"
fi
if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then
export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}"
elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then
export AWT_LIB_PATH="${JAVA_HOME}/jre/bin"
elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then
export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)"
else
eerror "${JAWTSO} not found in the JDK being used for compilation!"
die "cannot build AWT library"
fi
# Fix the pointer size for AMD64
[[ ${ARCH} == "amd64" || ${ARCH} == "ppc64" ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
local platform="linux"
use elibc_FreeBSD && platform="freebsd"
local make="emake -f make_${platform}.mak NO_STRIP=y"
einfo "Building AWT library"
${make} make_awt || die "Failed to build AWT support"
einfo "Building SWT library"
${make} make_swt || die "Failed to build SWT support"
einfo "Building JAVA-AT-SPI bridge"
${make} make_atk || die "Failed to build ATK support"
if use gnome ; then
einfo "Building GNOME VFS support"
${make} make_gnome || die "Failed to build GNOME VFS support"
fi
if use xulrunner ; then
einfo "Building the Mozilla component against xulrunner-1.9"
export MOZILLA_INCLUDES="$(pkg-config libxul --cflags)"
# the -R is a workaround for bug #234934
export MOZILLA_LIBS="-Wl,-R$(pkg-config libxul --variable=sdkdir) $(pkg-config libxul --libs)"
${make} make_mozilla || die "Failed to build Mozilla support"
# upstream ships libswt-xulrunner*.so even though the build.sh does not
# build it anymore... missing this file leads to another instance
# of bug #234934 so we build it too
einfo "Building the xulrunner component against xulrunner-1.9"
export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}"
export XULRUNNER_LIBS="${MOZILLA_LIBS}"
${make} make_xulrunner || die "Failed to build xulrunner support"
fi
if use cairo ; then
einfo "Building CAIRO support"
${make} make_cairo || die "Unable to build CAIRO support"
fi
if use opengl ; then
einfo "Building OpenGL component"
${make} make_glx || die "Unable to build OpenGL component"
fi
einfo "Building JNI libraries"
eant compile
einfo "Copying missing files"
cp -i "${S}/version.txt" "${S}/build/version.txt"
cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \
"${S}/build/org/eclipse/swt/internal/"
einfo "Packing JNI libraries"
eant jar
}
src_install() {
swtArch=${ARCH}
use amd64 && swtArch=x86_64
use x86-fbsd && swtArch=x86
sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-3.4.1-manifest" > "MANIFEST_TMP.MF"
java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0"
java-pkg_sointo /usr/$(get_libdir)
java-pkg_doso *.so
if use xulrunner; then
local gecko_dir="$(pkg-config libxul --variable=sdkdir)"
java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}"
fi
dohtml about.html || die
}

View File

@@ -0,0 +1,207 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.5.ebuild,v 1.2 2009/07/20 12:57:36 caster Exp $
EAPI=2
inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
MY_PV="${PV}"
MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-200909170800"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="GTK based SWT Library"
HOMEPAGE="http://www.eclipse.org/"
SRC_URI="x86? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
)
x86-fbsd? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
)
amd64? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
)
ppc? (
http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip
)
ppc64? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
)"
SLOT="3.5"
LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE="cairo gnome opengl xulrunner"
COMMON=">=dev-libs/glib-2.6
>=x11-libs/gtk+-2.6.8
>=dev-libs/atk-1.10.2
cairo? ( >=x11-libs/cairo-1.4.14 )
gnome? (
=gnome-base/libgnome-2*
=gnome-base/gnome-vfs-2*
=gnome-base/libgnomeui-2*
)
xulrunner? ( net-libs/xulrunner:1.9 )
opengl? (
virtual/opengl
virtual/glu
)"
# Use a blocker to avoid file collisions when upgrading to the slotted version
# We cannot use slotmove, java packages are expected to be in /usr/share/PN-SLOT
# so this is the only way to prevent collisions
DEPEND=">=virtual/jdk-1.4
app-arch/unzip
x11-libs/libX11
x11-libs/libXrender
x11-libs/libXt
x11-proto/xextproto
x11-proto/inputproto
dev-util/pkgconfig
${COMMON}"
RDEPEND=">=virtual/jre-1.4
x11-libs/libXtst
${COMMON}"
S="${WORKDIR}"
src_unpack() {
local DISTFILE=${A}
unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "Unable to extract distfile"
unpack "./src.zip"
# Cleanup the redirtied directory structure
rm -rf about_files/ || die
}
src_prepare() {
# Replace the build.xml to allow compilation without Eclipse tasks
cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml"
mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources"
# Fix Makefiles to respect flags and work with --as-needed
epatch "${FILESDIR}"/as-needed-and-flag-fixes.patch
}
src_compile() {
# Drop jikes support as it seems to be unfriendly with SWT
java-pkg_filter-compiler jikes
local AWT_ARCH
local JAWTSO="libjawt.so"
if [[ $(tc-arch) == 'x86' ]] ; then
AWT_ARCH="i386"
elif [[ $(tc-arch) == 'ppc' ]] ; then
AWT_ARCH="ppc"
elif [[ $(tc-arch) == 'ppc64' ]] ; then
AWT_ARCH="ppc64"
else
AWT_ARCH="amd64"
fi
if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then
export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}"
elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then
export AWT_LIB_PATH="${JAVA_HOME}/jre/bin"
elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then
export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)"
else
eerror "${JAWTSO} not found in the JDK being used for compilation!"
die "cannot build AWT library"
fi
# Fix the pointer size for AMD64
[[ ${ARCH} == "amd64" || ${ARCH} == "ppc64" ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
local platform="linux"
use elibc_FreeBSD && platform="freebsd"
local make="emake -f make_${platform}.mak NO_STRIP=y CC=$(tc-getCC) CXX=$(tc-getCXX)"
einfo "Building AWT library"
${make} make_awt || die "Failed to build AWT support"
einfo "Building SWT library"
${make} make_swt || die "Failed to build SWT support"
einfo "Building JAVA-AT-SPI bridge"
${make} make_atk || die "Failed to build ATK support"
if use gnome ; then
einfo "Building GNOME VFS support"
${make} make_gnome || die "Failed to build GNOME VFS support"
fi
if use xulrunner ; then
einfo "Building the Mozilla component against xulrunner-1.9"
export MOZILLA_INCLUDES="$(pkg-config --cflags libxul libxul-embedding)"
# the -R is a workaround for bug #234934
export MOZILLA_LIBS="-Wl,-R$(pkg-config libxul --variable=sdkdir) $(pkg-config --libs libxul libxul-embedding)"
${make} make_mozilla || die "Failed to build Mozilla support"
# upstream ships libswt-xulrunner*.so even though the build.sh does not
# build it anymore... missing this file leads to another instance
# of bug #234934 so we build it too
einfo "Building the xulrunner component against xulrunner-1.9"
export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}"
export XULRUNNER_LIBS="${MOZILLA_LIBS}"
${make} make_xulrunner || die "Failed to build xulrunner support"
${make} make_xpcominit || die "Failed to build xpcominit support"
fi
if use cairo ; then
einfo "Building CAIRO support"
${make} make_cairo || die "Unable to build CAIRO support"
fi
if use opengl ; then
einfo "Building OpenGL component"
${make} make_glx || die "Unable to build OpenGL component"
fi
einfo "Building JNI libraries"
eant compile
einfo "Copying missing files"
cp -i "${S}/version.txt" "${S}/build/version.txt"
cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \
"${S}/build/org/eclipse/swt/internal/"
einfo "Packing JNI libraries"
eant jar
}
src_install() {
swtArch=${ARCH}
use amd64 && swtArch=x86_64
use x86-fbsd && swtArch=x86
sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-3.5-manifest" > "MANIFEST_TMP.MF"
java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0"
java-pkg_sointo /usr/$(get_libdir)
java-pkg_doso *.so
if use xulrunner; then
local gecko_dir="$(pkg-config libxul --variable=sdkdir)"
java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}"
fi
dohtml about.html || die
}
pkg_postinst() {
if use xulrunner; then
local gecko_dir="$(pkg-config libxul --variable=sdkdir)"
elog "You built swt with xulrunner support. For your custom applications please set"
elog "MOZILLA_FIVE_HOME environment variable to ${gecko_dir}"
fi
}

View File

@@ -0,0 +1,12 @@
AUX 3.4/eclipse-3.4 1378 RMD160 8e99b71258a5c047e3094b2ec941924871b9b147 SHA1 99cf45921276ed70f1123cc2c0655ec37944a0d4 SHA256 ba99d0d956d53d5f8f801c7f8aa9a805bb32c0a4e64262eac39bfc176c46ebbe
AUX 3.4/eclipserc-3.4 858 RMD160 f911438aa661be9ca8fc352dd372c9485d163ddb SHA1 abb1c369326be455d16bc42cf0a1b035aa145dc0 SHA256 0aea733c968ca064ad5ca95d5895778ecf7387826198b512e98d0cbb7dd353f1
AUX 3.5/eclipse-3.5 1378 RMD160 f8b0e69ac5ecd988c53ed94a806a155fa99d5621 SHA1 d49e67f7dcc53895330fbf6f9df6ecf0b33be304 SHA256 a5faecfb0aabea10539a09340aade4454d4a69d28bf43cae3c5c93f02331fd0d
AUX 3.5/eclipserc-3.5 858 RMD160 f911438aa661be9ca8fc352dd372c9485d163ddb SHA1 abb1c369326be455d16bc42cf0a1b035aa145dc0 SHA256 0aea733c968ca064ad5ca95d5895778ecf7387826198b512e98d0cbb7dd353f1
DIST eclipse-I20090611-1540-fetched-src.tar.bz2 86737752 RMD160 67c562675a85e7a83bcf798ca599a384b4517523 SHA1 bd3d784aa05b53fe9aa385b635b564dfba8dc011 SHA256 8b9151a617cc51388cbf74daf167eb6e1125461a5ee502238aa0af891674d1bf
DIST eclipse-R3_5_1-fetched-src.tar.bz2 86976475 RMD160 2903769589f5d5b4c4deb68f27cc140c5cdc7a84 SHA1 920e2d826167d9026b0d3f0855d2e9cf34be546d SHA256 b9afadefe09906cfa3a49c32363cebf12bfc75244367e91ee8b4f36a1a089386
DIST eclipse-build-R0_3_0.tar.gz 40437 RMD160 d1382f3ede39e0e700f7dcd00158e6622bce196c SHA1 535f54620f1647ec404c35bc92fafbd1966e4eb2 SHA256 f6895b8dc6cca93589de78de2f4d43afa3a351b1bc0ad4a4073015532eb71346
DIST eclipse-sourceBuild-srcIncluded-3.4.2.zip 105843305 RMD160 d4bb5e15b484ac955ba342336de70b3d0c14ac6d SHA1 2a093a119def58b4df43e672c4d75c2f62fb0b16 SHA256 0c0df3b317a0c5745dfb7d5714ea3754b1f2d23f08c1f59713c812dd0bfa79d7
EBUILD eclipse-sdk-3.4.2.ebuild 13579 RMD160 11e41a08244339cfb6cc7da4df32df2fa5f094c5 SHA1 b3376b377b5a20d8ebe548aae1aafdf8d40360f7 SHA256 c5b6a0293a7ff5512344ca3fcef2b17dada978f0eb9580c3d77580038fff8b74
EBUILD eclipse-sdk-3.5.1.ebuild 10063 RMD160 ed57fa1fb6fa5d584e796b356d8647aa9f84fb57 SHA1 65ff80ad5bf71dc4f6df5c6f482aa4f14de9a09d SHA256 7310c4c514a077cfcee466e0033bc1a5c2ab9428bdc46abe38bf4c41fe64cef4
EBUILD eclipse-sdk-3.5.ebuild 9509 RMD160 acb568e8f9e4ad6f36fa14208fc055076f89f7c4 SHA1 8a84516267ce7beec319903dbc68a3c8db7d904a SHA256 5f03330e9a3c2346332ec1b8208ae720a10a438fe5828cf455567c096fa5fcb8
MISC metadata.xml 800 RMD160 f97cc4ac78898369a7706331bb14bc838519cf21 SHA1 21cd52a15acb6510aa3b955f78fb28a73cf58234 SHA256 76e243573c28c3d705f54745cfbcedd85dae3233b6ed00e2f81a61ac9caeeeaa

View File

@@ -0,0 +1,359 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit java-pkg-2 check-reqs
MY_PV=${PV/_pre/M}
DMF="R-${MY_PV}-200902111700"
MY_A="eclipse-sourceBuild-srcIncluded-${MY_PV}.zip"
S=${WORKDIR}
DESCRIPTION="Eclipse SDK"
HOMEPAGE="http://www.eclipse.org/eclipse/"
SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/${DMF}/${MY_A}"
LICENSE="EPL-1.0"
SLOT="3.4"
KEYWORDS="~amd64"
IUSE="doc source"
CDEPEND=">=dev-java/swt-${PV}:${SLOT}
>=dev-java/ant-1.7.0
>=dev-java/ant-core-1.7.0
>=dev-java/ant-eclipse-ecj-${PV}:${SLOT}
>=dev-java/asm-3.1:3
>=dev-java/commons-el-1.0
>=dev-java/commons-logging-1.0.4
>=dev-java/icu4j-3.8.1:0
>=dev-java/jsch-0.1.37
>=dev-java/junit-3.8.2:0
dev-java/junit:4
>=dev-java/lucene-1.9.1:1.9
>=dev-java/lucene-analyzers-1.9.1:1.9
>=dev-java/sat4j-core-2.0.3:2
>=dev-java/sat4j-pseudo-2.0.3:2
dev-java/tomcat-servlet-api:2.4"
RDEPEND="${CDEPEND}
>=virtual/jre-1.5"
DEPEND="${CDEPEND}
app-arch/unzip
app-arch/zip
>=virtual/jdk-1.6"
ALL_WS='carbon gtk motif photon wpf'
ALL_OS='aix hpux linux macosx qnx solaris win32'
ALL_ARCH='ia64 PA_RISC ppc s390 s390x sparc x86 x86_64'
pkg_setup() {
ws='gtk'
if use x86 ; then os='linux' ; arch='x86'
elif use amd64 ; then os='linux' ; arch='x86_64'
fi
java-pkg-2_pkg_setup
CHECKREQS_MEMORY="512"
check_reqs
if use doc ; then
ewarn "Having the 'doc' USE flag enabled greatly increases the build time."
ewarn "You might want to disable it for ${PN} if you don't need it."
fi
CLASSPATH=$(java-pkg_getjars --with-dependencies "ant-eclipse-ecj:${SLOT}")
}
src_prepare() {
java-pkg_jar-from "eclipse-ecj:${SLOT}"
ebegin 'Removing plugins of irrelevant platforms'
local remove=" ${ALL_WS[@]} ${ALL_OS[@]} ${ALL_ARCH[@]} "
remove=${remove/ ${ws} / } ; remove=${remove/ ${os} / } ; remove=${remove/ ${arch} / }
remove=${remove# } ; remove=${remove% } ; remove=${remove// /'\|'}
find \( -type d -o -name '*.xml' \) \
! -regex '.*[./]\(net\|update\.core\.'"${os}"'\)\([./].*\|\)' \
-regex '.*[./]\('"${remove}"'\)\([./].*\|\)' -prune -exec rm -rf {} +
eclipse_delete-plugins '.*[./]\('"${remove}"'\)\([./].*\|\)'
eend
ebegin 'Removing bundled binaries'
find -type f \( -name '*.so' -o -name 'eclipse' \) -delete
eend
ebegin 'Unbundling dependencies'
eclipse_unbundle-dir plugins/org.apache.ant_* ant-core,ant-nodeps lib
eclipse_unbundle-dir plugins/org.eclipse.swt."${ws}.${os}.${arch}"_*.jar swt:${SLOT}
eclipse_unbundle-dir plugins/org.junit_* junit
eclipse_unbundle-dir plugins/org.junit4 junit:4
eclipse_unbundle-jar plugins/com.ibm.icu_*.jar icu4j
eclipse_unbundle-jar plugins/com.jcraft.jsch_*.jar jsch
eclipse_unbundle-jar plugins/javax.servlet_*.jar tomcat-servlet-api:2.4 servlet-api
eclipse_unbundle-jar plugins/javax.servlet.jsp_*.jar tomcat-servlet-api:2.4 jsp-api
eclipse_unbundle-jar plugins/org.apache.commons.el_*.jar commons-el
eclipse_unbundle-jar plugins/org.apache.commons.logging_*.jar commons-logging
#eclipse_unbundle-jar plugins/org.apache.jasper_*.jar tomcat-jasper
eclipse_unbundle-jar plugins/org.apache.lucene_*.jar lucene:1.9
eclipse_unbundle-jar plugins/org.apache.lucene.analysis_*.jar lucene-analyzers:1.9
#eclipse_unbundle-jar plugins/org.mortbay.jetty_*.jar jetty
eclipse_unbundle-jar plugins/org.objectweb.asm_*.jar asm:3
eclipse_unbundle-jar plugins/org.sat4j.core_*.jar sat4j-core:2
eclipse_unbundle-jar plugins/org.sat4j.pb_*.jar sat4j-pseudo:2
eend
if use doc ; then
# No need to keep unpacking and repacking stuff
sed -e '/<antcall target="install\.eclipse/d' \
-e '/<move .*-old"/,/<delete .*-old/d' \
-e 's/\(java\b.*\bjar="\).*\(\${launcher}\)/\1${plugin.destination}\/\2/' \
-i build.xml || die
sed_xml_element 'pathconvert\|delete\|copy' \
-e '/property="launcher"/s/\(<fileset dir=\)"[^"]*"/\1"${plugin.destination}"/' \
-e '/\${buildDirectory}\/eclipse/d' \
-i build.xml || die
else
ebegin 'Removing documentation plugins'
rm -rf plugins/*.doc{,.*}
eclipse_delete-plugins '.*\.doc\([./].*\|\)'
sed_xml_element 'antcall' -e '/target="build\.doc\.plugins"/d' -i build.xml || die
eend
fi
if ! use source ; then
ebegin 'Removing source features and plugins'
rm -rf {features,plugins}/*.source{,_*}
eclipse_delete-plugins '.*\.source\(_[0-9].*\|\/\|\)'
eend
fi
ebegin 'Preparing build system'
# Disable compiler warnings
find -name 'build.xml' -exec sed -e 's/<javac\b/<javac nowarn="true"/' -i {} +
# Fix OSGi plugin classpath
sed -e '/<path id="@dot\.classpath">/a<pathelement path="'"$(java-config --runtime)"'"/>' \
-i plugins/org.eclipse.osgi/build.xml || die
# Skip final archiving phase
sed -e '/<exec executable="tar" dir="${assemblyTempDir}">/,/<delete dir="${assemblyTempDir}"\/>/d' \
-i {assemble,package}.*.xml || die
eend
}
src_compile() {
local java_home=$(java-config --jdk-home)
# Compile Eclipse SDK
CLASSPATH=${CLASSPATH} ant insertBuildId compile || die 'ant compile failed'
# Compile Equinox native launcher
chmod +x "features/org.eclipse.equinox.executable/library/${ws}/build.sh"
"features/org.eclipse.equinox.executable/library/${ws}/build.sh" -java "${java_home}" \
|| die 'equinox native launcher build failed'
ln "features/org.eclipse.equinox.executable/library/${ws}/eclipse" \
"features/org.eclipse.equinox.executable/bin/${ws}/${os}/${arch}/" \
|| die 'ln equinox native launcher failed'
ln "features/org.eclipse.equinox.executable/library/${ws}"/eclipse*.so \
"plugins/org.eclipse.equinox.launcher.${ws}.${os}.${arch}/" &&
ln "features/org.eclipse.equinox.executable/library/${ws}"/eclipse*.so \
"plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.${ws}.${os}.${arch}/" \
|| die 'ln equinox native library failed'
# Compile liblocalfile
emake -C "plugins/org.eclipse.core.filesystem/natives/unix/${os}" \
JAVA_HOME="${java_home}" || die 'emake liblocalfile failed'
ln "plugins/org.eclipse.core.filesystem/natives/unix/${os}/liblocalfile_1_0_0.so" \
"plugins/org.eclipse.core.filesystem.${os}.${arch}/os/${os}/${arch}/" \
|| die 'ln liblocalfile failed'
# Compile libupdate
ant -buildfile "plugins/org.eclipse.update.core.${os}/src/build.xml" \
|| die 'ant build libupdate failed'
# Package everything up
ant -DinstallWs="${ws}" -DinstallOs="${os}" -DinstallArch="${arch}" install \
|| die 'ant install failed'
# Generate P2 repository
$(java-config --java) \
-jar tmp/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
-data workspace \
-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
-source "${S}/tmp/eclipse" \
-metadataRepository "file:${S}/tmp/eclipse/repo" \
-metadataRepositoryName 'Gentoo Portage' \
-artifactRepository "file:${S}/tmp/eclipse/repo" \
-artifactRepositoryName 'Gentoo Portage' \
-publishArtifacts \
-root 'Gentoo Eclipse SDK' -rootVersion "${PV%_*}" \
-flavor tooling \
|| die 'P2 repository generation failed'
# Disable Internet update sites
sed -e '/^repositories\/http:/ s/\(enabled=\)true/\1false/' \
-i tmp/eclipse/configuration/.settings/org.eclipse.equinox.p2.*.prefs || die
}
src_install() {
local destdir="/usr/$(get_libdir)/eclipse-${SLOT}"
# Copy root files
insinto "${destdir}"
doins -r features/org.eclipse.platform/rootfiles/{.eclipseproduct,*}
# Install Eclipse SDK with P2
$(java-config --java) \
-Declipse.p2.data.area="file:${D}${destdir}/p2" \
-jar tmp/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
-data workspace \
-application org.eclipse.equinox.p2.director.app.application \
-metadataRepository "file:${S}/tmp/eclipse/repo" \
-artifactRepository "file:${S}/tmp/eclipse/repo" \
-installIU 'Gentoo Eclipse SDK' -version "${PV%_*}" \
-destination "${D}${destdir}" \
-profile SDKProfile \
-profileProperties 'org.eclipse.update.install.features=true' \
-bundlepool "${D}${destdir}" \
-p2.ws "${ws}" -p2.os "${os}" -p2.arch "${arch}" \
-roaming \
|| die 'P2 installation failed'
# Java doesn't know about symlinks
find plugins -type l -name '*.jar' |
while read -r link ; do
ref=$(readlink "${link}") ; link=${link#plugins/}
ln -sf "${ref}" "$(echo "${D}${destdir}/plugins/${link%%/*}"*)/${link#*/}" || die
done
# Install Gentoo wrapper and config
dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}"
insinto /etc/
doins "${FILESDIR}/${SLOT}/eclipserc-${SLOT}"
# Create desktop entry
newicon "features/org.eclipse.equinox.executable/bin/${ws}/${os}/${arch}/icon.xpm" \
"eclipse-${SLOT}.xpm" || die
make_desktop_entry "eclipse-${SLOT}" "Eclipse ${MY_PV}" "eclipse-${SLOT}.xpm" || die
}
# Replaces the bundled jars in plugin dir ${1} with links to the jars from
# java-config package ${2}. If ${3} is given, the jars are linked in ${1}/${3}.
eclipse_unbundle-dir() {
local bundle=${S}/${1} package=${2} into=${3}
local basename=$(basename "${bundle}")
local barename=${basename%_*}
if [[ -d "${bundle}" ]] ; then
pushd "${bundle}" > /dev/null || die
einfo " ${barename} => ${package}"
rm -rf "../${barename}.source${basename#${barename}}"*
eclipse_delete-plugins ".*${barename//./\.}\.source.*"
local classpath=$(manifest_get META-INF/MANIFEST.MF 'Bundle-ClassPath')
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
rm -f ${classpath//,/ } META-INF/ECLIPSEF.{RSA,SF}
java-pkg_jar-from ${into:+--into "${into}"} "${package}"
popd > /dev/null
fi
}
# Extracts plugin jar ${1} and updates its manifest to reference the jars of
# java-config package ${2}.
eclipse_unbundle-jar() {
local bundle=${S}/${1} package=${2}
local basename=$(basename "${bundle}" .jar)
local barename=${basename%_*}
pushd "$(dirname "${bundle}")" > /dev/null || die
if [[ -f "${basename}.jar" ]] ; then
einfo " ${barename} => ${package}"
rm -rf "${barename}.source${basename#${barename}}"*
eclipse_delete-plugins ".*${barename//./\.}\.source.*"
mkdir "${basename}" && cd "${basename}" || die
$(java-config --jar) -xf "../${basename}.jar" \
META-INF/MANIFEST.MF {feature,fragment,plugin}.{properties,xml} || die
local classpath=$(java-pkg_getjars "${package}")
[[ ${classpath} ]] || die "java-pkg_getjars ${package} failed"
CLASSPATH="${CLASSPATH}:${classpath}"
manifest_replace META-INF/MANIFEST.MF 'Bundle-ClassPath' \
"external:${classpath//:/,external:}"
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
sed_xml_element 'plugin' -e '/id="'"${barename//./\.}"'"/s/unpack="false"//' \
-i "${S}"/features/*/feature.xml || die
eclipse_replace-pathelement "${basename//./\.}" "${classpath////\/}"
rm "../${basename}.jar" || die
sed_xml_element 'copy' \
-e '/\bfile=".*'"${basename//./\.}"'/{
s/<copy/<copydir/;s/\.jar//g;s/\bfile=/src=/;s/\btofile=/dest=/}' \
-i "${S}"/package.*.xml || die
fi
popd > /dev/null
}
# Replaces Ant path elements that match ${1} with ${2}.
eclipse_replace-pathelement() {
local from=${1} to=${2}
sed -e '/<pathelement path="/s/\([":;]\)[^":;]*\('"${from}"'\)[^":;]*\([":;]\)/\1'"${to}"'\3/' \
-i "${S}"/{,features/*/,plugins/*/}build.xml \
|| die 'eclipse_replace-pathelement failed'
}
# Removes Ant commands that reference plugins matching ${1}.
eclipse_delete-plugins() {
sed_xml_element 'ant' -e '/dir="'"${1}"'"/d' -i "${S}"/features/*/build.xml &&
sed_xml_element 'includes\|plugin' -e '/id="'"${1}"'"/d' -i "${S}"/features/*/feature.xml &&
sed_xml_element 'customGather\|antcall' -e '/="'"${1}"'"/d' -i "${S}"/assemble.*.xml &&
sed_xml_element 'copy\|antcall' -e '/="'"${1}"'"/d' -i "${S}"/package.*.xml \
|| die 'eclipse_delete-plugins failed'
}
# Prints the first value from manifest file ${1} whose key matches regex ${2},
# unfolding as necessary.
manifest_get() {
sed -n -e '/^\('"${2}"'\): /{h;:A;$bB;n;/^ /!bB;H;bA};d;:B;g;s/^[^:]*: //;s/\n //g;p;q' "${1}" \
|| die 'manifest_get failed'
}
# Deletes values from manifest file ${1} whose keys match regex ${2}, taking
# into account folding.
manifest_delete() {
sed -n -e ':A;/^\('"${2}"'\): /{:B;n;/^ /!{bA};bB};p' -i "${1}" \
|| die 'manifest_delete failed'
}
# Replaces the value for key ${2} in the first section of manifest file ${1}
# with ${3}, or adds the key-value pair to that section if the key was absent.
manifest_replace() {
LC_ALL='C' awk -v key="${2}" -v val="${3}" '
function fold(s, o, l, r) {
o = 2 ; l = length(s) - 1 ; r = substr(s, 1, 1)
while (l > 69) { r = r substr(s, o, 69) "\n " ; o += 69 ; l -= 69 }
return r substr(s, o)
}
BEGIN { FS = ": " }
f { print ; next }
i { if ($0 !~ "^ ") { f = 1 ; print } ; next }
$1 == key { print fold(key FS val) ; i = 1 ; next }
/^\r?$/ { print fold(key FS val) ; print ; f = 1 ; next }
{ print }
END { if (!f) { print fold(key FS val) } }
' "${1}" > "${1}-" && mv "${1}"{-,} || die 'manifest_replace failed'
}
# Executes sed over each XML element with a name matching ${1}, rather than
# over each line. The entire element (and its children) may be removed with the
# 'd' command, or they may be edited using all the usual sed foo. Basically,
# the script argument will be executed only for elements matching ${1}, and the
# sed pattern space will consist of the entire element, including any nested
# elements. Note that this is not perfect and requires no more than one XML
# element per line to be reliable.
sed_xml_element() {
local elem="${1}" ; shift
sed -e '/<\('"${elem}"'\)\([> \t]\|$\)/{:_1;/>/!{N;b_1};/\/>/b_3' \
-e ':_2;/<\/\('"${elem}"'\)>/!{N;b_2};b_3};b;:_3' "${@}"
}

View File

@@ -0,0 +1,278 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit java-pkg-2 check-reqs
BUILD_ID="R3_5_1"
S="${WORKDIR}/eclipse-build-R0_3_0"
DESCRIPTION="Eclipse SDK"
HOMEPAGE="http://www.eclipse.org/eclipse/"
SRC_URI="http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-${BUILD_ID}-fetched-src.tar.bz2
http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-build-R0_3_0.tar.gz"
LICENSE="EPL-1.0"
SLOT="3.5"
KEYWORDS="~amd64 ~x86"
IUSE="doc source"
CDEPEND=">=dev-java/swt-${PV}:${SLOT}
>=dev-java/ant-1.7.1
>=dev-java/ant-core-1.7.1
>=dev-java/asm-3.1:3
>=dev-java/commons-codec-1.3
>=dev-java/commons-el-1.0
>=dev-java/commons-httpclient-3.1:3
>=dev-java/commons-logging-1.0.4
>=dev-java/hamcrest-core-1.1
>=dev-java/icu4j-4.0.1:4
>=dev-java/jsch-0.1.41
>=dev-java/junit-3.8.2:0
>=dev-java/junit-4.5:4
>=dev-java/lucene-1.9.1:1.9
>=dev-java/lucene-analyzers-1.9.1:1.9
>=dev-java/sat4j-core-2.1:2
>=dev-java/sat4j-pseudo-2.1:2
dev-java/tomcat-servlet-api:2.5"
RDEPEND="${CDEPEND}
>=virtual/jre-1.5"
DEPEND="${CDEPEND}
app-arch/unzip
app-arch/zip
>=virtual/jdk-1.6"
ALL_WS='carbon cocoa gtk motif photon wpf'
ALL_OS='aix hpux linux macosx qnx solaris win32'
ALL_ARCH='ia64 PA_RISC ppc s390 s390x sparc x86 x86_64'
buildDir="${S}/build/eclipse-${BUILD_ID}-fetched-src"
pkg_setup() {
ws='gtk'
if use x86 ; then os='linux' ; arch='x86'
elif use amd64 ; then os='linux' ; arch='x86_64'
fi
java-pkg-2_pkg_setup
if use doc ; then
ewarn "Having the 'doc' USE flag enabled greatly increases the build time."
ewarn "You might want to disable it for ${PN} if you don't need it."
fi
}
src_unpack() {
CHECKREQS_MEMORY="1536"
CHECKREQS_DISK_BUILD="3072"
check_reqs
unpack eclipse-build-R0_3_0.tar.gz
ln -s "${DISTDIR}/eclipse-${BUILD_ID}-fetched-src.tar.bz2" "${S}"/ || die
# fix up hardcoded buildId
sed -e 's/^\(buildId=\).*$/\1'"${BUILD_ID}"'/' -i "${S}"/{,pde}build.properties || die
sed -e 's/I20090611-1540/'"${BUILD_ID}"'/g' -i "${S}"/pdebuild.xml || die
( cd "${S}" && ant init ) || die
# remove init target since we've already run it
sed -e 's/depends="init"//' -i "${S}"/build.xml || die
}
src_prepare() {
if use amd64 ; then
sed -e 's/^buildArch=x86$/\0_64/' -i {,pde}build.properties || die
fi
# fix up hardcoded paths
local JAVA_HOME=$(java-config --jdk-home)
sed -e 's|/usr/lib/jvm/java/jre/lib/rt\.jar:.*$|'"$(java-config --runtime)"'|' \
-i {,pde}build.properties || die
sed -e 's|javaHome="[^"]*"|javaHome="'"${JAVA_HOME}"'"|' \
-i "${buildDir}"/features/org.eclipse.equinox.executable/library/gtk/build.sh || die
sed -e 's|~/vm/sun142|'"${JAVA_HOME}"'|' \
-i "${buildDir}"/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile || die
# fix up hardcoded versions and add new ECF plugin to build paths
sed -e 's/20090604-1131/20090831-1906/' -e 's/20090415/20090822/' \
-e '/org\.eclipse\.ecf\.filetransfer/{p;s/\(filetransfer_3\.0\.\)0/provider.\11/}' \
-i "${buildDir}"/plugins/*/build.xml || die
# skip compilation of SWT native libraries (we use the system-installed copies)
sed_xml_element 'ant\|patch' -e '/swt/d' -i build.xml || die
ebegin 'Removing plugins of irrelevant platforms'
local remove=" ${ALL_WS[@]} ${ALL_OS[@]} ${ALL_ARCH[@]} "
remove=${remove/ ${ws} / } ; remove=${remove/ ${os} / } ; remove=${remove/ ${arch} / }
remove=${remove# } ; remove=${remove% } ; remove=${remove// /'\|'}
find \( -type d -o -name '*.xml' \) \
! -regex '.*[./]\(net\|update\.core\.'"${os}"'\)\([./].*\|\)' \
-regex '.*[./]\('"${remove}"'\)\([./].*\|\)' -prune -exec rm -rf {} +
eclipse_delete-plugins '.*\.\('"${remove}"'\)\(\..*\|\)'
eend
if ! use doc ; then
ebegin 'Removing documentation plugins'
rm -rf "${buildDir}"/plugins/*.doc{,.*}
eclipse_delete-plugins '.*\.doc\(\..*\|\)'
eend
fi
if ! use source ; then
ebegin 'Removing source plugins'
rm -rf "${buildDir}"/plugins/*.source{,_*}
eclipse_delete-plugins '.*\.source'
eend
fi
}
src_compile() {
ANT_OPTS='-Xmx512M' ./build.sh || die
}
src_install() {
local destDir="/usr/$(get_libdir)/eclipse-${SLOT}"
insinto "${destDir}"
shopt -s dotglob
doins -r "${buildDir}"/installation/*
shopt -u dotglob
chmod +x "${D}${destDir}"/eclipse
rm "${D}${destDir}"/libcairo-swt.so # use the system-installed SWT libraries
ebegin 'Unbundling dependencies'
pushd "${D}${destDir}" > /dev/null || die
eclipse_unbundle-dir plugins/org.apache.ant_* ant-core,ant-nodeps lib
eclipse_unbundle-dir plugins/org.junit_* junit
eclipse_unbundle-dir plugins/org.junit4_* junit:4
eclipse_unbundle-jar plugins/com.ibm.icu_*.jar icu4j:4
eclipse_unbundle-jar plugins/com.jcraft.jsch_*.jar jsch
eclipse_unbundle-jar plugins/javax.servlet_*.jar tomcat-servlet-api:2.5 servlet-api
eclipse_unbundle-jar plugins/javax.servlet.jsp_*.jar tomcat-servlet-api:2.5 jsp-api
eclipse_unbundle-jar plugins/org.apache.commons.codec_*.jar commons-codec
eclipse_unbundle-jar plugins/org.apache.commons.el_*.jar commons-el
eclipse_unbundle-jar plugins/org.apache.commons.httpclient_*.jar commons-httpclient:3
eclipse_unbundle-jar plugins/org.apache.commons.logging_*.jar commons-logging
#eclipse_unbundle-jar plugins/org.apache.jasper_*.jar tomcat-jasper
eclipse_unbundle-jar plugins/org.apache.lucene_*.jar lucene:1.9
eclipse_unbundle-jar plugins/org.apache.lucene.analysis_*.jar lucene-analyzers:1.9
eclipse_unbundle-jar plugins/org.eclipse.swt."${ws}.${os}.${arch}"_*.jar swt:${SLOT}
eclipse_unbundle-jar plugins/org.hamcrest.core_*.jar hamcrest-core
#eclipse_unbundle-jar plugins/org.mortbay.jetty_*.jar jetty
eclipse_unbundle-jar plugins/org.objectweb.asm_*.jar asm:3
eclipse_unbundle-jar plugins/org.sat4j.core_*.jar sat4j-core:2
eclipse_unbundle-jar plugins/org.sat4j.pb_*.jar sat4j-pseudo:2
popd > /dev/null
eend
# Install Gentoo wrapper and config
dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}"
insinto /etc
doins "${FILESDIR}/${SLOT}/eclipserc-${SLOT}"
# Create desktop entry
make_desktop_entry "eclipse-${SLOT}" "Eclipse ${PV}" "${destDir}/icon.xpm" || die
}
# Replaces the bundled jars in plugin dir ${1} with links to the jars from
# java-config package ${2}. If ${3} is given, the jars are linked in ${1}/${3}.
eclipse_unbundle-dir() {
local bundle=${1} package=${2} into=${3}
local basename=$(basename "${bundle}")
local barename=${basename%_*}
if [[ -d "${bundle}" ]] ; then
einfo " ${barename} => ${package}"
pushd "${bundle}" > /dev/null || die
local classpath=$(manifest_get META-INF/MANIFEST.MF 'Bundle-ClassPath')
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
rm -f ${classpath//,/ } META-INF/ECLIPSEF.{RSA,SF}
java-pkg_jar-from ${into:+--into "${into}"} "${package}"
popd > /dev/null
fi
}
# Extracts plugin jar ${1}, updates its manifest to reference the jars of
# java-config package ${2}, and repacks it.
eclipse_unbundle-jar() {
local bundle=${1} package=${2} jar=${3}
local basename=$(basename "${bundle}" .jar)
local barename=${basename%_*}
if [[ -f "${bundle}" ]] ; then
einfo " ${barename} => ${package}"
bundle=$(readlink -f "${bundle}")
mkdir "${T}/${basename}" && pushd "${T}/${basename}" > /dev/null || die
$(java-config --jar) -xf "${bundle}" \
META-INF/MANIFEST.MF {feature,fragment,plugin}.{properties,xml} || die
rm "${bundle}" || die
local classpath=$(java-pkg_getjars "${package}")
[[ ${classpath} ]] || die "java-pkg_getjars ${package} failed"
[[ ${jar} ]] && classpath=$(echo "${classpath}" | grep -o '[^:]*/'"${jar}"'\.jar')
manifest_replace META-INF/MANIFEST.MF 'Bundle-ClassPath' \
"external:${classpath//:/,external:}"
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
$(java-config --jar) -cfm "${bundle}" META-INF/MANIFEST.MF . || die
popd > /dev/null
rm -r "${T}/${basename}" || die
fi
}
# Removes feature.xml references to plugins matching ${1}.
eclipse_delete-plugins() {
sed_xml_element 'includes\|plugin' -e '/id="'"${1}"'"/d' \
-i "${buildDir}"/features/*/feature.xml "${S}"/eclipse-build-feature/feature.xml \
|| die 'eclipse_delete-plugins failed'
}
# Prints the first value from manifest file ${1} whose key matches regex ${2},
# unfolding as necessary.
manifest_get() {
sed -n -e '/^\('"${2}"'\): /{h;:A;$bB;n;/^ /!bB;H;bA};d;:B;g;s/^[^:]*: //;s/\n //g;p;q' "${1}" \
|| die 'manifest_get failed'
}
# Deletes values from manifest file ${1} whose keys match regex ${2}, taking
# into account folding.
manifest_delete() {
sed -n -e ':A;/^\('"${2}"'\): /{:B;n;/^ /!{bA};bB};p' -i "${1}" \
|| die 'manifest_delete failed'
}
# Replaces the value for key ${2} in the first section of manifest file ${1}
# with ${3}, or adds the key-value pair to that section if the key was absent.
manifest_replace() {
LC_ALL='C' awk -v key="${2}" -v val="${3}" '
function fold(s, o, l, r) {
o = 2 ; l = length(s) - 1 ; r = substr(s, 1, 1)
while (l > 69) { r = r substr(s, o, 69) "\n " ; o += 69 ; l -= 69 }
return r substr(s, o)
}
BEGIN { FS = ": " }
f { print ; next }
i { if ($0 !~ "^ ") { f = 1 ; print } ; next }
$1 == key { print fold(key FS val) ; i = 1 ; next }
/^\r?$/ { print fold(key FS val) ; print ; f = 1 ; next }
{ print }
END { if (!f) { print fold(key FS val) } }
' "${1}" > "${1}-" && mv "${1}"{-,} || die 'manifest_replace failed'
}
# Executes sed over each XML element with a name matching ${1}, rather than
# over each line. The entire element (and its children) may be removed with the
# 'd' command, or they may be edited using all the usual sed foo. Basically,
# the script argument will be executed only for elements matching ${1}, and the
# sed pattern space will consist of the entire element, including any nested
# elements. Note that this is not perfect and requires no more than one XML
# element per line to be reliable.
sed_xml_element() {
local elem="${1}" ; shift
sed -e '/<\('"${elem}"'\)\([> \t]\|$\)/{:_1;/>/!{N;b_1};/\/>/b_3' \
-e ':_2;/<\/\('"${elem}"'\)>/!{N;b_2};b_3};b;:_3' "${@}"
}

View File

@@ -0,0 +1,267 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit java-pkg-2 check-reqs
BUILD_ID="I20090611-1540"
S="${WORKDIR}/eclipse-build-R0_3_0"
DESCRIPTION="Eclipse SDK"
HOMEPAGE="http://www.eclipse.org/eclipse/"
SRC_URI="http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-${BUILD_ID}-fetched-src.tar.bz2
http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-build-R0_3_0.tar.gz"
LICENSE="EPL-1.0"
SLOT="3.5"
KEYWORDS="~amd64 ~x86"
IUSE="doc source"
CDEPEND=">=dev-java/swt-${PV}:${SLOT}
>=dev-java/ant-1.7.1
>=dev-java/ant-core-1.7.1
>=dev-java/asm-3.1:3
>=dev-java/commons-codec-1.3
>=dev-java/commons-el-1.0
>=dev-java/commons-httpclient-3.1:3
>=dev-java/commons-logging-1.0.4
>=dev-java/icu4j-4.0.1:4
>=dev-java/jsch-0.1.41
>=dev-java/junit-3.8.2:0
>=dev-java/junit-4.5:4
>=dev-java/lucene-1.9.1:1.9
>=dev-java/lucene-analyzers-1.9.1:1.9
>=dev-java/sat4j-core-2.1:2
>=dev-java/sat4j-pseudo-2.1:2
dev-java/tomcat-servlet-api:2.5"
RDEPEND="${CDEPEND}
>=virtual/jre-1.5"
DEPEND="${CDEPEND}
app-arch/unzip
app-arch/zip
>=virtual/jdk-1.6"
ALL_WS='carbon cocoa gtk motif photon wpf'
ALL_OS='aix hpux linux macosx qnx solaris win32'
ALL_ARCH='ia64 PA_RISC ppc s390 s390x sparc x86 x86_64'
buildDir="${S}/build/eclipse-${BUILD_ID}-fetched-src"
pkg_setup() {
ws='gtk'
if use x86 ; then os='linux' ; arch='x86'
elif use amd64 ; then os='linux' ; arch='x86_64'
fi
java-pkg-2_pkg_setup
if use doc ; then
ewarn "Having the 'doc' USE flag enabled greatly increases the build time."
ewarn "You might want to disable it for ${PN} if you don't need it."
fi
}
src_unpack() {
CHECKREQS_MEMORY="1536"
CHECKREQS_DISK_BUILD="3072"
check_reqs
unpack eclipse-build-R0_3_0.tar.gz
ln -s "${DISTDIR}/eclipse-${BUILD_ID}-fetched-src.tar.bz2" "${S}"/ || die
( cd "${S}" && ant init ) || die
# remove init target since we've already run it
sed -e 's/depends="init"//' -i "${S}"/build.xml || die
}
src_prepare() {
if use amd64 ; then
sed -e 's/^buildArch=x86$/\0_64/' -i {,pde}build.properties || die
fi
# fix up hardcoded paths
local JAVA_HOME=$(java-config --jdk-home)
sed -e 's|/usr/lib/jvm/java/jre/lib/rt\.jar:.*$|'"$(java-config --runtime)"'|' \
-i {,pde}build.properties || die
sed -e 's|javaHome="[^"]*"|javaHome="'"${JAVA_HOME}"'"|' \
-i "${buildDir}"/features/org.eclipse.equinox.executable/library/gtk/build.sh || die
sed -e 's|~/vm/sun142|'"${JAVA_HOME}"'|' \
-i "${buildDir}"/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile || die
# skip compilation of SWT native libraries (we use the system-installed copies)
sed_xml_element 'ant\|patch' -e '/swt/d' -i build.xml || die
ebegin 'Removing plugins of irrelevant platforms'
local remove=" ${ALL_WS[@]} ${ALL_OS[@]} ${ALL_ARCH[@]} "
remove=${remove/ ${ws} / } ; remove=${remove/ ${os} / } ; remove=${remove/ ${arch} / }
remove=${remove# } ; remove=${remove% } ; remove=${remove// /'\|'}
find \( -type d -o -name '*.xml' \) \
! -regex '.*[./]\(net\|update\.core\.'"${os}"'\)\([./].*\|\)' \
-regex '.*[./]\('"${remove}"'\)\([./].*\|\)' -prune -exec rm -rf {} +
eclipse_delete-plugins '.*\.\('"${remove}"'\)\(\..*\|\)'
eend
if ! use doc ; then
ebegin 'Removing documentation plugins'
rm -rf "${buildDir}"/plugins/*.doc{,.*}
eclipse_delete-plugins '.*\.doc\(\..*\|\)'
eend
fi
if ! use source ; then
ebegin 'Removing source plugins'
rm -rf "${buildDir}"/plugins/*.source{,_*}
eclipse_delete-plugins '.*\.source'
eend
fi
}
src_compile() {
ANT_OPTS='-Xmx512M' ./build.sh || die
}
src_install() {
local destDir="/usr/$(get_libdir)/eclipse-${SLOT}"
insinto "${destDir}"
shopt -s dotglob
doins -r "${buildDir}"/installation/*
shopt -u dotglob
chmod +x "${D}${destDir}"/eclipse
rm "${D}${destDir}"/libcairo-swt.so # use the system-installed SWT libraries
ebegin 'Unbundling dependencies'
pushd "${D}${destDir}" > /dev/null || die
eclipse_unbundle-dir plugins/org.apache.ant_* ant-core,ant-nodeps lib
eclipse_unbundle-dir plugins/org.junit_* junit
eclipse_unbundle-dir plugins/org.junit4_* junit:4
eclipse_unbundle-jar plugins/com.ibm.icu_*.jar icu4j:4
eclipse_unbundle-jar plugins/com.jcraft.jsch_*.jar jsch
eclipse_unbundle-jar plugins/javax.servlet_*.jar tomcat-servlet-api:2.5 servlet-api
eclipse_unbundle-jar plugins/javax.servlet.jsp_*.jar tomcat-servlet-api:2.5 jsp-api
eclipse_unbundle-jar plugins/org.apache.commons.codec_*.jar commons-codec
eclipse_unbundle-jar plugins/org.apache.commons.el_*.jar commons-el
eclipse_unbundle-jar plugins/org.apache.commons.httpclient_*.jar commons-httpclient:3
eclipse_unbundle-jar plugins/org.apache.commons.logging_*.jar commons-logging
#eclipse_unbundle-jar plugins/org.apache.jasper_*.jar tomcat-jasper
eclipse_unbundle-jar plugins/org.apache.lucene_*.jar lucene:1.9
eclipse_unbundle-jar plugins/org.apache.lucene.analysis_*.jar lucene-analyzers:1.9
eclipse_unbundle-jar plugins/org.eclipse.swt."${ws}.${os}.${arch}"_*.jar swt:${SLOT}
#eclipse_unbundle-jar plugins/org.mortbay.jetty_*.jar jetty
eclipse_unbundle-jar plugins/org.objectweb.asm_*.jar asm:3
eclipse_unbundle-jar plugins/org.sat4j.core_*.jar sat4j-core:2
eclipse_unbundle-jar plugins/org.sat4j.pb_*.jar sat4j-pseudo:2
popd > /dev/null
eend
# Install Gentoo wrapper and config
dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}"
insinto /etc
doins "${FILESDIR}/${SLOT}/eclipserc-${SLOT}"
# Create desktop entry
make_desktop_entry "eclipse-${SLOT}" "Eclipse ${PV}" "${destDir}/icon.xpm" || die
}
# Replaces the bundled jars in plugin dir ${1} with links to the jars from
# java-config package ${2}. If ${3} is given, the jars are linked in ${1}/${3}.
eclipse_unbundle-dir() {
local bundle=${1} package=${2} into=${3}
local basename=$(basename "${bundle}")
local barename=${basename%_*}
if [[ -d "${bundle}" ]] ; then
einfo " ${barename} => ${package}"
pushd "${bundle}" > /dev/null || die
local classpath=$(manifest_get META-INF/MANIFEST.MF 'Bundle-ClassPath')
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
rm -f ${classpath//,/ } META-INF/ECLIPSEF.{RSA,SF}
java-pkg_jar-from ${into:+--into "${into}"} "${package}"
popd > /dev/null
fi
}
# Extracts plugin jar ${1}, updates its manifest to reference the jars of
# java-config package ${2}, and repacks it.
eclipse_unbundle-jar() {
local bundle=${1} package=${2} jar=${3}
local basename=$(basename "${bundle}" .jar)
local barename=${basename%_*}
if [[ -f "${bundle}" ]] ; then
einfo " ${barename} => ${package}"
bundle=$(readlink -f "${bundle}")
mkdir "${T}/${basename}" && pushd "${T}/${basename}" > /dev/null || die
$(java-config --jar) -xf "${bundle}" \
META-INF/MANIFEST.MF {feature,fragment,plugin}.{properties,xml} || die
rm "${bundle}" || die
local classpath=$(java-pkg_getjars "${package}")
[[ ${classpath} ]] || die "java-pkg_getjars ${package} failed"
[[ ${jar} ]] && classpath=$(echo "${classpath}" | grep -o '[^:]*/'"${jar}"'\.jar')
manifest_replace META-INF/MANIFEST.MF 'Bundle-ClassPath' \
"external:${classpath//:/,external:}"
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
$(java-config --jar) -cfm "${bundle}" META-INF/MANIFEST.MF . || die
popd > /dev/null
rm -r "${T}/${basename}" || die
fi
}
# Removes feature.xml references to plugins matching ${1}.
eclipse_delete-plugins() {
sed_xml_element 'includes\|plugin' -e '/id="'"${1}"'"/d' \
-i "${buildDir}"/features/*/feature.xml "${S}"/eclipse-build-feature/feature.xml \
|| die 'eclipse_delete-plugins failed'
}
# Prints the first value from manifest file ${1} whose key matches regex ${2},
# unfolding as necessary.
manifest_get() {
sed -n -e '/^\('"${2}"'\): /{h;:A;$bB;n;/^ /!bB;H;bA};d;:B;g;s/^[^:]*: //;s/\n //g;p;q' "${1}" \
|| die 'manifest_get failed'
}
# Deletes values from manifest file ${1} whose keys match regex ${2}, taking
# into account folding.
manifest_delete() {
sed -n -e ':A;/^\('"${2}"'\): /{:B;n;/^ /!{bA};bB};p' -i "${1}" \
|| die 'manifest_delete failed'
}
# Replaces the value for key ${2} in the first section of manifest file ${1}
# with ${3}, or adds the key-value pair to that section if the key was absent.
manifest_replace() {
LC_ALL='C' awk -v key="${2}" -v val="${3}" '
function fold(s, o, l, r) {
o = 2 ; l = length(s) - 1 ; r = substr(s, 1, 1)
while (l > 69) { r = r substr(s, o, 69) "\n " ; o += 69 ; l -= 69 }
return r substr(s, o)
}
BEGIN { FS = ": " }
f { print ; next }
i { if ($0 !~ "^ ") { f = 1 ; print } ; next }
$1 == key { print fold(key FS val) ; i = 1 ; next }
/^\r?$/ { print fold(key FS val) ; print ; f = 1 ; next }
{ print }
END { if (!f) { print fold(key FS val) } }
' "${1}" > "${1}-" && mv "${1}"{-,} || die 'manifest_replace failed'
}
# Executes sed over each XML element with a name matching ${1}, rather than
# over each line. The entire element (and its children) may be removed with the
# 'd' command, or they may be edited using all the usual sed foo. Basically,
# the script argument will be executed only for elements matching ${1}, and the
# sed pattern space will consist of the entire element, including any nested
# elements. Note that this is not perfect and requires no more than one XML
# element per line to be reliable.
sed_xml_element() {
local elem="${1}" ; shift
sed -e '/<\('"${elem}"'\)\([> \t]\|$\)/{:_1;/>/!{N;b_1};/\/>/b_3' \
-e ':_2;/<\/\('"${elem}"'\)>/!{N;b_2};b_3};b;:_3' "${@}"
}

View File

@@ -0,0 +1,43 @@
#! /bin/sh
#
# Tiny startup wrapper for Eclipse
#
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
# Copyright (c) 2007-2008, Jean-Noël Rivasseau <elvanor@gentoo.org>
# Copyright (c) 2004-2008, Gentoo Foundation
#
# Licensed under the GNU General Public License, version 2
#
SLOT="3.4"
[ -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
echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr
exit -1
fi
if [ $(id -u) -eq 0 ] ; then
echo "Do not run eclipse as root user! Exiting ..."
exit -1
fi
[[ "$(java-config -f)" =~ "gcj" ]] \
&& export JAVA_PKG_CLASSMAP="${ECLIPSE_HOME}/eclipse.gcjdb"
eval $(gjl --package "swt-${SLOT}" --get-args)
[ -n "${ECLIPSE_XMS}" ] && VM_ARGS="${VM_ARGS} -Xms${ECLIPSE_XMS}"
[ -n "${ECLIPSE_XMX}" ] && VM_ARGS="${VM_ARGS} -Xmx${ECLIPSE_XMX}"
[ -n "${ECLIPSE_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"
[ -n "${ECLIPSE_MAX_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"
# 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}

View File

@@ -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

View File

@@ -0,0 +1,43 @@
#! /bin/sh
#
# Tiny startup wrapper for Eclipse
#
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
# Copyright (c) 2007-2008, Jean-Noël Rivasseau <elvanor@gentoo.org>
# Copyright (c) 2004-2008, Gentoo Foundation
#
# Licensed under the GNU General Public License, version 2
#
SLOT="3.5"
[ -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
echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr
exit -1
fi
if [ $(id -u) -eq 0 ] ; then
echo "Do not run eclipse as root user! Exiting ..."
exit -1
fi
[[ "$(java-config -f)" =~ "gcj" ]] \
&& export JAVA_PKG_CLASSMAP="${ECLIPSE_HOME}/eclipse.gcjdb"
eval $(gjl --package "swt-${SLOT}" --get-args)
[ -n "${ECLIPSE_XMS}" ] && VM_ARGS="${VM_ARGS} -Xms${ECLIPSE_XMS}"
[ -n "${ECLIPSE_XMX}" ] && VM_ARGS="${VM_ARGS} -Xmx${ECLIPSE_XMX}"
[ -n "${ECLIPSE_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"
[ -n "${ECLIPSE_MAX_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"
# 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}

View File

@@ -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

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>dev-tools</herd>
<herd>java</herd>
<longdescription>
The Eclipse Project is an open source project of eclipse.org, overseen by
a Project Management Committee (PMC) and project leaders. The work is done
in subprojects working against a CVS repository. The Eclipse Project
Charter describes the organization of the project, roles and
responsibilities of the participants, and top level development process
for the project. The JDT and PDE are plug-in tools for the Eclipse
Platform. Together, these three pieces form the Eclipse SDK download, a
complete development environment for Eclipse-based tools, and for
developing Eclipse itself.
</longdescription>
</pkgmetadata>