Skip to content

Commit 8d16067

Browse files
authored
perlPackages.Tk: fix cross build (NixOS#374088)
2 parents f1cf2b7 + 273d98d commit 8d16067

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pkgs/top-level/perl-packages.nix

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27714,7 +27714,21 @@ with self; {
2771427714
# in an error with clang 16.
2771527715
../development/perl-modules/tk-configure-implicit-int-fix.patch
2771627716
];
27717-
makeMakerFlags = [ "X11INC=${pkgs.xorg.libX11.dev}/include" "X11LIB=${pkgs.xorg.libX11.out}/lib" ];
27717+
postPatch = ''
27718+
substituteInPlace pTk/mTk/additions/imgWindow.c \
27719+
--replace-fail '"X11/Xproto.h"' "<X11/Xproto.h>"
27720+
substituteInPlace PNG/zlib/Makefile.in \
27721+
--replace-fail '$(AR) $@' '$(AR) rc $@'
27722+
substituteInPlace PNG/libpng/scripts/makefile.gcc \
27723+
--replace-fail 'AR_RC = ar rcs' 'AR_RC = ${pkgs.stdenv.cc.targetPrefix}ar rcs'
27724+
substituteInPlace JPEG/jpeg/makefile.cfg \
27725+
--replace-fail 'AR= ar rc' 'AR= ${pkgs.stdenv.cc.targetPrefix}ar rc'
27726+
'';
27727+
makeMakerFlags = [
27728+
"AR=${pkgs.stdenv.cc.targetPrefix}ar"
27729+
"X11INC=${pkgs.xorg.libX11.dev}/include"
27730+
"X11LIB=${pkgs.xorg.libX11.out}/lib"
27731+
];
2771827732
buildInputs = [ pkgs.xorg.libX11 pkgs.libpng ];
2771927733
env = lib.optionalAttrs stdenv.cc.isGNU {
2772027734
NIX_CFLAGS_COMPILE = toString [

0 commit comments

Comments
 (0)