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.3.1.1.ebuild
Date: Tue, 15 Jan 2008 12:33:49
Message-Id: E1JEkzC-0005wk-JJ@stork.gentoo.org
1 elvanor 08/01/15 12:33:46
2
3 Modified: ChangeLog
4 Added: swt-3.3.1.1.ebuild
5 Log:
6 OSGi compliant version, swt version bump to 3.3.1.1
7 (Portage version: 2.1.3.19)
8
9 Revision Changes Path
10 1.79 dev-java/swt/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?rev=1.79&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?rev=1.79&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?r1=1.78&r2=1.79
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v
19 retrieving revision 1.78
20 retrieving revision 1.79
21 diff -u -r1.78 -r1.79
22 --- ChangeLog 9 Jan 2008 22:32:46 -0000 1.78
23 +++ ChangeLog 15 Jan 2008 12:33:46 -0000 1.79
24 @@ -1,6 +1,12 @@
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.78 2008/01/09 22:32:46 caster Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.79 2008/01/15 12:33:46 elvanor Exp $
29 +
30 +*swt-3.3.1.1 (15 Jan 2008)
31 +
32 + 15 Jan 2008; Jean-Noël Rivasseau <elvanor@g.o>
33 + +files/swt-3.3-manifest, +swt-3.3.1.1.ebuild:
34 + OSGi compliant version, bump to 3.3.1.1
35
36 09 Jan 2008; Vlastimil Babka <caster@g.o>
37 -files/swt-3.2-cairo-signedness-x86_64.patch, -files/swt-3.2.1-fbsd.patch,
38
39
40
41 1.1 dev-java/swt/swt-3.3.1.1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: swt-3.3.1.1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.3.1.1.ebuild,v 1.1 2008/01/15 12:33:46 elvanor Exp $
51
52 inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
53
54 MY_PV="${PV}"
55 MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-200710231652"
56 MY_P="${PN}-${MY_PV}"
57
58 DESCRIPTION="GTK based SWT Library"
59 HOMEPAGE="http://www.eclipse.org/"
60 SRC_URI="x86? (
61 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
62 )
63 x86-fbsd? (
64 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
65 )
66 amd64? (
67 http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
68 )
69 ppc? (
70 http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip
71 )"
72
73 SLOT="3"
74 LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
75 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
76
77 IUSE="cairo firefox gnome seamonkey opengl xulrunner"
78 COMMON=">=dev-libs/glib-2.6
79 >=x11-libs/gtk+-2.6.8
80 >=dev-libs/atk-1.10.2
81 cairo? ( >=x11-libs/cairo-1.0.2 )
82 gnome? (
83 =gnome-base/libgnome-2*
84 =gnome-base/gnome-vfs-2*
85 =gnome-base/libgnomeui-2*
86 )
87 seamonkey? ( !firefox? ( !xulrunner? (
88 >=www-client/seamonkey-1.0.2
89 >=dev-libs/nspr-4.6.2
90 ) ) )
91 firefox? ( !xulrunner? (
92 >=www-client/mozilla-firefox-2
93 >=dev-libs/nspr-4.6.2
94 ) )
95 xulrunner? (
96 net-libs/xulrunner
97 >=dev-libs/nspr-4.6.2
98 )
99 opengl? (
100 virtual/opengl
101 virtual/glu
102 )"
103 DEPEND=">=virtual/jdk-1.4
104 app-arch/unzip
105 x11-libs/libX11
106 x11-libs/libXrender
107 x11-libs/libXt
108 x11-proto/xextproto
109 ${COMMON}"
110
111 # java-config for the env_var stuff, until it's stabled and forced by eclass
112 RDEPEND=">=virtual/jre-1.4
113 x11-libs/libXtst
114 >=dev-java/java-config-2.0.33
115 ${COMMON}"
116
117 S="${WORKDIR}"
118
119 src_unpack() {
120 local DISTFILE="${A}"
121 unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "unable to extract distfile"
122 unpack ./src.zip
123
124 # unpack "${PATCHSET}.tar.bz2"
125
126 # Cleanup the redirtied directory structure
127 rm -rf about_files/ || die
128
129 # Replace the build.xml to allow compilation without Eclipse tasks
130 cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml"
131 mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources"
132
133 # apply all the patches, including arch-specific
134 # EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" epatch
135
136 sed -i "s/CFLAGS = -O -Wall/CFLAGS = ${CFLAGS} -Wall/" \
137 make_linux.mak \
138 || die "Failed to tweak make_linux.mak"
139
140 sed -i "s/MOZILLACFLAGS = -O/MOZILLACFLAGS = ${CXXFLAGS}/" \
141 make_linux.mak \
142 || die "Failed to tweak make_linux.mak"
143
144 # kill some strict-aliasing warnings
145 epatch "${FILESDIR}/${PN}-3.3-callback-pointer-dereferencing.patch"
146 }
147
148 get_gecko() {
149 local gecko
150
151 # order here match the logic in DEPEND and USE flag descriptions
152 use seamonkey && gecko="seamonkey"
153 use firefox && gecko="firefox"
154 use xulrunner && gecko="xulrunner"
155
156 echo ${gecko}
157 }
158
159 src_compile() {
160 # Drop jikes support as it seems to be unfriendly with SWT
161 java-pkg_filter-compiler jikes
162
163 local AWT_ARCH
164 local JAWTSO="libjawt.so"
165 if [[ $(tc-arch) == 'x86' ]] ; then
166 AWT_ARCH="i386"
167 elif [[ $(tc-arch) == 'ppc' ]] ; then
168 AWT_ARCH="ppc"
169 else
170 AWT_ARCH="amd64"
171 fi
172 if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then
173 export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}"
174 elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then
175 export AWT_LIB_PATH="${JAVA_HOME}/jre/bin"
176 elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then
177 export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)"
178 else
179 eerror "${JAWTSO} not found in the JDK being used for compilation!"
180 die "cannot build AWT library"
181 fi
182
183 # Fix the pointer size for AMD64
184 [[ ${ARCH} == 'amd64' ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
185
186 local platform="linux"
187
188 use elibc_FreeBSD && platform="freebsd"
189
190 local make="emake -f make_${platform}.mak NO_STRIP=y"
191
192 einfo "Building AWT library"
193 ${make} make_awt || die "Failed to build AWT support"
194
195 einfo "Building SWT library"
196 ${make} make_swt || die "Failed to build SWT support"
197
198 einfo "Building JAVA-AT-SPI bridge"
199 ${make} make_atk || die "Failed to build ATK support"
200
201 if use gnome ; then
202 einfo "Building GNOME VFS support"
203 ${make} make_gnome || die "Failed to build GNOME VFS support"
204 fi
205
206 local gecko="$(get_gecko)"
207 if [[ ${gecko} ]]; then
208 einfo "Building the Mozilla component against ${gecko}"
209 #local idir="$(pkg-config ${gecko}-xpcom --variable=includedir)"
210 local inc="$(pkg-config ${gecko}-xpcom --cflags)"
211 local libs="$(pkg-config ${gecko}-xpcom --libs)"
212 MOZILLA_INCLUDES="${inc}" \
213 MOZILLA_LIBS="${libs}" \
214 ${make} make_mozilla || die "Failed to build ${gecko} support"
215 if [[ "${gecko}" = "xulrunner" ]]; then
216 XULRUNNER_INCLUDES="${inc}" \
217 XULRUNNER_LIBS="${libs}" \
218 ${make} make_xulrunner || die "Failed to build ${gecko} support"
219 fi
220 fi
221
222 if use cairo ; then
223 einfo "Building CAIRO support"
224 ${make} make_cairo || die "Unable to build CAIRO support"
225 fi
226
227 if use opengl ; then
228 einfo "Building OpenGL component"
229 ${make} make_glx || die "Unable to build OpenGL component"
230 fi
231
232 einfo "Building JNI libraries"
233 eant compile
234
235 einfo "Copying missing files"
236 cp -i "${S}/version.txt" "${S}/build/version.txt"
237 cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \
238 "${S}/build/org/eclipse/swt/internal/"
239
240 einfo "Packing JNI libraries"
241 eant jar
242 }
243
244 src_install() {
245 swtArch=${ARCH}
246 use amd64 && swtArch=x86_64
247 use x86-fbsd && swtArch=x86
248
249 sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-3.3-manifest" > MANIFEST_TMP.MF
250 java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0"
251
252 java-pkg_sointo /usr/$(get_libdir)
253 java-pkg_doso *.so
254
255 local gecko="$(get_gecko)"
256 if [[ -n "${gecko}" ]]; then
257 local gecko_dir="$(pkg-config ${gecko}-xpcom --variable=libdir)"
258 java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}"
259 fi
260
261 dohtml about.html || die
262 }
263
264
265
266 --
267 gentoo-commits@l.g.o mailing list