Gentoo Archives: gentoo-commits

From: "Jean-Noel Rivasseau (elvanor)" <elvanor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/swt: ChangeLog swt-3.4_pre6-r1.ebuild swt-3.3.1.1.ebuild swt-3.4.ebuild
Date: Thu, 31 Jul 2008 09:12:00
Message-Id: E1KOUCS-0005GN-Oh@stork.gentoo.org
1 elvanor 08/07/31 09:11:56
2
3 Modified: ChangeLog swt-3.4_pre6-r1.ebuild swt-3.3.1.1.ebuild
4 Added: swt-3.4.ebuild
5 Log:
6 Commited swt-3.4 final.
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.90 dev-java/swt/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?rev=1.90&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?rev=1.90&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?r1=1.89&r2=1.90
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v
19 retrieving revision 1.89
20 retrieving revision 1.90
21 diff -u -r1.89 -r1.90
22 --- ChangeLog 20 May 2008 21:15:15 -0000 1.89
23 +++ ChangeLog 31 Jul 2008 09:11:56 -0000 1.90
24 @@ -1,6 +1,13 @@
25 # ChangeLog for dev-java/swt
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.89 2008/05/20 21:15:15 betelgeuse Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.90 2008/07/31 09:11:56 elvanor Exp $
29 +
30 +*swt-3.4 (31 Jul 2008)
31 +
32 + 31 Jul 2008; Jean-Noël Rivasseau <elvanor@g.o> swt-3.3.1.1.ebuild,
33 + swt-3.4_pre6-r1.ebuild, +swt-3.4.ebuild:
34 + Added swt-3.4 final. Mozilla/Gecko support is now only provided via xulrunner
35 + (this matches upstream policy as Firefox 3 needs xulrunner-1.9 for example).
36
37 20 May 2008; Petteri Räty <betelgeuse@g.o> swt-3.4_pre6-r1.ebuild:
38 Add ppc64 support. Fixes bug #222971. Thanks to Andrew John Hughes
39
40
41
42 1.4 dev-java/swt/swt-3.4_pre6-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.4_pre6-r1.ebuild?rev=1.4&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.4_pre6-r1.ebuild?rev=1.4&content-type=text/plain
46 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.4_pre6-r1.ebuild?r1=1.3&r2=1.4
47
48 Index: swt-3.4_pre6-r1.ebuild
49 ===================================================================
50 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4_pre6-r1.ebuild,v
51 retrieving revision 1.3
52 retrieving revision 1.4
53 diff -u -r1.3 -r1.4
54 --- swt-3.4_pre6-r1.ebuild 20 May 2008 21:15:15 -0000 1.3
55 +++ swt-3.4_pre6-r1.ebuild 31 Jul 2008 09:11:56 -0000 1.4
56 @@ -1,6 +1,6 @@
57 # Copyright 1999-2008 Gentoo Foundation
58 # Distributed under the terms of the GNU General Public License v2
59 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4_pre6-r1.ebuild,v 1.3 2008/05/20 21:15:15 betelgeuse Exp $
60 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4_pre6-r1.ebuild,v 1.4 2008/07/31 09:11:56 elvanor Exp $
61
62 EAPI="1"
63
64 @@ -80,7 +80,7 @@
65 S="${WORKDIR}"
66
67 src_unpack() {
68 - local DISTFILE="${A}"
69 + local DISTFILE=${A}
70 unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "unable to extract distfile"
71 unpack ./src.zip
72
73
74
75
76 1.6 dev-java/swt/swt-3.3.1.1.ebuild
77
78 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild?rev=1.6&view=markup
79 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild?rev=1.6&content-type=text/plain
80 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild?r1=1.5&r2=1.6
81
82 Index: swt-3.3.1.1.ebuild
83 ===================================================================
84 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild,v
85 retrieving revision 1.5
86 retrieving revision 1.6
87 diff -u -r1.5 -r1.6
88 --- swt-3.3.1.1.ebuild 19 Mar 2008 19:03:08 -0000 1.5
89 +++ swt-3.3.1.1.ebuild 31 Jul 2008 09:11:56 -0000 1.6
90 @@ -1,6 +1,6 @@
91 # Copyright 1999-2008 Gentoo Foundation
92 # Distributed under the terms of the GNU General Public License v2
93 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild,v 1.5 2008/03/19 19:03:08 caster Exp $
94 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild,v 1.6 2008/07/31 09:11:56 elvanor Exp $
95
96 EAPI="1"
97
98 @@ -70,7 +70,7 @@
99 S="${WORKDIR}"
100
101 src_unpack() {
102 - local DISTFILE="${A}"
103 + local DISTFILE=${A}
104 unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "unable to extract distfile"
105 unpack ./src.zip
106
107
108
109
110 1.1 dev-java/swt/swt-3.4.ebuild
111
112 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.4.ebuild?rev=1.1&view=markup
113 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.4.ebuild?rev=1.1&content-type=text/plain
114
115 Index: swt-3.4.ebuild
116 ===================================================================
117 # Copyright 1999-2008 Gentoo Foundation
118 # Distributed under the terms of the GNU General Public License v2
119 # $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4.ebuild,v 1.1 2008/07/31 09:11:56 elvanor Exp $
120
121 EAPI="1"
122
123 inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
124
125 MY_PV="${PV/_pre/M}"
126 MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-200806172000"
127 MY_P="${PN}-${MY_PV}"
128
129 DESCRIPTION="GTK based SWT Library"
130 HOMEPAGE="http://www.eclipse.org/"
131 SRC_URI="x86? (
132 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
133 )
134 x86-fbsd? (
135 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
136 )
137 amd64? (
138 http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
139 )
140 ppc? (
141 http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip
142 )
143 ppc64? (
144 http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
145 )"
146
147 SLOT="3.4"
148 LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
149 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
150
151 IUSE="cairo gnome opengl mozilla xulrunner"
152 COMMON=">=dev-libs/glib-2.6
153 >=x11-libs/gtk+-2.6.8
154 >=dev-libs/atk-1.10.2
155 cairo? ( >=x11-libs/cairo-1.4.14 )
156 gnome? (
157 =gnome-base/libgnome-2*
158 =gnome-base/gnome-vfs-2*
159 =gnome-base/libgnomeui-2*
160 )
161 mozilla? ( net-libs/xulrunner:1.9 )
162 xulrunner? ( net-libs/xulrunner:1.9 )
163 opengl? (
164 virtual/opengl
165 virtual/glu
166 )"
167
168 # Use a blocker to avoid file collisions when upgrading to the slotted version
169 # We cannot use slotmove, java packages are expected to be in /usr/share/PN-SLOT
170 # so this is the only way to prevent collisions
171
172 DEPEND=">=virtual/jdk-1.4
173 !=dev-java/swt-3.4*:3
174 app-arch/unzip
175 x11-libs/libX11
176 x11-libs/libXrender
177 x11-libs/libXt
178 x11-proto/xextproto
179 x11-proto/inputproto
180 ${COMMON}"
181
182 RDEPEND=">=virtual/jre-1.4
183 x11-libs/libXtst
184 ${COMMON}"
185
186 S="${WORKDIR}"
187
188 src_unpack() {
189 local DISTFILE=${A}
190 unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "Unable to extract distfile"
191 unpack "./src.zip"
192
193 # Cleanup the redirtied directory structure
194 rm -rf about_files/ || die
195
196 # Replace the build.xml to allow compilation without Eclipse tasks
197 cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml"
198 mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources"
199
200 # Apply all the patches, including arch-specific
201 # EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" epatch
202
203 sed -i "s/CFLAGS = -O -Wall/CFLAGS = ${CFLAGS} -Wall/" \
204 make_linux.mak || die "Failed to tweak make_linux.mak"
205
206 sed -i "s/MOZILLACFLAGS = -O/MOZILLACFLAGS = ${CXXFLAGS}/" \
207 make_linux.mak || die "Failed to tweak make_linux.mak"
208
209 # Kill some strict-aliasing warnings
210 epatch "${FILESDIR}/${PN}-3.3-callback-pointer-dereferencing.patch"
211 }
212
213 get_gecko() {
214 local gecko
215
216 # order here match the logic in DEPEND and USE flag descriptions
217 #use seamonkey && gecko="seamonkey"
218 use mozilla && gecko="xulrunner"
219 use xulrunner && gecko="xulrunner"
220
221 echo ${gecko}
222 }
223
224 src_compile() {
225 # Drop jikes support as it seems to be unfriendly with SWT
226 java-pkg_filter-compiler jikes
227
228 local AWT_ARCH
229 local JAWTSO="libjawt.so"
230 if [[ $(tc-arch) == 'x86' ]] ; then
231 AWT_ARCH="i386"
232 elif [[ $(tc-arch) == 'ppc' ]] ; then
233 AWT_ARCH="ppc"
234 elif [[ $(tc-arch) == 'ppc64' ]] ; then
235 AWT_ARCH="ppc"
236 else
237 AWT_ARCH="amd64"
238 fi
239 if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then
240 export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}"
241 elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then
242 export AWT_LIB_PATH="${JAVA_HOME}/jre/bin"
243 elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then
244 export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)"
245 else
246 eerror "${JAWTSO} not found in the JDK being used for compilation!"
247 die "cannot build AWT library"
248 fi
249
250 # Fix the pointer size for AMD64
251 [[ ${ARCH} == "amd64" || ${ARCH} == "ppc64" ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
252
253 local platform="linux"
254
255 use elibc_FreeBSD && platform="freebsd"
256
257 local make="emake -f make_${platform}.mak NO_STRIP=y"
258
259 einfo "Building AWT library"
260 ${make} make_awt || die "Failed to build AWT support"
261
262 einfo "Building SWT library"
263 ${make} make_swt || die "Failed to build SWT support"
264
265 einfo "Building JAVA-AT-SPI bridge"
266 ${make} make_atk || die "Failed to build ATK support"
267
268 if use gnome ; then
269 einfo "Building GNOME VFS support"
270 ${make} make_gnome || die "Failed to build GNOME VFS support"
271 fi
272
273 local gecko="$(get_gecko)"
274 if [[ ${gecko} ]]; then
275 einfo "Building the Mozilla component against ${gecko}"
276
277 if [[ "${gecko}" = "xulrunner" ]]; then
278 export XULRUNNER_INCLUDES="$(pkg-config mozilla-gtkmozembed --cflags)"
279 export XULRUNNER_LIBS="$(pkg-config mozilla-gtkmozembed --libs)"
280 export MOZILLA_INCLUDES="$(pkg-config mozilla-gtkmozembed --cflags)"
281 export MOZILLA_LIBS="$(pkg-config mozilla-gtkmozembed --libs)"
282
283 ${make} make_xulrunner || die "Failed to build ${gecko} support"
284 else
285 export MOZILLA_INCLUDES="$(pkg-config ${gecko}-gtkmozembed --cflags)"
286 export MOZILLA_LIBS="$(pkg-config ${gecko}-gtkmozembed --libs)"
287 fi
288
289 ${make} make_mozilla || die "Failed to build ${gecko} support"
290 fi
291
292 if use cairo ; then
293 einfo "Building CAIRO support"
294 ${make} make_cairo || die "Unable to build CAIRO support"
295 fi
296
297 if use opengl ; then
298 einfo "Building OpenGL component"
299 ${make} make_glx || die "Unable to build OpenGL component"
300 fi
301
302 einfo "Building JNI libraries"
303 eant compile
304
305 einfo "Copying missing files"
306 cp -i "${S}/version.txt" "${S}/build/version.txt"
307 cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \
308 "${S}/build/org/eclipse/swt/internal/"
309
310 einfo "Packing JNI libraries"
311 eant jar
312 }
313
314 src_install() {
315 swtArch=${ARCH}
316 use amd64 && swtArch=x86_64
317 use x86-fbsd && swtArch=x86
318
319 sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-3.4-manifest" > "MANIFEST_TMP.MF"
320 java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0"
321
322 java-pkg_sointo /usr/$(get_libdir)
323 java-pkg_doso *.so
324
325 local gecko="$(get_gecko)"
326 if [[ "${gecko}" == "seamonkey" ]]; then
327 local gecko_dir="$(pkg-config ${gecko}-xpcom --variable=libdir)"
328 java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}"
329 elif [[ -n "${gecko}" ]]; then
330 local gecko_dir="$(pkg-config mozilla-gtkmozembed --variable=sdkdir)"
331 java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}"
332 fi
333
334 dohtml about.html || die
335 }