1 /*
   2  * Copyright (c) 2013, 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 // Declare whether this particular target file applies to the current system
  59 X86EGL.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists()
  60 if (!X86EGL.canBuild) {
  61     return;
  62 }
  63 
  64 // Lambda for naming the generated libs
  65 X86EGL.library = { name -> return "lib${name}.so" as String }
  66 
  67 X86EGL.compileSwing = false;
  68 X86EGL.compileSWT = false;
  69 X86EGL.compileFXPackager = false;
  70 X86EGL.compileDesignTime = false;
  71 
  72 // Libraries end up in the sdk/rt/lib/arm directory for arm builds
  73 X86EGL.libDest = "lib/i386"
  74 
  75 // TODO this is garbage. Each target file should define what it includes,
  76 // not what it excludes.
  77 X86EGL.jfxrtJarExcludes = [
  78     "**/*.hlsl",
  79     "com/sun/glass/ui/win",
  80     "com/sun/prism/d3d",
  81     "com/sun/prism/es2/gl/win",
  82     //"com/sun/prism/null3d",
  83     "com/sun/scenario/effect/impl/hw/d3d",
  84     
  85     "com/sun/glass/events/mac",
  86     "com/sun/glass/ui/mac",
  87     "com/sun/prism/es2/gl/mac",
  88     
  89     "com/sun/glass/ui/android",
  90     
  91     "com/sun/glass/ui/ios",
  92     
  93     "com/sun/glass/ui/swt", // SWT glass
  94     
  95     "javafx/embed/swing", // Swing Interop
  96     
  97     "javafx/embed/swt", // SWT Interop
  98 
  99     "com/sun/prism/es2/MacGL*",
 100     "com/sun/prism/es2/IOSGL*",
 101     "com/sun/prism/es2/WinGL*",
 102 ]
 103 
 104 def commonFlags = [
 105         "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
 106         "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
 107 // Specify the compilation parameters and link parameters
 108 def ccFlags = [
 109         commonFlags,
 110         "-I$JDK_HOME/include", "-I$JDK_HOME/include/${jniPlatform}", "-c",
 111         IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
 112 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 113 def linkFlags = ["-shared", commonFlags].flatten()
 114 
 115 // Specify the compilation parameters and link parameters
 116 def extraCFlags = [
 117         "-I", "-L",
 118         ccFlags,
 119         "-I$sdk/usr/include",
 120         "-DEGL_X11_FB_CONTAINER"].flatten();
 121 def extraLFlags = [
 122         "-I", "-L",
 123         "-L$sdk/usr/lib",
 124         "-L$sdk/usr/lib/i386-linux-gnu",
 125         linkFlags].flatten()
 126 
 127 def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
 128 def monocleCFlags = [
 129         extraCFlags,
 130         "-Werror",
 131         "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
 132 def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
 133 
 134 def fontCFlags = [extraCFlags].flatten()
 135 def fontLFlags = [extraLFlags].flatten()
 136 
 137 def iioCFlags = [extraCFlags].flatten()
 138 def iioLFlags = [extraLFlags].flatten()
 139 
 140 def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX", "-ffast-math" ].flatten()
 141 def es2EglfbLFlags = [extraLFlags].flatten()
 142 
 143 def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
 144 def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
 145 
 146 def mediaCFlags = [extraCFlags,
 147     "-I${sdk}/usr/include/gstreamer-0.10",
 148     "-I${sdk}/usr/include/glib-2.0",
 149     "-DENABLE.nativeSource=1", "-DENABLE_GST_FFMPEG=1"].flatten()
 150 def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
 151     "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
 152 
 153 def webCFlags = [extraCFlags].flatten()
 154 def webLFlags = [extraLFlags].flatten()
 155 
 156 def gtkCFlags = [extraCFlags].flatten()
 157 def gtkLFlags = [extraLFlags].flatten()
 158 // Create $buildDir/x86egl_tools.properties file and load props from it
 159 setupTools("x86egl_tools",
 160         { propFile ->
 161             ByteArrayOutputStream results = new ByteArrayOutputStream();
 162 
 163             exec {
 164                 commandLine("$pkgconfig", "--cflags", "gtk+-2.0",
 165                         "gthread-2.0", "xtst");
 166                 setStandardOutput(results);
 167             }
 168             propFile << "cflags=" << results.toString().trim() << "\n";
 169 
 170             results = new ByteArrayOutputStream();
 171             exec {
 172                 commandLine "$pkgconfig", "--libs", "gtk+-2.0",
 173                         "gthread-2.0", "xtst"
 174                 standardOutput = results
 175             }
 176             propFile << "libs=" << results.toString().trim();
 177         },
 178         { properties ->
 179             gtkCFlags.addAll(properties.getProperty("cflags").split(" "))
 180             gtkLFlags.addAll(properties.getProperty("libs").split(" "))
 181         }
 182 )
 183 
 184 X86EGL.javafxPlatformProperties ="""javafx.platform=eglfb
 185 directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 186 directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 187 directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 188 directfb.glass.platform=Lens
 189 directfb.glass.lens=dfb
 190 directfb.prism.order=sw
 191 directfb.com.sun.javafx.isEmbedded=true
 192 directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 193 directfb.com.sun.javafx.gestures.zoom=true
 194 directfb.com.sun.javafx.gestures.rotate=true
 195 directfb.com.sun.javafx.gestures.scroll=true
 196 eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 197 eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 198 eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 199 eglfb.glass.platform=Lens
 200 eglfb.glass.lens=eglfb
 201 eglfb.prism.order=es2
 202 eglfb.prism.eglfb=true
 203 eglfb.prism.lcdtext=false
 204 eglfb.use.egl=true
 205 eglfb.use.gles2=true
 206 eglfb.embedded=eglfb
 207 eglfb.com.sun.javafx.isEmbedded=true
 208 eglfb.doNativeComposite=true
 209 eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 210 eglfb.com.sun.javafx.gestures.zoom=true
 211 eglfb.com.sun.javafx.gestures.rotate=true
 212 eglfb.com.sun.javafx.gestures.scroll=true
 213 fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 214 fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 215 fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 216 fb.glass.platform=Lens
 217 fb.glass.lens=fb
 218 fb.prism.order=sw
 219 fb.com.sun.javafx.isEmbedded=true
 220 fb.glass.restrictWindowToScreen=true
 221 fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 222 fb.com.sun.javafx.gestures.zoom=true
 223 fb.com.sun.javafx.gestures.rotate=true
 224 fb.com.sun.javafx.gestures.scroll=true
 225 monocle.glass.platform=Monocle
 226 monocle.prism.order=es2,sw
 227 monocle.prism.eglfb=true
 228 monocle.prism.lcdtext=false
 229 monocle.prism.maxvram=128m
 230 monocle.prism.targetvram=112m
 231 monocle.use.egl=true
 232 monocle.use.gles2=true
 233 monocle.embedded=eglfb
 234 monocle.com.sun.javafx.isEmbedded=true
 235 monocle.doNativeComposite=true
 236 monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
 237 monocle.com.sun.javafx.gestures.zoom=true
 238 monocle.com.sun.javafx.gestures.rotate=true
 239 monocle.com.sun.javafx.gestures.scroll=true
 240 monocle.prism.glDepthSize=0
 241 eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 242 eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 243 eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 244 eglx11.glass.platform=Lens
 245 eglx11.glass.lens=eglx11
 246 eglx11.prism.order=es2
 247 eglx11.prism.eglx11=true
 248 eglx11.prism.lcdtext=false
 249 eglx11.use.egl=true
 250 eglx11.use.gles2=true
 251 eglx11.embedded=eglx11
 252 eglx11.com.sun.javafx.isEmbedded=true
 253 eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
 254 eglx11.com.sun.javafx.gestures.zoom=true
 255 eglx11.com.sun.javafx.gestures.rotate=true
 256 eglx11.com.sun.javafx.gestures.scroll=true
 257 gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 258 gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 259 gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 260 gtk.glass.platform=gtk
 261 gtk.prism.order=sw
 262 gtk.com.sun.javafx.isEmbedded=true
 263 gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
 264 gtk.com.sun.javafx.gestures.zoom=true
 265 gtk.com.sun.javafx.gestures.rotate=true
 266 gtk.com.sun.javafx.gestures.scroll=true"""
 267 
 268 def pangoCCFlags = ["-D_ENABLE_PANGO"];
 269 def pangoLinkFlags = [];
 270 setupTools("linux_pango_tools",
 271         { propFile ->
 272             ByteArrayOutputStream results = new ByteArrayOutputStream();
 273             exec {
 274                 commandLine "$pkgconfig", "--cflags", "pangoft2"
 275                 standardOutput = results
 276             }
 277             propFile << "cflags=" << results.toString().trim() << "\n";
 278 
 279             results = new ByteArrayOutputStream();
 280             exec {
 281                 commandLine "$pkgconfig", "--libs", "pangoft2"
 282                 standardOutput = results
 283             }
 284             propFile << "libs=" << results.toString().trim();
 285         },
 286         { properties ->
 287             pangoCCFlags.addAll(properties.getProperty("cflags").split(" "))
 288             pangoLinkFlags.addAll(properties.getProperty("libs").split(" "))
 289         }
 290 )
 291 
 292 def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
 293 def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
 294 
 295 X86EGL.glass = [:]
 296 X86EGL.glass.variants = ["eglfb", "directfb", "fb", "gtk", "lensport", "monocle", "monocle_x11"]
 297 X86EGL.glass.javahInclude = [
 298     "com/sun/glass/events/**",
 299     "com/sun/glass/ui/*",
 300     "com/sun/glass/ui/lens/*",
 301     "com/sun/glass/ui/monocle/linux/*",
 302     "com/sun/glass/ui/monocle/util/*",
 303     "com/sun/glass/ui/monocle/x11/*",
 304     "com/sun/glass/ui/gtk/*"]
 305 X86EGL.glass.lib = "glass"
 306 
 307 X86EGL.glass.monocle = [:]
 308 X86EGL.glass.monocle.nativeSource = [
 309         file("modules/graphics/src/main/native-glass/monocle/linux"),
 310         file("modules/graphics/src/main/native-glass/monocle/util") ]
 311 X86EGL.glass.monocle.compiler = compiler
 312 X86EGL.glass.monocle.ccFlags = monocleCFlags
 313 X86EGL.glass.monocle.linker = linker
 314 X86EGL.glass.monocle.linkFlags = monocleLFlags
 315 X86EGL.glass.monocle.lib = "glass_monocle"
 316 
 317 X86EGL.glass.monocle_x11 = [:]
 318 X86EGL.glass.monocle_x11.nativeSource = [
 319         file("modules/graphics/src/main/native-glass/monocle/util"),
 320         file("modules/graphics/src/main/native-glass/monocle/x11") ]
 321 X86EGL.glass.monocle_x11.compiler = compiler
 322 X86EGL.glass.monocle_x11.ccFlags = monocleCFlags
 323 X86EGL.glass.monocle_x11.linker = linker
 324 X86EGL.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
 325 X86EGL.glass.monocle_x11.lib = "glass_monocle_x11"
 326 
 327 X86EGL.glass.lensport = [:]
 328 X86EGL.glass.lensport.nativeSource = [
 329     file("modules/graphics/src/main/native-glass/lens/lensport") ]
 330 X86EGL.glass.lensport.compiler = compiler
 331 X86EGL.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
 332     "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten()
 333 X86EGL.glass.lensport.linker = linker
 334 X86EGL.glass.lensport.linkFlags = [lensLFlags].flatten()
 335 X86EGL.glass.lensport.lib = "lens_porting"
 336 
 337 X86EGL.glass.eglfb = [:]
 338 // TODO when building headless, use lens/cursor/nullcursor/
 339 // otherwise we use lens/cursor/fbCursor/ and lens/input/udev
 340 
 341 // TODO when USE_RFB is specified use lens/rfb
 342 
 343 // TODO use /headless/headlessScreen when using headless
 344 X86EGL.glass.eglfb.nativeSource = [
 345     file("modules/graphics/src/main/native-glass/lens"),
 346     file("modules/graphics/src/main/native-glass/lens/wm"),
 347     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 348     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 349     file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c") ]
 350     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 351 X86EGL.glass.eglfb.compiler = compiler
 352 X86EGL.glass.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
 353 X86EGL.glass.eglfb.linker = linker
 354 X86EGL.glass.eglfb.linkFlags = [lensLFlags].flatten()
 355 X86EGL.glass.eglfb.lib = "glass_lens_eglfb"
 356 
 357 X86EGL.glass.directfb = [:]
 358 X86EGL.glass.directfb.nativeSource = [
 359     file("modules/graphics/src/main/native-glass/lens"),
 360     file("modules/graphics/src/main/native-glass/lens/wm"),
 361     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 362     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 363     file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c"),
 364     file("modules/graphics/src/main/native-glass/lens/lensport") ]
 365     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 366 X86EGL.glass.directfb.compiler = compiler
 367 X86EGL.glass.directfb.ccFlags = ["-ffast-math", extraCFlags,
 368         "-I${sdk}/usr/include/directfb", "-DLINUX"].flatten()
 369 X86EGL.glass.directfb.linker = linker
 370 X86EGL.glass.directfb.linkFlags = [lensLFlags].flatten()
 371 X86EGL.glass.directfb.lib = "glass_lens_dfb"
 372 
 373 X86EGL.glass.fb = [:]
 374 X86EGL.glass.fb.nativeSource = [
 375     file("modules/graphics/src/main/native-glass/lens"),
 376     file("modules/graphics/src/main/native-glass/lens/wm"),
 377     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 378     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 379     file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c"),
 380     file("modules/graphics/src/main/native-glass/lens/lensport") ]
 381     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 382 X86EGL.glass.fb.compiler = compiler
 383 X86EGL.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
 384 X86EGL.glass.fb.linker = linker
 385 X86EGL.glass.fb.linkFlags = [lensLFlags].flatten()
 386 X86EGL.glass.fb.lib = "glass_lens_fb"
 387 
 388 X86EGL.glass.eglx11 = [:]
 389 X86EGL.glass.eglx11.nativeSource = [
 390     file("modules/graphics/src/main/native-glass/lens"),
 391     file("modules/graphics/src/main/native-glass/lens/wm"),
 392     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 393     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 394     file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
 395     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 396 X86EGL.glass.eglx11.compiler = compiler
 397 X86EGL.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
 398 X86EGL.glass.eglx11.linker = linker
 399 X86EGL.glass.eglx11.linkFlags = [lensLFlags].flatten()
 400 X86EGL.glass.eglx11.lib = "glass_lens_eglx11"
 401 
 402 X86EGL.glass.gtk = [:]
 403 X86EGL.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk")
 404 X86EGL.glass.gtk.compiler = compiler
 405 X86EGL.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
 406 X86EGL.glass.gtk.linker = linker
 407 X86EGL.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
 408 X86EGL.glass.gtk.lib = "glass"
 409 
 410 X86EGL.decora = [:]
 411 X86EGL.decora.compiler = compiler
 412 X86EGL.decora.ccFlags = extraCFlags
 413 X86EGL.decora.linker = linker
 414 X86EGL.decora.linkFlags = extraLFlags
 415 X86EGL.decora.lib = "decora_sse"
 416 
 417 X86EGL.prism = [:]
 418 X86EGL.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
 419 X86EGL.prism.nativeSource = file("modules/graphics/src/main/native-prism")
 420 X86EGL.prism.compiler = compiler
 421 X86EGL.prism.ccFlags = [extraCFlags].flatten()
 422 X86EGL.prism.linker = linker
 423 X86EGL.prism.linkFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
 424 X86EGL.prism.lib = "prism_common"
 425 
 426 X86EGL.prismSW = [:]
 427 X86EGL.prismSW.javahInclude = ["com/sun/pisces/**/*"]
 428 X86EGL.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw")
 429 X86EGL.prismSW.compiler = compiler
 430 X86EGL.prismSW.ccFlags = [extraCFlags].flatten()
 431 X86EGL.prismSW.linker = linker
 432 X86EGL.prismSW.linkFlags = [extraLFlags].flatten()
 433 X86EGL.prismSW.lib = "prism_sw"
 434 
 435 X86EGL.iio = [:]
 436 X86EGL.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
 437 X86EGL.iio.nativeSource = [
 438     file("modules/graphics/src/main/native-iio"),
 439     file("modules/graphics/src/main/native-iio/libjpeg7")]
 440 X86EGL.iio.compiler = compiler
 441 X86EGL.iio.ccFlags = iioCFlags
 442 X86EGL.iio.linker = linker
 443 X86EGL.iio.linkFlags = iioLFlags
 444 X86EGL.iio.lib = "javafx_iio"
 445 
 446 X86EGL.prismES2 = [:]
 447 X86EGL.prismES2.variants = ["eglfb"]
 448 X86EGL.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
 449 
 450 X86EGL.prismES2.eglfb = [:]
 451 X86EGL.prismES2.eglfb.nativeSource = [
 452     file("modules/graphics/src/main/native-prism-es2"),
 453     file("modules/graphics/src/main/native-prism-es2/GL"),
 454     file("modules/graphics/src/main/native-prism-es2/eglfb")
 455 ]
 456 X86EGL.prismES2.eglfb.compiler = compiler
 457 X86EGL.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
 458 X86EGL.prismES2.eglfb.linker = linker
 459 X86EGL.prismES2.eglfb.linkFlags = es2EglfbLFlags
 460 X86EGL.prismES2.eglfb.lib = "prism_es2_eglfb"
 461 
 462 X86EGL.prismES2.eglx11 = [:]
 463 X86EGL.prismES2.eglx11.nativeSource = [
 464     file("modules/graphics/src/main/native-prism-es2"),
 465     file("modules/graphics/src/main/native-prism-es2/GL"),
 466     file("modules/graphics/src/main/native-prism-es2/eglx11")
 467 ]
 468 X86EGL.prismES2.eglx11.compiler = compiler
 469 X86EGL.prismES2.eglx11.ccFlags = es2X11CFlags
 470 X86EGL.prismES2.eglx11.linker = linker
 471 X86EGL.prismES2.eglx11.linkFlags = es2X11LFlags
 472 X86EGL.prismES2.eglx11.lib = "prism_es2_eglx11"
 473 
 474 def closedDir = file("$projectDir/../rt-closed")
 475 X86EGL.font = [:]
 476 X86EGL.font.javahInclude = [
 477     "com/sun/javafx/font/**/*",
 478     "com/sun/javafx/text/**/*"]
 479 X86EGL.font.nativeSource = [file("modules/graphics/src/main/native-font")]
 480 X86EGL.font.compiler = compiler
 481 X86EGL.font.ccFlags = fontCFlags
 482 X86EGL.font.linker = linker
 483 X86EGL.font.linkFlags = fontLFlags
 484 X86EGL.font.lib = "javafx_font"
 485 
 486 X86EGL.fontT2K = [:]
 487 X86EGL.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
 488 X86EGL.fontT2K.nativeSource = [
 489         file("$closedDir/javafx-font-t2k-native/src"),
 490         file("$closedDir/javafx-font-t2k-native/src/layout")]
 491 X86EGL.fontT2K.compiler = compiler
 492 X86EGL.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
 493 X86EGL.fontT2K.linker = linker
 494 X86EGL.fontT2K.linkFlags = fontLFlags
 495 X86EGL.fontT2K.lib = "javafx_font_t2k"
 496 
 497 X86EGL.fontPango = [:]
 498 X86EGL.fontPango.javahInclude = ["com/sun/javafx/font/pango/*"]
 499 X86EGL.fontPango.nativeSource = [
 500     "src/main/native-font/pango.c",
 501     "src/main/native-font/freetype.c"]
 502 X86EGL.fontPango.compiler = compiler
 503 X86EGL.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
 504 X86EGL.fontPango.linker = linker
 505 X86EGL.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
 506 X86EGL.fontPango.lib = "javafx_font_pango"
 507 
 508 X86EGL.media =[:]
 509 X86EGL.media.compiler = compiler
 510 X86EGL.media.linker = linker
 511 X86EGL.media.lib = "ar"