Unverified Commit 0689405f authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

netsurf.libcss: fix build on GCC 14 (#393228)

parents f55926cd 52689b52
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  perl,
  pkg-config,
  buildsystem,
@@ -18,6 +19,23 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-LfIVu+w01R1gwaBLAbLfTV0Y9RDx86evS4DN21ZxFU4=";
  };

  patches = [
    # select: computed: Squash -Wcalloc-transposed-args (gcc-14)
    # remove on next release
    (fetchpatch {
      name = "fix-calloc-transposed-args-computed.patch";
      url = "https://source.netsurf-browser.org/libcss.git/patch/?id=0541e18b442d2f46abc0f0b09e0db950e1b657e5";
      hash = "sha256-6nrT1S1E+jU6UDr3BZo9GH8jcSiIwTNLnmI1rthhhws=";
    })
    # select: select: Squash -Wcalloc-transposed-args (gcc-14)
    # remove on next release
    (fetchpatch {
      name = "fix-calloc-transposed-args-select.patch";
      url = "https://source.netsurf-browser.org/libcss.git/patch/?id=8619d09102d6cc34d63fe87195c548852fc93bf4";
      hash = "sha256-Clkhw/n/+NQR/T8Gi+2Lc1Neq5dWsNKM8RqieYuTnzQ=";
    })
  ];

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
@@ -37,6 +55,8 @@ stdenv.mkDerivation (finalAttrs: {
    "-Wno-error=${if stdenv.cc.isGNU then "maybe-uninitialized" else "uninitialized"}"
  ];

  enableParallelBuilding = true;

  meta = {
    homepage = "https://www.netsurf-browser.org/projects/libcss/";
    description = "Cascading Style Sheets library for netsurf browser";