From 075d9144f874f778e36962064fa3703ca8bf2eff Mon Sep 17 00:00:00 2001 From: Nikita Gubarkov Date: Sat, 25 Jun 2022 21:36:37 +0300 Subject: [PATCH] openjdk: use system Freetype and Harfbuzz This is needed to avoid duplicate symbols from bundled/system libfontmanager.so and libharfbuzz.so, because this duplication leads to crashes. --- pkgs/development/compilers/openjdk/11.nix | 6 ++++-- pkgs/development/compilers/openjdk/12.nix | 6 ++++-- pkgs/development/compilers/openjdk/13.nix | 6 ++++-- pkgs/development/compilers/openjdk/14.nix | 6 ++++-- pkgs/development/compilers/openjdk/15.nix | 6 ++++-- pkgs/development/compilers/openjdk/16.nix | 6 ++++-- pkgs/development/compilers/openjdk/17.nix | 6 ++++-- pkgs/development/compilers/openjdk/18.nix | 6 ++++-- 8 files changed, 32 insertions(+), 16 deletions(-) diff --git a/pkgs/development/compilers/openjdk/11.nix b/pkgs/development/compilers/openjdk/11.nix index 0dc085d032b3..820469ab8f15 100644 --- a/pkgs/development/compilers/openjdk/11.nix +++ b/pkgs/development/compilers/openjdk/11.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, bash, pkg-config, autoconf, cpio, file, which, unzip -, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 +, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama , libXcursor, libXrandr, fontconfig, openjdk11-bootstrap , setJavaClassPath @@ -27,7 +27,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ - cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib + cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk11-bootstrap ] ++ lib.optionals (!headless && enableGnome2) [ @@ -54,6 +54,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system" diff --git a/pkgs/development/compilers/openjdk/12.nix b/pkgs/development/compilers/openjdk/12.nix index addaa13270d9..a8de9fe43ffc 100644 --- a/pkgs/development/compilers/openjdk/12.nix +++ b/pkgs/development/compilers/openjdk/12.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip -, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 +, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama , libXcursor, libXrandr, fontconfig, openjdk11, fetchpatch , setJavaClassPath @@ -24,7 +24,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ - cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib + cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk11 ] ++ lib.optionals (!headless && enableGnome2) [ @@ -63,6 +63,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system" diff --git a/pkgs/development/compilers/openjdk/13.nix b/pkgs/development/compilers/openjdk/13.nix index 37ff99833784..5b7e87b0ef3a 100644 --- a/pkgs/development/compilers/openjdk/13.nix +++ b/pkgs/development/compilers/openjdk/13.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip -, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 +, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama , libXcursor, libXrandr, fontconfig, openjdk13-bootstrap, fetchpatch , setJavaClassPath @@ -24,7 +24,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ - cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib + cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk13-bootstrap ] ++ lib.optionals (!headless && enableGnome2) [ @@ -63,6 +63,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system" diff --git a/pkgs/development/compilers/openjdk/14.nix b/pkgs/development/compilers/openjdk/14.nix index d4e88f278cd0..1381b0995a76 100644 --- a/pkgs/development/compilers/openjdk/14.nix +++ b/pkgs/development/compilers/openjdk/14.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip -, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 +, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama , libXcursor, libXrandr, fontconfig, openjdk14-bootstrap , setJavaClassPath @@ -24,7 +24,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ - cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib + cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk14-bootstrap ] ++ lib.optionals (!headless && enableGnome2) [ @@ -58,6 +58,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system" diff --git a/pkgs/development/compilers/openjdk/15.nix b/pkgs/development/compilers/openjdk/15.nix index e692de71a10d..6ea1d0b1dd31 100644 --- a/pkgs/development/compilers/openjdk/15.nix +++ b/pkgs/development/compilers/openjdk/15.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip -, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 +, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama , libXcursor, libXrandr, fontconfig, openjdk15-bootstrap , setJavaClassPath @@ -24,7 +24,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip zip file which ]; buildInputs = [ - cpio perl zlib cups freetype alsa-lib libjpeg giflib + cpio perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk15-bootstrap ] ++ lib.optionals (!headless && enableGnome2) [ @@ -58,6 +58,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system" diff --git a/pkgs/development/compilers/openjdk/16.nix b/pkgs/development/compilers/openjdk/16.nix index 3e9ae98f3662..0e1911bb1a70 100644 --- a/pkgs/development/compilers/openjdk/16.nix +++ b/pkgs/development/compilers/openjdk/16.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, fetchFromGitHub, bash, pkg-config, autoconf, cpio -, file, which, unzip, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib +, file, which, unzip, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib , libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst , libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk16-bootstrap , setJavaClassPath @@ -28,7 +28,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ - cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib + cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk16-bootstrap ] ++ lib.optionals (!headless && enableGnome2) [ @@ -65,6 +65,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system" diff --git a/pkgs/development/compilers/openjdk/17.nix b/pkgs/development/compilers/openjdk/17.nix index e9408ba341b5..f49ef7bf553d 100644 --- a/pkgs/development/compilers/openjdk/17.nix +++ b/pkgs/development/compilers/openjdk/17.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, fetchFromGitHub, bash, pkg-config, autoconf, cpio -, file, which, unzip, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib +, file, which, unzip, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib , libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst , libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk17-bootstrap , setJavaClassPath @@ -28,7 +28,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ - cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib + cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk17-bootstrap ] ++ lib.optionals (!headless && enableGnome2) [ @@ -74,6 +74,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system" diff --git a/pkgs/development/compilers/openjdk/18.nix b/pkgs/development/compilers/openjdk/18.nix index 5da52c69f264..5be60eb94875 100644 --- a/pkgs/development/compilers/openjdk/18.nix +++ b/pkgs/development/compilers/openjdk/18.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, fetchFromGitHub, bash, pkg-config, autoconf, cpio -, file, which, unzip, zip, perl, cups, freetype, alsa-lib, libjpeg, giflib +, file, which, unzip, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib , libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst , libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk18-bootstrap , setJavaClassPath @@ -27,7 +27,7 @@ let nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ - cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib + cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk18-bootstrap ] ++ lib.optionals (!headless && enableGnome2) [ @@ -65,6 +65,8 @@ let "--with-version-pre=" "--enable-unlimited-crypto" "--with-native-debug-symbols=internal" + "--with-freetype=system" + "--with-harfbuzz=system" "--with-libjpeg=system" "--with-giflib=system" "--with-libpng=system"