From patchwork Sat May 30 16:41:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22452 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F38DD27BBE3; Sat, 30 May 2020 17:42:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 8909A27BBE1 for ; Sat, 30 May 2020 17:42:12 +0100 (BST) Received: from localhost ([::1]:36866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Ym-0001fc-3B for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:42:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Ye-0001bP-6K for guix-patches@gnu.org; Sat, 30 May 2020 12:42:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Yd-00043l-Ra for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Yd-0006X9-PA for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 1/9] gnu: java-openjfx-build: Add helpful patch. References: <20200517132829.1553311-1-levenson@mmer.org> In-Reply-To: <20200517132829.1553311-1-levenson@mmer.org> Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085690725048 (code B ref 41360); Sat, 30 May 2020 16:42:03 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:47 +0000 Received: from localhost ([127.0.0.1]:58995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YJ-0006Vl-7M for submit@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 ) id 1jf4YB-0006UG-GQ for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:46 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:15 +0200 Message-Id: <20200530164123.30557-1-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 --- 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 From patchwork Sat May 30 16:41:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22450 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0C0B027BBE3; Sat, 30 May 2020 17:42:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id CB52627BBE1 for ; Sat, 30 May 2020 17:42:08 +0100 (BST) Received: from localhost ([::1]:36688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Yi-0001ad-7l for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:42:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Yc-0001a5-8D for guix-patches@gnu.org; Sat, 30 May 2020 12:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Yb-00042y-Vo for guix-patches@gnu.org; Sat, 30 May 2020 12:42:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Yb-0006WY-TU for guix-patches@gnu.org; Sat, 30 May 2020 12:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 2/9] gnu: java-openjfx-build: Fix indentation. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085689724961 (code B ref 41360); Sat, 30 May 2020 16:42:01 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:37 +0000 Received: from localhost ([127.0.0.1]:58979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YC-0006UX-O8 for submit@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 ) id 1jf4YB-0006UF-Gn for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:46 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:16 +0200 Message-Id: <20200530164123.30557-2-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/java.scm (java-openjfx-build)[source]: Change the indentation of the uri dirictive. Signed-off-by: Alexey Abramov --- 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 From patchwork Sat May 30 16:41:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22458 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 31DF427BBE1; Sat, 30 May 2020 17:43:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D294127BBF4 for ; Sat, 30 May 2020 17:43:11 +0100 (BST) Received: from localhost ([::1]:38236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Zj-0002SX-Dd for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:43:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Zb-0002PU-6X for guix-patches@gnu.org; Sat, 30 May 2020 12:43:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Za-0004b6-TY for guix-patches@gnu.org; Sat, 30 May 2020 12:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Za-0006ZC-Rz for guix-patches@gnu.org; Sat, 30 May 2020 12:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 3/9] gnu: java-openjfx-graphics: Implement a complete compilation. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085692525148 (code B ref 41360); Sat, 30 May 2020 16:43:02 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:42:05 +0000 Received: from localhost ([127.0.0.1]:58999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YU-0006WB-U9 for submit@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 ) id 1jf4YB-0006UI-GV for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:47 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:17 +0200 Message-Id: <20200530164123.30557-3-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 --- 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) From patchwork Sat May 30 16:41:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22456 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9734027BBE3; Sat, 30 May 2020 17:42:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id F13D327BBE1 for ; Sat, 30 May 2020 17:42:31 +0100 (BST) Received: from localhost ([::1]:37862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Z5-00026r-IM for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:42:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Ye-0001cJ-IM for guix-patches@gnu.org; Sat, 30 May 2020 12:42:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47459) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Ye-00044R-7U for guix-patches@gnu.org; Sat, 30 May 2020 12:42:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Ye-0006XG-5I for guix-patches@gnu.org; Sat, 30 May 2020 12:42:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 4/9] gnu: java-openjfx-build: Fix openjfx-swing component build for JDKu8 Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:42:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085691525062 (code B ref 41360); Sat, 30 May 2020 16:42:04 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:55 +0000 Received: from localhost ([127.0.0.1]:58997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YN-0006Vx-Ie for submit@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 ) id 1jf4YB-0006UJ-NB for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:47 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:18 +0200 Message-Id: <20200530164123.30557-4-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 --- 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 From patchwork Sat May 30 16:41:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22453 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A821627BBE3; Sat, 30 May 2020 17:42:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 43C7A27BBE1 for ; Sat, 30 May 2020 17:42:09 +0100 (BST) Received: from localhost ([::1]:36692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Yi-0001av-O7 for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:42:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Yc-0001aC-Kc for guix-patches@gnu.org; Sat, 30 May 2020 12:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47454) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Yc-000432-Bf for guix-patches@gnu.org; Sat, 30 May 2020 12:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Yc-0006Wf-93 for guix-patches@gnu.org; Sat, 30 May 2020 12:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 5/9] gnu: java-openjfx-swing: Add new variable. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085690225009 (code B ref 41360); Sat, 30 May 2020 16:42:02 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:42 +0000 Received: from localhost ([127.0.0.1]:58987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YH-0006VI-V4 for submit@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 ) id 1jf4YC-0006UK-6g for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:47 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:19 +0200 Message-Id: <20200530164123.30557-5-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/java.scm (java-openjfx-graphics): New variable. Signed-off-by: Alexey Abramov --- 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") From patchwork Sat May 30 16:41:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22454 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EF0E727BBE3; Sat, 30 May 2020 17:42:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id C23E627BBE1 for ; Sat, 30 May 2020 17:42:16 +0100 (BST) Received: from localhost ([::1]:37344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Yq-0001sU-A0 for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:42:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Yc-0001aI-Vs for guix-patches@gnu.org; Sat, 30 May 2020 12:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Yc-00043M-N3 for guix-patches@gnu.org; Sat, 30 May 2020 12:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Yc-0006Wn-LF for guix-patches@gnu.org; Sat, 30 May 2020 12:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 6/9] gnu: java-openjfx-swt: Add new variable. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085690225021 (code B ref 41360); Sat, 30 May 2020 16:42:02 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:42 +0000 Received: from localhost ([127.0.0.1]:58989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YI-0006VK-7R for submit@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 ) id 1jf4YC-0006UR-Ps for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:48 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:20 +0200 Message-Id: <20200530164123.30557-6-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/java.scm (java-openjfx-swing): New variable. Signed-off-by: Alexey Abramov --- 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") From patchwork Sat May 30 16:41:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22451 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 61E3127BBE3; Sat, 30 May 2020 17:42:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 343EB27BBE1 for ; Sat, 30 May 2020 17:42:12 +0100 (BST) Received: from localhost ([::1]:36824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Yl-0001eV-J1 for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:42:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Yd-0001aS-BW for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Yd-00043Y-2t for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Yd-0006Wu-0x for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 7/9] gnu: java-openjfx-controls: Add new variable. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085690225029 (code B ref 41360); Sat, 30 May 2020 16:42:02 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:42 +0000 Received: from localhost ([127.0.0.1]:58991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YI-0006VW-FR for submit@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 ) id 1jf4YD-0006Ug-Dl for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:48 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:21 +0200 Message-Id: <20200530164123.30557-7-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/java.scm (java-openjfx-swt): New variable. Signed-off-by: Alexey Abramov --- 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") From patchwork Sat May 30 16:41:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22457 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EC61027BBE1; Sat, 30 May 2020 17:43:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 75B3E27BBE3 for ; Sat, 30 May 2020 17:43:21 +0100 (BST) Received: from localhost ([::1]:38870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Zt-0002oo-1M for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:43:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Zb-0002Pa-K0 for guix-patches@gnu.org; Sat, 30 May 2020 12:43:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Zb-0004bc-9m for guix-patches@gnu.org; Sat, 30 May 2020 12:43:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Zb-0006ZJ-7w for guix-patches@gnu.org; Sat, 30 May 2020 12:43:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 8/9] gnu: java-openjfx-build: Prepare a patch to build openjfx-web. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085692825157 (code B ref 41360); Sat, 30 May 2020 16:43:03 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:42:08 +0000 Received: from localhost ([127.0.0.1]:59008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4Yf-0006XZ-4b for submit@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 ) id 1jf4YD-0006UR-Gb for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:49 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:22 +0200 Message-Id: <20200530164123.30557-8-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 --- 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 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 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 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 From patchwork Sat May 30 16:41:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 22455 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1BF1327BBE3; Sat, 30 May 2020 17:42:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 5938227BBE1 for ; Sat, 30 May 2020 17:42:26 +0100 (BST) Received: from localhost ([::1]:37572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4Yz-0001xo-UT for patchwork@mira.cbaines.net; Sat, 30 May 2020 12:42:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Yd-0001an-PI for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Yd-00043h-FC for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Yd-0006X1-D9 for guix-patches@gnu.org; Sat, 30 May 2020 12:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41360] [PATCH v2 9/9] gnu: java-openjfx-web: Add new variable. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 May 2020 16:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41360@debbugs.gnu.org Received: via spool by 41360-submit@debbugs.gnu.org id=B41360.159085690325036 (code B ref 41360); Sat, 30 May 2020 16:42:03 +0000 Received: (at 41360) by debbugs.gnu.org; 30 May 2020 16:41:43 +0000 Received: from localhost ([127.0.0.1]:58993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4YI-0006Ve-Nc for submit@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 ) id 1jf4YE-0006Un-1R for 41360@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@debbugs.gnu.org>; Sat, 30 May 2020 16:10:49 +0000 (UTC) From: Alexey Abramov Date: Sat, 30 May 2020 18:41:23 +0200 Message-Id: <20200530164123.30557-9-levenson@mmer.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200530164123.30557-1-levenson@mmer.org> References: <20200530164123.30557-1-levenson@mmer.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 --- 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")