1 |
elvanor 08/07/28 20:12:29 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: eclipse-sdk-3.3.1.1-r2.ebuild |
5 |
Log: |
6 |
Changed icu4j requirement for eclipse-3.3 (now forces SLOT=0) |
7 |
(Portage version: 2.1.4.4) |
8 |
|
9 |
Revision Changes Path |
10 |
1.145 dev-util/eclipse-sdk/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/ChangeLog?rev=1.145&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/ChangeLog?rev=1.145&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/ChangeLog?r1=1.144&r2=1.145 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v |
19 |
retrieving revision 1.144 |
20 |
retrieving revision 1.145 |
21 |
diff -u -r1.144 -r1.145 |
22 |
--- ChangeLog 17 Apr 2008 08:43:37 -0000 1.144 |
23 |
+++ ChangeLog 28 Jul 2008 20:12:29 -0000 1.145 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for dev-util/eclipse-sdk |
26 |
# Copyright 2003-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v 1.144 2008/04/17 08:43:37 caster Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v 1.145 2008/07/28 20:12:29 elvanor Exp $ |
29 |
+ |
30 |
+*eclipse-sdk-3.3.1.1-r2 (28 Jul 2008) |
31 |
+ |
32 |
+ 28 Jul 2008; Jean-Noël Rivasseau <elvanor@g.o> |
33 |
+ +eclipse-sdk-3.3.1.1-r2.ebuild: |
34 |
+ Changed dependency on icu4j to SLOT=0, now that icu4j-4.0 is in tree. |
35 |
|
36 |
17 Apr 2008; Vlastimil Babka <caster@g.o> files/eclipse-3.2-r1, |
37 |
files/3.3/eclipse-3.3-r1: |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1-r2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1-r2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1-r2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: eclipse-sdk-3.3.1.1-r2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 2007-2008 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1-r2.ebuild,v 1.1 2008/07/28 20:12:29 elvanor Exp $ |
51 |
|
52 |
# Tomcat is almost no longer needed in 3.3 and removed in 3.4. |
53 |
# See bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173692 |
54 |
# Currently we remove the Tomcat stuff entirely - potentially this can still break things. |
55 |
# We'll put it back if there is any bug report, which is unlikely. |
56 |
|
57 |
# To unbundle a jar, do the following: |
58 |
# 1) Rewrite the ebuild so it uses OSGi packaging |
59 |
# 2) Add the dependency and add it to gentoo_jars/system_jars |
60 |
# 3) Remove it from the build directory, and don't forget to modify the main Ant file |
61 |
# so that it does *NOT* copy the file at the end |
62 |
# 4) Install the symlink itself via java-pkg_jarfrom |
63 |
|
64 |
# Jetty, Tomcat-jasper and Lucene analysis (1.9.1) jars have to stay bundled for now, until someone does some work on them. |
65 |
# Hopefully, wltjr will soon package tomcat-jasper. |
66 |
|
67 |
# Current patches are hard to maintain when revbumping. |
68 |
# Two solutions: |
69 |
# 1) Split patches so that there is one per file |
70 |
# 2) Use sed, better solution I would say. |
71 |
|
72 |
EAPI="1" |
73 |
JAVA_PKG_IUSE="doc" |
74 |
inherit java-pkg-2 java-ant-2 check-reqs |
75 |
|
76 |
DMF="R-${PV}-200710231652" |
77 |
MY_A="eclipse-sourceBuild-srcIncluded-${PV/.0}.zip" |
78 |
|
79 |
DESCRIPTION="Eclipse Tools Platform" |
80 |
HOMEPAGE="http://www.eclipse.org/" |
81 |
SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/${DMF}/${MY_A}" |
82 |
|
83 |
SLOT="3.3" |
84 |
LICENSE="EPL-1.0" |
85 |
IUSE="" |
86 |
KEYWORDS="~amd64 ~x86" |
87 |
|
88 |
S=${WORKDIR} |
89 |
PATCHDIR="${FILESDIR}/${SLOT}" |
90 |
FEDORA="${PATCHDIR}/fedora" |
91 |
ECLIPSE_DIR="/usr/lib/eclipse-${SLOT}" |
92 |
|
93 |
CDEPEND=">=dev-java/ant-eclipse-ecj-3.3 |
94 |
dev-java/ant-core |
95 |
dev-java/ant-nodeps |
96 |
=dev-java/junit-3* |
97 |
dev-java/junit:4 |
98 |
<dev-java/swt-3.4_alpha:3 |
99 |
>=dev-java/jsch-0.1.36-r1 |
100 |
>=dev-java/icu4j-3.6.1:0 |
101 |
>=dev-java/commons-el-1.0-r2 |
102 |
>=dev-java/commons-logging-1.1-r6 |
103 |
>=dev-java/tomcat-servlet-api-5.5.25-r1:2.4 |
104 |
dev-java/lucene:1.9" |
105 |
|
106 |
RDEPEND=">=virtual/jre-1.5 |
107 |
${CDEPEND}" |
108 |
|
109 |
DEPEND=">=virtual/jdk-1.5 |
110 |
sys-apps/findutils |
111 |
dev-java/cldc-api:1.1 |
112 |
app-arch/unzip |
113 |
app-arch/zip |
114 |
${CDEPEND}" |
115 |
|
116 |
JAVA_PKG_BSFIX="off" |
117 |
|
118 |
pkg_setup() { |
119 |
java-pkg-2_pkg_setup |
120 |
|
121 |
CHECKREQS_MEMORY="768" |
122 |
check_reqs |
123 |
|
124 |
eclipseArch=${ARCH} |
125 |
use amd64 && eclipseArch="x86_64" |
126 |
} |
127 |
|
128 |
src_unpack() { |
129 |
unpack ${A} |
130 |
patch-apply |
131 |
remove-bundled-stuff |
132 |
|
133 |
# No warnings / Java 5 / all output should be directed to stdout |
134 |
find "${S}" -type f -name '*.xml' -exec \ |
135 |
sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" -e "s:(\"compilerArg\" value=\"):\1-nowarn :g" \ |
136 |
-e "s:(<property name=\"javacSource\" value=)\".*\":\1\"1.5\":g" \ |
137 |
-e "s:(<property name=\"javacTarget\" value=)\".*\":\1\"1.5\":g" -e "s:output=\".*(txt|log).*\"::g" -i {} \; |
138 |
|
139 |
# JDK home |
140 |
sed -r -e "s:^(JAVA_HOME =) .*:\1 $(java-config --jdk-home):" -e "s:gcc :gcc ${CFLAGS} :" \ |
141 |
-i plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile || die "sed Makefile failed" |
142 |
|
143 |
while read line; do |
144 |
java-ant_rewrite-classpath "$line" > /dev/null |
145 |
done < <(find "${S}" -type f -name "build.xml" ) |
146 |
} |
147 |
|
148 |
src_compile() { |
149 |
# Figure out correct boot classpath |
150 |
local bootClassPath=$(java-config --runtime) |
151 |
einfo "Using boot classpath ${bootClassPath}" |
152 |
|
153 |
java-pkg_force-compiler ecj-3.3 |
154 |
|
155 |
# system_jars will be used when compiling (javac) |
156 |
# gentoo_jars will be used when building JSPs and other ant tasks (not javac) |
157 |
|
158 |
local systemJars="$(java-pkg_getjars swt-3,icu4j,ant-core,jsch,ant-nodeps,junit-4,tomcat-servlet-api-2.4,lucene-1.9):$(java-pkg_getjars --build-only cldc-api-1.1)" |
159 |
local gentooJars="$(java-pkg_getjars ant-core,icu4j,jsch,commons-logging,commons-el,tomcat-servlet-api-2.4)" |
160 |
local options="-q -Dnobootstrap=true -Dlibsconfig=true -Dbootclasspath=${bootClassPath} -DinstallOs=linux \ |
161 |
-DinstallWs=gtk -DinstallArch=${eclipseArch} -Djava5.home=$(java-config --jdk-home)" |
162 |
|
163 |
use doc && options="${options} -Dgentoo.javadoc=true" |
164 |
|
165 |
ANT_OPTS=-Xmx1024M ANT_TASKS="ant-nodeps" eant ${options} -Dgentoo.classpath="${systemJars}" -Dgentoo.jars="${gentooJars//:/,}" |
166 |
} |
167 |
|
168 |
src_install() { |
169 |
dodir /usr/lib |
170 |
|
171 |
[[ -f result/linux-gtk-${eclipseArch}-sdk.tar.gz ]] || die "tar.gz bundle was not built properly!" |
172 |
tar zxf "result/linux-gtk-${eclipseArch}-sdk.tar.gz" -C "${D}/usr/lib" || die "Failed to extract the built package" |
173 |
|
174 |
mv "${D}/usr/lib/eclipse" "${D}/${ECLIPSE_DIR}" |
175 |
|
176 |
# Install startup script |
177 |
newbin "${FILESDIR}"/${SLOT}/eclipse-${SLOT}-r1 eclipse-${SLOT} |
178 |
|
179 |
# Chmod the actual binary in the Eclipse dir |
180 |
chmod +x "${D}/${ECLIPSE_DIR}/eclipse" |
181 |
|
182 |
insinto "/etc" && doins "${FILESDIR}/${SLOT}/eclipserc" |
183 |
|
184 |
make_desktop_entry eclipse-${SLOT} "Eclipse ${PV}" "${ECLIPSE_DIR}/icon.xpm" |
185 |
|
186 |
cd "${D}/${ECLIPSE_DIR}" |
187 |
install-link-system-jars |
188 |
} |
189 |
|
190 |
pkg_postinst() { |
191 |
einfo |
192 |
einfo "Welcome to Eclipse-3.3 (Europa)!" |
193 |
einfo |
194 |
einfo "You can now install plugins via Update Manager without any" |
195 |
einfo "tweaking. This is the recommended way to install new features for Eclipse." |
196 |
einfo |
197 |
einfo "Please read http://gentoo-wiki.com/Eclipse" |
198 |
einfo "It contains a lot of useful information and help about Eclipse on Gentoo." |
199 |
} |
200 |
|
201 |
# ----------------------------------------------------------------------------- |
202 |
# Helper functions |
203 |
# ----------------------------------------------------------------------------- |
204 |
|
205 |
install-link-system-jars() { |
206 |
|
207 |
pushd plugins/ > /dev/null |
208 |
java-pkg_jarfrom swt-3 |
209 |
|
210 |
mkdir "org.apache.ant" |
211 |
mkdir "org.apache.ant/META-INF/" |
212 |
mkdir "org.apache.ant/lib" |
213 |
cp "${FILESDIR}/${SLOT}/ant-osgi-manifest.mf" "org.apache.ant/META-INF/MANIFEST.MF" |
214 |
pushd org.apache.ant/lib > /dev/null |
215 |
java-pkg_jarfrom ant-core |
216 |
java-pkg_jarfrom ant-nodeps |
217 |
popd > /dev/null |
218 |
|
219 |
java-pkg_jarfrom icu4j |
220 |
java-pkg_jarfrom jsch |
221 |
java-pkg_jarfrom commons-el |
222 |
java-pkg_jarfrom commons-logging |
223 |
java-pkg_jarfrom lucene-1.9 |
224 |
java-pkg_jarfrom tomcat-servlet-api-2.4 |
225 |
|
226 |
popd > /dev/null |
227 |
|
228 |
pushd plugins/org.junit_*/ > /dev/null |
229 |
java-pkg_jarfrom junit |
230 |
popd > /dev/null |
231 |
|
232 |
pushd plugins/org.junit4*/ > /dev/null |
233 |
java-pkg_jarfrom junit-4 |
234 |
popd > /dev/null |
235 |
} |
236 |
|
237 |
patch-apply() { |
238 |
# Patch launcher source |
239 |
mkdir launchertmp |
240 |
unzip -qq -d launchertmp plugins/org.eclipse.platform/launchersrc.zip > /dev/null || die "unzip failed" |
241 |
pushd launchertmp/ > /dev/null |
242 |
epatch "${PATCHDIR}/launcher_double-free.diff" |
243 |
sed -i "s/CFLAGS\ =\ -O\ -s\ -Wall/CFLAGS = ${CFLAGS}\ -Wall/" library/gtk/make_linux.mak \ |
244 |
|| die "Failed to tweak make_linux.mak" |
245 |
zip -q -6 -r ../launchersrc.zip * >/dev/null || die "zip failed" |
246 |
popd > /dev/null |
247 |
mv launchersrc.zip plugins/org.eclipse.platform/launchersrc.zip |
248 |
rm -rf launchertmp |
249 |
|
250 |
# Disable SWT, JDT-Tool, JDK-6 |
251 |
epatch "${PATCHDIR}/disable-swt.diff" |
252 |
epatch "${PATCHDIR}/disable-jdt-tool.diff" |
253 |
epatch "${PATCHDIR}/disable-jdk6.diff" |
254 |
epatch "${PATCHDIR}/set-java-home.diff" # this setups the java5 home variable |
255 |
|
256 |
# Following are patches from Fedora - I did not investigate this yet |
257 |
|
258 |
epatch "${FEDORA}/eclipse-libupdatebuild2.patch" |
259 |
|
260 |
# Fedora does not apply this anymore because they checkout |
261 |
# org.eclipse.equinox.initializer project from cvs. Untill a fix, we'll |
262 |
# keep the old patch |
263 |
pushd plugins/org.eclipse.core.runtime >/dev/null |
264 |
epatch "${FEDORA}/eclipse-fileinitializer.patch" |
265 |
popd >/dev/null |
266 |
|
267 |
# Generic releng plugins that can be used to build plugins |
268 |
# https://www.redhat.com/archives/fedora-devel-java-list/2006-April/msg00048.html |
269 |
pushd plugins/org.eclipse.pde.build > /dev/null |
270 |
# Patch 53 |
271 |
epatch "${FEDORA}/eclipse-pde.build-add-package-build.patch" |
272 |
sed -e "s:@eclipse_base@:${ECLIPSE_DIR}:g" -i templates/package-build/build.properties |
273 |
popd > /dev/null |
274 |
|
275 |
# Gentoo patch to support jsch-0.1.36 - ali_bush |
276 |
# Already fixed in upstream svn. Remove after next release? |
277 |
|
278 |
pushd "plugins/org.eclipse.jsch.ui" > /dev/null |
279 |
epatch "${PATCHDIR}/eclipse-jsch-api-update.patch" |
280 |
popd > /dev/null |
281 |
|
282 |
# Later we could produce a patch out of all these sed, but this is not the best solution |
283 |
# since this would make a lot of patches (x86, x86_64...) and would be hard to revbump |
284 |
|
285 |
# Following adds an additional classpath when building JSPs |
286 |
|
287 |
sed -i '/<path id="@dot\.classpath">/ a\ |
288 |
<filelist dir="" files="${gentoo.jars}" />' "plugins/org.eclipse.help.webapp/build.xml" |
289 |
|
290 |
# Following allows the doc USE flag to be honored |
291 |
|
292 |
sed -i -e '/<target name="generateJavadoc" depends="getJavadocPath"/ c\ |
293 |
<target name="generateJavadoc" depends="getJavadocPath" if="gentoo.javadoc">' \ |
294 |
-e '/<replace file="\${basedir}\/\${optionsFile}" token="@rt@" value="\${bootclasspath}/ c\ |
295 |
<replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}:${gentoo.classpath}" />' \ |
296 |
"plugins/org.eclipse.platform.doc.isv/buildDoc.xml" |
297 |
|
298 |
# Following disables Tomcat entirely |
299 |
|
300 |
sed -i '/plugins\/org\.eclipse\.tomcat"/{N;N;N;N;d;}' "features/org.eclipse.platform/build.xml" |
301 |
sed -i '/org\.eclipse\.tomcat/{N;N;N;d;}' "plugins/org.eclipse.platform.source/build.xml" |
302 |
sed -i '/<ant.*org\.eclipse\.tomcat/{N;N;d;}' "assemble.org.eclipse.sdk.linux.gtk.${eclipseArch}.xml" |
303 |
|
304 |
# This allows to compile osgi.util and osgi.service, and fixes IPluginDescriptor.class which is present compiled |
305 |
|
306 |
sed -i -e 's/<src path="\."/<src path="org"/' -e '/<include name="org\/"\/>/ d' \ |
307 |
-e '/<subant antfile="\${customBuildCallbacks}" target="pre\.gather\.bin\.parts" failonerror="false" buildpath="\.">/ { n;n;n; a\ |
308 |
<copy todir="${destination.temp.folder}/org.eclipse.osgi.services_3.1.200.v20070605" failonerror="true" overwrite="false"> \ |
309 |
<fileset dir="${build.result.folder}/@dot"> \ |
310 |
<include name="**"/> \ |
311 |
</fileset> \ |
312 |
</copy> |
313 |
}' "plugins/org.eclipse.osgi.services/build.xml" |
314 |
|
315 |
sed -i -e 's/<src path="\."/<src path="org"/' -e '/<include name="org\/"\/>/ d' \ |
316 |
-e '/<subant antfile="\${customBuildCallbacks}" target="pre\.gather\.bin\.parts" failonerror="false" buildpath="\.">/ { n;n;n; a\ |
317 |
<copy todir="${destination.temp.folder}/org.eclipse.osgi.util_3.1.200.v20070605" failonerror="true" overwrite="false"> \ |
318 |
<fileset dir="${build.result.folder}/@dot"> \ |
319 |
<include name="**"/> \ |
320 |
</fileset> \ |
321 |
</copy> |
322 |
}' "plugins/org.eclipse.osgi.util/build.xml" |
323 |
|
324 |
sed -i '/<mkdir dir="${temp\.folder}\/runtime_registry_compatibility\.jar\.bin"\/>/ a\ |
325 |
<mkdir dir="classes"/> \ |
326 |
<copy todir="classes" failonerror="true" overwrite="false"> \ |
327 |
<fileset dir="${build.result.folder}/../org.eclipse.core.runtime/@dot/" includes="**/IPluginDescriptor.class" > \ |
328 |
</fileset> \ |
329 |
</copy>' "plugins/org.eclipse.core.runtime.compatibility.registry/build.xml" |
330 |
|
331 |
# This removes the copying operation for bundled jars |
332 |
|
333 |
sed -i -e "s/<copy.*com\.jcraft\.jsch.*\/>//" -e "s/<copy.*com\.ibm\.icu.*\/>//" -e "s/<copy.*org\.apache\.commons\.el_.*\/>//" \ |
334 |
-e "s/<copy.*org\.apache\.commons\.logging_.*\/>//" -e "s/<copy.*javax\.servlet\.jsp_.*\/>//" -e "s/<copy.*javax\.servlet_.*\/>//" \ |
335 |
-e "s/<copy.*org\.apache\.lucene_.*\/>//" "package.org.eclipse.sdk.linux.gtk.${eclipseArch}.xml" |
336 |
|
337 |
# -e "s/<copy.*org\.apache\.lucene\.analysis_.*\/>//" |
338 |
} |
339 |
|
340 |
remove-bundled-stuff() { |
341 |
# Remove pre-built eclipse binaries |
342 |
find "${S}" -type f -name eclipse | xargs rm |
343 |
# ... .so libraries |
344 |
find "${S}" -type f -name '*.so' | xargs rm |
345 |
# ... .jar files |
346 |
rm plugins/org.eclipse.swt/extra_jars/exceptions.jar plugins/org.eclipse.osgi/osgi/osgi*.jar \ |
347 |
plugins/org.eclipse.osgi/supplement/osgi/osgi.jar |
348 |
|
349 |
rm -rf plugins/org.eclipse.swt.* |
350 |
rm -rf plugins/org.apache.ant_* |
351 |
rm plugins/org.apache.commons.*.jar |
352 |
rm plugins/com.jcraft.jsch* |
353 |
rm plugins/com.ibm.icu* |
354 |
rm plugins/org.junit_*/*.jar |
355 |
rm plugins/org.junit4*/*.jar |
356 |
rm plugins/javax.*.jar |
357 |
rm plugins/org.apache.lucene_*.jar |
358 |
|
359 |
# Removing Tomcat stuff |
360 |
|
361 |
rm -rf "plugins/org.eclipse.tomcat/" |
362 |
|
363 |
# Remove bundled classes |
364 |
|
365 |
rm -rf "plugins/org.eclipse.osgi.services/org" |
366 |
unzip -q "plugins/org.eclipse.osgi.services/src.zip" -d "plugins/org.eclipse.osgi.services/" |
367 |
rm -rf "plugins/org.eclipse.osgi.util/org" |
368 |
unzip -q "plugins/org.eclipse.osgi.util/src.zip" -d "plugins/org.eclipse.osgi.util/" |
369 |
|
370 |
rm -rf plugins/org.eclipse.jdt.core/scripts/*.class |
371 |
rm -rf plugins/org.eclipse.core.runtime.compatibility.registry/classes |
372 |
} |