openjfx17: fix withWebKit = true build

Without the change build of `openjfx` (`greenfoot` depend) fails as
https://hydra.nixos.org/build/247689718:

    $ nix build --no-link --impure --expr "with import ./. {}; openjfx17.override { withWebKit  = true; }"
    ...
    /build/source/modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp:108:5: error: 'fprintf' was not declared in this scope; did you mean 'wprintf'?
      108 |     fprintf(stderr, "%s: %zu (%zd) %s\n", label, value, amount, note);
          |     ^~~~~~~
          |     wprintf
This commit is contained in:
Sergei Trofimovich 2024-02-09 09:33:37 +00:00
parent a5d28c9bff
commit d9dacad8a3
2 changed files with 8 additions and 1 deletions

View File

@ -41,6 +41,13 @@ let
dontUseCmakeConfigure = true;
postPatch = ''
# Add missing includes for gcc-13 for webkit build:
sed -e '1i #include <cstdio>' \
-i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \
modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h
'';
config = writeText "gradle.properties" (''
CONF = Release
JDK_HOME = ${openjdk17_headless.home}

View File

@ -16361,7 +16361,7 @@ with pkgs;
hugs = callPackage ../development/interpreters/hugs { };
inherit (javaPackages) openjfx11 openjfx15 openjfx17 openjfx19 openjfx20 openjfx21;
openjfx = pin-to-gcc12-if-gcc13 (openjfx17.override { });
openjfx = openjfx17;
openjdk8-bootstrap = javaPackages.compiler.openjdk8-bootstrap;
openjdk8 = javaPackages.compiler.openjdk8;