changeset 5526:405182d0e3c4

Partial RT-31560: javafx-font-pango should be built by default [NOTE: still disabled] Reviewed-by: felipe
author kcr
date Thu, 24 Oct 2013 16:41:32 -0700
parents 86c40357ada4
children 2c8c59c8f66d
files build.gradle buildSrc/armv6hf.gradle buildSrc/armv6sf.gradle buildSrc/linux.gradle modules/graphics/src/main/java/com/sun/javafx/font/pango/OS.java
diffstat 5 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Thu Oct 24 15:51:51 2013 -0700
+++ b/build.gradle	Thu Oct 24 16:41:32 2013 -0700
@@ -305,7 +305,8 @@
 defineProperty("COMPILE_MEDIA", "false")
 ext.IS_COMPILE_MEDIA = Boolean.parseBoolean(COMPILE_MEDIA)
 
-// COMPILE_PANGO specifies whether to build javafx-font-pango.
+// COMPILE_PANGO specifies whether to build javafx_font_pango.
+//KCR: defineProperty("COMPILE_PANGO", "${IS_LINUX}")
 defineProperty("COMPILE_PANGO", "false")
 ext.IS_COMPILE_PANGO = Boolean.parseBoolean(COMPILE_PANGO)
 
@@ -677,10 +678,9 @@
  * @param name The name of the project, such as "prism-common". This name is used
  *        in the name of the generated task, such as ccPrismCommon, and also
  *        in the name of the final library, such as libprism-common.dylib.
- * @param optional If the task is optional or not
  */
-void addNative(Project project, String name, boolean optional = false) {
-    addNative(project, name, null, optional)
+void addNative(Project project, String name) {
+    addNative(project, name, null)
 }
 
 /**
@@ -693,9 +693,8 @@
  *        in the name of the generated task, such as ccPrismCommon, and also
  *        in the name of the final library, such as libprism-common.dylib.
  * @param list of compile targets. Library is applicable only for these targets.
- * @param optional If the task is optional or not
  */
-void addNative(Project project, String name, List<String> includeTargets, boolean optional = false) {
+void addNative(Project project, String name, List<String> includeTargets) {
     // TODO if we want to handle 32/64 bit windows in the same build,
     // Then we will need to modify the win compile target to be win32 or win64
     def capitalName = name.split("-").collect{it.capitalize()}.join()
@@ -706,9 +705,7 @@
         description = "Clean native objects for $name"
     }
     if (project.hasProperty("nativeAllTask")) project.nativeAllTask.dependsOn nativeTask
-    if (!optional) {
-        project.assemble.dependsOn(nativeTask)
-    }
+    project.assemble.dependsOn(nativeTask)
     if (project.hasProperty("cleanNativeAllTask")) project.cleanNativeAllTask.dependsOn cleanTask
     
     // Each of the different compile targets will be placed in a sub directory
@@ -1077,9 +1074,9 @@
     addNative(project, "iio")
     addNative(project, "prismES2")
 
-    // Currently lets not build pango by default
-    if (IS_LINUX) {
-        addNative(project, "fontPango", ["linux","armv6hf", "armv6sf"],!IS_COMPILE_PANGO)
+    if (IS_COMPILE_PANGO) {
+        // TODO: embedded support
+        addNative(project, "fontPango", ["linux"])
     }
 
     if (IS_WINDOWS) {
@@ -2161,7 +2158,10 @@
                 from("modules/graphics/build/libs/jsl-decora/${t.name}/${library(targetProperties.decora.lib)}")
                 def libs = ['font', 'prism', 'prismSW', 'prismES2', 'glass', 'iio']
                 if (IS_COMPILE_PANGO) {
-                    libs += 'fontPango';
+                    // TODO: embedded support
+                    if ("${defaultHostTarget}" == "${t.name}") {
+                        libs += 'fontPango';
+                    }
                 }
                 libs.each { lib ->
                     def variants = targetProperties[lib].containsKey('variants') && !useLipo ? targetProperties[lib].variants : [null]
--- a/buildSrc/armv6hf.gradle	Thu Oct 24 15:51:51 2013 -0700
+++ b/buildSrc/armv6hf.gradle	Thu Oct 24 16:41:32 2013 -0700
@@ -435,7 +435,7 @@
 ARMV6HF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
 ARMV6HF.fontPango.linker = linker
 ARMV6HF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-ARMV6HF.fontPango.lib = "javafx-font-pango"
+ARMV6HF.fontPango.lib = "javafx_font_pango"
 
 ARMV6HF.webkit = [:]
 ARMV6HF.webkit.binDir   = "$compilerHome/bin"
--- a/buildSrc/armv6sf.gradle	Thu Oct 24 15:51:51 2013 -0700
+++ b/buildSrc/armv6sf.gradle	Thu Oct 24 16:41:32 2013 -0700
@@ -454,7 +454,7 @@
 ARMV6SF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
 ARMV6SF.fontPango.linker = linker
 ARMV6SF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-ARMV6SF.fontPango.lib = "javafx-font-pango"
+ARMV6SF.fontPango.lib = "javafx_font_pango"
 
 ARMV6SF.webkit = [:]
 ARMV6SF.webkit.binDir   = "$compilerHome/bin"
--- a/buildSrc/linux.gradle	Thu Oct 24 15:51:51 2013 -0700
+++ b/buildSrc/linux.gradle	Thu Oct 24 16:41:32 2013 -0700
@@ -233,7 +233,7 @@
 LINUX.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
 LINUX.fontPango.linker = linker
 LINUX.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-LINUX.fontPango.lib = "javafx-font-pango"
+LINUX.fontPango.lib = "javafx_font_pango"
 
 LINUX.media = [:]
 LINUX.media.compiler = compiler
--- a/modules/graphics/src/main/java/com/sun/javafx/font/pango/OS.java	Thu Oct 24 15:51:51 2013 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/font/pango/OS.java	Thu Oct 24 16:41:32 2013 -0700
@@ -36,7 +36,7 @@
     static {
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
            public Void run() {
-               NativeLibLoader.loadLibrary("javafx-font-pango");
+               NativeLibLoader.loadLibrary("javafx_font_pango");
                return null;
            }
         });