comparison buildSrc/armv7hf.gradle @ 8968:eb272f8584c8

Automated merge with http://hg.openjdk.java.net/openjfx/8u40/rt
author kcr
date Fri, 06 Feb 2015 11:18:35 -0800
parents c1c737ec7c60
children 0efae19e83e7
comparison
equal deleted inserted replaced
16:bdf9ae39cd08 17:a9ae3f024347
165 def webCFlags = [extraCFlags].flatten() 165 def webCFlags = [extraCFlags].flatten()
166 def webLFlags = [extraLFlags].flatten() 166 def webLFlags = [extraLFlags].flatten()
167 167
168 def gtkCFlags = [extraCFlags].flatten() 168 def gtkCFlags = [extraCFlags].flatten()
169 def gtkLFlags = [extraLFlags].flatten() 169 def gtkLFlags = [extraLFlags].flatten()
170 setupTools("armv7hf_tools", 170
171 { propFile -> 171 def gtkCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/gtk-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I${sdk}/usr/include/atk-1.0 -I${sdk}/usr/include/cairo -I${sdk}/usr/include/gdk-pixbuf-2.0 -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/gio-unix-2.0/ -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I${sdk}/usr/include/pixman-1 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include/libpng12"
172 ByteArrayOutputStream results = new ByteArrayOutputStream(); 172
173 exec { 173 def gtkLFlags_pkgconfig = "-pthread -L${sdk}/usr/lib/arm-linux-gnueabihf -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXtst"
174 commandLine("$sdk/bin/pkg-config", "--cflags", "gtk+-2.0", "gthread-2.0", "xtst"); 174
175 setStandardOutput(results); 175 gtkCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
176 } 176 gtkLFlags.addAll(gtkLFlags_pkgconfig.split(" "))
177 propFile << "cflags=" << results.toString().trim() << "\n";
178
179 results = new ByteArrayOutputStream();
180 exec {
181 commandLine "$sdk/bin/pkg-config", "--libs", "gtk+-2.0", "gthread-2.0", "xtst"
182 standardOutput = results
183 }
184 propFile << "libs=" << results.toString().trim();
185 },
186 { properties ->
187 if (properties.getProperty("cflags") == null || properties.getProperty("libs") == null ) {
188 fail("pkg-config failed for tools")
189 throw new GradleException("FAIL: pkg-config failed for tools")
190 }
191 gtkCFlags.addAll(properties.getProperty("cflags").split(" "))
192 gtkLFlags.addAll(properties.getProperty("libs").split(" "))
193 }
194 )
195 177
196 def monoclePlatformAdditions = """ 178 def monoclePlatformAdditions = """
197 monocle.glass.platform=Monocle 179 monocle.glass.platform=Monocle
198 monocle.prism.order=es2,sw 180 monocle.prism.order=es2,sw
199 monocle.prism.eglfb=true 181 monocle.prism.eglfb=true
287 gtk.com.sun.javafx.gestures.rotate=true 269 gtk.com.sun.javafx.gestures.rotate=true
288 gtk.com.sun.javafx.gestures.scroll=true""" 270 gtk.com.sun.javafx.gestures.scroll=true"""
289 271
290 def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"]; 272 def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
291 def pangoLinkFlags = [extraLFlags]; 273 def pangoLinkFlags = [extraLFlags];
292 setupTools("armv7hf_pango_tools", 274
293 { propFile -> 275 def pangoCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/glib-2.0/include"
294 ByteArrayOutputStream results = new ByteArrayOutputStream(); 276
295 exec { 277 def pangoLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabihf -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0"
296 commandLine "$sdk/bin/pkg-config", "--cflags", "pangoft2" 278
297 standardOutput = results 279 pangoCCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
298 } 280 pangoLinkFlags.addAll(gtkLFlags_pkgconfig.split(" "))
299 propFile << "cflags=" << results.toString().trim() << "\n";
300
301 results = new ByteArrayOutputStream();
302 exec {
303 commandLine "$sdk/bin/pkg-config", "--libs", "pangoft2"
304 standardOutput = results
305 }
306 propFile << "libs=" << results.toString().trim();
307 },
308 { properties ->
309 pangoCCFlags.addAll(properties.getProperty("cflags").split(" "))
310 pangoLinkFlags.addAll(properties.getProperty("libs").split(" "))
311 }
312 )
313 281
314 def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" : 282 def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
315 ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""] 283 ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
316 def freetypeLinkFlags = [] 284 def freetypeLinkFlags = []
317 setupTools("armv7hf_freetype_tools", 285
318 { propFile -> 286 def freetypeCFlags_pkgconfig = "-I${sdk}/usr/include/freetype2 -I${sdk}/usr/include"
319 ByteArrayOutputStream results = new ByteArrayOutputStream(); 287 def freeytpeLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabihf -lfreetype"
320 exec { 288
321 commandLine "$sdk/bin/pkg-config", "--cflags", "freetype2" 289 freetypeCCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
322 standardOutput = results 290 freetypeLinkFlags.addAll(gtkLFlags_pkgconfig.split(" "))
323 }
324 propFile << "cflags=" << results.toString().trim() << "\n";
325
326 results = new ByteArrayOutputStream();
327 exec {
328 commandLine "$sdk/bin/pkg-config", "--libs", "freetype2"
329 standardOutput = results
330 }
331 propFile << "libs=" << results.toString().trim();
332 },
333 { properties ->
334 freetypeCCFlags.addAll(properties.getProperty("cflags").split(" "))
335 freetypeLinkFlags.addAll(properties.getProperty("libs").split(" "))
336 }
337 )
338 291
339 ARMV7HF.javafxPlatformProperties = "javafx.platform=${ARMV7HF.javafxPlatformDefault}" 292 ARMV7HF.javafxPlatformProperties = "javafx.platform=${ARMV7HF.javafxPlatformDefault}"
340 293
341 ARMV7HF.glass = [:] 294 ARMV7HF.glass = [:]
342 ARMV7HF.glass.javahInclude = [ 295 ARMV7HF.glass.javahInclude = [