tk-8_5: fix build with GCC 14

This commit is contained in:
FliegendeWurst
2025-01-02 22:40:29 +01:00
parent f28864e00d
commit eff5c482de
2 changed files with 14 additions and 7 deletions
@@ -12,5 +12,9 @@ callPackage ./generic.nix (
url = "mirror://sourceforge/tcl/tcl${version}-src.tar.gz";
sha256 = "066vlr9k5f44w9gl9382hlxnryq00d5p6c7w5vq1fgc7v9b49w6k";
};
extraPatch = ''
substituteInPlace 'generic/tclInt.h' --replace-fail 'typedef int ptrdiff_t;' ""
'';
}
)
+10 -7
View File
@@ -12,6 +12,7 @@
release,
version,
src,
extraPatch ? "",
...
}:
@@ -27,13 +28,15 @@ let
setOutputFlags = false;
postPatch = ''
substituteInPlace library/clock.tcl \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" \
--replace "/usr/share/lib/zoneinfo" "" \
--replace "/usr/lib/zoneinfo" "" \
--replace "/usr/local/etc/zoneinfo" ""
'';
postPatch =
''
substituteInPlace library/clock.tcl \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" \
--replace "/usr/share/lib/zoneinfo" "" \
--replace "/usr/lib/zoneinfo" "" \
--replace "/usr/local/etc/zoneinfo" ""
''
+ extraPatch;
nativeBuildInputs = lib.optionals (lib.versionAtLeast version "9.0") [
# Only used to detect the presence of zlib. Could be replaced with a stub.