Skip to content

Commit 273d98d

Browse files
perlPackages.Tk: fix cross build
1 parent d9e9853 commit 273d98d

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
@@ -27685,7 +27685,21 @@ with self; {
2768527685
# in an error with clang 16.
2768627686
../development/perl-modules/tk-configure-implicit-int-fix.patch
2768727687
];
27688-
makeMakerFlags = [ "X11INC=${pkgs.xorg.libX11.dev}/include" "X11LIB=${pkgs.xorg.libX11.out}/lib" ];
27688+
postPatch = ''
27689+
substituteInPlace pTk/mTk/additions/imgWindow.c \
27690+
--replace-fail '"X11/Xproto.h"' "<X11/Xproto.h>"
27691+
substituteInPlace PNG/zlib/Makefile.in \
27692+
--replace-fail '$(AR) $@' '$(AR) rc $@'
27693+
substituteInPlace PNG/libpng/scripts/makefile.gcc \
27694+
--replace-fail 'AR_RC = ar rcs' 'AR_RC = ${pkgs.stdenv.cc.targetPrefix}ar rcs'
27695+
substituteInPlace JPEG/jpeg/makefile.cfg \
27696+
--replace-fail 'AR= ar rc' 'AR= ${pkgs.stdenv.cc.targetPrefix}ar rc'
27697+
'';
27698+
makeMakerFlags = [
27699+
"AR=${pkgs.stdenv.cc.targetPrefix}ar"
27700+
"X11INC=${pkgs.xorg.libX11.dev}/include"
27701+
"X11LIB=${pkgs.xorg.libX11.out}/lib"
27702+
];
2768927703
buildInputs = [ pkgs.xorg.libX11 pkgs.libpng ];
2769027704
env = lib.optionalAttrs stdenv.cc.isGNU {
2769127705
NIX_CFLAGS_COMPILE = toString [

0 commit comments

Comments
 (0)