From 42f749145d296d6106634e0104c857a05426f20a Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Tue, 5 Sep 2023 23:40:34 -0400 Subject: perlPackages.Tk: fix build with clang 16 The jpeg `configure` script fails to detect clang as a functioning C compiler because it uses a test with a `main` that returns an implicit `int`, which results in an error with clang 16. --- .../perl-modules/tk-configure-implicit-int-fix.patch | 11 +++++++++++ pkgs/top-level/perl-packages.nix | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/development/perl-modules/tk-configure-implicit-int-fix.patch diff --git a/pkgs/development/perl-modules/tk-configure-implicit-int-fix.patch b/pkgs/development/perl-modules/tk-configure-implicit-int-fix.patch new file mode 100644 index 0000000000000..215bf864cfe49 --- /dev/null +++ b/pkgs/development/perl-modules/tk-configure-implicit-int-fix.patch @@ -0,0 +1,11 @@ +--- a/JPEG/jpeg/configure 2013-11-15 18:50:03.000000000 -0500 ++++ b/JPEG/jpeg/configure 2023-09-05 23:36:12.675151164 -0400 +@@ -623,7 +623,7 @@ + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index e720a70fafc35..35fff6aa5969c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -26585,6 +26585,11 @@ with self; { url = "mirror://cpan/authors/id/S/SR/SREZIC/Tk-804.036.tar.gz"; hash = "sha256-Mqpycaa9/twzMBGbOCXa3dCqS1yTb4StdOq7kyogCl4="; }; + patches = [ + # Fix failing configure test due to implicit int return value of main, which results + # in an error with clang 16. + ../development/perl-modules/tk-configure-implicit-int-fix.patch + ]; makeMakerFlags = [ "X11INC=${pkgs.xorg.libX11.dev}/include" "X11LIB=${pkgs.xorg.libX11.out}/lib" ]; buildInputs = [ pkgs.xorg.libX11 pkgs.libpng ]; doCheck = false; # Expects working X11. -- cgit 1.4.1