Gentoo Archives: gentoo-commits

From: "Vlastimil Babka (caster)" <caster@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/swt: metadata.xml ChangeLog swt-3.6.1.ebuild swt-3.6.ebuild
Date: Sat, 27 Nov 2010 00:03:23
Message-Id: 20101126234742.C6B4420051@flycatcher.gentoo.org
1 caster 10/11/26 23:47:42
2
3 Modified: metadata.xml ChangeLog swt-3.6.ebuild
4 Added: swt-3.6.1.ebuild
5 Log:
6 Version bump. Fixes bug #342931. Xulrunner dep restricted to 1.9 as 2.0 is not supported anymore. Disable the flag if you have xulrunner-2.0. In future versions, swt should use webkit instead. Bug #335165.
7
8 (Portage version: 2.2.0_alpha5/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.5 dev-java/swt/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/metadata.xml?rev=1.5&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/metadata.xml?rev=1.5&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/metadata.xml?r1=1.4&r2=1.5
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/metadata.xml,v
20 retrieving revision 1.4
21 retrieving revision 1.5
22 diff -u -r1.4 -r1.5
23 --- metadata.xml 19 Nov 2006 18:41:13 -0000 1.4
24 +++ metadata.xml 26 Nov 2010 23:47:42 -0000 1.5
25 @@ -7,4 +7,7 @@
26 Eclipse platform in an operating system independent manner. It is analogous to
27 AWT/Swing in Java with a difference - SWT uses a rich set of native widgets.
28 </longdescription>
29 + <use>
30 + <flag name="xulrunner">Embedded browser support via xulrunner-1.9 (1.8 for swt-3.3). Xulrunner 2.0 is not supported, will be replaced by webkit in 3.7.</flag>
31 + </use>
32 </pkgmetadata>
33
34
35
36 1.129 dev-java/swt/ChangeLog
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/ChangeLog?rev=1.129&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/ChangeLog?rev=1.129&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/ChangeLog?r1=1.128&r2=1.129
41
42 Index: ChangeLog
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v
45 retrieving revision 1.128
46 retrieving revision 1.129
47 diff -u -r1.128 -r1.129
48 --- ChangeLog 16 Aug 2010 09:38:50 -0000 1.128
49 +++ ChangeLog 26 Nov 2010 23:47:42 -0000 1.129
50 @@ -1,6 +1,14 @@
51 # ChangeLog for dev-java/swt
52 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
53 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.128 2010/08/16 09:38:50 ali_bush Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.129 2010/11/26 23:47:42 caster Exp $
55 +
56 +*swt-3.6.1 (26 Nov 2010)
57 +
58 + 26 Nov 2010; Vlastimil Babka <caster@g.o> swt-3.6.ebuild,
59 + +swt-3.6.1.ebuild, metadata.xml:
60 + Version bump. Fixes bug #342931. Xulrunner dep restricted to 1.9 as 2.0 is
61 + not supported anymore. Disable the flag if you have xulrunner-2.0. In
62 + future versions, swt should use webkit instead. Bug #335165.
63
64 *swt-3.6 (16 Aug 2010)
65
66
67
68
69 1.2 dev-java/swt/swt-3.6.ebuild
70
71 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/swt-3.6.ebuild?rev=1.2&view=markup
72 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/swt-3.6.ebuild?rev=1.2&content-type=text/plain
73 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/swt-3.6.ebuild?r1=1.1&r2=1.2
74
75 Index: swt-3.6.ebuild
76 ===================================================================
77 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.6.ebuild,v
78 retrieving revision 1.1
79 retrieving revision 1.2
80 diff -u -r1.1 -r1.2
81 --- swt-3.6.ebuild 16 Aug 2010 09:38:50 -0000 1.1
82 +++ swt-3.6.ebuild 26 Nov 2010 23:47:42 -0000 1.2
83 @@ -1,6 +1,6 @@
84 # Copyright 1999-2010 Gentoo Foundation
85 # Distributed under the terms of the GNU General Public License v2
86 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.6.ebuild,v 1.1 2010/08/16 09:38:50 ali_bush Exp $
87 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.6.ebuild,v 1.2 2010/11/26 23:47:42 caster Exp $
88
89 EAPI=2
90
91 @@ -42,7 +42,7 @@
92 =gnome-base/gnome-vfs-2*
93 =gnome-base/libgnomeui-2*
94 )
95 - xulrunner? ( net-libs/xulrunner:1.9 )
96 + xulrunner? ( =net-libs/xulrunner-1.9* )
97 opengl? (
98 virtual/opengl
99 virtual/glu
100
101
102
103 1.1 dev-java/swt/swt-3.6.1.ebuild
104
105 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/swt-3.6.1.ebuild?rev=1.1&view=markup
106 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/swt/swt-3.6.1.ebuild?rev=1.1&content-type=text/plain
107
108 Index: swt-3.6.1.ebuild
109 ===================================================================
110 # Copyright 1999-2010 Gentoo Foundation
111 # Distributed under the terms of the GNU General Public License v2
112 # $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.6.1.ebuild,v 1.1 2010/11/26 23:47:42 caster Exp $
113
114 EAPI=2
115
116 inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
117
118 MY_PV="${PV/_rc/RC}"
119 MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-201009090800"
120 MY_P="${PN}-${MY_PV}"
121
122 DESCRIPTION="GTK based SWT Library"
123 HOMEPAGE="http://www.eclipse.org/"
124 SRC_URI="x86? (
125 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
126 )
127 x86-fbsd? (
128 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
129 )
130 amd64? (
131 http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
132 )
133 ppc? (
134 http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip
135 )
136 ppc64? (
137 http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
138 )"
139
140 SLOT="3.6"
141 LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
142 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
143
144 IUSE="cairo gnome opengl xulrunner"
145 COMMON=">=dev-libs/glib-2.6
146 >=x11-libs/gtk+-2.6.8
147 >=dev-libs/atk-1.10.2
148 cairo? ( >=x11-libs/cairo-1.4.14 )
149 gnome? (
150 =gnome-base/libgnome-2*
151 =gnome-base/gnome-vfs-2*
152 =gnome-base/libgnomeui-2*
153 )
154 xulrunner? ( =net-libs/xulrunner-1.9* )
155 opengl? (
156 virtual/opengl
157 virtual/glu
158 )
159 x11-libs/libXtst"
160
161 # Use a blocker to avoid file collisions when upgrading to the slotted version
162 # We cannot use slotmove, java packages are expected to be in /usr/share/PN-SLOT
163 # so this is the only way to prevent collisions
164 # libXtst/xextproto is done like this due to the XTest.h move - bug #292244
165
166 DEPEND=">=virtual/jdk-1.4
167 app-arch/unzip
168 x11-libs/libX11
169 x11-libs/libXrender
170 x11-libs/libXt
171 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1 )
172 x11-proto/inputproto
173 dev-util/pkgconfig
174 ${COMMON}"
175
176 RDEPEND=">=virtual/jre-1.4
177 ${COMMON}"
178
179 S="${WORKDIR}"
180
181 src_unpack() {
182 local DISTFILE=${A}
183 unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "Unable to extract distfile"
184 unpack "./src.zip"
185
186 # Cleanup the redirtied directory structure
187 rm -rf about_files/ || die
188 }
189
190 java_prepare() {
191 # Replace the build.xml to allow compilation without Eclipse tasks
192 cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml"
193 mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources"
194
195 # Fix Makefiles to respect flags and work with --as-needed
196 epatch "${FILESDIR}"/as-needed-and-flag-fixes-3.6.patch
197 }
198
199 src_compile() {
200 # Drop jikes support as it seems to be unfriendly with SWT
201 java-pkg_filter-compiler jikes
202
203 local AWT_ARCH
204 local JAWTSO="libjawt.so"
205 if [[ $(tc-arch) == 'x86' ]] ; then
206 AWT_ARCH="i386"
207 elif [[ $(tc-arch) == 'ppc' ]] ; then
208 AWT_ARCH="ppc"
209 elif [[ $(tc-arch) == 'ppc64' ]] ; then
210 AWT_ARCH="ppc64"
211 else
212 AWT_ARCH="amd64"
213 fi
214 if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then
215 export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}"
216 elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then
217 export AWT_LIB_PATH="${JAVA_HOME}/jre/bin"
218 elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then
219 export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)"
220 else
221 eerror "${JAWTSO} not found in the JDK being used for compilation!"
222 die "cannot build AWT library"
223 fi
224
225 # Fix the pointer size for AMD64
226 [[ ${ARCH} == "amd64" || ${ARCH} == "ppc64" ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
227
228 local platform="linux"
229
230 use elibc_FreeBSD && platform="freebsd"
231
232 local make="emake -f make_${platform}.mak NO_STRIP=y CC=$(tc-getCC) CXX=$(tc-getCXX)"
233
234 einfo "Building AWT library"
235 ${make} make_awt || die "Failed to build AWT support"
236
237 einfo "Building SWT library"
238 ${make} make_swt || die "Failed to build SWT support"
239
240 einfo "Building JAVA-AT-SPI bridge"
241 ${make} make_atk || die "Failed to build ATK support"
242
243 if use gnome ; then
244 einfo "Building GNOME VFS support"
245 ${make} make_gnome || die "Failed to build GNOME VFS support"
246 fi
247
248 if use xulrunner ; then
249 einfo "Building the Mozilla component against xulrunner-1.9"
250
251 export MOZILLA_INCLUDES="$(pkg-config --cflags libxul libxul-embedding)"
252 # the -R is a workaround for bug #234934
253 export MOZILLA_LIBS="-Wl,-R$(pkg-config libxul --variable=sdkdir) $(pkg-config --libs libxul libxul-embedding)"
254
255 ${make} make_mozilla || die "Failed to build Mozilla support"
256
257 # upstream ships libswt-xulrunner*.so even though the build.sh does not
258 # build it anymore... missing this file leads to another instance
259 # of bug #234934 so we build it too
260 einfo "Building the xulrunner component against xulrunner-1.9"
261
262 export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}"
263 export XULRUNNER_LIBS="${MOZILLA_LIBS}"
264
265 ${make} make_xulrunner || die "Failed to build xulrunner support"
266
267 ${make} make_xpcominit || die "Failed to build xpcominit support"
268 fi
269
270 if use cairo ; then
271 einfo "Building CAIRO support"
272 ${make} make_cairo || die "Unable to build CAIRO support"
273 fi
274
275 if use opengl ; then
276 einfo "Building OpenGL component"
277 ${make} make_glx || die "Unable to build OpenGL component"
278 fi
279
280 einfo "Building JNI libraries"
281 eant compile
282
283 einfo "Copying missing files"
284 cp -i "${S}/version.txt" "${S}/build/version.txt"
285 cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \
286 "${S}/build/org/eclipse/swt/internal/"
287
288 einfo "Packing JNI libraries"
289 eant jar
290 }
291
292 src_install() {
293 swtArch=${ARCH}
294 use amd64 && swtArch=x86_64
295 use x86-fbsd && swtArch=x86
296
297 sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-${SLOT}-manifest" > "MANIFEST_TMP.MF"
298 java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0"
299
300 java-pkg_sointo /usr/$(get_libdir)
301 java-pkg_doso *.so
302
303 if use xulrunner; then
304 local gecko_dir="$(pkg-config libxul --variable=sdkdir)"
305 java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}"
306 fi
307
308 dohtml about.html || die
309 }
310
311 pkg_postinst() {
312 if use xulrunner; then
313 local gecko_dir="$(pkg-config libxul --variable=sdkdir)"
314 elog "You built swt with xulrunner support. For your custom applications please set"
315 elog "MOZILLA_FIVE_HOME environment variable to ${gecko_dir}"
316 fi
317 }