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: ChangeLog swt-3.4_pre6.ebuild
Date: Wed, 02 Apr 2008 22:17:19
Message-Id: E1JhBCL-0003gd-7o@stork.gentoo.org
1 caster 08/04/02 22:12:49
2
3 Modified: ChangeLog
4 Added: swt-3.4_pre6.ebuild
5 Log:
6 Version bump, bug #214012.
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.84 dev-java/swt/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?rev=1.84&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?rev=1.84&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/ChangeLog?r1=1.83&r2=1.84
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v
19 retrieving revision 1.83
20 retrieving revision 1.84
21 diff -u -r1.83 -r1.84
22 --- ChangeLog 19 Mar 2008 19:03:08 -0000 1.83
23 +++ ChangeLog 2 Apr 2008 22:12:48 -0000 1.84
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.83 2008/03/19 19:03:08 caster Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.84 2008/04/02 22:12:48 caster Exp $
29 +
30 +*swt-3.4_pre6 (02 Apr 2008)
31 +
32 + 02 Apr 2008; Vlastimil Babka <caster@g.o> +files/swt-3.4-manifest,
33 + +swt-3.4_pre6.ebuild:
34 + Version bump, bug #214012.
35
36 19 Mar 2008; Vlastimil Babka <caster@g.o> -swt-3.3.ebuild,
37 swt-3.3.1.1.ebuild:
38
39
40
41 1.1 dev-java/swt/swt-3.4_pre6.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.4_pre6.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/swt/swt-3.4_pre6.ebuild?rev=1.1&content-type=text/plain
45
46 Index: swt-3.4_pre6.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.4_pre6.ebuild,v 1.1 2008/04/02 22:12:48 caster Exp $
51
52 EAPI="1"
53
54 inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
55
56 MY_PV="${PV/_pre/M}"
57 MY_DMF="download.eclipse.org/eclipse/downloads/drops/S-${MY_PV}-200803301350"
58 MY_P="${PN}-${MY_PV}"
59
60 DESCRIPTION="GTK based SWT Library"
61 HOMEPAGE="http://www.eclipse.org/"
62 SRC_URI="x86? (
63 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
64 )
65 x86-fbsd? (
66 http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
67 )
68 amd64? (
69 http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
70 )
71 ppc? (
72 http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip
73 )"
74
75 SLOT="3"
76 LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
77 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
78
79 IUSE="cairo firefox gnome seamonkey opengl xulrunner"
80 COMMON=">=dev-libs/glib-2.6
81 >=x11-libs/gtk+-2.6.8
82 >=dev-libs/atk-1.10.2
83 cairo? ( >=x11-libs/cairo-1.0.2 )
84 gnome? (
85 =gnome-base/libgnome-2*
86 =gnome-base/gnome-vfs-2*
87 =gnome-base/libgnomeui-2*
88 )
89 seamonkey? ( !firefox? ( !xulrunner? (
90 =www-client/seamonkey-1*
91 >=dev-libs/nspr-4.6.2
92 ) ) )
93 firefox? ( !xulrunner? (
94 =www-client/mozilla-firefox-2*
95 >=dev-libs/nspr-4.6.2
96 ) )
97 xulrunner? (
98 net-libs/xulrunner:1.8
99 >=dev-libs/nspr-4.6.2
100 )
101 opengl? (
102 virtual/opengl
103 virtual/glu
104 )"
105 DEPEND=">=virtual/jdk-1.4
106 app-arch/unzip
107 x11-libs/libX11
108 x11-libs/libXrender
109 x11-libs/libXt
110 x11-proto/xextproto
111 ${COMMON}"
112
113 RDEPEND=">=virtual/jre-1.4
114 x11-libs/libXtst
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.4-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