unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ioannis Kappas <ioannis.kappas@gmail.com>
To: 41360@debbugs.gnu.org
Cc: ludo@gnu.org, julien@lepiller.eu, levenson@mmer.org
Subject: [bug#41360] [PATCH v5] finalize java-openjfx packages
Date: Sun, 19 Jun 2022 20:26:32 +0100	[thread overview]
Message-ID: <CAMRHuGCUsJDzk-LoHAA5d1fSESyb0Xjg6KUxk09HgUjHFS3W2Q@mail.gmail.com> (raw)
In-Reply-To: <20200517132829.1553311-1-levenson@mmer.org>

[-- Attachment #1: Type: text/plain, Size: 3217 bytes --]

Hi,

could you please consider reviewing patches to finalize the building
of the java-openjfx packages in scope of this discussion, as part of
an attempt to complete Alexey's awesome work.

The thread had stopped receiving updates for some time now. I assume
priorities were shifted elsewhere.

I recently got interested testing an openjfx application on Java 1.8,
only to realise that the current packages are incomplete. I came
across this thread, and thought to give the patches a try, and fix
where possible.

I believe I have finalised all openjfx packages in scope to build,
pass all tests and seamlessly link to their native libraries at
runtime.

My test application now works, I can use the graphics, controls and
web openjfx packages by merely specifying their share/java jar
packages on the classpath.

This email has three incremental patches. I've named the as [PATCH v5]
to denote this is a continuation from the last patches.

0001: Alexey's work brought forward to a recent guix revision.

0002: Small changes to updated the above to build with the current
guix spec/packages.

0003: My update to finalize the openjfx packages, normalize inputs,
run all tests where they exist and fix the load path of native
libraries at runtime.

I've put the author of 0001 down to Alexey since this is his works. I
compiled this patch by hand from the thread, I hope I haven't missed
anything.

The individual packages produce a jar output, and some of them also
build native shared libraries. The individual jar packages try to load
their native libraries just by name, and this will fail if the native
libs are not on the library path.

I've taken the decision to load these libraries by their full
gnu/store path instead of their names. I have also applied the same to
an external package, java-swt, since it has a shared library that has
to be located at runtime. Although there are a few native libraries
built by the java-openjfx-graphics package I left it as is, because it
has a sophisticated native library loader that locates shared
libraries relative to the jar location.

The changes in 0003 are as follows:

* java-openjfx-graphics
  1. Normalize inputs, only build against gtk-2.0.
  2. Output native libs to openjfx standard share/amd64 dir.
  3. Do not build libjpeg from source, but rather use corresponding
     package.
  4. Run all tests.
* java-openjfx-controls
  1. Run all tests.
  2. Fix java-openjfx-graphics name typo.
* java-openjfx-media
  1. Build against gstreamer.
  2. Compile native library and modify loader to load it directly from
     the store path.
* java-openjfx-web
  1. Include version.
  2. Modify loader to load native web kit lib directly from the store.
  3. Fix a failing test, by applying new
     java-openjfx-build-web-js-test.patch as picked up from a later
     openjfx revision source code revision, to fix a failing test.
  4. Run all tests.
* java-swt
  1. Modify loader to load native library directly from the gnu/store
     path if it can't be found otherwise. This is required for
     seamlessly loading java-swt as an input.

This is my first guix package update, so is likely to require more
work based on your feedback, which is most welcome.

Thanks

[-- Attachment #2: 0002-Fix-openjfx-build-issues-occuring-from-merge.patch --]
[-- Type: application/octet-stream, Size: 12835 bytes --]

From bf9878d6a02d781bda240432017bf7659b42bd75 Mon Sep 17 00:00:00 2001
From: Ioannis Kappas <ioannis.kappas@gmamil.com>
Date: Sat, 18 Jun 2022 14:39:18 +0100
Subject: [PATCH v5 2/3] Fix openjfx build issues occuring from merge

This is because the guix syntax or inputs have changed/updated since Alexey's
v4 patch.
---
 gnu/packages/java.scm | 88 +++++++++++++++++++++++++++++++++----------
 1 file changed, 69 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 5185967960..8ac501252c 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2621,8 +2621,7 @@ (define-public java-openjfx-graphics
                   (ice-9 regex)
                   (ice-9 match))
        #:phases
-       (let* ((jdk (assoc-ref %build-inputs "jdk"))
-              (javac/h-flags
+       (let* ((javac/h-flags
                '(;; When javac is compiling code it doesn't link
                  ;; against rt.jar by default. Instead it uses special
                  ;; symbol file lib/ct.sym with class stubs.
@@ -2639,10 +2638,6 @@ (define-public java-openjfx-graphics
                '("-fno-strict-aliasing" "-fPIC" "-fno-omit-frame-pointer" ;; optimization flags
                  "-fstack-protector"
                  "-W" "-Wall" "-Wno-unused" "-Wno-parentheses"))
-              (cc-flags
-               `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
-                                "-I" ,(string-append jdk "/include")
-                                "-I" ,(string-append jdk "/include/linux")))
               (link-flags
                `("-static-libgcc" "-static-libstdc++" "-shared" ,@common-flags
                  "-z" "relro"
@@ -2832,6 +2827,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (decora-native-src "modules/graphics/src/main/native-decora")
                       (decora-src "modules/graphics/src/main/jsl-decora/")
                       (decora-classes "modules/graphics/build/classes/jsl-decora/")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (decora-cc-flags `(,@cc-flags "-ffast-math")))
                  (mkdir-p decora-gen-headers)
                  (apply invoke "javah"
@@ -2864,6 +2864,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (font-native-obj "modules/graphics/build/native/font/linux")
                       (font-native-src "modules/graphics/src/main/native-font")
                       ;;
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (font-cc-flags `("-DJFXFONT_PLUS" ,@cc-flags)))
                  (mkdir-p font-gen-headers)
                  (apply invoke "javah"
@@ -2898,6 +2903,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (font-freetype-native-lib "modules/graphics/build/libs/fontFreetype/linux/libjavafx_font_freetype.so")
                       (font-freetype-native-obj "modules/graphics/build/native/fontFreetype/linux")
                       (font-freetype-native-src "modules/graphics/src/main/native-font/freetype.c")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (font-freetype-cc-flags `("-DJFXFONT_PLUS" "-D_ENABLE_PANGO"
                                                 "$(pkg-config --cflags freetype2)" ,@cc-flags))
                       (font-freetype-link-flags `("$(pkg-config --libs freetype2)" ,@link-flags)))
@@ -2932,6 +2942,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (font-pango-native-lib "modules/graphics/build/libs/fontPango/linux/libjavafx_font_pango.so")
                       (font-pango-native-obj "modules/graphics/build/native/fontPango/linux")
                       (font-pango-native-src "modules/graphics/src/main/native-font/pango.c")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (font-pango-cc-flags `("-DJFXFONT_PLUS" "-D_ENABLE_PANGO"
                                              "$(pkg-config --cflags pangoft2)" ,@cc-flags))
                       (font-pango-link-flags `("$(pkg-config --libs pangoft2)" ,@link-flags)))
@@ -2967,10 +2982,17 @@ (class (match:suffix (regexp-exec rx class))))
                       (glass-native-lib "modules/graphics/build/libs/glass/linux/libglass.so")
                       (glass-native-obj "modules/graphics/build/native/glass/linux/glass")
                       (glass-native-src "modules/graphics/src/main/native-glass/gtk/launcher.c")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (glass-cc-flags
                        `(,@cc-flags
                          "$(pkg-config --cflags glib-2.0 gdk-2.0 gtk+-2.0 gthread-2.0 xtst)"
-                         "-Werror"))
+                         "-Werror"
+                         "-Wno-cast-function-type"
+                         ))
                       (glass-link-flags
                        `(,@link-flags "$(pkg-config --libs x11)" "-ldl"))
                       ;; glass-gtk2
@@ -2985,7 +3007,9 @@ (class (match:suffix (regexp-exec rx class))))
                          ;; version 2.62. GTimeVal s not year-2038-safe. Gtk
                          ;; 2.24 uses GTimeVal so our build is also failing.
                          "-Wno-deprecated-declarations"
-                         "-Werror"))
+                         "-Werror"
+                         "-Wno-cast-function-type"
+                         ))
                       (glass-gtk2-link-flags
                        `(,@link-flags
                          "$(pkg-config --libs gtk+-2.0 gthread-2.0 xtst)"))
@@ -2997,7 +3021,9 @@ (class (match:suffix (regexp-exec rx class))))
                       (glass-gtk3-cc-flags
                        `(,@cc-flags
                          "$(pkg-config --cflags gtk+-3.0 gthread-2.0 xtst)"
-                         "-Wno-deprecated-declarations" "-Werror"))
+                         "-Wno-deprecated-declarations" "-Werror"
+                         "-Wno-cast-function-type"
+                         ))
                       (glass-gtk3-link-flags
                        `(,@link-flags "$(pkg-config --libs gtk+-3.0 gthread-2.0 xtst)")))
                  ;; glass
@@ -3069,6 +3095,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (iio-native-lib "modules/graphics/build/libs/iio/linux/libjavafx_iio.so")
                       (iio-native-obj "modules/graphics/build/native/iio/linux")
                       (iio-native-src "modules/graphics/src/main/native-iio")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (iio-cc-flags cc-flags)
                       (iio-link-flags link-flags))
                  (mkdir-p iio-gen-headers)
@@ -3103,6 +3134,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (prism-native-lib "modules/graphics/build/libs/prism/linux/libprism_common.so")
                       (prism-native-obj "modules/graphics/build/native/prism/linux")
                       (prism-native-src "modules/graphics/src/main/native-prism")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (prism-cc-flags `(,@cc-flags "-DINLINE=inline"))
                       (prism-link-flags link-flags))
                  (mkdir-p prism-gen-headers)
@@ -3140,6 +3176,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (prism-es2-native-lib "modules/graphics/build/libs/prism/linux/libprism_es2.so")
                       (prism-es2-native-obj "modules/graphics/build/native/prismES2/linux")
                       (prism-es2-native-src "modules/graphics/src/main/native-prism-es2")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       (prism-es2-cc-flags `("-DLINUX" ,@cc-flags))
                       (prism-es2-link-flags
                        `(,@link-flags "$(pkg-config --libs x11 xxf86vm gl)"))
@@ -3184,6 +3225,11 @@ (class (match:suffix (regexp-exec rx class))))
                       (prism-sw-native-lib "modules/graphics/build/libs/prism/linux/libprism_sw.so")
                       (prism-sw-native-obj "modules/graphics/build/native/prismSW/linux")
                       (prism-sw-native-src "modules/graphics/src/main/native-prism-sw")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (cc-flags
+                       `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                        "-I" ,(string-append jdk "/include")
+                                        "-I" ,(string-append jdk "/include/linux")))
                       ;;
                       (prism-sw-cc-flags `(,@cc-flags "-DINLINE=inline"))
                       (prism-sw-link-flags link-flags))
@@ -3418,16 +3464,20 @@ (define-public java-openjfx-web
                                               "\"-Wl,-rpath=" lib "\"")
                                (string-append "-DCMAKE_SYSTEM_PROCESSOR=" machine)
                                "-DJAVAFX_RELEASE_VERSION=8.0"
-                               "-W"
-                               "-Wall"
-                               "-Werror=implicit-function-declaration"
-                               "-Wl,--gc-sections"
-                               "-Wno-parentheses"
-                               "-Wno-unused"
-                               "-fPIC"
-                               "-fno-omit-frame-pointer"
-                               "-fno-strict-aliasing"
-                               "-fstack-protector")))))
+                               "-DCMAKE_CXX_FLAGS=\""
+                               (string-join (list "-W"
+                                                  "-DU_DEFINE_FALSE_AND_TRUE=1"
+                                                  "-Wall"
+                                                  "-Werror=implicit-function-declaration"
+                                                  "-Wl,--gc-sections"
+                                                  "-Wno-parentheses"
+                                                  "-Wno-unused"
+                                                  "-fPIC"
+                                                  "-fno-omit-frame-pointer"
+                                                  "-fno-strict-aliasing"
+                                                  "-fstack-protector")
+                                            " ")
+                               "\"")))))
              #t))
 
          (add-after 'compile-native-linux 'install-native
-- 
2.34.0


[-- Attachment #3: 0003-Finalize-openjfx-libraries.patch --]
[-- Type: application/octet-stream, Size: 40500 bytes --]

From 0b6c756fc44fcda303cf1268a9efa64f936724ad Mon Sep 17 00:00:00 2001
From: Ioannis Kappas <ioannis.kappas@gmamil.com>
Date: Sun, 19 Jun 2022 09:44:26 +0100
Subject: [PATCH v5 3/3] Finalize openjfx libraries

* java-openjfx-graphics
  1. Normalize inputs, only build against gtk-2.0.
  2. Output native libs to openjfx standard share/amd64 dir.
  3. Do not build libjpeg from source, but rather use corresponding
     package.
  4. Run all tests.
* java-openjfx-controls
  1. Run all tests.
  2. Fix java-openjfx-graphics name typo.
* java-openjfx-media
  1. Build against gstreamer.
  2. Compile native library and modify loader to load it directly from
     the store path.
* java-openjfx-web
  1. Include version.
  2. Modify loader to load native web kit lib directly from the store.
  3. Fix a failing test, by applying new
     java-openjfx-build-web-js-test.patch as picked up from a later
     openjfx revision source code revision, to fix a failing test.
  4. Run all tests.
* java-swt
  1. Modify loader to load native library directly from the gnu/store
     path if it can't be found otherwise. This is required for
     seamlessly loading java-swt as an input.
---
 gnu/local.mk          |   1 +
 gnu/packages/java.scm | 482 ++++++++++++++++++++++++++++++++++--------
 2 files changed, 399 insertions(+), 84 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 9b982c42db..29c3f750aa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1327,6 +1327,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-openjfx-build-web-WTF.patch			\
   %D%/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch	\
   %D%/packages/patches/java-openjfx-build-web-icu.patch			\
+  %D%/packages/patches/java-openjfx-build-web-js-test.patch     \
   %D%/packages/patches/java-powermock-fix-java-files.patch		\
   %D%/packages/patches/java-simple-xml-fix-tests.patch		\
   %D%/packages/patches/java-svg-salamander-Fix-non-det.patch	\
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 8ac501252c..5940df018b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -72,6 +72,7 @@ (define-module (gnu packages java)
   #:use-module (gnu packages ghostscript) ;lcms
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages groovy)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages icu4c)
@@ -2527,6 +2528,7 @@ (define-public java-openjfx-build
                   ;; Delete source code of a ThirdParty libraries
                   (delete-file-recursively "modules/web/src/main/native/Source/ThirdParty")
                   (delete-file-recursively "modules/web/src/main/native/Source/PlatformJava.cmake")
+                  (delete-file-recursively "modules/graphics/src/main/native-iio/libjpeg")
                   #t))
               (sha256
                (base32
@@ -2539,7 +2541,7 @@ (define-public java-openjfx-build
                                        "java-openjfx-build-web-WTF.patch"
                                        "java-openjfx-build-web-WebKitCompilerFlags.cmake.patch"
                                        "java-openjfx-build-web-icu.patch"
-                                       ))))
+                                       "java-openjfx-build-web-js-test.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
@@ -2611,7 +2613,6 @@ (define-public java-openjfx-graphics
     (arguments
      `(#:jar-name "java-openjfx-graphics.jar"
        #:source-dir "modules/graphics/src/main/java"
-       #:tests? #f               ; requires X
        #:test-dir "modules/graphics/src/test"
        #:test-include (list "**/*Test.*")
        #:modules ((guix build ant-build-system)
@@ -2975,13 +2976,15 @@ (class (match:suffix (regexp-exec rx class))))
                #t))
 
            (add-after 'compile-linux-font-pango-lib 'compile-linux-glass-lib
-             (lambda* (#:key inputs #:allow-other-keys)
+             (lambda* (#:key inputs outputs #:allow-other-keys)
                (let* ((classes "modules/graphics/build/classes/java/main")
                       ;; glass
                       (glass-gen-headers "modules/graphics/build/generated-src/headers/glass/linux")
                       (glass-native-lib "modules/graphics/build/libs/glass/linux/libglass.so")
                       (glass-native-obj "modules/graphics/build/native/glass/linux/glass")
-                      (glass-native-src "modules/graphics/src/main/native-glass/gtk/launcher.c")
+                      (glass-native-src "modules/graphics/src/main/native-glass/gtk")
+                      (glass-lib-path (string-append (assoc-ref outputs "out")
+                                                     "/share/amd64"))
                       (jdk (assoc-ref inputs "jdk"))
                       (cc-flags
                        `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
@@ -2989,20 +2992,22 @@ (class (match:suffix (regexp-exec rx class))))
                                         "-I" ,(string-append jdk "/include/linux")))
                       (glass-cc-flags
                        `(,@cc-flags
-                         "$(pkg-config --cflags glib-2.0 gdk-2.0 gtk+-2.0 gthread-2.0 xtst)"
+                         "$(pkg-config --cflags glib-2.0 gtk+-2.0 xtst)"
+                         "-Wno-deprecated-declarations"
                          "-Werror"
                          "-Wno-cast-function-type"
                          ))
                       (glass-link-flags
-                       `(,@link-flags "$(pkg-config --libs x11)" "-ldl"))
+                       `(,@link-flags
+                         "$(pkg-config --libs x11 gtk+-2.0)" "-ldl"))
                       ;; glass-gtk2
                       (gtk (assoc-ref inputs "gtk"))
                       (glass-gtk2-native-obj "modules/graphics/build/native/glass/linux/glassgtk2")
-                      (glass-gtk2-native-src (dirname glass-native-src))
+                      (glass-gtk2-native-src glass-native-src)
                       (glass-gtk2-native-lib "modules/graphics/build/libs/glass/linux/libglassgtk2.so")
                       (glass-gtk2-cc-flags
                        `(,@cc-flags
-                         "$(pkg-config --cflags gtk+-2.0 gthread-2.0 xtst)"
+                         "$(pkg-config --cflags gtk+-2.0 xtst)"
                          ;; XX: GTimeVal has been deprecated in GLIB since
                          ;; version 2.62. GTimeVal s not year-2038-safe. Gtk
                          ;; 2.24 uses GTimeVal so our build is also failing.
@@ -3011,21 +3016,7 @@ (class (match:suffix (regexp-exec rx class))))
                          "-Wno-cast-function-type"
                          ))
                       (glass-gtk2-link-flags
-                       `(,@link-flags
-                         "$(pkg-config --libs gtk+-2.0 gthread-2.0 xtst)"))
-                      ;; glass-gtk3
-                      (gtk3 (assoc-ref inputs "gtk3"))
-                      (glass-gtk3-native-obj "modules/graphics/build/native/glass/linux/glassgtk3")
-                      (glass-gtk3-native-src (dirname glass-native-src))
-                      (glass-gtk3-native-lib "modules/graphics/build/libs/glass/linux/libglassgtk3.so")
-                      (glass-gtk3-cc-flags
-                       `(,@cc-flags
-                         "$(pkg-config --cflags gtk+-3.0 gthread-2.0 xtst)"
-                         "-Wno-deprecated-declarations" "-Werror"
-                         "-Wno-cast-function-type"
-                         ))
-                      (glass-gtk3-link-flags
-                       `(,@link-flags "$(pkg-config --libs gtk+-3.0 gthread-2.0 xtst)")))
+                       `(,@link-flags "$(pkg-config --libs gtk+-2.0 xtst)")))
                  ;; glass
                  (mkdir-p glass-gen-headers)
                  (apply invoke "javah"
@@ -3038,14 +3029,16 @@ (class (match:suffix (regexp-exec rx class))))
                                               (string-prefix? "com.sun.glass.ui" class)))
                                         (java-list-classes classes))))
                  (mkdir-p glass-native-obj)
-                 (invoke "bash" "-c"
-                         (string-join `("gcc"
-                                        ,@glass-cc-flags
-                                        "-I" ,glass-gen-headers
-                                        "-I" ,(dirname glass-native-src)
-                                        "-o" ,(string-append glass-native-obj "/"
-                                                             (basename glass-native-src ".c") ".obj")
-                                        ,glass-native-src)))
+                 (for-each (lambda (c)
+                             (invoke "bash" "-c"
+                                     (string-join `("gcc"
+                                                    ,@glass-cc-flags
+                                                    "-I" ,glass-gen-headers
+                                                    "-I" ,glass-native-src
+                                                    "-o" ,(string-append glass-native-obj "/"
+                                                                         (basename c ".c") ".obj")
+                                                    ,c))))
+                           (find-files glass-native-src "\\.c$"))
                  (mkdir-p (dirname glass-native-lib))
                  (invoke "bash" "-c"
                          (string-join `("g++"
@@ -3068,24 +3061,7 @@ (class (match:suffix (regexp-exec rx class))))
                          (string-join `("g++"
                                         ,@glass-gtk2-link-flags
                                         "-o" ,glass-gtk2-native-lib
-                                        ,@(find-files glass-gtk2-native-obj "\\.obj$"))))
-                 ;; gtk3
-                 (mkdir-p glass-gtk3-native-obj)
-                 (for-each (lambda (cpp)
-                             (invoke "bash" "-c"
-                                     (string-join `("gcc"
-                                                    ,@glass-gtk3-cc-flags
-                                                    "-I" ,glass-gen-headers
-                                                    "-o" ,(string-append glass-gtk3-native-obj "/"
-                                                                         (basename cpp ".cpp") ".obj")
-                                                    ,cpp))))
-                           (find-files glass-gtk3-native-src "\\.cpp$"))
-                 (mkdir-p (dirname glass-gtk3-native-lib))
-                 (invoke "bash" "-c"
-                         (string-join `("g++"
-                                        ,@glass-gtk3-link-flags
-                                        "-o" ,glass-gtk3-native-lib
-                                        ,@(find-files glass-gtk3-native-obj "\\.obj$")))))
+                                        ,@(find-files glass-gtk2-native-obj "\\.obj$")))))
                #t))
 
            (add-after 'compile-linux-glass-lib  'compile-linux-iio
@@ -3101,7 +3077,7 @@ (class (match:suffix (regexp-exec rx class))))
                                         "-I" ,(string-append jdk "/include")
                                         "-I" ,(string-append jdk "/include/linux")))
                       (iio-cc-flags cc-flags)
-                      (iio-link-flags link-flags))
+                      (iio-link-flags `(,@link-flags "$(pkg-config --libs libjpeg)")))
                  (mkdir-p iio-gen-headers)
                  (apply invoke "javah"
                         "-d" iio-gen-headers
@@ -3160,7 +3136,7 @@ (class (match:suffix (regexp-exec rx class))))
                                                     "-o" ,(string-append prism-native-obj "/"
                                                                          (basename c ".c") ".obj")
                                                     ,c))))
-                           (find-files prism-native-obj "\\.c$"))
+                           (find-files prism-native-src "\\.c$"))
                  (mkdir-p (dirname prism-native-lib))
                  (invoke "bash" "-c"
                          (string-join `("g++"
@@ -3183,14 +3159,14 @@ (class (match:suffix (regexp-exec rx class))))
                                         "-I" ,(string-append jdk "/include/linux")))
                       (prism-es2-cc-flags `("-DLINUX" ,@cc-flags))
                       (prism-es2-link-flags
-                       `(,@link-flags "$(pkg-config --libs x11 xxf86vm gl)"))
+                       `(,@link-flags "$(pkg-config --libs x11 xxf86vm gl fontconfig)"))
                       ;; We need all *.c files in the root and only those
                       ;; which are in a specific directories.
                       (filter-src
                        (lambda (abs _)
-                         (or (regexp-exec (make-regexp (string-append prism-es2-native-src "[^/]*\\.c$"))
+                         (or (regexp-exec (make-regexp (string-append prism-es2-native-src "/[[:alnum:]]+\\.c$"))
                                           abs)
-                             (regexp-exec (make-regexp (string-append prism-es2-native-src "(x11/|GL/)"))
+                             (regexp-exec (make-regexp (string-append prism-es2-native-src "/(x11/|GL/).*\\.c$"))
                                           abs)))))
                  (mkdir-p prism-es2-gen-headers)
                  (apply invoke "javah"
@@ -3202,7 +3178,6 @@ (class (match:suffix (regexp-exec rx class))))
                  (mkdir-p prism-es2-native-obj)
                  (for-each (lambda (c)
                              (apply invoke "gcc"
-                                    "-I" glass-native-src
                                     "-I" prism-es2-gen-headers
                                     "-I" prism-es2-native-src
                                     "-I" (string-append prism-es2-native-src "/GL")
@@ -3258,7 +3233,7 @@ (class (match:suffix (regexp-exec rx class))))
 
            (add-after 'compile-linux-prism-sw 'install-native
              (lambda* (#:key outputs #:allow-other-keys)
-               (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
+               (let ((lib (string-append (assoc-ref outputs "out") "/share/amd64")))
                  (for-each (lambda (file)
                              (install-file file lib))
                            (find-files "." "\\.so$"))
@@ -3267,25 +3242,54 @@ (class (match:suffix (regexp-exec rx class))))
            (add-after 'install-native 'build-jar
              (lambda _
                (let* ((module (string-append "modules/graphics"))
+                      (decora (string-append module "/build/classes/jsl-decora"))
+                      (prism (string-append module "/build/classes/jsl-prism"))
                       (resources (string-append module "/src/main/resources"))
                       (classes (string-append module "/build/classes/java/main")))
+                 (copy-recursively decora classes)
+                 (copy-recursively prism classes)
                  (copy-recursively resources classes)
 
                  (invoke "ant" "jar" (string-append "-Dclasses.dir=" classes)))
-               #t))))))
+               #t))
+
+           (add-before 'check 'copy-classes
+             (lambda _
+             (copy-recursively "modules/graphics/build/classes/java/main" "build/classes")
+             (substitute* "build.xml"
+               (("<junit.*haltonfailure=\"yes\">" all)
+                (string-append
+                 all
+                 "<sysproperty key=\"java.library.path\" value=\""
+                 (string-join '("modules/graphics/build/libs/prism/linux/"
+                                "modules/graphics/build/libs/font/linux/"
+                                "modules/graphics/build/libs/fontFreetype/linux/"
+                                "modules/graphics/build/libs/fontPango/linux/"
+                                "modules/graphics/build/libs/iio/linux/")
+                              ":")
+                  "\"/>"
+                 "<sysproperty key=\"javafx.toolkit\" value=\"com.sun.javafx.pgstub.StubToolkit\"/>")))
+             #t))))))
     (native-inputs
+     `(("antlr3" ,antlr3)
+       ("java-stringtemplate" ,java-stringtemplate)
+       ("gcc" ,gcc)
+       ("jdk" ,icedtea-8 "jdk")
+       ("pkg-config" ,pkg-config)
+       ("java-junit" ,java-junit)))
+    (inputs
      `(("freetype" ,freetype)
        ("fontconfig" ,fontconfig)
-       ("gcc" ,gcc)
        ("glib" ,glib)
        ("zlib" ,zlib)
        ("gtk" ,gtk+-2)
-       ("gtk3" ,gtk+)
        ("jpeg" ,libjpeg-turbo)
        ("libxtst" ,libxtst)
+       ("mesa" ,mesa)
        ("pango" ,pango)
        ("libpng" ,libpng)
-       ("pkg-config" ,pkg-config)))
+       ("xxf86vm" ,libxxf86vm)
+       ("x11" ,libx11)))
     (propagated-inputs
      `(("java-openjfx-base" ,java-openjfx-base)
        ("java-swt" ,java-swt)))))
@@ -3296,10 +3300,21 @@ (define-public java-openjfx-swing
     (arguments
      `(#:jar-name "java-openjfx-swing.jar"
        #:source-dir "modules/swing/src/main/java"
-       #:tests? #f))
-    (inputs
-     `(("antlr3" ,antlr3)
-       ("java-stringtemplate" ,java-stringtemplate)))
+       #:test-dir "modules/swing/src/test"
+       #:test-include (list "**/*Test.*")
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (ice-9 regex))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'x-test-setup
+           (lambda _
+             (system "Xvfb :33 &")
+             (setenv "DISPLAY" ":33")
+             #t)))))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("xorg-server" ,xorg-server-for-tests)))
     (propagated-inputs
      `(("java-openjfx-graphics" ,java-openjfx-graphics)))))
 
@@ -3309,6 +3324,7 @@ (define-public java-openjfx-swt
     (arguments
      `(#:jar-name "java-openjfx-swt.jar"
        #:source-dir "modules/swt/src/main/java"
+       ;; no tests available in src
        #:tests? #f))
     (inputs
      `(("antlr3" ,antlr3)
@@ -3322,25 +3338,255 @@ (define-public java-openjfx-controls
     (arguments
      `(#:jar-name "java-openjfx-controls.jar"
        #:source-dir "modules/controls/src/main/java"
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'copy-resources
+       #:test-dir "modules/controls/src/test"
+       #:test-include (list "**/*Test.*")
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (ice-9 regex))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'copy-resources
+           (lambda _
+             ;; copy test support files (but not the actual tests themselves)
+             ;; from other modules
+             (copy-recursively "modules/graphics/src/test/java/com/sun/javafx/pgstub"
+                               "modules/controls/src/test/java/com/sun/javafx/pgstub")
+             (for-each delete-file (find-files "modules/controls/src/test/java/com/sun/javafx/pgstub" ".*Test.java$"))
+             (copy-recursively "modules/base/src/test/java/com/sun/javafx/binding"
+                               "modules/controls/src/test/java/com/sun/javafx/binding")
+             (for-each delete-file (find-files "modules/controls/src/test/java/com/sun/javafx/binding" ".*Test.java$"))
+             (copy-recursively "modules/base/src/test/java/javafx/beans"
+                               "modules/controls/src/test/java/javafx/beans")
+             (for-each delete-file (find-files "modules/controls/src/test/java/javafx/beans" ".*Test.java$"))
+             (copy-recursively "modules/base/src/test/java/javafx/collections"
+                               "modules/controls/src/test/java/javafx/collections")
+             (for-each delete-file (find-files "modules/controls/src/test/java/javafx/collections" ".*Test.java$"))
+             (copy-recursively "modules/base/src/test/java/javafx/binding"
+                               "modules/controls/src/test/java/javafx/binding")
+             (for-each delete-file (find-files "modules/controls/src/test/java/javafx/binding" ".*Test.java$"))
+
+             (copy-recursively "modules/controls/src/test/resources"
+                               "build/test-classes")
+             (copy-recursively "modules/controls/src/main/resources"
+                               "build/classes")))
+
+         (add-before 'check 'toolkit
            (lambda _
-             (let ((resources (string-append (getcwd) "/modules/controls/src/main/resources")))
-               (copy-recursively resources "build/classes")) #t)))))
+             (substitute* "build.xml"
+               (("<junit.*haltonfailure=\"yes\">" all)
+                (string-append all
+                               "<sysproperty key=\"javafx.toolkit\" value=\"com.sun.javafx.pgstub.StubToolkit\"/>")))
+             #t)))))
     (propagated-inputs
-     `(("java-openjfx-graphics" ,java-openjfx-graphics)))))
+     `(("java-openjxf-graphics" ,java-openjfx-graphics)))))
 
 (define-public java-openjfx-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")
+    (native-inputs
+     `(("gcc" ,gcc)
+       ("jdk" ,icedtea-8 "jdk")
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("xz" ,xz) ;; workaround for gstreamer's elfutils bug#55793.
+       ("gstreamer" ,gstreamer)
+       ("gst-plugins-base" ,gst-plugins-base)))
     (propagated-inputs
-     `(("java-openjxf-graphics" ,java-openjfx-graphics)))
+     `(("java-openjfx-graphics" ,java-openjfx-graphics)))
     (arguments
      `(#:jar-name "java-openjfx-media.jar"
-       #:source-dir "modules/media/src/main/java"
-       #:tests? #f)); no tests
+       #:source-dir "modules/media/src/main/java:modules/media/src/tools/java"
+       ;; no tests available in src
+       #:tests? #f
+       #:modules ((ice-9 match)
+                  (ice-9 regex)
+                  (guix build ant-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((lib (string-append (assoc-ref outputs "out")
+                                       "/lib/libjfxmedia.so")))
+               ;; Load jfxmedia.so library directly from output path.
+               (substitute* "modules/media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaManager.java"
+                 (((regexp-quote "NativeLibLoader.loadLibrary(\"jfxmedia\");"))
+                  (string-append
+                   "System.load(\""
+                   lib
+                   "\");"))))
+             (invoke "ant" "compile" "-Dclasses.dir=modules/media/build/classes/java/main")
+             #t))
+
+         (add-after 'build 'generate-headers
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((classes "modules/media/build/classes/java/main")
+                    (media-generated-headers "modules/media/build/generated-src/headers")
+                    (media-generated-classes
+                     '("com.sun.media.jfxmedia.logging.Logger"
+                       "com.sun.media.jfxmedia.track.AudioTrack"
+                       "com.sun.media.jfxmedia.control.VideoDataBuffer"
+                       "com.sun.media.jfxmedia.control.VideoFormat$FormatTypes"
+                       "com.sun.media.jfxmediaimpl.NativeAudioClip"
+                       "com.sun.media.jfxmediaimpl.NativeMediaPlayer"
+                       "com.sun.media.jfxmediaimpl.NativeVideoBuffer"
+                       "com.sun.media.jfxmediaimpl.platform.gstreamer.GSTPlatform"
+                       "com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMedia"
+                       "com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMediaPlayer"
+                       "com.sun.media.jfxmediaimpl.NativeAudioEqualizer"
+                       "com.sun.media.jfxmediaimpl.NativeEqualizerBand"
+                       "com.sun.media.jfxmediaimpl.NativeAudioSpectrum"))
+                    (graphics (assoc-ref inputs "java-openjfx-graphics")))
+               (mkdir-p media-generated-headers)
+               (invoke "java"
+                       "-Djava.ext.dirs="
+                       "-classpath" classes
+                       "headergen.HeaderGen"
+                       (string-append media-generated-headers "/" "jfxmedia_errors.h")
+                       classes)
+               (apply invoke
+                      "javah"
+                      "-Djava.ext.dirs="
+                      "-XDignore.symbol.file"
+                      "-XDuseUnsharedTable=true"
+                      "-d" media-generated-headers
+                      "-cp" (string-join (cons* classes (find-files graphics "\\.jar$")) ":")
+                      media-generated-classes))
+             #t))
+
+         (add-after 'generate-headers 'media-native-lib
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/media/build/classes/java/main")
+                      (media-gen-headers "modules/media/build/generated-src/headers")
+                      (media-gen-src "modules/media/build/generated-src")
+                      (media-native-lib "modules/media/build/libs/linux/libjfxmedia.so")
+                      (media-native-obj "modules/media/build/native/linux")
+                      ;; ref: modules/media/src/main/native/jfxmedia/projects/linux/Makefile
+                      (media-native-src "modules/media/src/main/native/jfxmedia")
+                      (media-native-src-files
+                       '("jni/com_sun_media_jfxmedia_logging_Logger.cpp"
+                         "jni/JavaBandsHolder.cpp"
+                         "jni/JavaMediaWarningListener.cpp"
+                         "jni/JavaPlayerEventDispatcher.cpp"
+                         "jni/JniUtils.cpp"
+                         "jni/Logger.cpp"
+                         "jni/NativeVideoBuffer.cpp"
+                         "jni/NativeAudioEqualizer.cpp"
+                         "jni/NativeAudioSpectrum.cpp"
+                         "jni/NativeEqualizerBand.cpp"
+                         "jni/JavaInputStreamCallbacks.cpp"
+                         "PipelineManagement/AudioTrack.cpp"
+                         "PipelineManagement/Pipeline.cpp"
+                         "PipelineManagement/PipelineFactory.cpp"
+                         "PipelineManagement/Track.cpp"
+                         "PipelineManagement/VideoFrame.cpp"
+                         "PipelineManagement/VideoTrack.cpp"
+                         "PipelineManagement/SubtitleTrack.cpp"
+                         "MediaManagement/Media.cpp"
+                         "MediaManagement/MediaManager.cpp"
+                         "Locator/Locator.cpp"
+                         "Locator/LocatorStream.cpp"
+                         "Utils/MediaWarningDispatcher.cpp"
+                         "Utils/posix/posix_critical_section.cpp"
+                          "platform/gstreamer/GstMedia.cpp"
+                         "platform/gstreamer/GstMediaPlayer.cpp"
+                         "platform/gstreamer/GstPlatform.cpp"
+                         "platform/gstreamer/GstAudioEqualizer.cpp"
+                         "platform/gstreamer/GstAudioPlaybackPipeline.cpp"
+                         "platform/gstreamer/GstAudioSpectrum.cpp"
+                         "platform/gstreamer/GstAVPlaybackPipeline.cpp"
+                         "platform/gstreamer/GstElementContainer.cpp"
+                         "platform/gstreamer/GstJniUtils.cpp"
+                         "platform/gstreamer/GstMediaManager.cpp"
+                         "platform/gstreamer/GstPipelineFactory.cpp"
+                         "platform/gstreamer/GstVideoFrame.cpp"))
+                      (media-native-src-c "Utils/ColorConverter.c")
+                      (media-src "modules/media/src/main")
+                      (media-classes "modules/media/build/classes")
+                      (jdk (assoc-ref inputs "jdk"))
+                      (gstreamer (assoc-ref inputs "gstreamer"))
+                      (link-flags
+                       '("-pthread"
+                         "-static-libgcc" "-static-libstdc++" "-shared"
+                         "-z" "relro"
+                         "-Wl,--gc-sections"
+                         "$(pkg-config --libs gstreamer-1.0)"
+                         "$(pkg-config --libs gstreamer-plugins-base-1.0)"
+                         "$(pkg-config --libs gstreamer-app-1.0)"))
+                      (cc-flags
+                       `("-pthread"
+                         "-fno-strict-aliasing" "-fPIC" "-fno-omit-frame-pointer" ;; optimization flags
+                         "-fstack-protector"
+                         "-W" "-Wall"
+                         "-DTARGET_OS_LINUX=1"
+                         "-D_GNU_SOURCE"
+                         "-DGST_REMOVE_DEPRECATED"
+                         "-DGST_DISABLE_GST_DEBUG"
+                         "-DGST_DISABLE_LOADSAVE"
+                         "-DGST_DISABLE_XML"
+                         "-DHAVE_CONFIG_H"
+                         "-DJFXMEDIA_JNI_EXPORTS"
+                         "-DLINUX"
+                         "-DG_DISABLE_DEPRECATED"
+                         "-ffunction-sections"
+                         "-fdata-sections"
+                         "-fno-rtti"
+                         "$(pkg-config --cflags gstreamer-1.0)"
+                         "$(pkg-config --cflags gstreamer-plugins-base-1.0)"
+                         "$(pkg-config --cflags gstreamer-app-1.0)"
+                         "-I" ,(string-append jdk "/include")
+                         "-I" ,(string-append jdk "/include/linux"))))
+                 (mkdir-p media-native-obj)
+                 (for-each (lambda (cpp)
+                             (let ((cpp (string-append media-native-src "/" cpp)))
+                               (invoke "bash" "-c"
+                                       (string-join
+                                        (append
+                                         `("g++"
+                                           "-c"
+                                           "-I" ,media-gen-headers
+                                           "-I" ,media-gen-src
+                                           "-I" ,media-native-src
+                                           "-o" ,(string-append media-native-obj
+                                                                "/" (basename cpp ".cpp") ".obj"))
+                                         cc-flags (list cpp))))))
+                           media-native-src-files)
+                 (let ((c (string-append media-native-src "/" media-native-src-c)))
+                   (invoke "bash" "-c"
+                           (string-join
+                            (append
+                             `("g++"
+                               "-c"
+                               "-I" ,media-gen-headers
+                               "-I" ,media-gen-src
+                               "-I" ,media-native-src
+                               "-o" ,(string-append media-native-obj
+                                                    "/" (basename c ".c")
+                                                    ".obj"))
+                             cc-flags (list c)))))
+                 (mkdir-p (dirname media-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join (append
+                                       `("gcc" "-o" ,media-native-lib)
+                                       link-flags
+                                       (find-files media-native-obj "\\.obj$")))))
+               #t))
+         (add-after 'media-native-lib 'install-native
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
+               (for-each (lambda (file)
+                             (install-file file lib))
+                         (find-files "." "\\.so$"))
+               #t)))
+         (add-after 'install-native 'build-jar
+           (lambda _
+             (let* ((module (string-append "modules/media"))
+                    (resources (string-append module "/src/main/resources"))
+                    (classes (string-append module "/build/classes/java/main")))
+               (copy-recursively resources classes)
+
+               (invoke "ant" "jar" (string-append "-Dclasses.dir=" classes)))
+             #t)))))
     (description "OpenJFX is a client application platform for desktop,
 mobile and embedded systems built on Java.  Its goal is to produce a
 modern, efficient, and fully featured toolkit for developing rich client
@@ -3350,19 +3596,28 @@ (define-public java-openjfx-media
 (define-public java-openjfx-web
   (package (inherit java-openjfx-build)
     (name "java-openjfx-web")
+    (version "8.202")
     (arguments
      `(#:jar-name "java-openjfx-web.jar"
        #:source-dir (string-join '("modules/web/src/main/java"
                                    "modules/web/src/main/native/Source/WebCore/bindings/java/dom3")
                                  ";")
-       #:tests? #f
+       #:test-dir "modules/web/src/test"
+       #:test-include (list "**/*Test.*")
        #:modules ((ice-9 match)
+                  (ice-9 regex)
                   (guix build ant-build-system)
                   (guix build utils))
        #:phases
        (modify-phases %standard-phases
          (replace 'build
-           (lambda* _
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((lib (string-append (assoc-ref outputs "out")
+                                       "/lib/libjfxwebkit.so")))
+               (substitute* "modules/web/src/main/java/com/sun/webkit/WebPage.java"
+                 (((regexp-quote "NativeLibLoader.loadLibrary(\"jfxwebkit\");") all)
+                  (string-append
+                   "System.load(\"" lib "\");"))))
              (invoke "ant" "compile" "-Dclasses.dir=modules/web/build/classes/java/main")
              #t))
 
@@ -3418,6 +3673,12 @@ (define-public java-openjfx-web
                       web-generated-classes))
              #t))
 
+         (add-after 'unpack 'copy-resources
+           (lambda _
+             (copy-recursively "modules/web/src/test/resources"
+                               "build/test-classes")
+             (copy-recursively "modules/web/src/main/resources"
+                               "build/classes")))
          (add-after 'generate-headers 'compile-native-linux
            (lambda* (#:key inputs system outputs #:allow-other-keys)
              (let*  ((module (string-append (getcwd) "/modules/web"))
@@ -3468,10 +3729,17 @@ (define-public java-openjfx-web
                                (string-join (list "-W"
                                                   "-DU_DEFINE_FALSE_AND_TRUE=1"
                                                   "-Wall"
-                                                  "-Werror=implicit-function-declaration"
                                                   "-Wl,--gc-sections"
                                                   "-Wno-parentheses"
                                                   "-Wno-unused"
+
+                                                  ;; silence excessive warnings
+                                                  " -Wno-expansion-to-defined"
+                                                  " -Wno-deprecated-copy"
+                                                  " -Wno-redundant-move"
+                                                  " -Wno-class-memaccess"
+                                                  " -Wno-undef"
+
                                                   "-fPIC"
                                                   "-fno-omit-frame-pointer"
                                                   "-fno-strict-aliasing"
@@ -3488,6 +3756,37 @@ (define-public java-openjfx-web
                          (find-files "." "\\.so$")))
              #t))
 
+         (add-before 'check 'x-test-setup
+           (lambda _
+             (system "Xvfb :33 &")
+             (setenv "DISPLAY" ":33")
+             #t))
+
+         (add-before 'x-test-setup 'copy-classes
+           (lambda _
+
+             (mkdir-p "src/test/resources")
+             (copy-recursively
+              "modules/web/src/test/resources"
+              "src/test/resources")
+
+             (mkdir-p "src/main/native/Tools/TestWebKitAPI/Tests/mac/")
+             (copy-file "modules/web/src/main/native/Tools/TestWebKitAPI/Tests/mac/Ahem.ttf"
+                        "src/main/native/Tools/TestWebKitAPI/Tests/mac/Ahem.ttf")
+
+             (with-directory-excursion "modules/web/src/test/resources/test/html/"
+               (apply invoke "jar" "cf" "webArchiveJar.jar" (find-files ".")))
+
+             (copy-recursively "modules/web/build/classes/java/main" "build/classes")
+             (substitute* "build.xml"
+               (("<junit.*haltonfailure=\"yes\">" all)
+                (string-append "<mkdir dir=\"${test.home}/home\" />" ;; home dir required for some tests.
+                               all
+                               "<sysproperty key=\"user.home\" value=\"${test.home}/home\"/>"
+                               "<sysproperty key=\"java.library.path\" value=\"modules/web/build/linux/Release/lib/\"/>"
+                               "<jvmarg value=\"-DWEB_ARCHIVE_JAR_TEST_DIR=modules/web/src/test/resources/test/html/\"/>")))
+             #t))
+
          (add-before 'install 'build-jar
            (lambda _
              (let* ((resources "modules/web/src/main/resources")
@@ -3498,19 +3797,15 @@ (define-public java-openjfx-web
 
     (native-inputs
      `(("java-junit" ,java-junit)
-       ("java-hamcrest-core" ,java-hamcrest-core)
        ("cmake" ,cmake)
-       ("gtk" ,gtk+-2)
-       ("gtk3" ,gtk+)
        ("ruby" ,ruby)
        ("perl" ,perl)
        ("gperf" ,gperf)
        ("python-2" ,python-2)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ("xorg-server" ,xorg-server-for-tests)))
     (inputs
-     `(("antlr3" ,antlr3)
-       ("java-stringtemplate" ,java-stringtemplate)
-       ;; Webkit Java port dependencies
+     `(;; Webkit Java port dependencies
        ("icu4c" ,icu4c)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
@@ -4310,6 +4605,9 @@ (define-public java-swt
      `(#:jar-name "swt.jar"
        #:jdk ,icedtea-8
        #:tests? #f ; no "check" target
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (ice-9 regex))
        #:phases
        (modify-phases %standard-phases
          (replace 'unpack
@@ -4319,6 +4617,22 @@ (define-public java-swt
              (chdir "swt")
              (mkdir "src")
              (invoke "unzip" "src.zip" "-d" "src")))
+         ;; explicitly load native library from gnu/store if it can't be found
+         ;; by any of other standard means.
+         (add-before 'configure 'engrave-swt-path
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((lib (string-append (assoc-ref outputs "out")
+                                       "/lib")))
+               (substitute* "src/org/eclipse/swt/internal/Library.java"
+                 (((regexp-quote "/* Failed to find the library */") all)
+                  (string-append
+                   "if (path != null) {
+                     path = new File (\"" lib "\").getAbsolutePath ();
+                     if (load (path + SEPARATOR + mappedName1, message)) return;
+                     if (mapName && load (path + SEPARATOR + mappedName2, message)) return;
+                    }\n\n"
+                     all))))
+             #t))
          ;; The classpath contains invalid icecat jars.  Since we don't need
          ;; anything other than the JDK on the classpath, we can simply unset
          ;; it.
-- 
2.34.0


[-- Attachment #4: 0001-Merge-Alexey-Abramov-s-openjfx-v4-patches.patch --]
[-- Type: application/octet-stream, Size: 76892 bytes --]

From 8a9ec18ec67ca9c94dbaff3ac1299fa2a467c1c3 Mon Sep 17 00:00:00 2001
From: Alexey Abramov <levenson@mmer.org>
Date: Sat, 18 Jun 2022 12:07:12 +0100
Subject: [PATCH v5 1/3] Merge Alexey Abramov's openjfx v4 patches

source: https://issues.guix.gnu.org/41360
---
 gnu/local.mk                                  |   7 +
 gnu/packages/java.scm                         | 977 +++++++++++++++---
 ...va-openjfx-build-swing-JFXPanel-JDK8.patch |  60 ++
 ...penjfx-build-web-DumpRenderTree-java.patch |  30 +
 ...-openjfx-build-web-OptionsJava.cmake.patch |  32 +
 .../patches/java-openjfx-build-web-WTF.patch  |  33 +
 ...-build-web-WebKitCompilerFlags.cmake.patch |  36 +
 .../patches/java-openjfx-build-web-icu.patch  |  38 +
 .../java-openjfx-build-web-xlocale.h.patch    |  52 +
 9 files changed, 1147 insertions(+), 118 deletions(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-DumpRenderTree-java.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-OptionsJava.cmake.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-WTF.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-icu.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 576c1a3eb6..9b982c42db 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1320,6 +1320,13 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-commons-lang-fix-dependency.patch \
   %D%/packages/patches/java-jeromq-fix-tests.patch		\
   %D%/packages/patches/java-openjfx-build-jdk_version.patch     \
+  %D%/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch     \
+  %D%/packages/patches/java-openjfx-build-web-xlocale.h.patch   \
+  %D%/packages/patches/java-openjfx-build-web-DumpRenderTree-java.patch	\
+  %D%/packages/patches/java-openjfx-build-web-OptionsJava.cmake.patch	\
+  %D%/packages/patches/java-openjfx-build-web-WTF.patch			\
+  %D%/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch	\
+  %D%/packages/patches/java-openjfx-build-web-icu.patch			\
   %D%/packages/patches/java-powermock-fix-java-files.patch		\
   %D%/packages/patches/java-simple-xml-fix-tests.patch		\
   %D%/packages/patches/java-svg-salamander-Fix-non-det.patch	\
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d2fbf840a0..5185967960 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2020 Alexey Abramov <levenson@mmer.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
 ;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -59,12 +60,15 @@ (define-module (gnu packages java)
   #:use-module (gnu packages cpio)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages ghostscript) ;lcms
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages groovy)
@@ -85,11 +89,14 @@ (define-module (gnu packages java)
   #:use-module (gnu packages wget)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages kerberos)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages security-token)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module ((srfi srfi-1) #:select (fold alist-delete))
   #:use-module (srfi srfi-11)
@@ -2517,11 +2524,22 @@ (define-public java-openjfx-build
                '(begin
                   ;; Delete included gradle jar
                   (delete-file-recursively "gradle/wrapper")
+                  ;; Delete source code of a ThirdParty libraries
+                  (delete-file-recursively "modules/web/src/main/native/Source/ThirdParty")
+                  (delete-file-recursively "modules/web/src/main/native/Source/PlatformJava.cmake")
                   #t))
               (sha256
                (base32
                 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
-              (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
+              (patches (search-patches "java-openjfx-build-jdk_version.patch"
+                                       "java-openjfx-build-swing-JFXPanel-JDK8.patch"
+                                       "java-openjfx-build-web-xlocale.h.patch"
+                                       "java-openjfx-build-web-DumpRenderTree-java.patch"
+                                       "java-openjfx-build-web-OptionsJava.cmake.patch"
+                                       "java-openjfx-build-web-WTF.patch"
+                                       "java-openjfx-build-web-WebKitCompilerFlags.cmake.patch"
+                                       "java-openjfx-build-web-icu.patch"
+                                       ))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
@@ -2580,112 +2598,693 @@ (define-public java-openjfx-base
 applications.  This package contains base classes for the OpenJFX
 distribution.")))
 
+;; The graphics module is needed for any graphical JavaFX application. It
+;; requires the base module and includes the scene graph, layout, css, prism,
+;; windowing, etc. This is a fairly complicated module. There are many
+;; different types of native components that all need to be compiled.
+;;
+;; All the bellow steps were taken by inspecting build.gradel and  ./gradlew build --info
+;; result.
 (define-public java-openjfx-graphics
   (package (inherit java-openjfx-build)
     (name "java-openjfx-graphics")
     (arguments
      `(#:jar-name "java-openjfx-graphics.jar"
        #:source-dir "modules/graphics/src/main/java"
-       #:tests? #f; require X
+       #:tests? #f               ; requires X
        #:test-dir "modules/graphics/src/test"
+       #:test-include (list "**/*Test.*")
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
+                  (srfi srfi-26)
+                  (ice-9 regex)
+                  (ice-9 match))
        #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'copy-missing-file
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
-               (copy-file (assoc-ref inputs "JNativeSurface.c") target)
-               ;; XXX: looks like the missing file we found isn't *quite*
-               ;; compatible...
-               (substitute* target
-                 (("case TYPE_INT_ARGB:") "")))))
-         (add-after 'build 'build-native
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((jdk (assoc-ref inputs "jdk"))
-                   (class-file->class-name
-                    (lambda (class-file)
-                      (string-map (lambda (c)
-                                    (if (char=? c #\/) #\. c))
-                                  (string-drop-right class-file
-                                                     (string-length ".class"))))))
-               (setenv "CPPFLAGS"
-                       (string-append "-DINLINE=inline "
-                                      "-DLINUX "
-                                      "-I" jdk "/include "
-                                      "-I" jdk "/include/linux "
-                                      "-I " (getcwd) "/build/classes/include "
-                                      "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
-
-               ;; Instructions have been adapted from buildSrc/linux.gradle
-               (with-directory-excursion "build/classes"
-                 ;; Build prism
-                 (mkdir-p "include")
-
-                 ;; Generate headers for prism
-                 (apply invoke "javah" "-d" "include" "-cp" "."
-                        (map class-file->class-name
-                             (append (find-files "com/sun/prism/impl" "\\.class$")
-                                     (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
-
-                 ;; ...then for prism_sw
-                 (apply invoke "javah" "-d" "include" "-cp" "."
-                        (map class-file->class-name
-                             (find-files "com/sun/pisces" "\\.class$")))
-
-                 ;; ...and for prism_es2
-                 (apply invoke "javah" "-d" "include" "-cp" "."
-                        (map class-file->class-name
-                             (find-files "com/sun/prism/es2" "\\.class$")))))
-
-             (with-directory-excursion "netbeans/native-prism"
-               (invoke "make" "CONF=Release"))
-             (with-directory-excursion "netbeans/native-prism-sw"
-               (invoke "make" "CONF=Release"))
-             ;; TODO: This fails due to unknown EGL procedure names
-             #;
-             (with-directory-excursion "netbeans/native-prism-es2"
-               (invoke "make" "CONF=Release"))
+       (let* ((jdk (assoc-ref %build-inputs "jdk"))
+              (javac/h-flags
+               '(;; When javac is compiling code it doesn't link
+                 ;; against rt.jar by default. Instead it uses special
+                 ;; symbol file lib/ct.sym with class stubs.
+                 ;; Surprisingly this file contains many but not *all*
+                 ;; of internal classes.
+                 "-XDignore.symbol.file"
+                 ;; It's an internal option for JDK 1.7+ that prevents
+                 ;; the compiler from sharing a table that will never
+                 ;; be reused. When shared, it can't be garbage
+                 ;; collected, continues to accumulate data, and
+                 ;; therefore wastes memory.
+                 "-XDuseUnsharedTable=true"))
+              (common-flags
+               '("-fno-strict-aliasing" "-fPIC" "-fno-omit-frame-pointer" ;; optimization flags
+                 "-fstack-protector"
+                 "-W" "-Wall" "-Wno-unused" "-Wno-parentheses"))
+              (cc-flags
+               `(,@common-flags "-c" "-ffunction-sections" "-fdata-sections"
+                                "-I" ,(string-append jdk "/include")
+                                "-I" ,(string-append jdk "/include/linux")))
+              (link-flags
+               `("-static-libgcc" "-static-libstdc++" "-shared" ,@common-flags
+                 "-z" "relro"
+                 "-Wl,--gc-sections"))
+              (java-aux-class?
+               (lambda (class)
+                 (string-match "\\$[0-9]+\\.class" class)))
+              (java-list-classes
+               (lambda (path)
+                 ;; For each .java file we need to figure out what
+                 ;; class the .java file belongs in and convert it to a
+                 ;; class name.
+                 (filter-map
+                  (lambda (class)
+                    (let* ((rx (make-regexp (string-append path file-name-separator-string "?")))
+                           (class (string-drop-right class (string-length ".class")))
+                           (class (match:suffix (regexp-exec rx class))))
+                      (if (java-aux-class? class)
+                          #f
+                          (string-join (string-split class #\/) "."))))
+                  (find-files path "\\.class$")))))
+         (modify-phases %standard-phases
 
-             (let* ((out (assoc-ref outputs "out"))
-                    (dir ,(match (%current-system)
-                            ("i686-linux"
-                             "i386")
-                            ((or "armhf-linux" "aarch64-linux")
-                             "arm")
-                            ((or "x86_64-linux")
-                             "amd64")
-                            (_ "unknown")))
-                    (target (string-append out "/share/" dir "/")))
-               (mkdir-p target)
-               (for-each (lambda (file)
-                           (let ((new-name
-                                  (string-append "lib"
-                                                 (string-map
-                                                  (lambda (c)
-                                                    (if (char=? c #\-) #\_ c))
-                                                  (string-drop (basename file)
-                                                               (string-length "libnative-"))))))
-                             (copy-file file
-                                        (string-append target new-name))))
-                         (find-files "netbeans" "\\.so$"))))))))
-    (propagated-inputs
-     (list java-openjfx-base java-swt))
-    ;; XXX: for unknown reasons
-    ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
-    ;; in this revision.
+           (replace 'build
+             (lambda _
+               ;; Do not mix different classes. There will be more stuff in build/classes
+               (invoke "ant" "compile" "-Dclasses.dir=modules/graphics/build/classes/java/main")
+               #t))
+
+           ;; The Decora and Prism JSL files have to be generated in a very specific set of steps.
+           ;;      1) Compile the *Compile.java classes. These live in src/main/jsl-* and will be
+           ;;         output to $buildDir/classes/jsl-compilers/* (where * == decora or prism).
+           ;;      2) Generate source files from the JSL files contained in src/main/jsl-*. These
+           ;;         will be output to $buildDir/generated-src/jsl-*
+           ;;      3) Compile the JSL Java sources in $buildDir/generated-src/jsl-* and put the output
+           ;;         into classes/jsl-*
+           ;;      4) Compile the native JSL sources in $buildDir/generated-src/jsl-* and put the obj
+           ;;         files into native/jsl-* and the resulting library into libs/jsl-*.dll|so|dylib
+           ;;      5) Modify the jar step to include classes/jsl-*
+           ;; The native library must be copied over during SDK creation time in the "sdk" task. In
+           ;; addition to these steps, the clean task is created. Note that I didn't bother to create
+           ;; a new task for each of the decora files, preferring instead just to create a rule?? Also
+           ;; need "clean" tasks for each compile task.
+           (add-after 'build 'compile-prism-compilers
+             (lambda _
+               (let ((prism-compilers-classes "modules/graphics/build/classes/jsl-compilers/prism")
+                     (prism-src "modules/graphics/src/main/jsl-prism/"))
+                 (mkdir-p prism-compilers-classes)
+
+                 (apply invoke "javac" "-d" prism-compilers-classes
+                        (append javac/h-flags (find-files prism-src "\\.java"))))
+
+               #t))
+
+           (add-after 'compile-prism-compilers 'generate-prism-shaders
+             (lambda _
+               (let ((prism-compilers-classes "modules/graphics/build/classes/jsl-compilers/prism")
+                     (prism-src "modules/graphics/src/main/jsl-prism/")
+                     (prism-gen-src "modules/graphics/build/generated-src/jsl-prism"))
+                 (mkdir-p prism-gen-src)
+                 (for-each (lambda (file)
+                             (apply invoke "java"
+                                    "-cp" (string-join (list
+                                                        ;; For CompileJSL
+                                                        prism-compilers-classes
+                                                        ;; jsl files are there
+                                                        prism-src
+                                                        (getenv "CLASSPATH"))
+                                                       ":")
+                                    "CompileJSL"
+                                    "-i" prism-src
+                                    "-o" prism-gen-src
+                                    "-t"
+                                    "-pkg" "com/sun/prism"
+                                    "-d3d"
+                                    "-es2"
+                                    "-name" (list file)))
+                           (find-files prism-src "\\.jsl$")))
+               #t))
+
+           (add-after 'generate-prism-shaders 'compile-prism-shaders
+             (lambda _
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (prism-classes "modules/graphics/build/classes/jsl-prism")
+                      (prism-gen-src "modules/graphics/build/generated-src/jsl-prism")
+                      (prism-gen-shaders-src (string-append prism-gen-src "/com/sun/prism/shader")))
+                 (mkdir-p prism-classes)
+                 (apply invoke "javac"
+                        "-d" prism-classes
+                        "-cp" (string-append classes ":" (getenv "CLASSPATH"))
+                        (append javac/h-flags (find-files prism-gen-shaders-src))))
+               #t))
+
+           (add-after 'compile-prism-shaders 'compile-decora-compilers
+             (lambda _
+               (let ((classes "modules/graphics/build/classes/java/main")
+                     (decora-compilers-classes "modules/graphics/build/classes/jsl-compilers/decora")
+                     (decora-src "modules/graphics/src/main/jsl-decora/"))
+                 (mkdir-p decora-compilers-classes)
+                 (apply invoke "javac"
+                        "-d" decora-compilers-classes
+                        "-cp" (string-append classes ":" (getenv "CLASSPATH"))
+                        (append javac/h-flags (find-files decora-src "\\.java"))))
+               #t))
+
+           (add-after 'compile-decora-compilers 'generate-decora-shaders
+             (lambda _
+               (let ((classes "modules/graphics/build/classes/java/main")
+                     (decora-classes "modules/graphics/build/classes/jsl-decora/")
+                     (decora-compilers-classes "modules/graphics/build/classes/jsl-compilers/decora")
+                     (decora-gen-src "modules/graphics/build/generated-src/jsl-decora")
+                     (decora-src "modules/graphics/src/main/jsl-decora/")
+                     (decora-components '([(file-name . "ColorAdjust")
+                                           (generator . "CompileJSL")
+                                           (outputs . "-all")]
+                                          [(file-name . "Brightpass")
+                                           (generator . "CompileJSL")
+                                           (outputs . "-all")]
+                                          [(file-name . "SepiaTone")
+                                           (generator . "CompileJSL")
+                                           (outputs . "-all")]
+                                          [(file-name . "PerspectiveTransform")
+                                           (generator . "CompileJSL")
+                                           (outputs . "-all")]
+                                          [(file-name . "DisplacementMap")
+                                           (generator . "CompileJSL")
+                                           (outputs . "-all")]
+                                          [(file-name . "InvertMask")
+                                           (generator . "CompileJSL")
+                                           (outputs . "-all")]
+                                          [(file-name . "Blend")
+                                           (generator . "CompileBlend")
+                                           (outputs . "-all")]
+                                          [(file-name . "PhongLighting")
+                                           (generator . "CompilePhong")
+                                           (outputs . "-all")]
+                                          [(file-name . "LinearConvolve")
+                                           (generator . "CompileLinearConvolve")
+                                           (outputs . "-hw")]
+                                          [(file-name . "LinearConvolveShadow")
+                                           (generator . "CompileLinearConvolve")
+                                           (outputs . "-hw")])))
+                 (mkdir-p decora-gen-src)
+                 (for-each (match-lambda
+                             ((('file-name . file-name)
+                               ('generator . generator)
+                               ('outputs . outputs))
+                              (apply invoke "java"
+                                     "-cp" (string-join (cons* classes
+                                                               decora-src
+                                                               ;; CompileJSL
+                                                               decora-compilers-classes
+                                                               decora-classes
+                                                               ;; We need resources from the build
+                                                               "buildSrc/src/main/resources"
+                                                               (list (getenv "CLASSPATH")))
+                                                        ":")
+                                     generator
+                                     "-i" decora-src
+                                     "-o" decora-gen-src
+                                     "-t"
+                                     "-pkg" "com/sun/scenario/effect"
+                                     outputs
+                                     (list file-name))))
+                           decora-components)
+                 #t)))
+
+           (add-after 'generate-decora-shaders 'compile-decora-shaders
+             (lambda _
+               (let ((classes "modules/graphics/build/classes/java/main")
+                     (decora-classes "modules/graphics/build/classes/jsl-decora/")
+                     (decora-gen-src "modules/graphics/build/generated-src/jsl-decora"))
+                 (mkdir-p decora-classes)
+                 (apply invoke "javac"
+                        "-d" decora-classes
+                        "-cp" classes
+                        (append javac/h-flags (find-files decora-gen-src "\\.java$"))))
+               #t))
+
+           (add-after 'compile-decora-shaders 'compile-decora-native-lib
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (decora-gen-headers "modules/graphics/build/generated-src/headers/jsl-decora")
+                      (decora-gen-src "modules/graphics/build/generated-src/jsl-decora")
+                      (decora-native-lib "modules/graphics/build/libs/jsl-decora/linux/libdecora_sse.so")
+                      (decora-native-obj "modules/graphics/build/native/jsl-decora/linux")
+                      (decora-native-src "modules/graphics/src/main/native-decora")
+                      (decora-src "modules/graphics/src/main/jsl-decora/")
+                      (decora-classes "modules/graphics/build/classes/jsl-decora/")
+                      (decora-cc-flags `(,@cc-flags "-ffast-math")))
+                 (mkdir-p decora-gen-headers)
+                 (apply invoke "javah"
+                        "-d" decora-gen-headers
+                        "-cp" (string-join (list classes decora-classes) ":")
+                        (append javac/h-flags
+                                (filter (cut string-prefix? "com.sun.scenario.effect.impl.sw.sse" <>)
+                                        (append (java-list-classes classes)
+                                                (java-list-classes decora-classes)))))
+                 (mkdir-p decora-native-obj)
+                 (for-each (lambda (cc)
+                             (apply invoke "gcc"
+                                    "-I" decora-gen-headers
+                                    "-I" decora-gen-src
+                                    "-I" decora-native-src
+                                    "-o" (string-append decora-native-obj  "/" (basename cc ".cc") ".obj")
+                                    (append decora-cc-flags (list cc))))
+                           (append (find-files decora-gen-src "\\.cc$")
+                                   (find-files decora-native-src "\\.cc$")))
+                 (mkdir-p (dirname decora-native-lib))
+                 (apply invoke "g++" "-o" decora-native-lib
+                        (append link-flags (find-files decora-native-obj "\\.obj$"))))
+               #t))
+
+           (add-after 'compile-decora-native-lib 'compile-linux-font-native-lib
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (font-gen-headers "modules/graphics/build/generated-src/headers/font/linux")
+                      (font-native-lib "modules/graphics/build/libs/font/linux/libjavafx_font.so")
+                      (font-native-obj "modules/graphics/build/native/font/linux")
+                      (font-native-src "modules/graphics/src/main/native-font")
+                      ;;
+                      (font-cc-flags `("-DJFXFONT_PLUS" ,@cc-flags)))
+                 (mkdir-p font-gen-headers)
+                 (apply invoke "javah"
+                        "-d" font-gen-headers
+                        "-cp" classes
+                        (append javac/h-flags
+                                (filter (lambda (class)
+                                          (or (string-prefix? "com.sun.javafx.font" class)
+                                              (string-prefix? "com.sun.javafx.text" class)))
+                                        (java-list-classes classes))))
+                 (mkdir-p font-native-obj)
+                 (for-each (lambda (cc)
+                             (apply invoke "gcc"
+                                    "-I" font-gen-headers
+                                    "-I" font-native-src
+                                    "-o" (string-append font-native-obj "/"
+                                                        (basename cc ".c") ".obj")
+                                    (append font-cc-flags (list cc))))
+                           (find-files font-native-src "\\.c$"))
+                 (mkdir-p (dirname font-native-lib))
+                 (apply invoke "g++"
+                        "-o" font-native-lib
+                        (append link-flags
+                                (find-files font-native-obj "\\.obj$"))))
+               #t))
+
+           (add-after 'compile-linux-font-native-lib 'compile-linux-font-freetype
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      ;;
+                      (font-freetype-gen-headers "modules/graphics/build/generated-src/headers/fontFreetype/linux")
+                      (font-freetype-native-lib "modules/graphics/build/libs/fontFreetype/linux/libjavafx_font_freetype.so")
+                      (font-freetype-native-obj "modules/graphics/build/native/fontFreetype/linux")
+                      (font-freetype-native-src "modules/graphics/src/main/native-font/freetype.c")
+                      (font-freetype-cc-flags `("-DJFXFONT_PLUS" "-D_ENABLE_PANGO"
+                                                "$(pkg-config --cflags freetype2)" ,@cc-flags))
+                      (font-freetype-link-flags `("$(pkg-config --libs freetype2)" ,@link-flags)))
+                 (mkdir-p font-freetype-gen-headers)
+                 (apply invoke "javah"
+                        "-d" font-freetype-gen-headers
+                        "-cp" classes
+                        (append javac/h-flags
+                                (filter (cut string-prefix? "com.sun.javafx.font.freetype.OSFreetype" <>)
+                                        (java-list-classes classes))))
+                 (mkdir-p font-freetype-native-obj)
+                 (invoke "bash" "-c"
+                         (string-join `("gcc"
+                                        ,@font-freetype-cc-flags
+                                        "-I" ,font-freetype-gen-headers
+                                        "-I" ,(dirname font-freetype-native-src)
+                                        "-o" ,(string-append font-freetype-native-obj "/"
+                                                             (basename font-freetype-native-src ".c") ".obj")
+                                        ,font-freetype-native-src)))
+                 (mkdir-p (dirname font-freetype-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        "-o" ,font-freetype-native-lib
+                                        ,@font-freetype-link-flags
+                                        ,@(find-files font-freetype-native-obj "\\.obj$"))))
+                 #t)))
+
+           (add-after 'compile-linux-font-freetype 'compile-linux-font-pango-lib
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (font-pango-gen-headers "modules/graphics/build/generated-src/headers/fontPango/linux")
+                      (font-pango-native-lib "modules/graphics/build/libs/fontPango/linux/libjavafx_font_pango.so")
+                      (font-pango-native-obj "modules/graphics/build/native/fontPango/linux")
+                      (font-pango-native-src "modules/graphics/src/main/native-font/pango.c")
+                      (font-pango-cc-flags `("-DJFXFONT_PLUS" "-D_ENABLE_PANGO"
+                                             "$(pkg-config --cflags pangoft2)" ,@cc-flags))
+                      (font-pango-link-flags `("$(pkg-config --libs pangoft2)" ,@link-flags)))
+                 (mkdir-p font-pango-gen-headers)
+                 (apply invoke "javah"
+                        "-d" font-pango-gen-headers
+                        "-cp" classes
+                        (append javac/h-flags
+                                (filter (cut string-prefix? "com.sun.javafx.font.freetype.OSPango" <>)
+                                        (java-list-classes classes))))
+                 (mkdir-p font-pango-native-obj)
+                 (invoke "bash" "-c"
+                         (string-join `("gcc"
+                                        ,@font-pango-cc-flags
+                                        "-I" ,font-pango-gen-headers
+                                        "-I" ,(dirname font-pango-native-src)
+                                        "-o" ,(string-append font-pango-native-obj "/"
+                                                             (basename font-pango-native-src ".c") ".obj")
+                                        ,font-pango-native-src)))
+                 (mkdir-p (dirname font-pango-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        ,@font-pango-link-flags
+                                        "-o" ,font-pango-native-lib
+                                        ,@(find-files font-pango-native-obj "\\.obj$")))))
+               #t))
+
+           (add-after 'compile-linux-font-pango-lib 'compile-linux-glass-lib
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      ;; glass
+                      (glass-gen-headers "modules/graphics/build/generated-src/headers/glass/linux")
+                      (glass-native-lib "modules/graphics/build/libs/glass/linux/libglass.so")
+                      (glass-native-obj "modules/graphics/build/native/glass/linux/glass")
+                      (glass-native-src "modules/graphics/src/main/native-glass/gtk/launcher.c")
+                      (glass-cc-flags
+                       `(,@cc-flags
+                         "$(pkg-config --cflags glib-2.0 gdk-2.0 gtk+-2.0 gthread-2.0 xtst)"
+                         "-Werror"))
+                      (glass-link-flags
+                       `(,@link-flags "$(pkg-config --libs x11)" "-ldl"))
+                      ;; glass-gtk2
+                      (gtk (assoc-ref inputs "gtk"))
+                      (glass-gtk2-native-obj "modules/graphics/build/native/glass/linux/glassgtk2")
+                      (glass-gtk2-native-src (dirname glass-native-src))
+                      (glass-gtk2-native-lib "modules/graphics/build/libs/glass/linux/libglassgtk2.so")
+                      (glass-gtk2-cc-flags
+                       `(,@cc-flags
+                         "$(pkg-config --cflags gtk+-2.0 gthread-2.0 xtst)"
+                         ;; XX: GTimeVal has been deprecated in GLIB since
+                         ;; version 2.62. GTimeVal s not year-2038-safe. Gtk
+                         ;; 2.24 uses GTimeVal so our build is also failing.
+                         "-Wno-deprecated-declarations"
+                         "-Werror"))
+                      (glass-gtk2-link-flags
+                       `(,@link-flags
+                         "$(pkg-config --libs gtk+-2.0 gthread-2.0 xtst)"))
+                      ;; glass-gtk3
+                      (gtk3 (assoc-ref inputs "gtk3"))
+                      (glass-gtk3-native-obj "modules/graphics/build/native/glass/linux/glassgtk3")
+                      (glass-gtk3-native-src (dirname glass-native-src))
+                      (glass-gtk3-native-lib "modules/graphics/build/libs/glass/linux/libglassgtk3.so")
+                      (glass-gtk3-cc-flags
+                       `(,@cc-flags
+                         "$(pkg-config --cflags gtk+-3.0 gthread-2.0 xtst)"
+                         "-Wno-deprecated-declarations" "-Werror"))
+                      (glass-gtk3-link-flags
+                       `(,@link-flags "$(pkg-config --libs gtk+-3.0 gthread-2.0 xtst)")))
+                 ;; glass
+                 (mkdir-p glass-gen-headers)
+                 (apply invoke "javah"
+                        "-d" glass-gen-headers
+                        "-cp" (string-append classes ":" (getenv "CLASSPATH"))
+                        (append javac/h-flags
+                                (filter (lambda (class)
+                                          (or (string-prefix? "com.sun.glass.events" class)
+                                              (string-prefix? "com.sun.glass.ui.gtk" class)
+                                              (string-prefix? "com.sun.glass.ui" class)))
+                                        (java-list-classes classes))))
+                 (mkdir-p glass-native-obj)
+                 (invoke "bash" "-c"
+                         (string-join `("gcc"
+                                        ,@glass-cc-flags
+                                        "-I" ,glass-gen-headers
+                                        "-I" ,(dirname glass-native-src)
+                                        "-o" ,(string-append glass-native-obj "/"
+                                                             (basename glass-native-src ".c") ".obj")
+                                        ,glass-native-src)))
+                 (mkdir-p (dirname glass-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        ,@glass-link-flags
+                                        "-o" ,glass-native-lib
+                                        ,@(find-files glass-native-obj "\\.obj$"))))
+                 ;; gtk2
+                 (mkdir-p glass-gtk2-native-obj)
+                 (for-each (lambda (cpp)
+                             (invoke "bash" "-c"
+                                     (string-join `("gcc"
+                                                    ,@glass-gtk2-cc-flags
+                                                    "-I" ,glass-gen-headers
+                                                    "-o" ,(string-append glass-gtk2-native-obj "/"
+                                                                         (basename cpp ".cpp") ".obj")
+                                                    ,cpp))))
+                           (find-files glass-gtk2-native-src "\\.cpp$"))
+                 (mkdir-p (dirname glass-gtk2-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        ,@glass-gtk2-link-flags
+                                        "-o" ,glass-gtk2-native-lib
+                                        ,@(find-files glass-gtk2-native-obj "\\.obj$"))))
+                 ;; gtk3
+                 (mkdir-p glass-gtk3-native-obj)
+                 (for-each (lambda (cpp)
+                             (invoke "bash" "-c"
+                                     (string-join `("gcc"
+                                                    ,@glass-gtk3-cc-flags
+                                                    "-I" ,glass-gen-headers
+                                                    "-o" ,(string-append glass-gtk3-native-obj "/"
+                                                                         (basename cpp ".cpp") ".obj")
+                                                    ,cpp))))
+                           (find-files glass-gtk3-native-src "\\.cpp$"))
+                 (mkdir-p (dirname glass-gtk3-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        ,@glass-gtk3-link-flags
+                                        "-o" ,glass-gtk3-native-lib
+                                        ,@(find-files glass-gtk3-native-obj "\\.obj$")))))
+               #t))
+
+           (add-after 'compile-linux-glass-lib  'compile-linux-iio
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (iio-gen-headers "modules/graphics/build/generated-src/headers/iio/linux")
+                      (iio-native-lib "modules/graphics/build/libs/iio/linux/libjavafx_iio.so")
+                      (iio-native-obj "modules/graphics/build/native/iio/linux")
+                      (iio-native-src "modules/graphics/src/main/native-iio")
+                      (iio-cc-flags cc-flags)
+                      (iio-link-flags link-flags))
+                 (mkdir-p iio-gen-headers)
+                 (apply invoke "javah"
+                        "-d" iio-gen-headers
+                        "-cp" (string-append classes ":" (getenv "CLASSPATH"))
+                        (append javac/h-flags
+                                (filter (cut string-prefix? "com.sun.javafx.iio" <>)
+                                        (java-list-classes classes))))
+                 (mkdir-p iio-native-obj)
+                 (for-each (lambda (c)
+                             (invoke "bash" "-c"
+                                     (string-join `("gcc"
+                                                    ,@iio-cc-flags
+                                                    "-I" ,iio-gen-headers
+                                                    "-o" ,(string-append iio-native-obj "/"
+                                                                         (basename c ".c") ".obj")
+                                                    ,c))))
+                           (find-files iio-native-src "\\.c$"))
+                 (mkdir-p (dirname iio-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        ,@iio-link-flags
+                                        "-o" ,iio-native-lib
+                                        ,@(find-files iio-native-obj "\\.obj$"))))
+                 #t)))
+
+           (add-after 'compile-linux-iio 'compile-linux-prism
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (prism-gen-headers "modules/graphics/build/generated-src/headers/prism/linux")
+                      (prism-native-lib "modules/graphics/build/libs/prism/linux/libprism_common.so")
+                      (prism-native-obj "modules/graphics/build/native/prism/linux")
+                      (prism-native-src "modules/graphics/src/main/native-prism")
+                      (prism-cc-flags `(,@cc-flags "-DINLINE=inline"))
+                      (prism-link-flags link-flags))
+                 (mkdir-p prism-gen-headers)
+                 (apply invoke "javah"
+                        "-d" prism-gen-headers
+                        "-cp" (string-append classes ":" (getenv "CLASSPATH"))
+                        (append javac/h-flags
+                                (filter (lambda (class)
+                                          (or (string-prefix? "com.sun.prism.impl" class)
+                                              (string-prefix? "com.sun.prism.PresentableState" class)))
+                                        (java-list-classes classes))))
+                 (mkdir-p prism-native-obj)
+                 (for-each (lambda (c)
+                             (invoke "bash" "-c"
+                                     (string-join `("gcc"
+                                                    ,@prism-cc-flags
+                                                    "-I" ,prism-gen-headers
+                                                    "-I" ,prism-native-src
+                                                    "-o" ,(string-append prism-native-obj "/"
+                                                                         (basename c ".c") ".obj")
+                                                    ,c))))
+                           (find-files prism-native-obj "\\.c$"))
+                 (mkdir-p (dirname prism-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        ,@prism-link-flags
+                                        "-o" ,prism-native-lib
+                                        ,@(find-files prism-native-obj "\\.obj$"))))
+                 #t)))
+
+           (add-after 'compile-linux-prism 'compile-linux-prism-es2
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (prism-es2-gen-headers "modules/graphics/build/generated-src/headers/prismES2/linux")
+                      (prism-es2-native-lib "modules/graphics/build/libs/prism/linux/libprism_es2.so")
+                      (prism-es2-native-obj "modules/graphics/build/native/prismES2/linux")
+                      (prism-es2-native-src "modules/graphics/src/main/native-prism-es2")
+                      (prism-es2-cc-flags `("-DLINUX" ,@cc-flags))
+                      (prism-es2-link-flags
+                       `(,@link-flags "$(pkg-config --libs x11 xxf86vm gl)"))
+                      ;; We need all *.c files in the root and only those
+                      ;; which are in a specific directories.
+                      (filter-src
+                       (lambda (abs _)
+                         (or (regexp-exec (make-regexp (string-append prism-es2-native-src "[^/]*\\.c$"))
+                                          abs)
+                             (regexp-exec (make-regexp (string-append prism-es2-native-src "(x11/|GL/)"))
+                                          abs)))))
+                 (mkdir-p prism-es2-gen-headers)
+                 (apply invoke "javah"
+                        "-d" prism-es2-gen-headers
+                        "-cp" (string-append classes ":" (getenv "CLASSPATH"))
+                        (append javac/h-flags
+                                (filter (cut string-prefix? "com.sun.prism.es2" <>)
+                                        (java-list-classes classes))))
+                 (mkdir-p prism-es2-native-obj)
+                 (for-each (lambda (c)
+                             (apply invoke "gcc"
+                                    "-I" glass-native-src
+                                    "-I" prism-es2-gen-headers
+                                    "-I" prism-es2-native-src
+                                    "-I" (string-append prism-es2-native-src "/GL")
+                                    "-I" (string-append prism-es2-native-src "/x11")
+                                    "-o" (string-append prism-es2-native-obj "/" (basename c ".c") ".obj")
+                                    (append prism-es2-cc-flags (list c))))
+                           (find-files prism-es2-native-src filter-src))
+                 (mkdir-p (dirname prism-es2-native-lib))
+                 (invoke "bash" "-c"
+                         (string-join `("g++"
+                                        ,@prism-es2-link-flags
+                                        "-o" ,prism-es2-native-lib
+                                        ,@(find-files prism-es2-native-obj "\\.obj$"))))
+                 #t)))
+
+           (add-after 'compile-linux-prism-es2 'compile-linux-prism-sw
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((classes "modules/graphics/build/classes/java/main")
+                      (prism-sw-gen-headers "modules/graphics/build/generated-src/headers/prismSW/linux")
+                      (prism-sw-native-lib "modules/graphics/build/libs/prism/linux/libprism_sw.so")
+                      (prism-sw-native-obj "modules/graphics/build/native/prismSW/linux")
+                      (prism-sw-native-src "modules/graphics/src/main/native-prism-sw")
+                      ;;
+                      (prism-sw-cc-flags `(,@cc-flags "-DINLINE=inline"))
+                      (prism-sw-link-flags link-flags))
+                 (mkdir-p prism-sw-gen-headers)
+                 (apply invoke "javah"
+                        "-d" prism-sw-gen-headers
+                        "-cp" (string-append classes ":" (getenv "CLASSPATH"))
+                        (append javac/h-flags
+                                (filter (cut string-prefix? "com.sun.pisces" <>)
+                                        (java-list-classes classes))))
+                 (mkdir-p prism-sw-native-obj)
+                 (for-each (lambda (c)
+                             (invoke "bash" "-c"
+                                     (string-join `("gcc"
+                                                    ,@prism-sw-cc-flags
+                                                    "-I" ,prism-sw-gen-headers
+                                                    "-I" ,prism-sw-native-src
+                                                    "-o" ,(string-append prism-sw-native-obj "/"
+                                                                         (basename c ".c") ".obj")
+                                                    ,c))))
+                           (find-files prism-sw-native-src "\\.c$"))
+                 (mkdir-p (dirname prism-sw-native-lib))
+                 (apply invoke "g++" "-o" prism-sw-native-lib
+                        (append prism-sw-link-flags (find-files prism-sw-native-obj "\\.obj$")))
+                 #t)))
+
+           (add-after 'compile-linux-prism-sw 'install-native
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
+                 (for-each (lambda (file)
+                             (install-file file lib))
+                           (find-files "." "\\.so$"))
+                 #t)))
+
+           (add-after 'install-native 'build-jar
+             (lambda _
+               (let* ((module (string-append "modules/graphics"))
+                      (resources (string-append module "/src/main/resources"))
+                      (classes (string-append module "/build/classes/java/main")))
+                 (copy-recursively resources classes)
+
+                 (invoke "ant" "jar" (string-append "-Dclasses.dir=" classes)))
+               #t))))))
     (native-inputs
-     `(("JNativeSurface.c"
-        ,(origin
-           (method url-fetch)
-           (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
-/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
-           (sha256
-            (base32
-             "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
-    (description "OpenJFX is a client application platform for desktop,
-mobile and embedded systems built on Java.  Its goal is to produce a
-modern, efficient, and fully featured toolkit for developing rich client
-applications.  This package contains graphics-related classes for the
-OpenJFX distribution.")))
+     `(("freetype" ,freetype)
+       ("fontconfig" ,fontconfig)
+       ("gcc" ,gcc)
+       ("glib" ,glib)
+       ("zlib" ,zlib)
+       ("gtk" ,gtk+-2)
+       ("gtk3" ,gtk+)
+       ("jpeg" ,libjpeg-turbo)
+       ("libxtst" ,libxtst)
+       ("pango" ,pango)
+       ("libpng" ,libpng)
+       ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("java-openjfx-base" ,java-openjfx-base)
+       ("java-swt" ,java-swt)))))
+
+(define-public java-openjfx-swing
+  (package (inherit java-openjfx-build)
+    (name "java-openjfx-swing")
+    (arguments
+     `(#:jar-name "java-openjfx-swing.jar"
+       #:source-dir "modules/swing/src/main/java"
+       #:tests? #f))
+    (inputs
+     `(("antlr3" ,antlr3)
+       ("java-stringtemplate" ,java-stringtemplate)))
+    (propagated-inputs
+     `(("java-openjfx-graphics" ,java-openjfx-graphics)))))
+
+(define-public java-openjfx-swt
+  (package (inherit java-openjfx-build)
+    (name "java-openjfx-swt")
+    (arguments
+     `(#:jar-name "java-openjfx-swt.jar"
+       #:source-dir "modules/swt/src/main/java"
+       #:tests? #f))
+    (inputs
+     `(("antlr3" ,antlr3)
+       ("java-stringtemplate" ,java-stringtemplate)))
+    (propagated-inputs
+     `(("java-openjfx-graphics" ,java-openjfx-graphics)))))
+
+(define-public java-openjfx-controls
+  (package (inherit java-openjfx-build)
+    (name "java-openjfx-controls")
+    (arguments
+     `(#:jar-name "java-openjfx-controls.jar"
+       #:source-dir "modules/controls/src/main/java"
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'copy-resources
+           (lambda _
+             (let ((resources (string-append (getcwd) "/modules/controls/src/main/resources")))
+               (copy-recursively resources "build/classes")) #t)))))
+    (propagated-inputs
+     `(("java-openjfx-graphics" ,java-openjfx-graphics)))))
 
 (define-public java-openjfx-media
   (package (inherit java-openjfx-build)
@@ -2702,32 +3301,174 @@ (define-public java-openjfx-media
 applications.  This package contains media-related classes for the
 OpenJFX distribution.")))
 
-(define-public java-openjfx-controls
+(define-public java-openjfx-web
   (package (inherit java-openjfx-build)
-    (name "java-openjfx-controls")
-    (propagated-inputs
-     `(("java-openjxf-graphics" ,java-openjfx-graphics)))
+    (name "java-openjfx-web")
     (arguments
-     `(#:jar-name "java-openjfx-controls.jar"
-       #:source-dir "modules/controls/src/main/java"
-       #:test-dir "modules/controls/src/test"
-       ;; TODO: tests require com.sun.javafx.pgstub,
-       ;; javafx.collections.MockSetObserver, and
-       ;; com.sun.javafx.binding.ExpressionHelperUtility
-       #:tests? #false
+     `(#:jar-name "java-openjfx-web.jar"
+       #:source-dir (string-join '("modules/web/src/main/java"
+                                   "modules/web/src/main/native/Source/WebCore/bindings/java/dom3")
+                                 ";")
+       #:tests? #f
+       #:modules ((ice-9 match)
+                  (guix build ant-build-system)
+                  (guix build utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'copy-resources
+         (replace 'build
+           (lambda* _
+             (invoke "ant" "compile" "-Dclasses.dir=modules/web/build/classes/java/main")
+             #t))
+
+         (add-after 'build 'generate-headers
+           ;; XX: We provide only software built from source, so let's build
+           ;; webkit as well. List of webkit classes can be found in
+           ;; build.gradle:2516. We need to generate headers for the upcoming
+           ;; compilation step first and put them in generated-src/headers
+           ;; location.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((classes "modules/web/build/classes/java/main")
+                    (web-generated-headers "modules/web/build/generated-src/headers")
+                    (web-generated-classes '("com.sun.webkit.ContextMenu"
+                                             "com.sun.webkit.ContextMenuItem"
+                                             "com.sun.webkit.CursorManager"
+                                             "com.sun.webkit.PageCache"
+                                             "com.sun.webkit.PopupMenu"
+                                             "com.sun.webkit.SharedBuffer"
+                                             "com.sun.webkit.WebPage"
+                                             "com.sun.webkit.LoadListenerClient"
+                                             "com.sun.webkit.event.WCFocusEvent"
+                                             "com.sun.webkit.event.WCKeyEvent"
+                                             "com.sun.webkit.event.WCMouseEvent"
+                                             "com.sun.webkit.event.WCMouseWheelEvent"
+                                             "com.sun.webkit.graphics.GraphicsDecoder"
+                                             "com.sun.webkit.graphics.RenderMediaControls"
+                                             "com.sun.webkit.graphics.RenderTheme"
+                                             "com.sun.webkit.graphics.ScrollBarTheme"
+                                             "com.sun.webkit.graphics.WCMediaPlayer"
+                                             "com.sun.webkit.graphics.WCGraphicsManager"
+                                             "com.sun.webkit.graphics.WCRenderQueue"
+                                             "com.sun.webkit.graphics.WCPath"
+                                             "com.sun.webkit.graphics.WCPathIterator"
+                                             "com.sun.webkit.Timer"
+                                             "com.sun.webkit.WCFrameView"
+                                             "com.sun.webkit.WCPasteboard"
+                                             "com.sun.webkit.WCPluginWidget"
+                                             "com.sun.webkit.dom.CharacterDataImpl"
+                                             "com.sun.webkit.dom.JSObject"
+                                             "com.sun.webkit.network.SocketStreamHandle"
+                                             "com.sun.webkit.network.URLLoader"
+                                             "com.sun.webkit.text.TextBreakIterator"
+                                             "com.sun.webkit.text.TextNormalizer"))
+                    (graphics (assoc-ref inputs "java-openjfx-graphics")))
+               (mkdir-p web-generated-headers)
+               (apply invoke
+                      "javah"
+                      "-Djava.ext.dirs="
+                      "-XDignore.symbol.file"
+                      "-XDuseUnsharedTable=true"
+                      "-d" web-generated-headers
+                      "-cp" (string-join (cons* classes (find-files graphics "\\.jar$")) ":")
+                      web-generated-classes))
+             #t))
+
+         (add-after 'generate-headers 'compile-native-linux
+           (lambda* (#:key inputs system outputs #:allow-other-keys)
+             (let*  ((module (string-append (getcwd) "/modules/web"))
+                     ;;
+                     (webkit-native-dest (string-append module "/build/linux"))
+                     (webkit-native-src (string-append module "/src/main/native"))
+                     ;;
+                     (lib (string-append (assoc-ref outputs "out") "/lib"))
+                     ;; uname -m
+                     (machine (match system
+                                ("x86_64-linux"   "x86_64")
+                                ("i686-linux"     "i686")
+                                ;; Prevent errors when querying this
+                                ;; package on unsupported platforms,
+                                ;; e.g. when running "guix package
+                                ;; --search="
+                                (_                "UNSUPPORTED"))))
+
+               (setenv "PYTHONDONTWRITEBYTECODE" "1")
+               (setenv "WEBKIT_OUTPUTDIR" webkit-native-dest)
+               (apply invoke `("perl"
+                               ,(string-append webkit-native-src "/Tools/Scripts/set-webkit-configuration")
+                               ,(if ,(target-64bit?) "--64-bit" "--32-bit")
+                               "--release"))
+
+               (invoke "perl"
+                       (string-append webkit-native-src "/Tools/Scripts/build-webkit")
+                       "--java" ; webkit port
+                       "--skip-library-update"
+                       "--icu-unicode"
+                       "--verbose"
+                       (string-append
+                        "--cmakeargs="
+                        (string-join
+                         (list "-DENABLE_TOOLS=1"
+                               "-DCMAKE_SYSTEM_NAME=Linux"
+                               ;; Ensure that the libraries are installed into /lib
+                               (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
+                               ;; Add input libraries to rpath
+                               "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
+                               ;; Enable verbose output from builds
+                               "-DCMAKE_VERBOSE_MAKEFILE=ON"
+                               (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
+                                              "\"-Wl,-rpath=" lib "\"")
+                               (string-append "-DCMAKE_SYSTEM_PROCESSOR=" machine)
+                               "-DJAVAFX_RELEASE_VERSION=8.0"
+                               "-W"
+                               "-Wall"
+                               "-Werror=implicit-function-declaration"
+                               "-Wl,--gc-sections"
+                               "-Wno-parentheses"
+                               "-Wno-unused"
+                               "-fPIC"
+                               "-fno-omit-frame-pointer"
+                               "-fno-strict-aliasing"
+                               "-fstack-protector")))))
+             #t))
+
+         (add-after 'compile-native-linux 'install-native
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
+               (for-each (lambda (file)
+                           (install-file file lib))
+                         (find-files "." "\\.so$")))
+             #t))
+
+         (add-before 'install 'build-jar
            (lambda _
-             (copy-recursively "modules/controls/src/test/resources"
-                               "build/test-classes")
-             (copy-recursively "modules/controls/src/main/resources"
-                               "build/classes"))))))
-    (description "OpenJFX is a client application platform for desktop,
-mobile and embedded systems built on Java.  Its goal is to produce a
-modern, efficient, and fully featured toolkit for developing rich client
-applications.  This package contains UI control classes for the
-OpenJFX distribution.")))
+             (let* ((resources "modules/web/src/main/resources")
+                    (classes "modules/web/build/classes/java/main"))
+               (copy-recursively resources classes)
+               (invoke "ant" "jar" (string-append "-Dclasses.dir=" classes)))
+             #t)))))
+
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("cmake" ,cmake)
+       ("gtk" ,gtk+-2)
+       ("gtk3" ,gtk+)
+       ("ruby" ,ruby)
+       ("perl" ,perl)
+       ("gperf" ,gperf)
+       ("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("antlr3" ,antlr3)
+       ("java-stringtemplate" ,java-stringtemplate)
+       ;; Webkit Java port dependencies
+       ("icu4c" ,icu4c)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("sqlite" ,sqlite)))
+    (propagated-inputs
+     `(("java-openjfx-controls" ,java-openjfx-controls)
+       ("java-openjfx-media" ,java-openjfx-media)
+       ("java-openjfx-graphics" ,java-openjfx-graphics)))))
 
 (define-public javacc-4
   (package
diff --git a/gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch b/gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch
new file mode 100644
index 0000000000..b540048621
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch
@@ -0,0 +1,60 @@
+Subject: [PATCH] java-openjfx-build: Cannot compile JFXPanel with JDK 8
+
+In JDKu9 getDefaultScale method was removed and sun.java2d.SurfaceData class now
+has separate getDefaultScaleX() and getDefaultScaleY() methods. See
+https://bugs.openjdk.java.net/browse/JDK-8073320 for more info.
+
+Backport the missing port to build openjfx-swing package using JDKu8. For more
+info please see https://bugs.openjdk.java.net/browse/JDK-8149967
+
+---
+ .../java/javafx/embed/swing/JFXPanel.java     | 20 ++++++++++++++++++-
+ 1 file changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java b/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java
+index 97515e2290..614ed656b9 100644
+--- a/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java
++++ b/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java
+@@ -81,6 +81,7 @@ import sun.awt.AppContext;
+ import sun.awt.CausedFocusEvent;
+ import sun.awt.SunToolkit;
+ import sun.java2d.SunGraphics2D;
++import sun.java2d.SurfaceData;
+ import sun.util.logging.PlatformLogger;
+ import sun.util.logging.PlatformLogger.Level;
+
+@@ -681,6 +682,23 @@
+                 e.getCaret().getInsertionIndex());
+     }
+
++    // FIXME: once we move to JDK 9 as the boot JDK we should remove the
++    // reflection code from this method, consider changing it to
++    // use double rather than int, and account for the possibility of
++    // a different scale factor in X and Y.
++    private int getDefaultScale(SurfaceData surfaceData) {
++        /*
++          double scale = surfaceData.getDefaultScaleX();
++        */
++        double scale = 1;
++        try {
++            Method meth = SurfaceData.class.getMethod("getDefaultScaleX");
++            scale = (Double)meth.invoke(surfaceData);
++        } catch (Exception ex) {
++        }
++
++        return (int)Math.round(scale);
++    }
+
+     /**
+      * Overrides the {@link javax.swing.JComponent#paintComponent(Graphics)}
+@@ -720,7 +738,7 @@ public class JFXPanel extends JComponent {
+
+             int newScaleFactor = scaleFactor;
+             if (g instanceof SunGraphics2D) {
+-                newScaleFactor = ((SunGraphics2D)g).surfaceData.getDefaultScale();
++                newScaleFactor = getDefaultScale(((SunGraphics2D)g).surfaceData);
+             }
+             if (scaleFactor != newScaleFactor) {
+                 resizePixelBuffer(newScaleFactor);
+--
+2.24.1
diff --git a/gnu/packages/patches/java-openjfx-build-web-DumpRenderTree-java.patch b/gnu/packages/patches/java-openjfx-build-web-DumpRenderTree-java.patch
new file mode 100644
index 0000000000..0200e92c05
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-web-DumpRenderTree-java.patch
@@ -0,0 +1,30 @@
+Subject: [PATCH] Fix DumpRenderTree linking.
+
+DumpRenderTree compiles OK, but fails on a linking stage with the bellow
+error. I found the very same fix for openjfx-8 FreeBSD ports as well. Let's
+ignore undefined references for now.
+
+CMakeFiles/DumpRenderTreeJava.dir/__/TestRunner.cpp.o:TestRunner.cpp:function TestRunner::runUIScript(OpaqueJSContext const*, OpaqueJSString*, OpaqueJSValue const*): error: undefined reference to 'WTF::String::String(unsigned short const*, unsigned int)'
+CMakeFiles/DumpRenderTreeJava.dir/__/__/TestRunnerShared/UIScriptContext/UIScriptContext.cpp.o:UIScriptContext.cpp:function WTR::UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback(): error: undefined reference to 'WTF::String::String(unsigned short const*, unsigned int)'
+collect2: error: ld returned 1 exit status
+
+---
+ .../src/main/native/Tools/DumpRenderTree/java/CMakeLists.txt  | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/modules/web/src/main/native/Tools/DumpRenderTree/java/CMakeLists.txt b/modules/web/src/main/native/Tools/DumpRenderTree/java/CMakeLists.txt
+index e2ce5ef..2ad3db7 100644
+--- a/modules/web/src/main/native/Tools/DumpRenderTree/java/CMakeLists.txt
++++ b/modules/web/src/main/native/Tools/DumpRenderTree/java/CMakeLists.txt
+@@ -72,9 +72,5 @@ add_library(DumpRenderTreeJava SHARED ${DumpRenderTree_SOURCES})
+ add_definitions(-DWEBCORE_EXPORT=WTF_IMPORT -DWEBCORE_TESTSUPPORT_EXPORT=WTF_IMPORT)
+ add_dependencies(DumpRenderTreeJava DumpRenderTreeBindings)
+
+-if (UNIX AND NOT APPLE)
+-  set_target_properties(DumpRenderTreeJava PROPERTIES LINK_FLAGS "-Wl,--no-undefined")
+-endif ()
+-
+ set_target_properties(DumpRenderTreeJava PROPERTIES OUTPUT_NAME "DumpRenderTreeJava")
+ target_link_libraries(DumpRenderTreeJava ${DumpRenderTree_LIBRARIES})
+--
+2.26.2
diff --git a/gnu/packages/patches/java-openjfx-build-web-OptionsJava.cmake.patch b/gnu/packages/patches/java-openjfx-build-web-OptionsJava.cmake.patch
new file mode 100644
index 0000000000..1f133571cb
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-web-OptionsJava.cmake.patch
@@ -0,0 +1,32 @@
+Subject: [PATCH] Use find_package.
+
+We remove all embedded 3rd-party libs like icu, libxml, libxslt and sqlite,
+and use libraries provided via guix inputs.
+---
+ .../web/src/main/native/Source/cmake/OptionsJava.cmake | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/modules/web/src/main/native/Source/cmake/OptionsJava.cmake b/modules/web/src/main/native/Source/cmake/OptionsJava.cmake
+index 76a6695..73c525b 100644
+--- a/modules/web/src/main/native/Source/cmake/OptionsJava.cmake
++++ b/modules/web/src/main/native/Source/cmake/OptionsJava.cmake
+@@ -26,13 +26,11 @@ endif ()
+ set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory")
+ set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory")
+
+-set(SQLITE_LIBRARIES SqliteJava)
+-set(LIBXML2_LIBRARIES XMLJava)
+-set(LIBXSLT_LIBRARIES XSLTJava)
+
+-set(ICU_LIBRARIES icuuc icudata)
+-set(ICU_I18N_LIBRARIES icui18n icuuc icudata)
+-set(ICU_DATA_LIBRARIES icudata)
++find_package(Sqlite REQUIRED)
++find_package(LibXml2 REQUIRED)
++find_package(LibXslt REQUIRED)
++find_package(ICU REQUIRED)
+
+ find_package(JNI REQUIRED)
+ find_package(Threads REQUIRED)
+--
+2.26.2
diff --git a/gnu/packages/patches/java-openjfx-build-web-WTF.patch b/gnu/packages/patches/java-openjfx-build-web-WTF.patch
new file mode 100644
index 0000000000..5fa76449df
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-web-WTF.patch
@@ -0,0 +1,33 @@
+Subject: [PATCH] Fix compilation against ICU 59+.
+
+ICU4C has moved to char16_t as the type for UTF-16
+http://site.icu-project.org/download/59
+
+diff --git a/modules/web/src/main/native/Source/WTF/wtf/unicode/java/UnicodeJava.h b/modules/web/src/main/native/Source/WTF/wtf/unicode/java/UnicodeJava.h
+index 0993aa6..e6ea131 100644
+--- a/modules/web/src/main/native/Source/WTF/wtf/unicode/java/UnicodeJava.h
++++ b/modules/web/src/main/native/Source/WTF/wtf/unicode/java/UnicodeJava.h
+@@ -15,21 +15,6 @@
+
+ #define CharProp(p) com_sun_webkit_dom_CharacterDataImpl_##p
+
+-#if PLATFORM(JAVA) && OS(WINDOWS)
+-typedef wchar_t UChar;
+-#else
+-typedef uint16_t UChar;
+-#endif
+-
+-// #ifdef UChar32
+-// #undef UChar32
+-// #endif
+-
+-#ifndef __UMACHINE_H__ //XXX: recheck
+-typedef uint32_t UChar32;
+-#endif
+-
+-#define U_MASK(x) ((uint32_t)1<<(x))
+ #define USE_FAST_PATH(c, fast, slow) ((c) <= 0x7F ? fast((char)c) : slow(c))
+
+ #define CHECK_PROPERTY(c, mask, isSet) \
+--
+2.26.2
diff --git a/gnu/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch b/gnu/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch
new file mode 100644
index 0000000000..d0bbb7e3b2
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch
@@ -0,0 +1,36 @@
+Subject: [PATCH] Fix WebKit linkage.
+
+Somehow the whole linkage fails because of the TestRunner's undefined
+references. However, I see the very same fixes in openjfx8-devel FreeBSD port,
+even though they use gradle to build it.
+
+CMakeFiles/DumpRenderTreeJava.dir/__/TestRunner.cpp.o:TestRunner.cpp:function TestRunner::runUIScript(OpaqueJSContext const*, OpaqueJSString*, OpaqueJSValue const*): error: undefined reference to 'WTF::String::String(unsigned short const*, unsigned int)'
+CMakeFiles/DumpRenderTreeJava.dir/__/__/TestRunnerShared/UIScriptContext/UIScriptContext.cpp.o:UIScriptContext.cpp:function WTR::UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback(): error: undefined reference to 'WTF::String::String(unsigned short const*, unsigned int)'
+
+Some related bugs/commits are:
+https://github.com/WebKit/webkit/commit/1e46377e47674363131299d54c8557734a99fb5f
+https://bugs.webkit.org/show_bug.cgi?id=199625#c24
+https://bugs.webkit.org/show_bug.cgi?id=200074
+
+---
+ .../src/main/native/Source/cmake/WebKitCompilerFlags.cmake   | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/modules/web/src/main/native/Source/cmake/WebKitCompilerFlags.cmake b/modules/web/src/main/native/Source/cmake/WebKitCompilerFlags.cmake
+index 5bcf047..4526ee6 100644
+--- a/modules/web/src/main/native/Source/cmake/WebKitCompilerFlags.cmake
++++ b/modules/web/src/main/native/Source/cmake/WebKitCompilerFlags.cmake
+@@ -176,11 +176,6 @@ if (NOT MSVC)
+     string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
+ endif ()
+
+-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
+-    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+-endif ()
+-
+-
+ # CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS only matters with GCC >= 4.7.0.  Since this
+ # version, -P does not output empty lines, which currently breaks make_names.pl in
+ # WebCore. Investigating whether make_names.pl should be changed instead is left as an exercise to
+--
+2.26.2
diff --git a/gnu/packages/patches/java-openjfx-build-web-icu.patch b/gnu/packages/patches/java-openjfx-build-web-icu.patch
new file mode 100644
index 0000000000..3e5c4a770c
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-web-icu.patch
@@ -0,0 +1,38 @@
+Subject: [PATCH] Fix compilateion with ICU.
+
+Regressed by https://github.com/unicode-org/icu/commit/480bec3ea652
+
+---
+ modules/web/src/main/native/Source/WebCore/dom/Document.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/modules/web/src/main/native/Source/WebCore/dom/Document.cpp b/modules/web/src/main/native/Source/WebCore/dom/Document.cpp
+index ec30fb5..4b0ff9d 100644
+--- a/modules/web/src/main/native/Source/WebCore/dom/Document.cpp
++++ b/modules/web/src/main/native/Source/WebCore/dom/Document.cpp
+@@ -4704,12 +4704,12 @@ static bool isValidNameNonASCII(const UChar* characters, unsigned length)
+     unsigned i = 0;
+
+     UChar32 c;
+-    U16_NEXT(characters, i, length, c)
++    U16_NEXT(characters, i, length, c);
+     if (!isValidNameStart(c))
+         return false;
+
+     while (i < length) {
+-        U16_NEXT(characters, i, length, c)
++        U16_NEXT(characters, i, length, c);
+         if (!isValidNamePart(c))
+             return false;
+     }
+@@ -4769,7 +4769,7 @@ ExceptionOr<std::pair<AtomicString, AtomicString>> Document::parseQualifiedName(
+
+     for (unsigned i = 0; i < length; ) {
+         UChar32 c;
+-        U16_NEXT(qualifiedName, i, length, c)
++        U16_NEXT(qualifiedName, i, length, c);
+         if (c == ':') {
+             if (sawColon)
+                 return Exception { InvalidCharacterError };
+--
+2.26.2
diff --git a/gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch b/gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch
new file mode 100644
index 0000000000..138f39f9af
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch
@@ -0,0 +1,52 @@
+Subject: [PATCH] Check <xlocale.h> header file
+
+Few libraries use hard-coded xlocale_h header even though if CMake takes care
+of it properly. Remove defined headers, and rely on CMake preprocessor
+instead.
+
+---
+ .../src/main/native/Source/ThirdParty/libxslt/linux/config.h    | 2 +-
+ .../src/main/native/Source/ThirdParty/libxslt/src/config.h.in   | 2 +-
+ modules/web/src/main/native/Source/cmake/OptionsCommon.cmake    | 1 +
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/modules/web/src/main/native/Source/ThirdParty/libxslt/linux/config.h b/modules/web/src/main/native/Source/ThirdParty/libxslt/linux/config.h
+index bd44c163..b19b45f4 100644
+--- a/modules/web/src/main/native/Source/ThirdParty/libxslt/linux/config.h
++++ b/modules/web/src/main/native/Source/ThirdParty/libxslt/linux/config.h
+@@ -143,7 +143,7 @@
+ #define HAVE_VSPRINTF 1
+
+ /* Define to 1 if you have the <xlocale.h> header file. */
+-#define HAVE_XLOCALE_H 1
++/* #define HAVE_XLOCALE_H 1 */
+
+ /* Define to 1 if you have the `_stat' function. */
+ /* #undef HAVE__STAT */
+diff --git a/modules/web/src/main/native/Source/ThirdParty/libxslt/src/config.h.in b/modules/web/src/main/native/Source/ThirdParty/libxslt/src/config.h.in
+index 085354e9..0210fce2 100644
+--- a/modules/web/src/main/native/Source/ThirdParty/libxslt/src/config.h.in
++++ b/modules/web/src/main/native/Source/ThirdParty/libxslt/src/config.h.in
+@@ -142,7 +142,7 @@
+ #undef HAVE_VSPRINTF
+
+ /* Define to 1 if you have the <xlocale.h> header file. */
+-#undef HAVE_XLOCALE_H
++/* #undef HAVE_XLOCALE_H */
+
+ /* Define to 1 if you have the `_stat' function. */
+ #undef HAVE__STAT
+diff --git a/modules/web/src/main/native/Source/cmake/OptionsCommon.cmake b/modules/web/src/main/native/Source/cmake/OptionsCommon.cmake
+index 3bbd2c4a..2b618dd6 100644
+--- a/modules/web/src/main/native/Source/cmake/OptionsCommon.cmake
++++ b/modules/web/src/main/native/Source/cmake/OptionsCommon.cmake
+@@ -148,6 +148,7 @@ _HAVE_CHECK_INCLUDE(HAVE_STRINGS_H strings.h)
+ _HAVE_CHECK_INCLUDE(HAVE_SYS_PARAM_H sys/param.h)
+ _HAVE_CHECK_INCLUDE(HAVE_SYS_TIME_H sys/time.h)
+ _HAVE_CHECK_INCLUDE(HAVE_SYS_TIMEB_H sys/timeb.h)
++_HAVE_CHECK_INCLUDE(HAVE_XLOCALE_H xlocale.h)
+
+ # Check for functions
+ _HAVE_CHECK_FUNCTION(HAVE_ALIGNED_MALLOC _aligned_malloc)
+--
+2.24.1
-- 
2.34.0


  parent reply	other threads:[~2022-06-19 20:24 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 13:28 [bug#41360] [PATCH 00/12] Package java-openjfx Alexey Abramov
2020-05-17 13:51 ` [bug#41360] [PATCH 01/12] gnu: java-openjfx-build: Add helpful patch Alexey Abramov
2020-05-17 13:51   ` [bug#41360] [PATCH 02/12] gnu: java-openjfx-build: Fix indentation Alexey Abramov
2020-05-23 13:58     ` Ludovic Courtès
2020-05-17 13:51   ` [bug#41360] [PATCH 03/12] gnu: java-openjfx-graphics: Implement a complete compilation Alexey Abramov
2020-05-23 14:04     ` Ludovic Courtès
2020-05-17 13:51   ` [bug#41360] [PATCH 04/12] gnu: java-openjfx-build: Fix openjfx-swing component build for JDKu8 Alexey Abramov
2020-05-23 14:05     ` Ludovic Courtès
2020-05-17 13:51   ` [bug#41360] [PATCH 05/12] gnu: java-openjfx-swing: Add new variable Alexey Abramov
2020-05-23 14:05     ` Ludovic Courtès
2020-05-17 13:51   ` [bug#41360] [PATCH 06/12] gnu: java-openjfx-swt: " Alexey Abramov
2020-05-17 13:51   ` [bug#41360] [PATCH 07/12] gnu: java-openjfx-controls: " Alexey Abramov
2020-05-17 13:51   ` [bug#41360] [PATCH 08/12] gnu: java-openjfx-build: Prepare a patch to build openjfx-web Alexey Abramov
2020-05-17 13:51   ` [bug#41360] [PATCH 09/12] gnu: java-openjfx-web: Add new variable Alexey Abramov
2020-05-23 14:09     ` Ludovic Courtès
2020-05-23 13:58   ` [bug#41360] [PATCH 01/12] gnu: java-openjfx-build: Add helpful patch Ludovic Courtès
2020-05-30 16:44     ` Alexey Abramov
2020-05-30 16:41 ` [bug#41360] [PATCH v2 1/9] " Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 2/9] gnu: java-openjfx-build: Fix indentation Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 3/9] gnu: java-openjfx-graphics: Implement a complete compilation Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 4/9] gnu: java-openjfx-build: Fix openjfx-swing component build for JDKu8 Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 5/9] gnu: java-openjfx-swing: Add new variable Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 6/9] gnu: java-openjfx-swt: " Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 7/9] gnu: java-openjfx-controls: " Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 8/9] gnu: java-openjfx-build: Prepare a patch to build openjfx-web Alexey Abramov
2020-05-30 16:41   ` [bug#41360] [PATCH v2 9/9] gnu: java-openjfx-web: Add new variable Alexey Abramov
2020-05-30 16:45 ` [bug#41360] [PATCH 03/12] gnu: java-openjfx-graphics: Implement a complete compilation Alexey Abramov
2020-05-30 16:45 ` [bug#41360] [PATCH 09/12] gnu: java-openjfx-web: Add new variable Alexey Abramov
2020-06-03 15:47   ` Ludovic Courtès
2020-06-07 16:25     ` Alexey Abramov
2020-05-30 17:09 ` [bug#41360] [PATCH v3 1/9] gnu: java-openjfx-build: Add helpful patch Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 2/9] gnu: java-openjfx-build: Fix indentation Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 3/9] gnu: java-openjfx-graphics: Implement a complete compilation Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 4/9] gnu: java-openjfx-build: Fix openjfx-swing component build for JDKu8 Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 5/9] gnu: java-openjfx-swing: Add new variable Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 6/9] gnu: java-openjfx-swt: " Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 7/9] gnu: java-openjfx-controls: " Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 8/9] gnu: java-openjfx-build: Prepare a patch to build openjfx-web Alexey Abramov
2020-05-30 17:09   ` [bug#41360] [PATCH v3 9/9] gnu: java-openjfx-web: Add new variable Alexey Abramov
2020-06-03 15:50   ` [bug#41360] [PATCH v3 1/9] gnu: java-openjfx-build: Add helpful patch Ludovic Courtès
2020-06-03 16:24     ` Julien Lepiller
2020-06-03 16:36       ` Alexey Abramov
2020-06-04  9:55         ` Ludovic Courtès
2020-06-07 15:55 ` [bug#41360] [PATCH v4 00/12] Improve OpenJFX and friends packages Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 01/12] gnu: java-openjfx-graphics: Implement a complete compilation Alexey Abramov
2020-06-12 16:12     ` Ludovic Courtès
2020-06-18 17:31       ` Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 02/12] gnu: java-openjfx-build: Fix openjfx-swing component build for JDKu8 Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 03/12] gnu: java-openjfx-swing: Add new variable Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 04/12] gnu: java-openjfx-swt: " Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 05/12] gnu: java-openjfx-controls: " Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 06/12] gnu: java-openjfx-build: Patch DumpRenderTree for the web component Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 07/12] gnu: java-openjfx-build: Do not use an embedded 3rd party libraries Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 08/12] gnu: java-openjfx-build: Fix web component compilation with ICU 59+ Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 09/12] gnu: java-openjfx-build: Fix web component linkage Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 10/12] gnu: java-openjfx-build: Fix web component compilation with ICU 65+ Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 11/12] gnu: java-openjfx-build: Ensure use of system provided libraries Alexey Abramov
2020-06-07 15:55   ` [bug#41360] [PATCH v4 12/12] gnu: java-openjfx-web: Add new variable Alexey Abramov
2022-06-19 19:26 ` Ioannis Kappas [this message]
2022-06-21  8:22   ` [bug#41360] [PATCH v5] finalize java-openjfx packages Julien Lepiller
2022-06-21  8:30   ` [bug#41360] [PATCH 00/12] Package java-openjfx Alexey Abramov via Guix-patches via
2022-06-21 17:32     ` Julien Lepiller
2022-06-21 17:27   ` [bug#41360] [PATCH v5] finalize java-openjfx packages Julien Lepiller
2022-06-21 18:14     ` Ioannis Kappas
2022-06-26  7:22     ` Ioannis Kappas
2022-09-09  6:15       ` Ioannis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMRHuGCUsJDzk-LoHAA5d1fSESyb0Xjg6KUxk09HgUjHFS3W2Q@mail.gmail.com \
    --to=ioannis.kappas@gmail.com \
    --cc=41360@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=levenson@mmer.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).