1 /* 2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 ext.X86EGL = [:] 27 28 def sdk 29 def compilerHome 30 def compilerPrefix 31 def pkgconfig 32 def jniPlatform 33 if (IS_MAC) { 34 jniPlatform="darwin" 35 fetchExternalTools('X86EGL', [ "x86egl-01.tgz" ], 36 rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS) 37 sdk=file("${rootProject.CROSS_TOOLS_DIR}/x86egl-01") 38 pkgconfig="${sdk}/bin/pkg-config" 39 } else { 40 jniPlatform="linux" 41 sdk="" 42 pkgconfig="pkg-config" 43 } 44 45 if (rootProject.hasProperty("X86EGL_COMPILER")) { 46 logger.quiet "Using alternate X86EGL_COMPILER $rootProject.X86EGL_COMPILER" 47 compilerHome=file(rootProject.X86EGL_COMPILER); 48 } else { 49 compilerHome=file("/usr"); 50 } 51 if (rootProject.hasProperty("X86EGL_COMPILER_PREFIX")) { 52 logger.quiet "Using alternate X86EGL_COMPILER_PREFIX $rootProject.X86EGL_COMPILER_PREFIX" 53 compilerPrefix="${rootProject.X86EGL_COMPILER_PREFIX}" 54 } else { 55 compilerPrefix="" 56 } 57 58 def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath() 59 def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath() 60 61 // Declare whether this particular target file applies to the current system 62 X86EGL.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() 63 if (!X86EGL.canBuild) { 64 return; 65 } 66 67 // Lambda for naming the generated libs 68 X86EGL.library = { name -> return "lib${name}.so" as String } 69 70 X86EGL.compileSwing = false; 71 X86EGL.compileSWT = false; 72 X86EGL.compileFXPackager = false; 73 X86EGL.compileWebnodeNative = false; 74 X86EGL.compileMediaNative = false; 75 76 X86EGL.includeLens = false 77 X86EGL.includeMonocle = true 78 X86EGL.includeNull3d = true 79 X86EGL.includeEGL = true 80 X86EGL.includeSwing = false 81 X86EGL.includeSWT = false 82 X86EGL.includeGTK = true 83 84 X86EGL.javafxPlatformDefault="monocle" 85 86 // Libraries end up in the sdk/rt/lib/[i386|amd46] directory depending on machine arch 87 if (rootProject.hasProperty("X86EGL_ARCH")) { 88 X86EGL.arch = X86EGL_ARCH 89 X86EGL.libDest = "lib/${X86EGL_ARCH}" 90 } else { 91 X86EGL.arch = OS_ARCH 92 X86EGL.libDest = "lib/${OS_ARCH}" 93 } 94 95 def commonFlags = [ 96 "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags 97 "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags 98 // Specify the compilation parameters and link parameters 99 def ccFlags = [ 100 commonFlags, 101 "-I$JDK_HOME/include", "-I$JDK_HOME/include/${jniPlatform}", "-c", 102 IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten() 103 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"]) 104 def linkFlags = ["-shared", commonFlags].flatten() 105 106 // Specify the compilation parameters and link parameters 107 def extraCFlags = [ 108 "-I", "-L", 109 ccFlags, 110 "-I$sdk/usr/include", 111 "-DEGL_X11_FB_CONTAINER"].flatten(); 112 def extraLFlags = [ 113 "-I", "-L", 114 "-L$sdk/usr/lib", 115 "-L$sdk/usr/lib/i386-linux-gnu", 116 linkFlags].flatten() 117 118 def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten() 119 def monocleCFlags = [ 120 extraCFlags, 121 "-Werror", 122 "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten(); 123 def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten() 124 125 def fontCFlags = [extraCFlags].flatten() 126 def fontLFlags = [extraLFlags].flatten() 127 128 def iioCFlags = [extraCFlags].flatten() 129 def iioLFlags = [extraLFlags].flatten() 130 131 def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX", "-ffast-math" ].flatten() 132 def es2EglfbLFlags = [extraLFlags].flatten() 133 134 def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten() 135 def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten() 136 137 def mediaCFlags = [extraCFlags, 138 "-I${sdk}/usr/include/gstreamer-0.10", 139 "-I${sdk}/usr/include/glib-2.0", 140 "-DENABLE.nativeSource=1", "-DENABLE_GST_FFMPEG=1"].flatten() 141 def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10", 142 "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten() 143 144 def webCFlags = [extraCFlags].flatten() 145 def webLFlags = [extraLFlags].flatten() 146 147 def gtkCFlags = [extraCFlags].flatten() 148 def gtkLFlags = [extraLFlags].flatten() 149 // Create $buildDir/x86egl_tools.properties file and load props from it 150 setupTools("x86egl_tools", 151 { propFile -> 152 ByteArrayOutputStream results = new ByteArrayOutputStream(); 153 154 exec { 155 commandLine("$pkgconfig", "--cflags", "gtk+-2.0", 156 "gthread-2.0", "xtst"); 157 setStandardOutput(results); 158 } 159 propFile << "cflags=" << results.toString().trim() << "\n"; 160 161 results = new ByteArrayOutputStream(); 162 exec { 163 commandLine "$pkgconfig", "--libs", "gtk+-2.0", 164 "gthread-2.0", "xtst" 165 standardOutput = results 166 } 167 propFile << "libs=" << results.toString().trim(); 168 }, 169 { properties -> 170 gtkCFlags.addAll(properties.getProperty("cflags").split(" ")) 171 gtkLFlags.addAll(properties.getProperty("libs").split(" ")) 172 } 173 ) 174 175 def monoclePlatformAdditions = """ 176 monocle.glass.platform=Monocle 177 monocle.prism.order=es2,sw 178 monocle.prism.eglfb=true 179 monocle.prism.lcdtext=false 180 monocle.prism.maxvram=128m 181 monocle.prism.targetvram=112m 182 monocle.use.egl=true 183 monocle.use.gles2=true 184 monocle.embedded=monocle 185 monocle.com.sun.javafx.isEmbedded=true 186 monocle.doNativeComposite=true 187 monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true 188 monocle.prism.glDepthSize=0 189 monocle.com.sun.javafx.gestures.zoom=true 190 monocle.com.sun.javafx.gestures.rotate=true 191 monocle.com.sun.javafx.gestures.scroll=true""" 192 193 def lensPlatformAdditions = """ 194 directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 195 directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 196 directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 197 directfb.glass.platform=Lens 198 directfb.glass.lens=dfb 199 directfb.prism.order=sw 200 directfb.com.sun.javafx.isEmbedded=true 201 directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true 202 directfb.com.sun.javafx.gestures.zoom=true 203 directfb.com.sun.javafx.gestures.rotate=true 204 directfb.com.sun.javafx.gestures.scroll=true 205 eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 206 eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 207 eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 208 eglfb.glass.platform=Lens 209 eglfb.glass.lens=eglfb 210 eglfb.prism.order=es2 211 eglfb.prism.eglfb=true 212 eglfb.prism.lcdtext=false 213 eglfb.prism.maxvram=128m 214 eglfb.prism.targetvram=112m 215 eglfb.use.egl=true 216 eglfb.use.gles2=true 217 eglfb.embedded=eglfb 218 eglfb.com.sun.javafx.isEmbedded=true 219 eglfb.doNativeComposite=true 220 eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true 221 eglfb.prism.glDepthSize=0 222 eglfb.com.sun.javafx.gestures.zoom=true 223 eglfb.com.sun.javafx.gestures.rotate=true 224 eglfb.com.sun.javafx.gestures.scroll=true 225 fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 226 fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 227 fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 228 fb.glass.platform=Lens 229 fb.glass.lens=fb 230 fb.prism.order=sw 231 fb.com.sun.javafx.isEmbedded=true 232 fb.glass.restrictWindowToScreen=true 233 fb.com.sun.javafx.scene.control.skin.FXVK.cache=true 234 fb.com.sun.javafx.gestures.zoom=true 235 fb.com.sun.javafx.gestures.rotate=true 236 fb.com.sun.javafx.gestures.scroll=true 237 eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 238 eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 239 eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 240 eglx11.glass.platform=Lens 241 eglx11.glass.lens=eglx11 242 eglx11.prism.order=es2 243 eglx11.prism.eglx11=true 244 eglx11.prism.lcdtext=false 245 eglx11.prism.maxvram=128m 246 eglx11.prism.targetvram=112m 247 eglx11.use.egl=true 248 eglx11.use.gles2=true 249 eglx11.embedded=eglx11 250 eglx11.com.sun.javafx.isEmbedded=true 251 eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true 252 eglx11.prism.glDepthSize=0 253 eglx11.com.sun.javafx.gestures.zoom=true 254 eglx11.com.sun.javafx.gestures.rotate=true 255 eglx11.com.sun.javafx.gestures.scroll=true""" 256 257 def gtkPlatformAdditions = """ 258 gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 259 gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 260 gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 261 gtk.glass.platform=gtk 262 gtk.prism.order=sw 263 gtk.com.sun.javafx.isEmbedded=true 264 gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true 265 gtk.com.sun.javafx.gestures.zoom=true 266 gtk.com.sun.javafx.gestures.rotate=true 267 gtk.com.sun.javafx.gestures.scroll=true""" 268 269 def pangoCCFlags = ["-D_ENABLE_PANGO"]; 270 def pangoLinkFlags = []; 271 setupTools("x86egl_pango_tools", 272 { propFile -> 273 ByteArrayOutputStream results = new ByteArrayOutputStream(); 274 exec { 275 commandLine "$pkgconfig", "--cflags", "pangoft2" 276 standardOutput = results 277 } 278 propFile << "cflags=" << results.toString().trim() << "\n"; 279 280 results = new ByteArrayOutputStream(); 281 exec { 282 commandLine "$pkgconfig", "--libs", "pangoft2" 283 standardOutput = results 284 } 285 propFile << "libs=" << results.toString().trim(); 286 }, 287 { properties -> 288 pangoCCFlags.addAll(properties.getProperty("cflags").split(" ")) 289 pangoLinkFlags.addAll(properties.getProperty("libs").split(" ")) 290 } 291 ) 292 293 def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" : 294 ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""] 295 def freetypeLinkFlags = [] 296 setupTools("x86egl_freetype_tools", 297 { propFile -> 298 ByteArrayOutputStream results = new ByteArrayOutputStream(); 299 exec { 300 commandLine "pkg-config", "--cflags", "freetype2" 301 standardOutput = results 302 } 303 propFile << "cflags=" << results.toString().trim() << "\n"; 304 305 results = new ByteArrayOutputStream(); 306 exec { 307 commandLine "pkg-config", "--libs", "freetype2" 308 standardOutput = results 309 } 310 propFile << "libs=" << results.toString().trim(); 311 }, 312 { properties -> 313 freetypeCCFlags.addAll(properties.getProperty("cflags").split(" ")) 314 freetypeLinkFlags.addAll(properties.getProperty("libs").split(" ")) 315 } 316 ) 317 318 X86EGL.javafxPlatformProperties = "javafx.platform=${X86EGL.javafxPlatformDefault}" 319 320 X86EGL.glass = [:] 321 X86EGL.glass.javahInclude = [ 322 "com/sun/glass/events/**", 323 "com/sun/glass/ui/*"] 324 X86EGL.glass.variants = [ ] 325 if (X86EGL.includeLens) { 326 X86EGL.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" ); 327 X86EGL.glass.javahInclude.addAll("com/sun/glass/ui/lens/*"); 328 X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + lensPlatformAdditions 329 } 330 if (X86EGL.includeMonocle) { 331 X86EGL.glass.variants.addAll("monocle", "monocle_x11"); 332 X86EGL.glass.javahInclude.addAll( 333 "com/sun/glass/ui/monocle/*", 334 "com/sun/glass/ui/monocle/dispman/*", 335 "com/sun/glass/ui/monocle/mx6/*", 336 "com/sun/glass/ui/monocle/linux/*", 337 "com/sun/glass/ui/monocle/util/*", 338 "com/sun/glass/ui/monocle/x11/*"); 339 X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + monoclePlatformAdditions 340 } 341 if (X86EGL.includeGTK) { 342 X86EGL.glass.variants.addAll("gtk"); 343 X86EGL.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*"); 344 X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + gtkPlatformAdditions 345 } 346 347 X86EGL.glass.lib = "glass" 348 349 X86EGL.glass.monocle = [:] 350 X86EGL.glass.monocle.nativeSource = [ 351 file("modules/graphics/src/main/native-glass/monocle"), 352 file("modules/graphics/src/main/native-glass/monocle/linux"), 353 file("modules/graphics/src/main/native-glass/monocle/util") ] 354 X86EGL.glass.monocle.compiler = compiler 355 X86EGL.glass.monocle.ccFlags = monocleCFlags 356 X86EGL.glass.monocle.linker = linker 357 X86EGL.glass.monocle.linkFlags = monocleLFlags 358 X86EGL.glass.monocle.lib = "glass_monocle" 359 360 X86EGL.glass.monocle_x11 = [:] 361 X86EGL.glass.monocle_x11.nativeSource = [ 362 file("modules/graphics/src/main/native-glass/monocle/util"), 363 file("modules/graphics/src/main/native-glass/monocle/x11") ] 364 X86EGL.glass.monocle_x11.compiler = compiler 365 X86EGL.glass.monocle_x11.ccFlags = monocleCFlags 366 X86EGL.glass.monocle_x11.linker = linker 367 X86EGL.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten() 368 X86EGL.glass.monocle_x11.lib = "glass_monocle_x11" 369 370 X86EGL.glass.lensport = [:] 371 X86EGL.glass.lensport.nativeSource = [ 372 file("modules/graphics/src/main/native-glass/lens/lensport") ] 373 X86EGL.glass.lensport.compiler = compiler 374 X86EGL.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB", 375 "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten() 376 X86EGL.glass.lensport.linker = linker 377 X86EGL.glass.lensport.linkFlags = [lensLFlags].flatten() 378 X86EGL.glass.lensport.lib = "lens_porting" 379 380 X86EGL.glass.eglfb = [:] 381 // TODO when building headless, use lens/cursor/nullcursor/ 382 // otherwise we use lens/cursor/fbCursor/ and lens/input/udev 383 384 // TODO when USE_RFB is specified use lens/rfb 385 386 // TODO use /headless/headlessScreen when using headless 387 X86EGL.glass.eglfb.nativeSource = [ 388 file("modules/graphics/src/main/native-glass/lens"), 389 file("modules/graphics/src/main/native-glass/lens/wm"), 390 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 391 file("modules/graphics/src/main/native-glass/lens/input/udev"), 392 file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c") ] 393 //file("modules/graphics/src/main/native-glass/lens/wm/screen")] 394 X86EGL.glass.eglfb.compiler = compiler 395 X86EGL.glass.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten() 396 X86EGL.glass.eglfb.linker = linker 397 X86EGL.glass.eglfb.linkFlags = [lensLFlags].flatten() 398 X86EGL.glass.eglfb.lib = "glass_lens_eglfb" 399 400 X86EGL.glass.directfb = [:] 401 X86EGL.glass.directfb.nativeSource = [ 402 file("modules/graphics/src/main/native-glass/lens"), 403 file("modules/graphics/src/main/native-glass/lens/wm"), 404 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 405 file("modules/graphics/src/main/native-glass/lens/input/udev"), 406 file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c"), 407 file("modules/graphics/src/main/native-glass/lens/lensport") ] 408 //file("modules/graphics/src/main/native-glass/lens/wm/screen")] 409 X86EGL.glass.directfb.compiler = compiler 410 X86EGL.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, 411 "-I${sdk}/usr/include/directfb", "-DLINUX"].flatten() 412 X86EGL.glass.directfb.linker = linker 413 X86EGL.glass.directfb.linkFlags = [lensLFlags].flatten() 414 X86EGL.glass.directfb.lib = "glass_lens_dfb" 415 416 X86EGL.glass.fb = [:] 417 X86EGL.glass.fb.nativeSource = [ 418 file("modules/graphics/src/main/native-glass/lens"), 419 file("modules/graphics/src/main/native-glass/lens/wm"), 420 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 421 file("modules/graphics/src/main/native-glass/lens/input/udev"), 422 file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c"), 423 file("modules/graphics/src/main/native-glass/lens/lensport") ] 424 //file("modules/graphics/src/main/native-glass/lens/wm/screen")] 425 X86EGL.glass.fb.compiler = compiler 426 X86EGL.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten() 427 X86EGL.glass.fb.linker = linker 428 X86EGL.glass.fb.linkFlags = [lensLFlags].flatten() 429 X86EGL.glass.fb.lib = "glass_lens_fb" 430 431 X86EGL.glass.eglx11 = [:] 432 X86EGL.glass.eglx11.nativeSource = [ 433 file("modules/graphics/src/main/native-glass/lens"), 434 file("modules/graphics/src/main/native-glass/lens/wm"), 435 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 436 file("modules/graphics/src/main/native-glass/lens/input/udev"), 437 file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")] 438 //file("modules/graphics/src/main/native-glass/lens/wm/screen")] 439 X86EGL.glass.eglx11.compiler = compiler 440 X86EGL.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten() 441 X86EGL.glass.eglx11.linker = linker 442 X86EGL.glass.eglx11.linkFlags = [lensLFlags].flatten() 443 X86EGL.glass.eglx11.lib = "glass_lens_eglx11" 444 445 X86EGL.glass.gtk = [:] 446 X86EGL.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk") 447 X86EGL.glass.gtk.compiler = compiler 448 X86EGL.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten() 449 X86EGL.glass.gtk.linker = linker 450 X86EGL.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten() 451 X86EGL.glass.gtk.lib = "glass" 452 453 X86EGL.decora = [:] 454 X86EGL.decora.compiler = compiler 455 X86EGL.decora.ccFlags = extraCFlags 456 X86EGL.decora.linker = linker 457 X86EGL.decora.linkFlags = extraLFlags 458 X86EGL.decora.lib = "decora_sse" 459 460 X86EGL.prism = [:] 461 X86EGL.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"] 462 X86EGL.prism.nativeSource = file("modules/graphics/src/main/native-prism") 463 X86EGL.prism.compiler = compiler 464 X86EGL.prism.ccFlags = [extraCFlags].flatten() 465 X86EGL.prism.linker = linker 466 X86EGL.prism.linkFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten() 467 X86EGL.prism.lib = "prism_common" 468 469 X86EGL.prismSW = [:] 470 X86EGL.prismSW.javahInclude = ["com/sun/pisces/**/*"] 471 X86EGL.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw") 472 X86EGL.prismSW.compiler = compiler 473 X86EGL.prismSW.ccFlags = [extraCFlags].flatten() 474 X86EGL.prismSW.linker = linker 475 X86EGL.prismSW.linkFlags = [extraLFlags].flatten() 476 X86EGL.prismSW.lib = "prism_sw" 477 478 X86EGL.iio = [:] 479 X86EGL.iio.javahInclude = ["com/sun/javafx/iio/**/*"] 480 X86EGL.iio.nativeSource = [ 481 file("modules/graphics/src/main/native-iio"), 482 file("modules/graphics/src/main/native-iio/libjpeg7")] 483 X86EGL.iio.compiler = compiler 484 X86EGL.iio.ccFlags = iioCFlags 485 X86EGL.iio.linker = linker 486 X86EGL.iio.linkFlags = iioLFlags 487 X86EGL.iio.lib = "javafx_iio" 488 489 X86EGL.prismES2 = [:] 490 X86EGL.prismES2.variants = ["eglfb", "monocle"] 491 X86EGL.prismES2.javahInclude = ["com/sun/prism/es2/**/*"] 492 493 X86EGL.prismES2.eglfb = [:] 494 X86EGL.prismES2.eglfb.nativeSource = [ 495 file("modules/graphics/src/main/native-prism-es2"), 496 file("modules/graphics/src/main/native-prism-es2/GL"), 497 file("modules/graphics/src/main/native-prism-es2/eglfb") 498 ] 499 X86EGL.prismES2.eglfb.compiler = compiler 500 X86EGL.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten() 501 X86EGL.prismES2.eglfb.linker = linker 502 X86EGL.prismES2.eglfb.linkFlags = es2EglfbLFlags 503 X86EGL.prismES2.eglfb.lib = "prism_es2_eglfb" 504 505 X86EGL.prismES2.eglx11 = [:] 506 X86EGL.prismES2.eglx11.nativeSource = [ 507 file("modules/graphics/src/main/native-prism-es2"), 508 file("modules/graphics/src/main/native-prism-es2/GL"), 509 file("modules/graphics/src/main/native-prism-es2/eglx11") 510 ] 511 X86EGL.prismES2.eglx11.compiler = compiler 512 X86EGL.prismES2.eglx11.ccFlags = es2X11CFlags 513 X86EGL.prismES2.eglx11.linker = linker 514 X86EGL.prismES2.eglx11.linkFlags = es2X11LFlags 515 X86EGL.prismES2.eglx11.lib = "prism_es2_eglx11" 516 517 X86EGL.prismES2.monocle= [:] 518 X86EGL.prismES2.monocle.nativeSource = [ 519 file("modules/graphics/src/main/native-prism-es2"), 520 file("modules/graphics/src/main/native-prism-es2/GL"), 521 file("modules/graphics/src/main/native-prism-es2/monocle") 522 ] 523 X86EGL.prismES2.monocle.compiler = compiler 524 X86EGL.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten() 525 X86EGL.prismES2.monocle.linker = linker 526 X86EGL.prismES2.monocle.linkFlags = es2EglfbLFlags 527 X86EGL.prismES2.monocle.lib = "prism_es2_monocle" 528 529 def closedDir = file("$projectDir/../rt-closed") 530 X86EGL.font = [:] 531 X86EGL.font.javahInclude = [ 532 "com/sun/javafx/font/**/*", 533 "com/sun/javafx/text/**/*"] 534 X86EGL.font.nativeSource = [file("modules/graphics/src/main/native-font")] 535 X86EGL.font.compiler = compiler 536 X86EGL.font.ccFlags = fontCFlags 537 X86EGL.font.linker = linker 538 X86EGL.font.linkFlags = fontLFlags 539 X86EGL.font.lib = "javafx_font" 540 541 X86EGL.fontT2K = [:] 542 X86EGL.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"] 543 X86EGL.fontT2K.nativeSource = [ 544 file("$closedDir/javafx-font-t2k-native/src"), 545 file("$closedDir/javafx-font-t2k-native/src/layout")] 546 X86EGL.fontT2K.compiler = compiler 547 X86EGL.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten() 548 X86EGL.fontT2K.linker = linker 549 X86EGL.fontT2K.linkFlags = fontLFlags 550 X86EGL.fontT2K.lib = "javafx_font_t2k" 551 552 X86EGL.fontFreetype = [:] 553 X86EGL.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class"] 554 X86EGL.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"] 555 X86EGL.fontFreetype.compiler = compiler 556 X86EGL.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, freetypeCCFlags].flatten() 557 X86EGL.fontFreetype.linker = linker 558 X86EGL.fontFreetype.linkFlags = [linkFlags, freetypeLinkFlags].flatten() 559 X86EGL.fontFreetype.lib = "javafx_font_freetype" 560 561 X86EGL.fontPango = [:] 562 X86EGL.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"] 563 X86EGL.fontPango.nativeSource = ["src/main/native-font/pango.c"] 564 X86EGL.fontPango.compiler = compiler 565 X86EGL.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten() 566 X86EGL.fontPango.linker = linker 567 X86EGL.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten() 568 X86EGL.fontPango.lib = "javafx_font_pango" 569 570 X86EGL.disableMedia = true 571 X86EGL.media =[:] 572 X86EGL.media.compiler = compiler 573 X86EGL.media.linker = linker 574 X86EGL.media.lib = "ar" 575 576 X86EGL.deploy = [:] 577 X86EGL.deploy.publicLibraryFilter = [ 578 "fxavcodecplugin-52.so", 579 "fxavcodecplugin-53.so", 580 "fxplugins.so", 581 "libjfxwebkit.so", 582 "libgstplugins-lite.so", 583 "libgstreamer-lite.so", 584 "libprism_es2_eglx11.so", 585 "libglass_lens_fb.so" 586 ] 587 X86EGL.deploy.compressBigJar=true