GNU bug report logs - #41360
[PATCH 00/12] Package java-openjfx

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Alexey Abramov <levenson@HIDDEN>; Keywords: patch; dated Sun, 17 May 2020 13:30:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 12 Jun 2020 16:12:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 12 12:12:32 2020
Received: from localhost ([127.0.0.1]:40475 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jjmI9-0007PY-1G
	for submit <at> debbugs.gnu.org; Fri, 12 Jun 2020 12:12:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51478)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jjmI6-0007PH-MJ
 for 41360 <at> debbugs.gnu.org; Fri, 12 Jun 2020 12:12:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38453)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jjmI0-0002CY-7v; Fri, 12 Jun 2020 12:12:20 -0400
Received: from [2a01:e0a:1d:7270:6a6c:dc17:fc02:cfda] (port=55068 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jjmHy-0004Tt-5l; Fri, 12 Jun 2020 12:12:19 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH v4 01/12] gnu: java-openjfx-graphics:
 Implement a complete compilation.
References: <20200607155518.1400-1-levenson@HIDDEN>
 <20200607155518.1400-2-levenson@HIDDEN>
Date: Fri, 12 Jun 2020 18:12:16 +0200
In-Reply-To: <20200607155518.1400-2-levenson@HIDDEN> (Alexey Abramov's
 message of "Sun, 7 Jun 2020 17:55:07 +0200")
Message-ID: <87bllo5km7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Alexey,

Alexey Abramov <levenson@HIDDEN> skribis:

> * gnu/packages/java.scm (java-openjfx-graphics): Add stages to build
>   libdecora_sse, prism_common, glassgtk2, iio, prism_sw, prism_es2,
>   font_freetype, glassgtk3, font, font_pango and glass libraries.
>
> All the steps were taken by inspecting ./gradlew build --info result.

Could you add it in a comment?

So essentially all these phases and the unrolled and translated version
of what Gradle would do, right?

> Signed-off-by: Alexey Abramov <levenson@HIDDEN>
> ---
>  gnu/packages/java.scm | 642 +++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 634 insertions(+), 8 deletions(-)

I guess it=E2=80=99s still =E2=80=9Csource=E2=80=9D, but that=E2=80=99s a l=
ot of it.

Do you think there are ways this could be factorized?  I=E2=80=99m not sayi=
ng we
have to do this right away, but we should probably keep in mind if we
want to ensure the long-term maintainability of this package.

> +           ;; XX: Description can be found in build.gradle:1429. Current=
ly

I think you can remove =E2=80=9CXX=E2=80=9D, but description of what?  Prob=
ably a bit
more context would be fine.

> +                 (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 "CLASSPA=
TH"))
> +                                                       ":")
> +                                    "CompileJSL"
> +                                    "-i" prism-src
> +                                    "-o" prism-gen-src
> +                                    "-t"
> +                                    "-pkg" "com/sun/prism"
> +                                    "-d3d"
> +                                    "-es2"
> +                                    "-name" (list file)))

Problem is we won=E2=80=99t know where those flags come from, right?  Perha=
ps
there=E2=80=99s additional info the Gradle build files?

> +           (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/c=
lasses/jsl-compilers/decora")
> +                     (decora-gen-src "modules/graphics/build/generated-s=
rc/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 . "PerspectiveTran=
sform")
> +                                           (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 . "CompileLinearCo=
nvolve")
> +                                           (outputs . "-hw")]
> +                                          [(file-name . "LinearConvolveS=
hadow")
> +                                           (generator . "CompileLinearCo=
nvolve")
> +                                           (outputs . "-hw")])))

We should at least have a comment explaining where that list comes from
and what it means.

I appreciate the huge amount of work you put into this, but I=E2=80=99m
concerned about maintainability.

Julien, what are the prospects of getting Gradle in Guix?  What are your
thoughts here?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 16:25:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 12:25:24 2020
Received: from localhost ([127.0.0.1]:54782 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhy6u-0002Nf-15
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 12:25:24 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:54215)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhy6r-0002NV-Oq
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 12:25:22 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 138B99CC35;
 Sun,  7 Jun 2020 15:54:34 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#41360] [PATCH 09/12] gnu: java-openjfx-web: Add new variable.
In-Reply-To: <87v9k8kv7s.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Wed, 03 Jun 2020 17:47:03 +0200")
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-9-levenson@HIDDEN> <87tv0668us.fsf@HIDDEN>
 <87wo4t1ie8.fsf@HIDDEN> <87v9k8kv7s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Date: Sun, 07 Jun 2020 18:25:18 +0200
Message-ID: <87img2c07l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


True. I have sent a new series with fixes.

This move allowed me to drop off gcc-5, and switch back to the current one. It is also shed some light on what should/could be investigated/done to make tests work.

--
Alexey




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:24 2020
Received: from localhost ([127.0.0.1]:54720 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxed-0007qe-VP
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:24 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62744)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe4-0007mu-9k
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:42 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 0569E9D066
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:46 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 10/12] gnu: java-openjfx-build: Fix web component
 compilation with ICU 65+.
Date: Sun,  7 Jun 2020 17:55:16 +0200
Message-Id: <20200607155518.1400-11-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-icu.patch: New file.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  1 +
 .../patches/java-openjfx-build-web-icu.patch  | 38 +++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-icu.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 85f8db7150..40458ac9c4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1114,6 +1114,7 @@ dist_patch_DATA =						\
   %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 5da1476077..a17da610d2 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2507,6 +2507,7 @@ new Date();"))
                                        "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
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:11 2020
Received: from localhost ([127.0.0.1]:54718 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxed-0007qX-MK
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:11 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62729)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe1-0007mk-QM
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:42 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id A16219CFDD
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:46 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 08/12] gnu: java-openjfx-build: Fix web component
 compilation with ICU 59+.
Date: Sun,  7 Jun 2020 17:55:14 +0200
Message-Id: <20200607155518.1400-9-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-WTF.patch: New file.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  1 +
 .../patches/java-openjfx-build-web-WTF.patch  | 33 +++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-WTF.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 71b2cf1d69..d36636fd81 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1112,6 +1112,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.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-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 8ce8043335..cf6135e926 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2505,6 +2505,7 @@ new Date();"))
                                        "java-openjfx-build-swing-JFXPanel-JDK8.patch"
                                        "java-openjfx-build-web-DumpRenderTree-java.patch"
                                        "java-openjfx-build-web-OptionsJava.cmake.patch"
+                                       "java-openjfx-build-web-WTF.patch"
                                        ))))
     (build-system ant-build-system)
     (arguments
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:11 2020
Received: from localhost ([127.0.0.1]:54716 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxed-0007qP-5h
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:11 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62745)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe5-0007nA-6y
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:42 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 59AE19D14A
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:47 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 12/12] gnu: java-openjfx-web: Add new variable.
Date: Sun,  7 Jun 2020 17:55:18 +0200
Message-Id: <20200607155518.1400-13-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-web): New variable.

We build not only the web component here, but webkit java port as well.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 175 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 175 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 1b6b494700..6922e51940 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Chris Marusich <cmmarusich@HIDDEN>
 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@HIDDEN>
 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@HIDDEN>
+;;; Copyright © 2020 Alexey Abramov <levenson@HIDDEN>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@HIDDEN>
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@HIDDEN>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
@@ -50,11 +51,13 @@
   #: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 gettext)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages ghostscript) ;lcms
@@ -74,10 +77,13 @@
   #: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 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)
@@ -3271,6 +3277,175 @@ modern, efficient, and fully featured toolkit for developing rich client
 applications.  This package contains media-related classes for the
 OpenJFX distribution.")))
 
+(define-public java-openjfx-web
+  (package (inherit java-openjfx-build)
+    (name "java-openjfx-web")
+    (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
+       #:modules ((ice-9 match)
+                  (guix build ant-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (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 _
+             (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
     (name "javacc")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:11 2020
Received: from localhost ([127.0.0.1]:54714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxec-0007qI-Qj
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:11 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62743)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe4-0007mt-9f
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:41 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id CD2519D05B
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:46 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 09/12] gnu: java-openjfx-build: Fix web component linkage.
Date: Sun,  7 Jun 2020 17:55:15 +0200
Message-Id: <20200607155518.1400-10-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch:
  New file.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  1 +
 ...-build-web-WebKitCompilerFlags.cmake.patch | 36 +++++++++++++++++++
 3 files changed, 38 insertions(+)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-WebKitCompilerFlags.cmake.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d36636fd81..85f8db7150 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1113,6 +1113,7 @@ dist_patch_DATA =						\
   %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-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 cf6135e926..5da1476077 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2506,6 +2506,7 @@ new Date();"))
                                        "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"
                                        ))))
     (build-system ant-build-system)
     (arguments
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:10 2020
Received: from localhost ([127.0.0.1]:54712 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxeZ-0007q8-9g
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:10 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62717)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe4-0007mb-So
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:41 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 31A5B9D0CE
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:47 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 11/12] gnu: java-openjfx-build: Ensure use of system
 provided libraries.
Date: Sun,  7 Jun 2020 17:55:17 +0200
Message-Id: <20200607155518.1400-12-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Delete source code of
  embedded 3rd party libraries.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index a17da610d2..1b6b494700 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2497,6 +2497,9 @@ new Date();"))
                '(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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:07 2020
Received: from localhost ([127.0.0.1]:54710 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxeX-0007pz-ID
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:07 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62725)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe1-0007mj-MJ
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:41 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 751039CFD1
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:46 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 07/12] gnu: java-openjfx-build: Do not use an embedded 3rd
 party libraries.
Date: Sun,  7 Jun 2020 17:55:13 +0200
Message-Id: <20200607155518.1400-8-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-OptionsJava.cmake.patch: New file.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  1 +
 ...-openjfx-build-web-OptionsJava.cmake.patch | 32 +++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-OptionsJava.cmake.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f8a59da3da..71b2cf1d69 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1111,6 +1111,7 @@ dist_patch_DATA =						\
   %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-DumpRenderTree-java.patch	\
+  %D%/packages/patches/java-openjfx-build-web-OptionsJava.cmake.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 d60ae7c8f1..8ce8043335 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2504,6 +2504,7 @@ new Date();"))
               (patches (search-patches "java-openjfx-build-jdk_version.patch"
                                        "java-openjfx-build-swing-JFXPanel-JDK8.patch"
                                        "java-openjfx-build-web-DumpRenderTree-java.patch"
+                                       "java-openjfx-build-web-OptionsJava.cmake.patch"
                                        ))))
     (build-system ant-build-system)
     (arguments
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:05 2020
Received: from localhost ([127.0.0.1]:54702 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxeT-0007p3-Qk
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:05 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62721)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe1-0007mc-Eh
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:40 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 4769C9CFB3
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:46 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 06/12] gnu: java-openjfx-build: Patch DumpRenderTree for
 the web component.
Date: Sun,  7 Jun 2020 17:55:12 +0200
Message-Id: <20200607155518.1400-7-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-DumpRenderTree-java.patch: New file.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  1 +
 ...penjfx-build-web-DumpRenderTree-java.patch | 30 +++++++++++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-DumpRenderTree-java.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 5fe0eeadda..f8a59da3da 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1110,6 +1110,7 @@ dist_patch_DATA =						\
   %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-DumpRenderTree-java.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 e05289758a..d60ae7c8f1 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2503,6 +2503,7 @@ new Date();"))
                 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
               (patches (search-patches "java-openjfx-build-jdk_version.patch"
                                        "java-openjfx-build-swing-JFXPanel-JDK8.patch"
+                                       "java-openjfx-build-web-DumpRenderTree-java.patch"
                                        ))))
     (build-system ant-build-system)
     (arguments
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:56:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:56:01 2020
Received: from localhost ([127.0.0.1]:54700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxeJ-0007oW-8G
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:56:01 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62701)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxdz-0007mQ-1M
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:37 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 6288A9CC49
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:43 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 01/12] gnu: java-openjfx-graphics: Implement a complete
 compilation.
Date: Sun,  7 Jun 2020 17:55:07 +0200
Message-Id: <20200607155518.1400-2-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-graphics): Add stages to build
  libdecora_sse, prism_common, glassgtk2, iio, prism_sw, prism_es2,
  font_freetype, glassgtk3, font, font_pango and glass libraries.

All the steps were taken by inspecting ./gradlew build --info result.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 642 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 634 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 43f0f37b91..fb5d754a60 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -56,6 +56,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gcc)
   #: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)
@@ -2567,16 +2568,641 @@ distribution.")))
     (arguments
      `(#:jar-name "java-openjfx-graphics.jar"
        #:source-dir "modules/graphics/src/main/java"
-       #:tests? #f; require X
-       #:test-dir "modules/graphics/src/test"))
+       #: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
+       (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
+
+           (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))
+
+           ;; XX: Description can be found in build.gradle:1429. Currently
+           ;; there is no sdk creation step.
+           ;;
+           ;; 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
+     `(("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)))
-    (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.")))
+       ("java-swt" ,java-swt)))))
 
 (define-public java-openjfx-media
   (package (inherit java-openjfx-build)
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:55:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:55:51 2020
Received: from localhost ([127.0.0.1]:54698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxeI-0007oT-W1
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:51 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62698)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxdz-0007mO-1L
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:37 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 2E22F9CC46
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:43 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 00/12] Improve OpenJFX and friends packages
Date: Sun,  7 Jun 2020 17:55:06 +0200
Message-Id: <20200607155518.1400-1-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is an updated series of patches for openjfx. We are now building WebKit java port and use Guix inputs, instead of embedded source code bundles ship with openjfx. Tests are still disabled.

I left round brackets in java-openjfx-build package on a separate line, just to make diffs look cleaner. Is it OK?

This is not an ideal build of course. Media component is missing for example. It would be also great to build a complete jfxrt.jar and not expose java-openjfx-<component> vars at all.

I have also checked the webkitgtk package while doing this. I found that some patches apply to openjfx as well. Don't know if it's possible to use webkit.org sources for openjfx-web.

In the meantime davmail and 2fa works :). Please let me know what you think.

Alexey Abramov (12):
  gnu: java-openjfx-graphics: Implement a complete compilation.
  gnu: java-openjfx-build: Fix openjfx-swing component build for JDKu8
  gnu: java-openjfx-swing: Add new variable.
  gnu: java-openjfx-swt: Add new variable.
  gnu: java-openjfx-controls: Add new variable.
  gnu: java-openjfx-build: Patch DumpRenderTree for the web component.
  gnu: java-openjfx-build: Do not use an embedded 3rd party libraries.
  gnu: java-openjfx-build: Fix web component compilation with ICU 59+.
  gnu: java-openjfx-build: Fix web component linkage.
  gnu: java-openjfx-build: Fix web component compilation with ICU 65+.
  gnu: java-openjfx-build: Ensure use of system provided libraries.
  gnu: java-openjfx-web: Add new variable.

 gnu/local.mk                                  |   6 +
 gnu/packages/java.scm                         | 871 +++++++++++++++++-
 ...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 +
 8 files changed, 1097 insertions(+), 9 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

--
2.26.2




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:55:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:55:50 2020
Received: from localhost ([127.0.0.1]:54696 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxeI-0007oI-Mk
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:50 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62717)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe1-0007mb-8e
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:36 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 06D1A9CFA5
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:45 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 05/12] gnu: java-openjfx-controls: Add new variable.
Date: Sun,  7 Jun 2020 17:55:11 +0200
Message-Id: <20200607155518.1400-6-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-controls): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d90b999473..e05289758a 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3232,6 +3232,22 @@ distribution.")))
     (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)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:55:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:55:50 2020
Received: from localhost ([127.0.0.1]:54694 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxeI-0007oA-Ar
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:50 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62705)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxdz-0007mR-L7
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:35 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 1F48B9CD79
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:44 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 02/12] gnu: java-openjfx-build: Fix openjfx-swing component
 build for JDKu8
Date: Sun,  7 Jun 2020 17:55:08 +0200
Message-Id: <20200607155518.1400-3-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  4 +-
 ...va-openjfx-build-swing-JFXPanel-JDK8.patch | 60 +++++++++++++++++++
 3 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ae8a2275f7..5fe0eeadda 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1109,6 +1109,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-commons-collections-fix-java8.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-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 fb5d754a60..6e7f92c859 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2501,7 +2501,9 @@ new Date();"))
               (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"
+                                       ))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:55:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:55:50 2020
Received: from localhost ([127.0.0.1]:54690 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxe4-0007mz-IH
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:50 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62713)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe0-0007mZ-Ro
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:33 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 687D19CF98
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:45 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 04/12] gnu: java-openjfx-swt: Add new variable.
Date: Sun,  7 Jun 2020 17:55:10 +0200
Message-Id: <20200607155518.1400-5-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-swt): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d59288df9a..d90b999473 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3219,6 +3219,19 @@ distribution.")))
     (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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 7 Jun 2020 15:55:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 11:55:36 2020
Received: from localhost ([127.0.0.1]:54682 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhxe1-0007mi-BH
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:36 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:62709)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jhxe0-0007mT-5H
 for 41360 <at> debbugs.gnu.org; Sun, 07 Jun 2020 11:55:32 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id B1DBE9CF21
 for <41360 <at> debbugs.gnu.org>; Sun,  7 Jun 2020 15:24:44 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v4 03/12] gnu: java-openjfx-swing: Add new variable.
Date: Sun,  7 Jun 2020 17:55:09 +0200
Message-Id: <20200607155518.1400-4-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200607155518.1400-1-levenson@HIDDEN>
References: <20200607155518.1400-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-swing): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 6e7f92c859..d59288df9a 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3206,6 +3206,19 @@ distribution.")))
      `(("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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 4 Jun 2020 09:56:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 04 05:56:09 2020
Received: from localhost ([127.0.0.1]:45176 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jgmbZ-0004Fz-1t
	for submit <at> debbugs.gnu.org; Thu, 04 Jun 2020 05:56:09 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46302)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jgmbX-0004Fl-Ci
 for 41360 <at> debbugs.gnu.org; Thu, 04 Jun 2020 05:56:07 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57656)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jgmbR-0006eZ-Aj; Thu, 04 Jun 2020 05:56:01 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=44758 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jgmbQ-0003zS-Ta; Thu, 04 Jun 2020 05:56:01 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH v3 1/9] gnu: java-openjfx-build: Add helpful
 patch.
References: <20200517132829.1553311-1-levenson@HIDDEN>
 <20200530170951.1649-1-levenson@HIDDEN> <87pnagkv1t.fsf@HIDDEN>
 <0F005145-C408-4B05-86C2-750219F7F2E3@HIDDEN>
 <877dwoyulp.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 17 Prairial an 228 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 04 Jun 2020 11:55:59 +0200
In-Reply-To: <877dwoyulp.fsf@HIDDEN> (Alexey Abramov's message of "Wed, 03
 Jun 2020 18:36:34 +0200")
Message-ID: <87h7vrduj4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Alexey Abramov <levenson@HIDDEN> skribis:

> Julien Lepiller <julien@HIDDEN> writes:
>
>> Le 3 juin 2020 11:50:38 GMT-04:00, "Ludovic Court=C3=A8s" <ludo@HIDDEN>=
 a =C3=A9crit :
>>>Alexey Abramov <levenson@HIDDEN> skribis:
>>>
>>>> +++ b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
>>
>>>> @@ -0,0 +1,27 @@
>>>> +Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
>>>> +
>>>> +Icedtea contains guix in its version, so build.gradle failes to run.
>>>Openjfx
>>>> +packaging is not trivial, so you will probably need to try build it
>>>with
>>>> +gradlew.
>>>> +
>>>> +---
>>>> + build.gradle | 5 ++---
>>>> + 1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>>This patch also made me realize that we=E2=80=99re using Gradle here, but
>>>there=E2=80=99s no Gradle package in Guix.  That means we must be using a
>>>pre-built jar somewhere, though I didn=E2=80=99t find it.  Any idea wher=
e that
>>>comes from?  Julien, any idea?
>>>
>>>(The problem existed before your patches.)
>>>
>>>Thanks,
>>>Ludo=E2=80=99.
>>
>> From what I understand, this patcg helps build openjfx with gradle on
>> guix, if you use the guix source in an environment, but reading the
>> other patches, it doesn't look like gradle is actually used anywhere.
>>
>> It looks like this patch is helpful in the sense that it allows users to=
 manually build the package outside of guix, but is not used at all during =
the build of openjfx by guix itself.
>>
>> Alexey, can you confirm?
>
> Yes, you are right. I am not using gradle. The reason for this patch was
> to be able to debug the building process openjfx. I had to run gradlew
> multiple times, so I decided to just patch it.

OK, thanks for explaining!

BTW, I=E2=80=99ve pushed the first two patches of this series, Alexey.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 3 Jun 2020 16:36:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 03 12:36:46 2020
Received: from localhost ([127.0.0.1]:44489 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jgWNh-0004Sb-Tq
	for submit <at> debbugs.gnu.org; Wed, 03 Jun 2020 12:36:46 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:50720)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jgWNe-0004SR-Ia
 for 41360 <at> debbugs.gnu.org; Wed, 03 Jun 2020 12:36:44 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id EC9EE9CC41;
 Wed,  3 Jun 2020 16:05:52 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: Julien Lepiller <julien@HIDDEN>
Subject: Re: [bug#41360] [PATCH v3 1/9] gnu: java-openjfx-build: Add helpful
 patch.
References: <20200517132829.1553311-1-levenson@HIDDEN>
 <20200530170951.1649-1-levenson@HIDDEN> <87pnagkv1t.fsf@HIDDEN>
 <0F005145-C408-4B05-86C2-750219F7F2E3@HIDDEN>
Date: Wed, 03 Jun 2020 18:36:34 +0200
In-Reply-To: <0F005145-C408-4B05-86C2-750219F7F2E3@HIDDEN> (Julien
 Lepiller's message of "Wed, 03 Jun 2020 12:24:58 -0400")
Message-ID: <877dwoyulp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Julien, Ludo,

Julien Lepiller <julien@HIDDEN> writes:

> Le 3 juin 2020 11:50:38 GMT-04:00, "Ludovic Court=C3=A8s" <ludo@HIDDEN> =
a =C3=A9crit :
>>Alexey Abramov <levenson@HIDDEN> skribis:
>>
>>> +++ b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
>
>>> @@ -0,0 +1,27 @@
>>> +Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
>>> +
>>> +Icedtea contains guix in its version, so build.gradle failes to run.
>>Openjfx
>>> +packaging is not trivial, so you will probably need to try build it
>>with
>>> +gradlew.
>>> +
>>> +---
>>> + build.gradle | 5 ++---
>>> + 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>>This patch also made me realize that we=E2=80=99re using Gradle here, but
>>there=E2=80=99s no Gradle package in Guix.  That means we must be using a
>>pre-built jar somewhere, though I didn=E2=80=99t find it.  Any idea where=
 that
>>comes from?  Julien, any idea?
>>
>>(The problem existed before your patches.)
>>
>>Thanks,
>>Ludo=E2=80=99.
>
> From what I understand, this patcg helps build openjfx with gradle on
> guix, if you use the guix source in an environment, but reading the
> other patches, it doesn't look like gradle is actually used anywhere.
>
> It looks like this patch is helpful in the sense that it allows users to =
manually build the package outside of guix, but is not used at all during t=
he build of openjfx by guix itself.
>
> Alexey, can you confirm?

Yes, you are right. I am not using gradle. The reason for this patch was
to be able to debug the building process openjfx. I had to run gradlew
multiple times, so I decided to just patch it.

--=20
Alexey




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 3 Jun 2020 16:25:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 03 12:25:38 2020
Received: from localhost ([127.0.0.1]:44482 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jgWCi-0004CC-PE
	for submit <at> debbugs.gnu.org; Wed, 03 Jun 2020 12:25:38 -0400
Received: from lepiller.eu ([89.234.186.109]:54826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1jgWCh-0004C3-1e
 for 41360 <at> debbugs.gnu.org; Wed, 03 Jun 2020 12:25:23 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 7438b954;
 Wed, 3 Jun 2020 16:25:20 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date
 :in-reply-to:references:mime-version:content-type
 :content-transfer-encoding:subject:to:cc:from:message-id; s=
 dkim; bh=FeULLNLaBoDFezkr+jG0MNtD6vE2uCeTspxxH5Alxtk=; b=JNL4xeq
 DH3fynpJx1vEYelldkc1aiWHOALU9qGUqJXtWXKva385pqRDsYpiLqjrdfny9v92
 i9bGkJ14NpnXpn/f7Ll1KBmMctuefXm98WBfBhMvTnYqIDs0+wGfJrFstQRZZCVE
 hzNvXeJZgatQ/5L7SIxAekXbS5Yjk7zYwnYoaQdHmSzmHPbgZTv4LGj9su5fr7HG
 0uMwM42YUtdMcv/i1fSAZBB6OtzmSOw9DxvPRncvByMZTSUjWKCEoQv6HcDCPIED
 mAvsPOuIWfXETadn1jKaaf0g6AYywTTmCrG6+THMylAuFVCBlUb8AKKUFdosmp0f
 W1O0QpSBYPGTnug==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 8d2f02c3
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Wed, 3 Jun 2020 16:25:19 +0000 (UTC)
Date: Wed, 03 Jun 2020 12:24:58 -0400
User-Agent: K-9 Mail for Android
In-Reply-To: <87pnagkv1t.fsf@HIDDEN>
References: <20200517132829.1553311-1-levenson@HIDDEN>
 <20200530170951.1649-1-levenson@HIDDEN> <87pnagkv1t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [bug#41360] [PATCH v3 1/9] gnu: java-openjfx-build: Add helpful
 patch.
To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= <ludo@HIDDEN>,
 Alexey Abramov <levenson@HIDDEN>
From: Julien Lepiller <julien@HIDDEN>
Message-ID: <0F005145-C408-4B05-86C2-750219F7F2E3@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Le 3 juin 2020 11:50:38 GMT-04:00, "Ludovic Court=C3=A8s" <ludo@gnu=2Eorg> =
a =C3=A9crit :
>Alexey Abramov <levenson@mmer=2Eorg> skribis:
>
>> +++ b/gnu/packages/patches/java-openjfx-build-jdk_version=2Epatch
>> @@ -0,0 +1,27 @@
>> +Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
>> +
>> +Icedtea contains guix in its version, so build=2Egradle failes to run=
=2E
>Openjfx
>> +packaging is not trivial, so you will probably need to try build it
>with
>> +gradlew=2E
>> +
>> +---
>> + build=2Egradle | 5 ++---
>> + 1 file changed, 2 insertions(+), 3 deletions(-)
>
>This patch also made me realize that we=E2=80=99re using Gradle here, but
>there=E2=80=99s no Gradle package in Guix=2E  That means we must be using=
 a
>pre-built jar somewhere, though I didn=E2=80=99t find it=2E  Any idea whe=
re that
>comes from?  Julien, any idea?
>
>(The problem existed before your patches=2E)
>
>Thanks,
>Ludo=E2=80=99=2E

From=20what I understand, this patcg helps build openjfx with gradle on guix=
, if you use the guix source in an environment, but reading the other patch=
es, it doesn't look like gradle is actually used anywhere=2E

It looks like this patch is helpful in the sense that it allows users to m=
anually build the package outside of guix, but is not used at all during th=
e build of openjfx by guix itself=2E

Alexey, can you confirm?




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 3 Jun 2020 15:50:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 03 11:50:47 2020
Received: from localhost ([127.0.0.1]:44412 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jgVfD-00019g-2S
	for submit <at> debbugs.gnu.org; Wed, 03 Jun 2020 11:50:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58130)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jgVfC-00019U-38
 for 41360 <at> debbugs.gnu.org; Wed, 03 Jun 2020 11:50:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43745)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jgVf6-0005lH-4j; Wed, 03 Jun 2020 11:50:40 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41698 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jgVf5-00033r-OE; Wed, 03 Jun 2020 11:50:39 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH v3 1/9] gnu: java-openjfx-build: Add helpful
 patch.
References: <20200517132829.1553311-1-levenson@HIDDEN>
 <20200530170951.1649-1-levenson@HIDDEN>
Date: Wed, 03 Jun 2020 17:50:38 +0200
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN> (Alexey Abramov's
 message of "Sat, 30 May 2020 19:09:43 +0200")
Message-ID: <87pnagkv1t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Alexey Abramov <levenson@HIDDEN> skribis:

> +++ b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
> @@ -0,0 +1,27 @@
> +Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
> +
> +Icedtea contains guix in its version, so build.gradle failes to run. Ope=
njfx
> +packaging is not trivial, so you will probably need to try build it with
> +gradlew.
> +
> +---
> + build.gradle | 5 ++---
> + 1 file changed, 2 insertions(+), 3 deletions(-)

This patch also made me realize that we=E2=80=99re using Gradle here, but
there=E2=80=99s no Gradle package in Guix.  That means we must be using a
pre-built jar somewhere, though I didn=E2=80=99t find it.  Any idea where t=
hat
comes from?  Julien, any idea?

(The problem existed before your patches.)

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 3 Jun 2020 15:47:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 03 11:47:25 2020
Received: from localhost ([127.0.0.1]:44407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jgVbk-00014m-59
	for submit <at> debbugs.gnu.org; Wed, 03 Jun 2020 11:47:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57554)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jgVbj-00014a-1b
 for 41360 <at> debbugs.gnu.org; Wed, 03 Jun 2020 11:47:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43710)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jgVbd-00059z-Lc; Wed, 03 Jun 2020 11:47:05 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41696 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jgVbd-0002lC-64; Wed, 03 Jun 2020 11:47:05 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH 09/12] gnu: java-openjfx-web: Add new variable.
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-9-levenson@HIDDEN> <87tv0668us.fsf@HIDDEN>
 <87wo4t1ie8.fsf@HIDDEN>
Date: Wed, 03 Jun 2020 17:47:03 +0200
In-Reply-To: <87wo4t1ie8.fsf@HIDDEN> (Alexey Abramov's message of "Sat, 30
 May 2020 18:45:19 +0200")
Message-ID: <87v9k8kv7s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Alexey,

Alexey Abramov <levenson@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

[...]

>>> +             (let* ((module (string-append (getcwd) "/modules/web"))
>>> +                    (classes (string-append module "/build/classes/jav=
a/main"))
>>> +                    (web-generated-headers (string-append module "/bui=
ld/generated-src/headers"))
>>> +                    (web-generated-classes '("com.sun.webkit.ContextMe=
nu"
>>> +                                             "com.sun.webkit.ContextMe=
nuItem"
>>> +                                             "com.sun.webkit.CursorMan=
ager"
>>
>> Perhaps add a comment explaining how you obtained this list of classes
>> so that our future selves know how to update it.
>>
>> Since this is a Web thing, could you check whether it contains pre-built
>> (=E2=80=9Cminified=E2=80=9D) JavaScript?  If it does, that=E2=80=99s a p=
roblem because we
>> generally provide only software built from source.
>
> We build not only a web component here, but webkit as well. Webkit requir=
es some extra 3rd party libraries icu, libxml, libxslt and sqlite which are=
 already in openjfx source bundle. We also build them now.

Oh sorry, I had overlooked that and it=E2=80=99s problematic.

The policy in Guix is to not use bundled software: it=E2=80=99s a waste of
resources (especially for large pieces of software like WebKit), but
more importantly it=E2=80=99s a security issue (nobody will notice if
=E2=80=98java-openjfx-web=E2=80=99 includes an outdated, vulnerable version=
 of WebKit).

So the solution is to:

  1. Pass the relevant flags to tell the build system to use the
     =E2=80=9Csystem=E2=80=9D copies of these libraries.  If there=E2=80=99=
s no such flag, patch
     the build system to not try to build these things.

  2. Add a snippet to remove bundled copies of these libraries, to make
     sure they=E2=80=99re not picked up by mistake.

Sometimes it=E2=80=99s just a build flag, and sometimes it=E2=80=99s harder=
.  If it
turns out to be difficult, let us know, and perhaps we can find an
interim solution.

Could you take a look?  Let me know what you think!

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:10:28 2020
Received: from localhost ([127.0.0.1]:59088 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf506-0007IP-NS
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:28 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53339)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4za-0007F9-0F
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:08 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 02E899CFFC
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:05 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 4/9] gnu: java-openjfx-build: Fix openjfx-swing component
 build for JDKu8
Date: Sat, 30 May 2020 19:09:46 +0200
Message-Id: <20200530170951.1649-4-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 +-
 ...va-openjfx-build-swing-JFXPanel-JDK8.patch | 60 +++++++++++++++++++
 3 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cbf0a20a9e..e15554f1c2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1111,6 +1111,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-commons-collections-fix-java8.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-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 9d73d9a7e8..938fc0695c 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2501,7 +2501,8 @@ new Date();"))
               (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"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:10:26 2020
Received: from localhost ([127.0.0.1]:59086 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf506-0007II-5x
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:26 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53358)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4ze-0007FY-3m
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:06 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id E306D9D166
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:06 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 9/9] gnu: java-openjfx-web: Add new variable.
Date: Sat, 30 May 2020 19:09:51 +0200
Message-Id: <20200530170951.1649-9-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-web): New variable.

We build not only a web component here, but webkit as well. Webkit requires
some extra 3rd party libraries icu, libxml, libxslt and sqlite which are
already in openjfx source bundle.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 176 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 176 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f8a5b71a48..0d2f268764 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -50,11 +50,13 @@
   #: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 gettext)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages ghostscript) ;lcms
@@ -74,8 +76,10 @@
   #: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 xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages texinfo)
@@ -3263,6 +3267,178 @@ modern, efficient, and fully featured toolkit for developing rich client
 applications.  This package contains media-related classes for the
 OpenJFX distribution.")))
 
+(define-public java-openjfx-web
+  (package (inherit java-openjfx-build)
+    (name "java-openjfx-web")
+    (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
+       #:modules ((ice-9 match)
+                  (guix build ant-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (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"))))
+
+               (mkdir-p webkit-native-dest)
+               (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
+                       ;; We disable all the updates, and build 3rd-party libs
+                       ;; lice icu, libxml, libxslt and sqlite. Source code
+                       ;; sits modules/web/src/main/native/Source/ThirdPArty.
+                       "--skip-library-update"
+                       "--verbose"
+                       (string-append
+                        "--cmakeargs="
+                        (string-join
+                         (list "-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$")))))
+
+         (add-before 'install 'build-jar
+           (lambda _
+             (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)))))
+
+    (inputs
+     `(("antlr3" ,antlr3)
+       ("java-stringtemplate" ,java-stringtemplate)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("cmake" ,cmake)
+       ;; XX: With current gcc (gcc-7.5) the build breaks on building
+       ;; thirdparty libraries like xslt. c++14 is used to build
+       ;; them. CMAKE_CXX_STANDARD doesn't take any effect here for some
+       ;; reason.
+       ("gcc" ,gcc-5)
+       ("glibc" ,glibc-2.29)
+       ("gtk" ,gtk+-2)
+       ("gtk3" ,gtk+)
+       ("ruby" ,ruby)
+       ("perl" ,perl)
+       ("gperf" ,gperf)
+       ("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (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
     (name "javacc")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:10:26 2020
Received: from localhost ([127.0.0.1]:59084 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf502-0007I6-HE
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:26 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53353)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4zd-0007FH-Pa
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:05 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id B54C09D164
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:06 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 8/9] gnu: java-openjfx-build: Prepare a patch to build
 openjfx-web.
Date: Sat, 30 May 2020 19:09:50 +0200
Message-Id: <20200530170951.1649-8-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 +-
 .../java-openjfx-build-web-xlocale.h.patch    | 52 +++++++++++++++++++
 3 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e15554f1c2..71d7079134 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1112,6 +1112,7 @@ dist_patch_DATA =						\
   %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-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 ec9e24b8d3..f8a5b71a48 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2502,7 +2502,8 @@ new Date();"))
                (base32
                 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
               (patches (search-patches "java-openjfx-build-jdk_version.patch"
-                                       "java-openjfx-build-swing-JFXPanel-JDK8.patch"))))
+                                       "java-openjfx-build-swing-JFXPanel-JDK8.patch"
+                                       "java-openjfx-build-web-xlocale.h.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
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.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:10:22 2020
Received: from localhost ([127.0.0.1]:59082 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf502-0007Hz-5X
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:22 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53343)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4za-0007FB-6S
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:05 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 305569D06C
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:06 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 5/9] gnu: java-openjfx-swing: Add new variable.
Date: Sat, 30 May 2020 19:09:47 +0200
Message-Id: <20200530170951.1649-5-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-swing): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 938fc0695c..f124062035 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3205,6 +3205,19 @@ distribution.")))
      `(("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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:10:22 2020
Received: from localhost ([127.0.0.1]:59078 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4zp-0007HR-KD
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:22 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53335)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4zZ-0007F8-RU
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:05 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 71D479CE92
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:05 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 3/9] gnu: java-openjfx-graphics: Implement a complete
 compilation.
Date: Sat, 30 May 2020 19:09:45 +0200
Message-Id: <20200530170951.1649-3-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-graphics): Add stages to build
  libdecora_sse, prism_common, glassgtk2, iio, prism_sw, prism_es2,
  font_freetype, glassgtk3, font, font_pango and glass libraries.

All the steps were taken by inspecting ./gradlew build --info result.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 642 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 634 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 43f0f37b91..9d73d9a7e8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -56,6 +56,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gcc)
   #: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)
@@ -2567,16 +2568,641 @@ distribution.")))
     (arguments
      `(#:jar-name "java-openjfx-graphics.jar"
        #:source-dir "modules/graphics/src/main/java"
-       #:tests? #f; require X
-       #:test-dir "modules/graphics/src/test"))
+       #: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
+       (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" "-Werror=implicit-function-declaration"))
+              (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
+
+           (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))
+
+           ;; XX: Description can be found in build.gradle:1429. Currently
+           ;; there is no sdk creation step.
+           ;;
+           ;; 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
+     `(("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)))
-    (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.")))
+       ("java-swt" ,java-swt)))))
 
 (define-public java-openjfx-media
   (package (inherit java-openjfx-build)
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:10:09 2020
Received: from localhost ([127.0.0.1]:59076 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4zp-0007HP-BV
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:09 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4za-0007FI-QR
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:09:59 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 8A6859D154
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:06 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 7/9] gnu: java-openjfx-controls: Add new variable.
Date: Sat, 30 May 2020 19:09:49 +0200
Message-Id: <20200530170951.1649-7-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-controls): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f8d47d7eed..ec9e24b8d3 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3231,6 +3231,22 @@ distribution.")))
     (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)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:10:04 2020
Received: from localhost ([127.0.0.1]:59067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4zf-0007Fl-TG
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:10:04 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:19157)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4zZ-0007F7-Kh
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:09:58 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 189A69CC60
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:05 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 1/9] gnu: java-openjfx-build: Add helpful patch.
Date: Sat, 30 May 2020 19:09:43 +0200
Message-Id: <20200530170951.1649-1-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-jdk_version.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 ++-
 .../java-openjfx-build-jdk_version.patch      | 27 +++++++++++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-jdk_version.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 768943a67a..cbf0a20a9e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1110,6 +1110,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-apache-ivy-port-to-latest-bouncycastle.patch	\
   %D%/packages/patches/java-commons-collections-fix-java8.patch \
   %D%/packages/patches/java-jeromq-fix-tests.patch		\
+  %D%/packages/patches/java-openjfx-build-jdk_version.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 b12c3ca95c..d569ed57d6 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2499,7 +2499,8 @@ new Date();"))
                   #t))
               (sha256
                (base32
-                "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
+                "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
+              (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
diff --git a/gnu/packages/patches/java-openjfx-build-jdk_version.patch b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
new file mode 100644
index 0000000000..7be954467a
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
@@ -0,0 +1,27 @@
+Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
+
+Icedtea contains guix in its version, so build.gradle failes to run. Openjfx
+packaging is not trivial, so you will probably need to try build it with
+gradlew.
+
+---
+ build.gradle | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/build.gradle b/build.gradle
+index df82f63..2c626cd 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -742,9 +742,9 @@ try {
+     if (inStream.readLine() != null) {
+         String v = inStream.readLine();
+         if (v != null) {
+-            int ib = v.indexOf(" (build ");
++            int ib = v.indexOf(" (guix build ");
+             if (ib != -1) {
+-                String ver = v.substring(ib + 8, v.size() - 1);
++                String ver = v.substring(ib + 13, v.size() - 1);
+
+                 defineProperty("jdkRuntimeVersion", ver)
+                 defineProperty("jdkVersion", jdkRuntimeVersion.split("-")[0])
+2.24.1
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:10:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:09:59 2020
Received: from localhost ([127.0.0.1]:59064 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4zf-0007Fj-IP
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:09:59 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53353)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4za-0007FH-QO
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:09:57 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 5D3A09D0EE
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:06 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 6/9] gnu: java-openjfx-swt: Add new variable.
Date: Sat, 30 May 2020 19:09:48 +0200
Message-Id: <20200530170951.1649-6-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-swt): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f124062035..f8d47d7eed 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3218,6 +3218,19 @@ distribution.")))
     (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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 17:09:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:09:55 2020
Received: from localhost ([127.0.0.1]:59061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4zb-0007FK-B4
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:09:55 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:41735)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4zZ-0007F6-Lk
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 13:09:54 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 454D99CCD1
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:39:05 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v3 2/9] gnu: java-openjfx-build: Fix indentation.
Date: Sat, 30 May 2020 19:09:44 +0200
Message-Id: <20200530170951.1649-2-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530170951.1649-1-levenson@HIDDEN>
References: <20200530170951.1649-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Change the indentation
  of the uri dirictive.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d569ed57d6..43f0f37b91 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2486,10 +2486,10 @@ new Date();"))
     (source (origin
               (method hg-fetch)
               (uri (hg-reference
-                     (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
-                     (changeset (string-append
-                                  (string-join (string-split version #\.) "u")
-                                  "-ga"))))
+                    (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
+                    (changeset (string-append
+                                (string-join (string-split version #\.) "u")
+                                "-ga"))))
               (file-name (string-append name "-" version "-checkout"))
               (modules '((guix build utils)))
               (snippet
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:45:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:45:24 2020
Received: from localhost ([127.0.0.1]:59023 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4br-0006dT-PZ
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:24 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:32798)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4bp-0006dL-RX
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:22 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 2CC1D9CC47;
 Sat, 30 May 2020 16:14:32 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#41360] [PATCH 09/12] gnu: java-openjfx-web: Add new variable.
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-9-levenson@HIDDEN> <87tv0668us.fsf@HIDDEN>
Date: Sat, 30 May 2020 18:45:19 +0200
Message-ID: <87wo4t1ie8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Alexey Abramov <levenson@HIDDEN> skribis:
>
>> ---
>>  gnu/packages/java.scm | 165 ++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 165 insertions(+)
>
> Please add a commit log.
>
> [...]
>
>> +         (add-after 'build 'generate-headers
>> +           (lambda* (#:key inputs #:allow-other-keys)
>
> Could you add a comment explaining what this phase does and why we=E2=80=
=99re
> doing all this?  (Same for the other phases.)

Done.

>
>> +             (let* ((module (string-append (getcwd) "/modules/web"))
>> +                    (classes (string-append module "/build/classes/java=
/main"))
>> +                    (web-generated-headers (string-append module "/buil=
d/generated-src/headers"))
>> +                    (web-generated-classes '("com.sun.webkit.ContextMen=
u"
>> +                                             "com.sun.webkit.ContextMen=
uItem"
>> +                                             "com.sun.webkit.CursorMana=
ger"
>
> Perhaps add a comment explaining how you obtained this list of classes
> so that our future selves know how to update it.
>
> Since this is a Web thing, could you check whether it contains pre-built
> (=E2=80=9Cminified=E2=80=9D) JavaScript?  If it does, that=E2=80=99s a pr=
oblem because we
> generally provide only software built from source.

We build not only a web component here, but webkit as well. Webkit requires=
 some extra 3rd party libraries icu, libxml, libxslt and sqlite which are a=
lready in openjfx source bundle. We also build them now.

One thing to note here, I have tested openjfx only with davmail in order to=
 make oauth2 works. There is one exception during the authorization. When o=
auth accepts your password and waits for you to approve from another device=
, it changes the form and tries to shadow some captions, and those captions=
 just don't show up during that period of time. Don't know what to do here.=
 I am not a java developer, so probably it requires more testing. I was pla=
nning to talk about on openjfx mailing list, but time didn't let me.

--8<---------------cut here---------------start------------->8---
Error: CPU/SIMD peer not found for: Blend_SRC_IN due to error: com.sun.scen=
ario.effect.impl.sw.sse.SSEBlend_SRC_INPeer
java.lang.RuntimeException: Could not create peer  Blend_SRC_IN for rendere=
r com.sun.scenario.effect.impl.prism.sw.PSWRenderer@6218eb01
	at com.sun.scenario.effect.impl.Renderer.getPeerInstance(Unknown Source)
	at com.sun.scenario.effect.CoreEffect.getPeer(Unknown Source)
	at com.sun.scenario.effect.CoreEffect.getPeer(Unknown Source)
	at com.sun.scenario.effect.CoreEffect.filterImageDatas(Unknown Source)
	at com.sun.scenario.effect.Blend.filterImageDatas(Unknown Source)
	at com.sun.scenario.effect.FilterEffect.filter(Unknown Source)
	at com.sun.scenario.effect.impl.prism.PrEffectHelper.render(Unknown Source)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext$ClipLayer.render(Unk=
nown Source)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.renderLayer(Unknown =
Source)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.restoreStateInternal=
(Unknown Source)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.restoreState(Unknown=
 Source)
	at com.sun.webkit.graphics.GraphicsDecoder.decode(Unknown Source)
	at com.sun.webkit.graphics.WCRenderQueue.decode(Unknown Source)
	at com.sun.webkit.WebPage.paint2GC(Unknown Source)
	at com.sun.webkit.WebPage.paint(Unknown Source)
	at com.sun.javafx.sg.prism.web.NGWebView.renderContent(Unknown Source)
	at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
	at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
	at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
	at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
	at com.sun.javafx.tk.quantum.ViewPainter.doPaint(Unknown Source)
	at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(Unknown Source)
	at com.sun.javafx.tk.quantum.UploadingPainter.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at com.sun.javafx.tk.RenderJob.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja=
va:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j=
ava:624)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown =
Source)
	at java.lang.Thread.run(Thread.java:748)
--8<---------------cut here---------------end--------------->8---

--
Alexey




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:45:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:45:17 2020
Received: from localhost ([127.0.0.1]:59020 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4bl-0006d8-GB
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:17 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:32793)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4bi-0006cz-L8
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:15 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 82F829CC40;
 Sat, 30 May 2020 16:14:21 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#41360] [PATCH 03/12] gnu: java-openjfx-graphics: Implement a
 complete compilation.
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-3-levenson@HIDDEN> <878shi7no2.fsf@HIDDEN>
Date: Sat, 30 May 2020 18:45:08 +0200
Message-ID: <874krx2wyz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Alexey Abramov <levenson@HIDDEN> skribis:
>
>> ---
>>  gnu/packages/java.scm | 643 +++++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 635 insertions(+), 8 deletions(-)
>
> Please add a commit log.
>
>> +              (java-aux-class?
>> +               (lambda (class)
>> +                 (string-match "\\$[0-9]+.class" class)))
>
> Probably =E2=80=9C\\.class=E2=80=9D instead of =E2=80=9C.class=E2=80=9D?

Ah, that sneaky dot. Thanks!

>
>> +           (add-after 'chdir-to-a-module-directory 'compile-prism-compi=
lers
>> +             (lambda _
>
> Maybe add a comment explaining why this phase is necessary.

Well, you know, I managed to eliminate it. Thanks!

>
>> +               (let ((prism-compilers-classes "build/classes/jsl-compil=
ers/prism")
>> +                     (prism-src "src/main/jsl-prism/"))
>> +                 (mkdir-p prism-compilers-classes)
>> +                 (apply invoke `("javac"
>> +                                 "-d" ,prism-compilers-classes
>> +                                 ,@javac/h-flags
>> +                                 ,@(find-files prism-src "\\.java"))))
>
> This can be shortened as:
>
>   (apply invoke "javac" "-d" prism-compilers-classes
>          (append javac/h-flags (find-files prism-src "\\.java")))
>
> These two comments apply to the other phases too.
>
> More generally, why are there so many phases?  How do people normally
> build it?  Gradle?
>
> Would it make sense to factorize helpers in a new (gnu build
> java-openjfx) module or similar?


You are right, javafx builds with Gradel. I basically replicated gradle
stages, by inspecting ./gradlew build ... --info

The reason I didn't start building any helpers is because OpenJFX 8u and Op=
enJFX 9u or later use different instuctions as it states here [1]. I don't =
know if these helpers will apply to 9u, also having a (gnu build gradle) wo=
uld eliminate the need in helpers as well. In any case I think it won't be =
a problem to do that with a second iteration of openjfx build.

--
Alexey

Footnotes:

[1] https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX+8u




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:45:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:45:06 2020
Received: from localhost ([127.0.0.1]:59017 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4ba-0006cg-7t
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:06 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:27904)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4bV-0006bs-D6
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:05 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 84CD99CC41;
 Sat, 30 May 2020 16:14:12 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#41360] [PATCH 01/12] gnu: java-openjfx-build: Add helpful
 patch.
References: <20200517132829.1553311-1-levenson@HIDDEN>
 <20200517135138.1651512-1-levenson@HIDDEN> <87k1127ny7.fsf@HIDDEN>
Date: Sat, 30 May 2020 18:44:56 +0200
Message-ID: <87blm52wzb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi Alexey,
>
> Thanks for the patch series!
>
> Alexey Abramov <levenson@HIDDEN> skribis:
>
>> * gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
>> * gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch: Ne=
w file.
>> * gnu/local.mk (dist_patch_DATA): Add it.
>
> [...]
>
>> +++ b/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch
>> @@ -0,0 +1,37 @@
>
> Could you shorten this file name a bit?  (=E2=80=98guix lint=E2=80=99 pro=
bably complains.)

Sure. By the way it complains on other derrived packages like java-openjfx-=
base which inherits java-openjfx-build.

/home/levenson/factory/guix/gnu/packages/java.scm:2486:12: java-openjfx-bui=
ld@HIDDEN: source not archived on Software Heritage

/home/levenson/factory/guix/gnu/packages/java.scm:2533:2: java-openjfx-base=
@8.202: file names of patches should start with the package name
/home/levenson/factory/guix/gnu/packages/java.scm:2537:0: java-openjfx-base=
@8.202: line 2537 is way too long (111 characters)
/home/levenson/factory/guix/gnu/packages/java.scm:2552:0: java-openjfx-base=
@8.202: line 2552 is way too long (99 characters)
/home/levenson/factory/guix/gnu/packages/java.scm:2533:2: java-openjfx-base=
@8.202: source not archived on Software Heritage

>
>> +From d156313340d3edcd78751ea8ed5e66c7668275c3 Mon Sep 17 00:00:00 2001
>> +From: Alexey Abramov <levenson@HIDDEN>
>> +Date: Sun, 8 Mar 2020 20:07:22 +0100
>> +Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
>
> In general I think you can omit the first three lines and just keep the
> subject.

Ah, great.

>
>> +Icedtea contains guix in its version, so build.gradle failes to run. Op=
enjfx
>> +packaging is not trivial, so you will probably need to try build it with
>> +gradlew.
>
> Otherwise LGTM.

--
Alexey




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:42:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:42:08 2020
Received: from localhost ([127.0.0.1]:59008 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4Yf-0006XZ-4b
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:42:08 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:33012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YD-0006UR-Gb
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:42 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id A5F719D166
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:49 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 8/9] gnu: java-openjfx-build: Prepare a patch to build
 openjfx-web.
Date: Sat, 30 May 2020 18:41:22 +0200
Message-Id: <20200530164123.30557-8-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 +-
 .../java-openjfx-build-web-xlocale.h.patch    | 52 +++++++++++++++++++
 3 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-xlocale.h.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e15554f1c2..71d7079134 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1112,6 +1112,7 @@ dist_patch_DATA =						\
   %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-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 ec9e24b8d3..f8a5b71a48 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2502,7 +2502,8 @@ new Date();"))
                (base32
                 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
               (patches (search-patches "java-openjfx-build-jdk_version.patch"
-                                       "java-openjfx-build-swing-JFXPanel-JDK8.patch"))))
+                                       "java-openjfx-build-swing-JFXPanel-JDK8.patch"
+                                       "java-openjfx-build-web-xlocale.h.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
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.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:42:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:42:05 2020
Received: from localhost ([127.0.0.1]:58999 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YU-0006WB-U9
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:42:05 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:33000)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YB-0006UI-GV
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:41 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 118999CE92
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:47 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 3/9] gnu: java-openjfx-graphics: Implement a complete
 compilation.
Date: Sat, 30 May 2020 18:41:17 +0200
Message-Id: <20200530164123.30557-3-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-graphics): Add stages to build
  libdecora_sse, prism_common, glassgtk2, iio, prism_sw, prism_es2,
  font_freetype, glassgtk3, font, font_pango and glass libraries.

All the steps were taken by inspecting ./gradlew build --info result.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 642 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 634 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 43f0f37b91..9d73d9a7e8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -56,6 +56,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gcc)
   #: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)
@@ -2567,16 +2568,641 @@ distribution.")))
     (arguments
      `(#:jar-name "java-openjfx-graphics.jar"
        #:source-dir "modules/graphics/src/main/java"
-       #:tests? #f; require X
-       #:test-dir "modules/graphics/src/test"))
+       #: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
+       (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" "-Werror=implicit-function-declaration"))
+              (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
+
+           (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))
+
+           ;; XX: Description can be found in build.gradle:1429. Currently
+           ;; there is no sdk creation step.
+           ;;
+           ;; 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
+     `(("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)))
-    (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.")))
+       ("java-swt" ,java-swt)))))
 
 (define-public java-openjfx-media
   (package (inherit java-openjfx-build)
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:41:54 2020
Received: from localhost ([127.0.0.1]:58997 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YN-0006Vx-Ie
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:54 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:33004)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YB-0006UJ-NB
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:41 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 815239CFFC
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:47 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 4/9] gnu: java-openjfx-build: Fix openjfx-swing component
 build for JDKu8
Date: Sat, 30 May 2020 18:41:18 +0200
Message-Id: <20200530164123.30557-4-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 +-
 ...va-openjfx-build-swing-JFXPanel-JDK8.patch | 60 +++++++++++++++++++
 3 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-swing-JFXPanel-JDK8.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cbf0a20a9e..e15554f1c2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1111,6 +1111,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-commons-collections-fix-java8.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-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 9d73d9a7e8..938fc0695c 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2501,7 +2501,8 @@ new Date();"))
               (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"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
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
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:41:47 2020
Received: from localhost ([127.0.0.1]:58995 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YJ-0006Vl-7M
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:47 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:32996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YB-0006UG-GQ
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:39 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 9E9F89CC41
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:46 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 1/9] gnu: java-openjfx-build: Add helpful patch.
Date: Sat, 30 May 2020 18:41:15 +0200
Message-Id: <20200530164123.30557-1-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-jdk_version.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 ++-
 .../java-openjfx-build-jdk_version.patch      | 27 +++++++++++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-jdk_version.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 768943a67a..cbf0a20a9e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1110,6 +1110,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-apache-ivy-port-to-latest-bouncycastle.patch	\
   %D%/packages/patches/java-commons-collections-fix-java8.patch \
   %D%/packages/patches/java-jeromq-fix-tests.patch		\
+  %D%/packages/patches/java-openjfx-build-jdk_version.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 b12c3ca95c..d569ed57d6 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2499,7 +2499,8 @@ new Date();"))
                   #t))
               (sha256
                (base32
-                "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
+                "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
+              (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
diff --git a/gnu/packages/patches/java-openjfx-build-jdk_version.patch b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
new file mode 100644
index 0000000000..7be954467a
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
@@ -0,0 +1,27 @@
+Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
+
+Icedtea contains guix in its version, so build.gradle failes to run. Openjfx
+packaging is not trivial, so you will probably need to try build it with
+gradlew.
+
+---
+ build.gradle | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/build.gradle b/build.gradle
+index df82f63..2c626cd 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -742,9 +742,9 @@ try {
+     if (inStream.readLine() != null) {
+         String v = inStream.readLine();
+         if (v != null) {
+-            int ib = v.indexOf(" (build ");
++            int ib = v.indexOf(" (guix build ");
+             if (ib != -1) {
+-                String ver = v.substring(ib + 8, v.size() - 1);
++                String ver = v.substring(ib + 13, v.size() - 1);
+
+                 defineProperty("jdkRuntimeVersion", ver)
+                 defineProperty("jdkVersion", jdkRuntimeVersion.split("-")[0])
+2.24.1
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:41:43 2020
Received: from localhost ([127.0.0.1]:58993 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YI-0006Ve-Nc
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:43 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:33023)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YE-0006Un-1R
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:39 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id E6D979D154
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:49 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 9/9] gnu: java-openjfx-web: Add new variable.
Date: Sat, 30 May 2020 18:41:23 +0200
Message-Id: <20200530164123.30557-9-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-web): New variable.

We build not only a web component here, but webkit as well. Webkit requires
some extra 3rd party libraries icu, libxml, libxslt and sqlite which are
already in openjfx source bundle.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 176 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 176 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f8a5b71a48..0d2f268764 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -50,11 +50,13 @@
   #: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 gettext)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages ghostscript) ;lcms
@@ -74,8 +76,10 @@
   #: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 xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages texinfo)
@@ -3263,6 +3267,178 @@ modern, efficient, and fully featured toolkit for developing rich client
 applications.  This package contains media-related classes for the
 OpenJFX distribution.")))
 
+(define-public java-openjfx-web
+  (package (inherit java-openjfx-build)
+    (name "java-openjfx-web")
+    (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
+       #:modules ((ice-9 match)
+                  (guix build ant-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (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"))))
+
+               (mkdir-p webkit-native-dest)
+               (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
+                       ;; We disable all the updates, and build 3rd-party libs
+                       ;; lice icu, libxml, libxslt and sqlite. Source code
+                       ;; sits modules/web/src/main/native/Source/ThirdPArty.
+                       "--skip-library-update"
+                       "--verbose"
+                       (string-append
+                        "--cmakeargs="
+                        (string-join
+                         (list "-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$")))))
+
+         (add-before 'install 'build-jar
+           (lambda _
+             (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)))))
+
+    (inputs
+     `(("antlr3" ,antlr3)
+       ("java-stringtemplate" ,java-stringtemplate)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("cmake" ,cmake)
+       ;; XX: With current gcc (gcc-7.5) the build breaks on building
+       ;; thirdparty libraries like xslt. c++14 is used to build
+       ;; them. CMAKE_CXX_STANDARD doesn't take any effect here for some
+       ;; reason.
+       ("gcc" ,gcc-5)
+       ("glibc" ,glibc-2.29)
+       ("gtk" ,gtk+-2)
+       ("gtk3" ,gtk+)
+       ("ruby" ,ruby)
+       ("perl" ,perl)
+       ("gperf" ,gperf)
+       ("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (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
     (name "javacc")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:41:42 2020
Received: from localhost ([127.0.0.1]:58991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YI-0006VW-FR
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:42 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:33016)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YD-0006Ug-Dl
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:38 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 1393F9D164
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:48 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 7/9] gnu: java-openjfx-controls: Add new variable.
Date: Sat, 30 May 2020 18:41:21 +0200
Message-Id: <20200530164123.30557-7-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-swt): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f8d47d7eed..ec9e24b8d3 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3231,6 +3231,22 @@ distribution.")))
     (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)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:41:42 2020
Received: from localhost ([127.0.0.1]:58989 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YI-0006VK-7R
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:42 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:33012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YC-0006UR-Ps
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:37 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 5CD3A9D154
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:48 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 6/9] gnu: java-openjfx-swt: Add new variable.
Date: Sat, 30 May 2020 18:41:20 +0200
Message-Id: <20200530164123.30557-6-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-swing): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f124062035..f8d47d7eed 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3218,6 +3218,19 @@ distribution.")))
     (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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:41:42 2020
Received: from localhost ([127.0.0.1]:58987 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YH-0006VI-V4
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:42 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:33008)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YC-0006UK-6g
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:36 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id BE8929D0EE
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:47 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 5/9] gnu: java-openjfx-swing: Add new variable.
Date: Sat, 30 May 2020 18:41:19 +0200
Message-Id: <20200530164123.30557-5-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-graphics): New variable.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 938fc0695c..f124062035 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3205,6 +3205,19 @@ distribution.")))
      `(("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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:41:36 2020
Received: from localhost ([127.0.0.1]:58979 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4YC-0006UX-O8
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:36 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:15983)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jf4YB-0006UF-Gn
 for 41360 <at> debbugs.gnu.org; Sat, 30 May 2020 12:41:35 -0400
Received: from delta (92-109-1-225.cable.dynamic.v4.ziggo.nl [92.109.1.225])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id D7DF59CC47
 for <41360 <at> debbugs.gnu.org>; Sat, 30 May 2020 16:10:46 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH v2 2/9] gnu: java-openjfx-build: Fix indentation.
Date: Sat, 30 May 2020 18:41:16 +0200
Message-Id: <20200530164123.30557-2-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200530164123.30557-1-levenson@HIDDEN>
References: <20200530164123.30557-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/java.scm (java-openjfx-build)[source]: Change the indentation
  of the uri dirictive.

Signed-off-by: Alexey Abramov <levenson@HIDDEN>
---
 gnu/packages/java.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d569ed57d6..43f0f37b91 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2486,10 +2486,10 @@ new Date();"))
     (source (origin
               (method hg-fetch)
               (uri (hg-reference
-                     (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
-                     (changeset (string-append
-                                  (string-join (string-split version #\.) "u")
-                                  "-ga"))))
+                    (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
+                    (changeset (string-append
+                                (string-join (string-split version #\.) "u")
+                                "-ga"))))
               (file-name (string-append name "-" version "-checkout"))
               (modules '((guix build utils)))
               (snippet
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 23 May 2020 14:09:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 10:09:56 2020
Received: from localhost ([127.0.0.1]:35236 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcUqa-0001VI-IY
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 10:09:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcUqZ-0001V6-5m
 for 41360 <at> debbugs.gnu.org; Sat, 23 May 2020 10:09:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43508)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcUqT-0005FG-VD; Sat, 23 May 2020 10:09:49 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52244 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcUqT-0007jl-Fv; Sat, 23 May 2020 10:09:49 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH 09/12] gnu: java-openjfx-web: Add new variable.
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-9-levenson@HIDDEN>
Date: Sat, 23 May 2020 16:09:47 +0200
In-Reply-To: <20200517135138.1651512-9-levenson@HIDDEN> (Alexey Abramov's
 message of "Sun, 17 May 2020 15:51:38 +0200")
Message-ID: <87tv0668us.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Alexey Abramov <levenson@HIDDEN> skribis:

> ---
>  gnu/packages/java.scm | 165 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 165 insertions(+)

Please add a commit log.

[...]

> +         (add-after 'build 'generate-headers
> +           (lambda* (#:key inputs #:allow-other-keys)

Could you add a comment explaining what this phase does and why we=E2=80=99=
re
doing all this?  (Same for the other phases.)

> +             (let* ((module (string-append (getcwd) "/modules/web"))
> +                    (classes (string-append module "/build/classes/java/=
main"))
> +                    (web-generated-headers (string-append module "/build=
/generated-src/headers"))
> +                    (web-generated-classes '("com.sun.webkit.ContextMenu"
> +                                             "com.sun.webkit.ContextMenu=
Item"
> +                                             "com.sun.webkit.CursorManag=
er"

Perhaps add a comment explaining how you obtained this list of classes
so that our future selves know how to update it.

Since this is a Web thing, could you check whether it contains pre-built
(=E2=80=9Cminified=E2=80=9D) JavaScript?  If it does, that=E2=80=99s a prob=
lem because we
generally provide only software built from source.

Could you send an updated patch series?

Thank you for the hard work!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 23 May 2020 14:05:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 10:05:49 2020
Received: from localhost ([127.0.0.1]:35231 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcUmb-0001PY-0Y
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 10:05:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcUmZ-0001PI-JQ
 for 41360 <at> debbugs.gnu.org; Sat, 23 May 2020 10:05:47 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43470)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcUmU-0004Po-Dy; Sat, 23 May 2020 10:05:42 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52242 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcUmT-0007Se-KP; Sat, 23 May 2020 10:05:42 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH 05/12] gnu: java-openjfx-swing: Add new
 variable.
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-5-levenson@HIDDEN>
Date: Sat, 23 May 2020 16:05:40 +0200
In-Reply-To: <20200517135138.1651512-5-levenson@HIDDEN> (Alexey Abramov's
 message of "Sun, 17 May 2020 15:51:34 +0200")
Message-ID: <87zh9y691n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Alexey Abramov <levenson@HIDDEN> skribis:

> ---
>  gnu/packages/java.scm | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

Please add a commit log.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 23 May 2020 14:05:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 10:05:27 2020
Received: from localhost ([127.0.0.1]:35228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcUmC-0001Os-PM
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 10:05:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52212)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcUm8-0001Ob-0y
 for 41360 <at> debbugs.gnu.org; Sat, 23 May 2020 10:05:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43462)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcUm2-0004FF-S1; Sat, 23 May 2020 10:05:14 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52240 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcUm1-0007Lf-Ix; Sat, 23 May 2020 10:05:14 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH 04/12] gnu: java-openjfx-build: Fix
 openjfx-swing component build for JDKu8
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-4-levenson@HIDDEN>
Date: Sat, 23 May 2020 16:05:12 +0200
In-Reply-To: <20200517135138.1651512-4-levenson@HIDDEN> (Alexey Abramov's
 message of "Sun, 17 May 2020 15:51:33 +0200")
Message-ID: <874ks67nmv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Alexey Abramov <levenson@HIDDEN> skribis:

> * gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
> * gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch:
>   New file.
> * gnu/local.mk (dist_patch_DATA): Add it.

[...]

> +++ b/gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch
> @@ -0,0 +1,63 @@
> +From 173e65937d9e76872df51f7ba39c9d58986dc38f Mon Sep 17 00:00:00 2001
> +From: Alexey Abramov <levenson@HIDDEN>
> +Date: Fri, 3 Jan 2020 01:17:45 +0100
> +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

Same comment as earlier regarding the patch.  :-)

Otherwise LGTM!




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 23 May 2020 14:04:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 10:04:54 2020
Received: from localhost ([127.0.0.1]:35224 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcUlW-0001NS-2r
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 10:04:54 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcUlR-0001NC-6c
 for 41360 <at> debbugs.gnu.org; Sat, 23 May 2020 10:04:41 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43453)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcUlL-00043I-Ry; Sat, 23 May 2020 10:04:31 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52238 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcUlL-0007I1-Bl; Sat, 23 May 2020 10:04:31 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH 03/12] gnu: java-openjfx-graphics: Implement a
 complete compilation.
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-3-levenson@HIDDEN>
Date: Sat, 23 May 2020 16:04:29 +0200
In-Reply-To: <20200517135138.1651512-3-levenson@HIDDEN> (Alexey Abramov's
 message of "Sun, 17 May 2020 15:51:32 +0200")
Message-ID: <878shi7no2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Alexey Abramov <levenson@HIDDEN> skribis:

> ---
>  gnu/packages/java.scm | 643 +++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 635 insertions(+), 8 deletions(-)

Please add a commit log.

> +              (java-aux-class?
> +               (lambda (class)
> +                 (string-match "\\$[0-9]+.class" class)))

Probably =E2=80=9C\\.class=E2=80=9D instead of =E2=80=9C.class=E2=80=9D?

> +           (add-after 'chdir-to-a-module-directory 'compile-prism-compil=
ers
> +             (lambda _

Maybe add a comment explaining why this phase is necessary.

> +               (let ((prism-compilers-classes "build/classes/jsl-compile=
rs/prism")
> +                     (prism-src "src/main/jsl-prism/"))
> +                 (mkdir-p prism-compilers-classes)
> +                 (apply invoke `("javac"
> +                                 "-d" ,prism-compilers-classes
> +                                 ,@javac/h-flags
> +                                 ,@(find-files prism-src "\\.java"))))

This can be shortened as:

  (apply invoke "javac" "-d" prism-compilers-classes
         (append javac/h-flags (find-files prism-src "\\.java")))

These two comments apply to the other phases too.

More generally, why are there so many phases?  How do people normally
build it?  Gradle?

Would it make sense to factorize helpers in a new (gnu build
java-openjfx) module or similar?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 23 May 2020 13:59:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 09:59:06 2020
Received: from localhost ([127.0.0.1]:35220 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcUg6-0007Xk-E0
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 09:59:06 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcUg4-0007X5-W8
 for 41360 <at> debbugs.gnu.org; Sat, 23 May 2020 09:59:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43374)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcUfz-0002rt-M9; Sat, 23 May 2020 09:58:59 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52236 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcUfy-00018u-7d; Sat, 23 May 2020 09:58:58 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH 02/12] gnu: java-openjfx-build: Fix
 indentation.
References: <20200517135138.1651512-1-levenson@HIDDEN>
 <20200517135138.1651512-2-levenson@HIDDEN>
Date: Sat, 23 May 2020 15:58:57 +0200
In-Reply-To: <20200517135138.1651512-2-levenson@HIDDEN> (Alexey Abramov's
 message of "Sun, 17 May 2020 15:51:31 +0200")
Message-ID: <87ftbq7nxa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Alexey Abramov <levenson@HIDDEN> skribis:

> ---
>  gnu/packages/java.scm | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Please add a commit log like you did for some of the other patches.
Otherwise LGTM!




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 23 May 2020 13:58:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 09:58:45 2020
Received: from localhost ([127.0.0.1]:35216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcUff-0007Wd-GO
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 09:58:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcUfa-0007WM-7y
 for 41360 <at> debbugs.gnu.org; Sat, 23 May 2020 09:58:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43363)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcUfU-0002oE-QP; Sat, 23 May 2020 09:58:28 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52234 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcUfS-0000Xi-56; Sat, 23 May 2020 09:58:27 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Alexey Abramov <levenson@HIDDEN>
Subject: Re: [bug#41360] [PATCH 01/12] gnu: java-openjfx-build: Add helpful
 patch.
References: <20200517132829.1553311-1-levenson@HIDDEN>
 <20200517135138.1651512-1-levenson@HIDDEN>
Date: Sat, 23 May 2020 15:58:24 +0200
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN> (Alexey Abramov's
 message of "Sun, 17 May 2020 15:51:30 +0200")
Message-ID: <87k1127ny7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41360
Cc: 41360 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Alexey,

Thanks for the patch series!

Alexey Abramov <levenson@HIDDEN> skribis:

> * gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
> * gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch: New=
 file.
> * gnu/local.mk (dist_patch_DATA): Add it.

[...]

> +++ b/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch
> @@ -0,0 +1,37 @@

Could you shorten this file name a bit?  (=E2=80=98guix lint=E2=80=99 proba=
bly complains.)

> +From d156313340d3edcd78751ea8ed5e66c7668275c3 Mon Sep 17 00:00:00 2001
> +From: Alexey Abramov <levenson@HIDDEN>
> +Date: Sun, 8 Mar 2020 20:07:22 +0100
> +Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME

In general I think you can omit the first three lines and just keep the
subject.

> +Icedtea contains guix in its version, so build.gradle failes to run. Ope=
njfx
> +packaging is not trivial, so you will probably need to try build it with
> +gradlew.

Otherwise LGTM.




Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:42 2020
Received: from localhost ([127.0.0.1]:42687 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJia-0008K3-49
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:42 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59933)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJiE-0008IR-1M
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:21 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 1CCB29CECB
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:30 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 08/12] gnu: java-openjfx-build: Prepare a patch to build
 openjfx-web.
Date: Sun, 17 May 2020 15:51:37 +0200
Message-Id: <20200517135138.1651512-8-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-web-Check-xlocale.h-header-file.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 +-
 ...uild-web-Check-xlocale.h-header-file.patch | 55 +++++++++++++++++++
 3 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-Check-xlocale.h-header-file.patch


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0008-gnu-java-openjfx-build-Prepare-a-patch-to-build-open.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0008-gnu-java-openjfx-build-Prepare-a-patch-to-build-open.patch"

diff --git a/gnu/local.mk b/gnu/local.mk
index eaaa54e6f8..591c7c9d46 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1108,6 +1108,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-jeromq-fix-tests.patch		\
   %D%/packages/patches/java-openjfx-build-get_guix_jdk_version.patch    \
   %D%/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch     \
+  %D%/packages/patches/java-openjfx-build-web-Check-xlocale.h-header-file.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 c28c8450b1..ccf347be4c 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2502,7 +2502,8 @@ new Date();"))
                (base32
                 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
               (patches (search-patches "java-openjfx-build-get_guix_jdk_version.patch"
-                                       "java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch"))))
+                                       "java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch"
+                                       "java-openjfx-build-web-Check-xlocale.h-header-file.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
diff --git a/gnu/packages/patches/java-openjfx-build-web-Check-xlocale.h-header-file.patch b/gnu/packages/patches/java-openjfx-build-web-Check-xlocale.h-header-file.patch
new file mode 100644
index 0000000000..a5cb9730e4
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-web-Check-xlocale.h-header-file.patch
@@ -0,0 +1,55 @@
+From 95fe8463a3283f0f2c72fcf3416ebfac095688e5 Mon Sep 17 00:00:00 2001
+From: Alexey Abramov <levenson@HIDDEN>
+Date: Sun, 9 Feb 2020 18:31:26 +0100
+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

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:40 2020
Received: from localhost ([127.0.0.1]:42685 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJiW-0008Jr-IX
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:40 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59917)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJiC-0008IF-Oa
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:20 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id A03749CE85
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:23 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 04/12] gnu: java-openjfx-build: Fix openjfx-swing component
 build for JDKu8
Date: Sun, 17 May 2020 15:51:33 +0200
Message-Id: <20200517135138.1651512-4-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 +-
 ...ld-swing-compile-JFXPanel-with-JDK-8.patch | 63 +++++++++++++++++++
 3 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0004-gnu-java-openjfx-build-Fix-openjfx-swing-component-b.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0004-gnu-java-openjfx-build-Fix-openjfx-swing-component-b.patch"

diff --git a/gnu/local.mk b/gnu/local.mk
index ad0ad930ad..eaaa54e6f8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1107,6 +1107,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-commons-collections-fix-java8.patch \
   %D%/packages/patches/java-jeromq-fix-tests.patch		\
   %D%/packages/patches/java-openjfx-build-get_guix_jdk_version.patch    \
+  %D%/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.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 4b83e963ea..e38e691ee5 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2501,7 +2501,8 @@ new Date();"))
               (sha256
                (base32
                 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
-              (patches (search-patches "java-openjfx-build-get_guix_jdk_version.patch"))))
+              (patches (search-patches "java-openjfx-build-get_guix_jdk_version.patch"
+                                       "java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
diff --git a/gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch b/gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch
new file mode 100644
index 0000000000..363ce9509b
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch
@@ -0,0 +1,63 @@
+From 173e65937d9e76872df51f7ba39c9d58986dc38f Mon Sep 17 00:00:00 2001
+From: Alexey Abramov <levenson@HIDDEN>
+Date: Fri, 3 Jan 2020 01:17:45 +0100
+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

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:36 2020
Received: from localhost ([127.0.0.1]:42683 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJiV-0008Jj-Gj
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:36 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59937)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJiE-0008IY-9s
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:19 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 46BC19CF2D
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:30 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 09/12] gnu: java-openjfx-web: Add new variable.
Date: Sun, 17 May 2020 15:51:38 +0200
Message-Id: <20200517135138.1651512-9-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 gnu/packages/java.scm | 165 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 165 insertions(+)


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0009-gnu-java-openjfx-web-Add-new-variable.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0009-gnu-java-openjfx-web-Add-new-variable.patch"

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index ccf347be4c..7e477d082e 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -50,11 +50,13 @@
   #: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 gettext)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages ghostscript) ;lcms
@@ -74,8 +76,10 @@
   #: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 xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages texinfo)
@@ -3264,6 +3268,167 @@ modern, efficient, and fully featured toolkit for developing rich client
 applications.  This package contains media-related classes for the
 OpenJFX distribution.")))
 
+(define-public java-openjfx-web
+  (package (inherit java-openjfx-build)
+    (name "java-openjfx-web")
+    (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
+       #:modules ((ice-9 match)
+                  (guix build ant-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((module (string-append (getcwd) "/modules/web"))
+                    (classes (string-append module "/build/classes/java/main")))
+               (invoke "ant" "compile" (string-append "-Dclasses.dir=" classes)))
+             #t))
+         (add-after 'build 'generate-headers
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((module (string-append (getcwd) "/modules/web"))
+                    (classes (string-append module "/build/classes/java/main"))
+                    (web-generated-headers (string-append module "/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"))))
+
+               (mkdir-p webkit-native-dest)
+               (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"
+                       "--verbose"
+                       (string-append
+                        "--cmakeargs="
+                        (string-join
+                         (list "-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$")))))
+
+         (add-before 'install 'build-jar
+           (lambda _
+             (let* ((module (string-append (getcwd) "/modules/web"))
+                    (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)))))
+    (inputs
+     `(("antlr3" ,antlr3)
+       ("java-stringtemplate" ,java-stringtemplate)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("cmake" ,cmake)
+       ("gcc" ,gcc)
+       ("gtk" ,gtk+-2)
+       ("gtk3" ,gtk+)
+       ("ruby" ,ruby)
+       ("perl" ,perl)
+       ("gperf" ,gperf)
+       ("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (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
     (name "javacc")

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:35 2020
Received: from localhost ([127.0.0.1]:42681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJiJ-0008JQ-CK
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:35 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59911)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJi7-0008Hw-Dh
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:19 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 07B989CE5D
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:22 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 03/12] gnu: java-openjfx-graphics: Implement a complete
 compilation.
Date: Sun, 17 May 2020 15:51:32 +0200
Message-Id: <20200517135138.1651512-3-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 gnu/packages/java.scm | 643 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 635 insertions(+), 8 deletions(-)


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0003-gnu-java-openjfx-graphics-Implement-a-complete-compi.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0003-gnu-java-openjfx-graphics-Implement-a-complete-compi.patch"

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index b5757217dd..4b83e963ea 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -56,6 +56,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gcc)
   #: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)
@@ -2567,16 +2568,642 @@ distribution.")))
     (arguments
      `(#:jar-name "java-openjfx-graphics.jar"
        #:source-dir "modules/graphics/src/main/java"
-       #:tests? #f; require X
-       #:test-dir "modules/graphics/src/test"))
+       #: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
+       (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" "-Werror=implicit-function-declaration"))
+              (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
+
+           (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))
+
+           (add-after 'build 'chdir-to-a-module-directory
+             (lambda _
+               (chdir (string-append (getcwd) "/modules/graphics"))
+               #t))
+
+           (add-after 'chdir-to-a-module-directory 'compile-prism-compilers
+             (lambda _
+               (let ((prism-compilers-classes "build/classes/jsl-compilers/prism")
+                     (prism-src "src/main/jsl-prism/"))
+                 (mkdir-p prism-compilers-classes)
+                 (apply invoke `("javac"
+                                 "-d" ,prism-compilers-classes
+                                 ,@javac/h-flags
+                                 ,@(find-files prism-src "\\.java"))))
+               #t))
+
+           (add-after 'compile-prism-compilers 'generate-prism-shaders
+             (lambda _
+               (let ((prism-compilers-classes "build/classes/jsl-compilers/prism")
+                     (prism-src "src/main/jsl-prism/")
+                     (prism-gen-src "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" ,file)))
+                           (find-files prism-src "\\.jsl$")))
+               #t))
+
+           (add-after 'generate-prism-shaders 'compile-prism-shaders
+             (lambda _
+               (let* ((classes "build/classes/java/main")
+                      (prism-classes "build/classes/jsl-prism")
+                      (prism-gen-src "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"))
+                                 ,@javac/h-flags
+                                 ,@(find-files prism-gen-shaders-src))))
+               #t))
+
+           (add-after 'compile-prism-shaders 'compile-decora-compilers
+             (lambda _
+               (let ((classes "build/classes/java/main")
+                     (decora-compilers-classes "build/classes/jsl-compilers/decora")
+                     (decora-src "src/main/jsl-decora/"))
+                 (mkdir-p decora-compilers-classes)
+                 (apply invoke `("javac"
+                                 "-d" ,decora-compilers-classes
+                                 "-cp" ,(string-append classes ":" (getenv "CLASSPATH"))
+                                 ,@javac/h-flags
+                                 ,@(find-files decora-src "\\.java"))))
+               #t))
+
+           (add-after 'compile-decora-compilers 'generate-decora-shaders
+             (lambda _
+               (let ((classes "build/classes/java/main")
+                     (decora-classes "build/classes/jsl-decora/")
+                     (decora-compilers-classes "build/classes/jsl-compilers/decora")
+                     (decora-gen-src "build/generated-src/jsl-decora")
+                     (decora-src "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
+                                              ,file-name))))
+                           decora-components)
+                 #t)))
+
+           (add-after 'generate-decora-shaders 'compile-decora-shaders
+             (lambda _
+               (let ((classes "build/classes/java/main")
+                     (decora-classes "build/classes/jsl-decora/")
+                     (decora-gen-src "build/generated-src/jsl-decora"))
+                 (mkdir-p decora-classes)
+                 (apply invoke `("javac"
+                                 "-d" ,decora-classes
+                                 "-cp" ,classes
+                                 ,@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 "build/classes/java/main")
+                      (decora-gen-headers "build/generated-src/headers/jsl-decora")
+                      (decora-gen-src "build/generated-src/jsl-decora")
+                      (decora-native-lib "build/libs/jsl-decora/linux/libdecora_sse.so")
+                      (decora-native-obj "build/native/jsl-decora/linux")
+                      (decora-native-src "src/main/native-decora")
+                      (decora-src "src/main/jsl-decora/")
+                      (decora-classes "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) ":")
+                                 ,@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"
+                                             ,@decora-cc-flags
+                                             "-I" ,decora-gen-headers
+                                             "-I" ,decora-gen-src
+                                             "-I" ,decora-native-src
+                                             "-o" ,(string-append decora-native-obj  "/"
+                                                                  (basename cc ".cc") ".obj")
+                                             ,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
+                                 ,@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 "build/classes/java/main")
+                      (font-gen-headers "build/generated-src/headers/font/linux")
+                      (font-native-lib "build/libs/font/linux/libjavafx_font.so")
+                      (font-native-obj "build/native/font/linux")
+                      (font-native-src "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
+                                 ,@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"
+                                             ,@font-cc-flags
+                                             "-I" ,font-gen-headers
+                                             "-I" ,font-native-src
+                                             "-o" ,(string-append font-native-obj "/"
+                                                                  (basename cc ".c") ".obj")
+                                             ,cc)))
+                           (find-files font-native-src "\\.c$"))
+                 (mkdir-p (dirname font-native-lib))
+                 (apply invoke `("g++"
+                                 "-o" ,font-native-lib
+                                 ,@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 "build/classes/java/main")
+                      ;;
+                      (font-freetype-gen-headers "build/generated-src/headers/fontFreetype/linux")
+                      (font-freetype-native-lib "build/libs/fontFreetype/linux/libjavafx_font_freetype.so")
+                      (font-freetype-native-obj "build/native/fontFreetype/linux")
+                      (font-freetype-native-src "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
+                                 ,@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 "build/classes/java/main")
+                      (font-pango-gen-headers "build/generated-src/headers/fontPango/linux")
+                      (font-pango-native-lib "build/libs/fontPango/linux/libjavafx_font_pango.so")
+                      (font-pango-native-obj "build/native/fontPango/linux")
+                      (font-pango-native-src "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
+                                 ,@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 "build/classes/java/main")
+                      ;; glass
+                      (glass-gen-headers "build/generated-src/headers/glass/linux")
+                      (glass-native-lib "build/libs/glass/linux/libglass.so")
+                      (glass-native-obj "build/native/glass/linux/glass")
+                      (glass-native-src "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 "build/native/glass/linux/glassgtk2")
+                      (glass-gtk2-native-src (dirname glass-native-src))
+                      (glass-gtk2-native-lib "build/libs/glass/linux/libglassgtk2.so")
+                      (glass-gtk2-cc-flags
+                       `(,@cc-flags
+                         "$(pkg-config --cflags gtk+-2.0 gthread-2.0 xtst)"
+                         "-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 "build/native/glass/linux/glassgtk3")
+                      (glass-gtk3-native-src (dirname glass-native-src))
+                      (glass-gtk3-native-lib "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"))
+                                 ,@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 "build/classes/java/main")
+                      (iio-gen-headers "build/generated-src/headers/iio/linux")
+                      (iio-native-lib "build/libs/iio/linux/libjavafx_iio.so")
+                      (iio-native-obj "build/native/iio/linux")
+                      (iio-native-src "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"))
+                                 ,@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 "build/classes/java/main")
+                      (prism-gen-headers "build/generated-src/headers/prism/linux")
+                      (prism-native-lib "build/libs/prism/linux/libprism_common.so")
+                      (prism-native-obj "build/native/prism/linux")
+                      (prism-native-src "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"))
+                                 ,@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 "build/classes/java/main")
+                      (prism-es2-gen-headers "build/generated-src/headers/prismES2/linux")
+                      (prism-es2-native-lib "build/libs/prism/linux/libprism_es2.so")
+                      (prism-es2-native-obj "build/native/prismES2/linux")
+                      (prism-es2-native-src "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"))
+                                 ,@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"
+                                             ,@prism-es2-cc-flags
+                                             "-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")
+                                             ,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 "build/classes/java/main")
+                      (prism-sw-gen-headers "build/generated-src/headers/prismSW/linux")
+                      (prism-sw-native-lib "build/libs/prism/linux/libprism_sw.so")
+                      (prism-sw-native-obj "build/native/prismSW/linux")
+                      (prism-sw-native-src "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"))
+                                 ,@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++"
+                                 ,@prism-sw-link-flags
+                                 "-o" ,prism-sw-native-lib
+                                 ,@(find-files prism-sw-native-obj "\\.obj$")))
+                 #t)))
+
+           (add-before 'check 'chdir-to-root
+             (lambda _
+               (chdir (dirname (dirname (getcwd))))
+               #t))
+
+           (add-after 'chdir-to-root '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 (getcwd) "/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
+     `(("freetype" ,freetype)
+       ("fontconfig" ,fontconfig)
+       ("gcc" ,gcc)
+       ("glib" ,glib)
+       ("zlib" ,zlib)
+       ("gtk" ,gtk+-2)
+       ("gtk3" ,gtk+)
+       ("jpeg" ,libjpeg)
+       ("libxtst" ,libxtst)
+       ("pango" ,pango)
+       ("libpng" ,libpng)
+       ("pkg-config" ,pkg-config)))
     (propagated-inputs
      `(("java-openjfx-base" ,java-openjfx-base)
-       ("java-swt" ,java-swt)))
-    (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.")))
+       ("java-swt" ,java-swt)))))
 
 (define-public java-openjfx-media
   (package (inherit java-openjfx-build)

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:23 2020
Received: from localhost ([127.0.0.1]:42679 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJiJ-0008JO-2h
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:23 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59929)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJiD-0008IQ-TR
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:18 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id E5F6F9CE93
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:29 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 07/12] gnu: java-openjfx-controls: Add new variable.
Date: Sun, 17 May 2020 15:51:36 +0200
Message-Id: <20200517135138.1651512-7-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 gnu/packages/java.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0007-gnu-java-openjfx-controls-Add-new-variable.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0007-gnu-java-openjfx-controls-Add-new-variable.patch"

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index beb84331a3..c28c8450b1 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3232,6 +3232,22 @@ distribution.")))
     (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)
     (name "java-openjfx-media")

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:19 2020
Received: from localhost ([127.0.0.1]:42676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJiE-0008Im-PZ
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:19 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59925)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJiD-0008IP-MH
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:17 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id A11F29CE92
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:29 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 06/12] gnu: java-openjfx-swt: Add new variable.
Date: Sun, 17 May 2020 15:51:35 +0200
Message-Id: <20200517135138.1651512-6-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0006-gnu-java-openjfx-swt-Add-new-variable.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0006-gnu-java-openjfx-swt-Add-new-variable.patch"

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 383a76ca2c..beb84331a3 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3219,6 +3219,19 @@ distribution.")))
     (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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:18 2020
Received: from localhost ([127.0.0.1]:42674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJiE-0008Ik-JH
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:18 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59921)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJiD-0008IN-Cy
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:17 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 31DDB9CE89
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:29 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 05/12] gnu: java-openjfx-swing: Add new variable.
Date: Sun, 17 May 2020 15:51:34 +0200
Message-Id: <20200517135138.1651512-5-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 gnu/packages/java.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0005-gnu-java-openjfx-swing-Add-new-variable.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0005-gnu-java-openjfx-swing-Add-new-variable.patch"

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e38e691ee5..383a76ca2c 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3206,6 +3206,19 @@ distribution.")))
      `(("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-media
   (package (inherit java-openjfx-build)
     (name "java-openjfx-media")

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:16 2020
Received: from localhost ([127.0.0.1]:42667 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJiC-0008I9-7U
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:16 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:59905)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJi6-0008Hp-Qq
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:11 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id A97C29CD79
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:17 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 02/12] gnu: java-openjfx-build: Fix indentation.
Date: Sun, 17 May 2020 15:51:31 +0200
Message-Id: <20200517135138.1651512-2-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200517135138.1651512-1-levenson@HIDDEN>
References: <20200517135138.1651512-1-levenson@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 gnu/packages/java.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0002-gnu-java-openjfx-build-Fix-indentation.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0002-gnu-java-openjfx-build-Fix-indentation.patch"

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 7a1a2f0861..b5757217dd 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2486,10 +2486,10 @@ new Date();"))
     (source (origin
               (method hg-fetch)
               (uri (hg-reference
-                     (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
-                     (changeset (string-append
-                                  (string-join (string-split version #\.) "u")
-                                  "-ga"))))
+                    (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
+                    (changeset (string-append
+                                (string-join (string-split version #\.) "u")
+                                "-ga"))))
               (file-name (string-append name "-" version "-checkout"))
               (modules '((guix build utils)))
               (snippet

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at 41360 <at> debbugs.gnu.org:


Received: (at 41360) by debbugs.gnu.org; 17 May 2020 13:52:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:52:16 2020
Received: from localhost ([127.0.0.1]:42664 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJi7-0008I2-Oh
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:16 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:53062)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJi1-0008Hk-UU
 for 41360 <at> debbugs.gnu.org; Sun, 17 May 2020 09:52:10 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 70C089CC2E
 for <41360 <at> debbugs.gnu.org>; Sun, 17 May 2020 13:21:17 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: 41360 <at> debbugs.gnu.org
Subject: [PATCH 01/12] gnu: java-openjfx-build: Add helpful patch.
Date: Sun, 17 May 2020 15:51:30 +0200
Message-Id: <20200517135138.1651512-1-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------[ mime-boundary-string ]"
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41360
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------[ mime-boundary-string ]
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


* gnu/packages/java.scm (java-openjfx-build)[source]: Use it.
* gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         |  3 +-
 ...a-openjfx-build-get_guix_jdk_version.patch | 37 +++++++++++++++++++
 3 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch


--------------[ mime-boundary-string ]
Content-Type: text/x-patch; name="0001-gnu-java-openjfx-build-Add-helpful-patch.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-gnu-java-openjfx-build-Add-helpful-patch.patch"

diff --git a/gnu/local.mk b/gnu/local.mk
index 118a9e24eb..ad0ad930ad 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1106,6 +1106,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-apache-ivy-port-to-latest-bouncycastle.patch	\
   %D%/packages/patches/java-commons-collections-fix-java8.patch \
   %D%/packages/patches/java-jeromq-fix-tests.patch		\
+  %D%/packages/patches/java-openjfx-build-get_guix_jdk_version.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 a4659240fc..7a1a2f0861 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2499,7 +2499,8 @@ new Date();"))
                   #t))
               (sha256
                (base32
-                "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
+                "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
+              (patches (search-patches "java-openjfx-build-get_guix_jdk_version.patch"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-openjfx.jar"
diff --git a/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch b/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch
new file mode 100644
index 0000000000..4ebdadc671
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch
@@ -0,0 +1,37 @@
+From d156313340d3edcd78751ea8ed5e66c7668275c3 Mon Sep 17 00:00:00 2001
+From: Alexey Abramov <levenson@HIDDEN>
+Date: Sun, 8 Mar 2020 20:07:22 +0100
+Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
+
+Icedtea contains guix in its version, so build.gradle failes to run. Openjfx
+packaging is not trivial, so you will probably need to try build it with
+gradlew.
+
+---
+ build.gradle | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/build.gradle b/build.gradle
+index df82f63..2c626cd 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -742,9 +742,9 @@ try {
+     if (inStream.readLine() != null) {
+         String v = inStream.readLine();
+         if (v != null) {
+-            int ib = v.indexOf(" (build ");
++            int ib = v.indexOf(" (guix build ");
+             if (ib != -1) {
+-                String ver = v.substring(ib + 8, v.size() - 1);
++                String ver = v.substring(ib + 13, v.size() - 1);
+ 
+                 defineProperty("jdkRuntimeVersion", ver)
+                 defineProperty("jdkVersion", jdkRuntimeVersion.split("-")[0])
+@@ -3540,4 +3540,3 @@ compileTargets { t ->
+         }
+     )
+ }
+-
+-- 
+2.24.1
+

--------------[ mime-boundary-string ]--






Information forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 May 2020 13:29:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 09:29:04 2020
Received: from localhost ([127.0.0.1]:42632 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaJLg-0007gV-RJ
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:29:04 -0400
Received: from lists.gnu.org ([209.51.188.17]:48654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <levenson@HIDDEN>) id 1jaJLa-0007gJ-CM
 for submit <at> debbugs.gnu.org; Sun, 17 May 2020 09:28:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36656)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <levenson@HIDDEN>) id 1jaJLa-0002px-6x
 for guix-patches@HIDDEN; Sun, 17 May 2020 09:28:54 -0400
Received: from mx4.mail.mmer.org ([178.22.66.29]:61398)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <levenson@HIDDEN>) id 1jaJLU-00048n-8p
 for guix-patches@HIDDEN; Sun, 17 May 2020 09:28:53 -0400
Received: from delta (unknown [10.147.19.46])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx4.mail.mmer.org (Postfix) with ESMTPSA id 20D239CC49
 for <guix-patches@HIDDEN>; Sun, 17 May 2020 12:57:58 +0000 (UTC)
From: Alexey Abramov <levenson@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 00/12] Package java-openjfx
Date: Sun, 17 May 2020 15:28:29 +0200
Message-Id: <20200517132829.1553311-1-levenson@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=178.22.66.29; envelope-from=levenson@HIDDEN;
 helo=mx4.mail.mmer.org
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 09:28:46
X-ACL-Warn: Detected OS   = FreeBSD 9.x or newer [fuzzy]
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

I am sending a series of patches I have for java-openjfx as a prerequisite to
build davmail. Unfortunately tests are still disabled.

Alexey Abramov (12):
  gnu: java-openjfx-build: Add helpful patch.
  gnu: java-openjfx-build: Fix indentation.
  gnu: java-openjfx-graphics: Implement a complete compilation.
  gnu: java-openjfx-build: Fix openjfx-swing component build for JDKu8
  gnu: java-openjfx-swing: Add new variable.
  gnu: java-openjfx-swt: Add new variable.
  gnu: java-openjfx-controls: Add new variable.
  gnu: java-openjfx-build: Prepare a patch to build openjfx-web.
  gnu: java-openjfx-web: Add new variable.
  gnu: java-openjfx-graphics: Replace deprecated library.
  gnu: java-openjfx-graphics: Fix package build.
  gnu: java-openjfx-web: Fix package build

 gnu/local.mk                                  |   3 +
 gnu/packages/java.scm                         | 872 +++++++++++++++++-
 ...a-openjfx-build-get_guix_jdk_version.patch |  37 +
 ...ld-swing-compile-JFXPanel-with-JDK-8.patch |  63 ++
 ...uild-web-Check-xlocale.h-header-file.patch |  55 ++
 5 files changed, 1017 insertions(+), 13 deletions(-)
 create mode 100644 gnu/packages/patches/java-openjfx-build-get_guix_jdk_version.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch
 create mode 100644 gnu/packages/patches/java-openjfx-build-web-Check-xlocale.h-header-file.patch

--
2.26.2




Acknowledgement sent to Alexey Abramov <levenson@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#41360; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 12 Jun 2020 16:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.