view buildSrc/x86egl.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 1f068eb07b58
children 0efae19e83e7
line wrap: on
line source
/*
 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

ext.X86EGL = [:]

def sdk
def compilerHome
def compilerPrefix
def pkgconfig
def jniPlatform
if (IS_MAC) {
    jniPlatform="darwin"
    fetchExternalTools('X86EGL', [ "x86egl-01.tgz" ], 
        rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
    sdk=file("${rootProject.CROSS_TOOLS_DIR}/x86egl-01")
    pkgconfig="${sdk}/bin/pkg-config"
} else {
    jniPlatform="linux"
    sdk=""
    pkgconfig="pkg-config"
}

if (rootProject.hasProperty("X86EGL_COMPILER")) {
    logger.quiet "Using alternate X86EGL_COMPILER $rootProject.X86EGL_COMPILER"
    compilerHome=file(rootProject.X86EGL_COMPILER);
} else {
    compilerHome=file("/usr");
}
if (rootProject.hasProperty("X86EGL_COMPILER_PREFIX")) {
    logger.quiet "Using alternate X86EGL_COMPILER_PREFIX $rootProject.X86EGL_COMPILER_PREFIX"
    compilerPrefix="${rootProject.X86EGL_COMPILER_PREFIX}"
} else {
    compilerPrefix=""
}

def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()

// Declare whether this particular target file applies to the current system
X86EGL.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists()
if (!X86EGL.canBuild) {
    return;
}

// Lambda for naming the generated libs
X86EGL.library = { name -> return "lib${name}.so" as String }

X86EGL.compileSwing = false;
X86EGL.compileSWT = false;
X86EGL.compileFXPackager = false;
X86EGL.compileDesignTime = false;
X86EGL.compileWebnodeNative = false;
X86EGL.compileMediaNative = false;

X86EGL.includeLens = false
X86EGL.includeMonocle = true
X86EGL.includeNull3d = true
X86EGL.includeEGL = true
X86EGL.includeSwing = false
X86EGL.includeSWT = false
X86EGL.includeGTK = true

X86EGL.javafxPlatformDefault="monocle"

// Libraries end up in the sdk/rt/lib/[i386|amd46] directory depending on machine arch
if (rootProject.hasProperty("X86EGL_ARCH")) {
    X86EGL.arch = X86EGL_ARCH
    X86EGL.libDest = "lib/${X86EGL_ARCH}"
} else {
    X86EGL.arch = OS_ARCH
    X86EGL.libDest = "lib/${OS_ARCH}"
}

def commonFlags = [
        "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
        "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
// Specify the compilation parameters and link parameters
def ccFlags = [
        commonFlags,
        "-I$JDK_HOME/include", "-I$JDK_HOME/include/${jniPlatform}", "-c",
        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
def linkFlags = ["-shared", commonFlags].flatten()

// Specify the compilation parameters and link parameters
def extraCFlags = [
        "-I", "-L",
        ccFlags,
        "-I$sdk/usr/include",
        "-DEGL_X11_FB_CONTAINER"].flatten();
def extraLFlags = [
        "-I", "-L",
        "-L$sdk/usr/lib",
        "-L$sdk/usr/lib/i386-linux-gnu",
        linkFlags].flatten()

def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
def monocleCFlags = [
        extraCFlags,
        "-Werror",
        "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()

def fontCFlags = [extraCFlags].flatten()
def fontLFlags = [extraLFlags].flatten()

def iioCFlags = [extraCFlags].flatten()
def iioLFlags = [extraLFlags].flatten()

def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX", "-ffast-math" ].flatten()
def es2EglfbLFlags = [extraLFlags].flatten()

def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()

def mediaCFlags = [extraCFlags,
    "-I${sdk}/usr/include/gstreamer-0.10",
    "-I${sdk}/usr/include/glib-2.0",
    "-DENABLE.nativeSource=1", "-DENABLE_GST_FFMPEG=1"].flatten()
def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
    "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()

def webCFlags = [extraCFlags].flatten()
def webLFlags = [extraLFlags].flatten()

def gtkCFlags = [extraCFlags].flatten()
def gtkLFlags = [extraLFlags].flatten()
// Create $buildDir/x86egl_tools.properties file and load props from it
setupTools("x86egl_tools",
        { propFile ->
            ByteArrayOutputStream results = new ByteArrayOutputStream();

            exec {
                commandLine("$pkgconfig", "--cflags", "gtk+-2.0",
                        "gthread-2.0", "xtst");
                setStandardOutput(results);
            }
            propFile << "cflags=" << results.toString().trim() << "\n";

            results = new ByteArrayOutputStream();
            exec {
                commandLine "$pkgconfig", "--libs", "gtk+-2.0",
                        "gthread-2.0", "xtst"
                standardOutput = results
            }
            propFile << "libs=" << results.toString().trim();
        },
        { properties ->
            gtkCFlags.addAll(properties.getProperty("cflags").split(" "))
            gtkLFlags.addAll(properties.getProperty("libs").split(" "))
        }
)

def monoclePlatformAdditions = """
monocle.glass.platform=Monocle
monocle.prism.order=es2,sw
monocle.prism.eglfb=true
monocle.prism.lcdtext=false
monocle.prism.maxvram=128m
monocle.prism.targetvram=112m
monocle.use.egl=true
monocle.use.gles2=true
monocle.embedded=monocle
monocle.com.sun.javafx.isEmbedded=true
monocle.doNativeComposite=true
monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
monocle.prism.glDepthSize=0
monocle.com.sun.javafx.gestures.zoom=true
monocle.com.sun.javafx.gestures.rotate=true
monocle.com.sun.javafx.gestures.scroll=true"""

def lensPlatformAdditions = """
directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
directfb.glass.platform=Lens
directfb.glass.lens=dfb
directfb.prism.order=sw
directfb.com.sun.javafx.isEmbedded=true
directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
directfb.com.sun.javafx.gestures.zoom=true
directfb.com.sun.javafx.gestures.rotate=true
directfb.com.sun.javafx.gestures.scroll=true
eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
eglfb.glass.platform=Lens
eglfb.glass.lens=eglfb
eglfb.prism.order=es2
eglfb.prism.eglfb=true
eglfb.prism.lcdtext=false
eglfb.prism.maxvram=128m
eglfb.prism.targetvram=112m
eglfb.use.egl=true
eglfb.use.gles2=true
eglfb.embedded=eglfb
eglfb.com.sun.javafx.isEmbedded=true
eglfb.doNativeComposite=true
eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
eglfb.prism.glDepthSize=0
eglfb.com.sun.javafx.gestures.zoom=true
eglfb.com.sun.javafx.gestures.rotate=true
eglfb.com.sun.javafx.gestures.scroll=true
fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
fb.glass.platform=Lens
fb.glass.lens=fb
fb.prism.order=sw
fb.com.sun.javafx.isEmbedded=true
fb.glass.restrictWindowToScreen=true
fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
fb.com.sun.javafx.gestures.zoom=true
fb.com.sun.javafx.gestures.rotate=true
fb.com.sun.javafx.gestures.scroll=true
eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
eglx11.glass.platform=Lens
eglx11.glass.lens=eglx11
eglx11.prism.order=es2
eglx11.prism.eglx11=true
eglx11.prism.lcdtext=false
eglx11.prism.maxvram=128m
eglx11.prism.targetvram=112m
eglx11.use.egl=true
eglx11.use.gles2=true
eglx11.embedded=eglx11
eglx11.com.sun.javafx.isEmbedded=true
eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
eglx11.prism.glDepthSize=0
eglx11.com.sun.javafx.gestures.zoom=true
eglx11.com.sun.javafx.gestures.rotate=true
eglx11.com.sun.javafx.gestures.scroll=true"""

def gtkPlatformAdditions = """
gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
gtk.glass.platform=gtk
gtk.prism.order=sw
gtk.com.sun.javafx.isEmbedded=true
gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
gtk.com.sun.javafx.gestures.zoom=true
gtk.com.sun.javafx.gestures.rotate=true
gtk.com.sun.javafx.gestures.scroll=true"""

def pangoCCFlags = ["-D_ENABLE_PANGO"];
def pangoLinkFlags = [];
setupTools("x86egl_pango_tools",
        { propFile ->
            ByteArrayOutputStream results = new ByteArrayOutputStream();
            exec {
                commandLine "$pkgconfig", "--cflags", "pangoft2"
                standardOutput = results
            }
            propFile << "cflags=" << results.toString().trim() << "\n";

            results = new ByteArrayOutputStream();
            exec {
                commandLine "$pkgconfig", "--libs", "pangoft2"
                standardOutput = results
            }
            propFile << "libs=" << results.toString().trim();
        },
        { properties ->
            pangoCCFlags.addAll(properties.getProperty("cflags").split(" "))
            pangoLinkFlags.addAll(properties.getProperty("libs").split(" "))
        }
)

def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
                       ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
def freetypeLinkFlags = []
setupTools("x86egl_freetype_tools",
    { propFile ->
        ByteArrayOutputStream results = new ByteArrayOutputStream();
        exec {
            commandLine "pkg-config", "--cflags", "freetype2"
            standardOutput = results
        }
        propFile << "cflags=" << results.toString().trim() << "\n";

        results = new ByteArrayOutputStream();
        exec {
            commandLine "pkg-config", "--libs", "freetype2"
            standardOutput = results
        }
        propFile << "libs=" << results.toString().trim();
    },
    { properties ->
        freetypeCCFlags.addAll(properties.getProperty("cflags").split(" "))
        freetypeLinkFlags.addAll(properties.getProperty("libs").split(" "))
    }
)

X86EGL.javafxPlatformProperties = "javafx.platform=${X86EGL.javafxPlatformDefault}"

X86EGL.glass = [:]
X86EGL.glass.javahInclude = [
    "com/sun/glass/events/**",
    "com/sun/glass/ui/*"]
X86EGL.glass.variants = [ ]
if (X86EGL.includeLens) { 
    X86EGL.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
    X86EGL.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
    X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + lensPlatformAdditions
}
if (X86EGL.includeMonocle) { 
    X86EGL.glass.variants.addAll("monocle", "monocle_x11");
    X86EGL.glass.javahInclude.addAll(
        "com/sun/glass/ui/monocle/*",
        "com/sun/glass/ui/monocle/dispman/*",
        "com/sun/glass/ui/monocle/mx6/*",
        "com/sun/glass/ui/monocle/linux/*",
        "com/sun/glass/ui/monocle/util/*",
        "com/sun/glass/ui/monocle/x11/*");
    X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + monoclePlatformAdditions
}
if (X86EGL.includeGTK) {
    X86EGL.glass.variants.addAll("gtk");
    X86EGL.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
    X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + gtkPlatformAdditions
}

X86EGL.glass.lib = "glass"

X86EGL.glass.monocle = [:]
X86EGL.glass.monocle.nativeSource = [
        file("modules/graphics/src/main/native-glass/monocle"),
        file("modules/graphics/src/main/native-glass/monocle/linux"),
        file("modules/graphics/src/main/native-glass/monocle/util") ]
X86EGL.glass.monocle.compiler = compiler
X86EGL.glass.monocle.ccFlags = monocleCFlags
X86EGL.glass.monocle.linker = linker
X86EGL.glass.monocle.linkFlags = monocleLFlags
X86EGL.glass.monocle.lib = "glass_monocle"

X86EGL.glass.monocle_x11 = [:]
X86EGL.glass.monocle_x11.nativeSource = [
        file("modules/graphics/src/main/native-glass/monocle/util"),
        file("modules/graphics/src/main/native-glass/monocle/x11") ]
X86EGL.glass.monocle_x11.compiler = compiler
X86EGL.glass.monocle_x11.ccFlags = monocleCFlags
X86EGL.glass.monocle_x11.linker = linker
X86EGL.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
X86EGL.glass.monocle_x11.lib = "glass_monocle_x11"

X86EGL.glass.lensport = [:]
X86EGL.glass.lensport.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens/lensport") ]
X86EGL.glass.lensport.compiler = compiler
X86EGL.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
    "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten()
X86EGL.glass.lensport.linker = linker
X86EGL.glass.lensport.linkFlags = [lensLFlags].flatten()
X86EGL.glass.lensport.lib = "lens_porting"

X86EGL.glass.eglfb = [:]
// TODO when building headless, use lens/cursor/nullcursor/
// otherwise we use lens/cursor/fbCursor/ and lens/input/udev

// TODO when USE_RFB is specified use lens/rfb

// TODO use /headless/headlessScreen when using headless
X86EGL.glass.eglfb.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c") ]
    //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
X86EGL.glass.eglfb.compiler = compiler
X86EGL.glass.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
X86EGL.glass.eglfb.linker = linker
X86EGL.glass.eglfb.linkFlags = [lensLFlags].flatten()
X86EGL.glass.eglfb.lib = "glass_lens_eglfb"

X86EGL.glass.directfb = [:]
X86EGL.glass.directfb.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c"),
    file("modules/graphics/src/main/native-glass/lens/lensport") ]
    //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
X86EGL.glass.directfb.compiler = compiler
X86EGL.glass.directfb.ccFlags = ["-ffast-math", extraCFlags,
        "-I${sdk}/usr/include/directfb", "-DLINUX"].flatten()
X86EGL.glass.directfb.linker = linker
X86EGL.glass.directfb.linkFlags = [lensLFlags].flatten()
X86EGL.glass.directfb.lib = "glass_lens_dfb"

X86EGL.glass.fb = [:]
X86EGL.glass.fb.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c"),
    file("modules/graphics/src/main/native-glass/lens/lensport") ]
    //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
X86EGL.glass.fb.compiler = compiler
X86EGL.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
X86EGL.glass.fb.linker = linker
X86EGL.glass.fb.linkFlags = [lensLFlags].flatten()
X86EGL.glass.fb.lib = "glass_lens_fb"

X86EGL.glass.eglx11 = [:]
X86EGL.glass.eglx11.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
    //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
X86EGL.glass.eglx11.compiler = compiler
X86EGL.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
X86EGL.glass.eglx11.linker = linker
X86EGL.glass.eglx11.linkFlags = [lensLFlags].flatten()
X86EGL.glass.eglx11.lib = "glass_lens_eglx11"

X86EGL.glass.gtk = [:]
X86EGL.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk")
X86EGL.glass.gtk.compiler = compiler
X86EGL.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
X86EGL.glass.gtk.linker = linker
X86EGL.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
X86EGL.glass.gtk.lib = "glass"

X86EGL.decora = [:]
X86EGL.decora.compiler = compiler
X86EGL.decora.ccFlags = extraCFlags
X86EGL.decora.linker = linker
X86EGL.decora.linkFlags = extraLFlags
X86EGL.decora.lib = "decora_sse"

X86EGL.prism = [:]
X86EGL.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
X86EGL.prism.nativeSource = file("modules/graphics/src/main/native-prism")
X86EGL.prism.compiler = compiler
X86EGL.prism.ccFlags = [extraCFlags].flatten()
X86EGL.prism.linker = linker
X86EGL.prism.linkFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
X86EGL.prism.lib = "prism_common"

X86EGL.prismSW = [:]
X86EGL.prismSW.javahInclude = ["com/sun/pisces/**/*"]
X86EGL.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw")
X86EGL.prismSW.compiler = compiler
X86EGL.prismSW.ccFlags = [extraCFlags].flatten()
X86EGL.prismSW.linker = linker
X86EGL.prismSW.linkFlags = [extraLFlags].flatten()
X86EGL.prismSW.lib = "prism_sw"

X86EGL.iio = [:]
X86EGL.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
X86EGL.iio.nativeSource = [
    file("modules/graphics/src/main/native-iio"),
    file("modules/graphics/src/main/native-iio/libjpeg7")]
X86EGL.iio.compiler = compiler
X86EGL.iio.ccFlags = iioCFlags
X86EGL.iio.linker = linker
X86EGL.iio.linkFlags = iioLFlags
X86EGL.iio.lib = "javafx_iio"

X86EGL.prismES2 = [:]
X86EGL.prismES2.variants = ["eglfb", "monocle"]
X86EGL.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]

X86EGL.prismES2.eglfb = [:]
X86EGL.prismES2.eglfb.nativeSource = [
    file("modules/graphics/src/main/native-prism-es2"),
    file("modules/graphics/src/main/native-prism-es2/GL"),
    file("modules/graphics/src/main/native-prism-es2/eglfb")
]
X86EGL.prismES2.eglfb.compiler = compiler
X86EGL.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
X86EGL.prismES2.eglfb.linker = linker
X86EGL.prismES2.eglfb.linkFlags = es2EglfbLFlags
X86EGL.prismES2.eglfb.lib = "prism_es2_eglfb"

X86EGL.prismES2.eglx11 = [:]
X86EGL.prismES2.eglx11.nativeSource = [
    file("modules/graphics/src/main/native-prism-es2"),
    file("modules/graphics/src/main/native-prism-es2/GL"),
    file("modules/graphics/src/main/native-prism-es2/eglx11")
]
X86EGL.prismES2.eglx11.compiler = compiler
X86EGL.prismES2.eglx11.ccFlags = es2X11CFlags
X86EGL.prismES2.eglx11.linker = linker
X86EGL.prismES2.eglx11.linkFlags = es2X11LFlags
X86EGL.prismES2.eglx11.lib = "prism_es2_eglx11"

X86EGL.prismES2.monocle= [:]
X86EGL.prismES2.monocle.nativeSource = [
        file("modules/graphics/src/main/native-prism-es2"),
        file("modules/graphics/src/main/native-prism-es2/GL"),
        file("modules/graphics/src/main/native-prism-es2/monocle")
]
X86EGL.prismES2.monocle.compiler = compiler
X86EGL.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
X86EGL.prismES2.monocle.linker = linker
X86EGL.prismES2.monocle.linkFlags = es2EglfbLFlags
X86EGL.prismES2.monocle.lib = "prism_es2_monocle"

def closedDir = file("$projectDir/../rt-closed")
X86EGL.font = [:]
X86EGL.font.javahInclude = [
    "com/sun/javafx/font/**/*",
    "com/sun/javafx/text/**/*"]
X86EGL.font.nativeSource = [file("modules/graphics/src/main/native-font")]
X86EGL.font.compiler = compiler
X86EGL.font.ccFlags = fontCFlags
X86EGL.font.linker = linker
X86EGL.font.linkFlags = fontLFlags
X86EGL.font.lib = "javafx_font"

X86EGL.fontT2K = [:]
X86EGL.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
X86EGL.fontT2K.nativeSource = [
        file("$closedDir/javafx-font-t2k-native/src"),
        file("$closedDir/javafx-font-t2k-native/src/layout")]
X86EGL.fontT2K.compiler = compiler
X86EGL.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
X86EGL.fontT2K.linker = linker
X86EGL.fontT2K.linkFlags = fontLFlags
X86EGL.fontT2K.lib = "javafx_font_t2k"

X86EGL.fontFreetype = [:]
X86EGL.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class"]
X86EGL.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
X86EGL.fontFreetype.compiler = compiler
X86EGL.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, freetypeCCFlags].flatten()
X86EGL.fontFreetype.linker = linker
X86EGL.fontFreetype.linkFlags = [linkFlags, freetypeLinkFlags].flatten()
X86EGL.fontFreetype.lib = "javafx_font_freetype"

X86EGL.fontPango = [:]
X86EGL.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
X86EGL.fontPango.nativeSource = ["src/main/native-font/pango.c"]
X86EGL.fontPango.compiler = compiler
X86EGL.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
X86EGL.fontPango.linker = linker
X86EGL.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
X86EGL.fontPango.lib = "javafx_font_pango"

X86EGL.disableMedia = true
X86EGL.media =[:]
X86EGL.media.compiler = compiler
X86EGL.media.linker = linker
X86EGL.media.lib = "ar"

X86EGL.deploy = [:]
X86EGL.deploy.publicLibraryFilter = [
  "fxavcodecplugin-52.so",
  "fxavcodecplugin-53.so",
  "fxplugins.so",
  "libjfxwebkit.so",
  "libgstplugins-lite.so",
  "libgstreamer-lite.so",
  "libprism_es2_eglx11.so",
  "libglass_lens_fb.so"
]
X86EGL.deploy.compressBigJar=true