Commit eff5c482 authored by FliegendeWurst's avatar FliegendeWurst
Browse files

tk-8_5: fix build with GCC 14

parent f28864e0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
  release,
  version,
  src,
  extraPatch ? "",
  ...
}:

@@ -27,13 +28,15 @@ let

    setOutputFlags = false;

    postPatch = ''
    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.