From 24c494a78ea30f797515929871418ad96ab02be8 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Sat, 23 Nov 2024 11:53:25 +0100 Subject: [PATCH] libsForQt5.qt5.qtwebengine: fix build with clang --- pkgs/development/libraries/qt-5/5.15/default.nix | 9 +++++++++ pkgs/development/libraries/qt-5/modules/qtwebengine.nix | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index b94be6d893d2..7c84a97c4d7c 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -176,6 +176,15 @@ let # See: https://bugreports.qt.io/browse/QTBUG-124375 # Backport of: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=a766045f65f934df3b5f1aa63bc86fbb3e003a09 ./qtwebengine-ninja-1.12.patch + # 5.15.17: Fixes 'converts to incompatible function type [-Werror,-Wcast-function-type-strict]' + # in chromium harfbuzz dependency. This may be removed again if harfbuzz is updated + # to include the upstream fixes: https://github.com/harfbuzz/harfbuzz/commit/d88269c827895b38f99f7cf741fa60210d4d5169 + # See https://trac.macports.org/ticket/70850 + (fetchpatch { + url = "https://github.com/macports/macports-ports/raw/dd7bc40d8de48c762bf9757ce0a0672840c5d8c2/aqua/qt5/files/patch-qtwebengine_hb-ft.cc_error.diff"; + sha256 = "sha256-8/CYjGM5n2eJ6sG+ODTa8fPaxZSDVyKuInpc3IlZuyc="; + extraPrefix = ""; + }) ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-mac-dont-set-dsymutil-path.patch diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 38ad37fc0364..b5768a3da351 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -173,6 +173,10 @@ qtModule ({ "-march=westmere" ] ++ lib.optionals stdenv.cc.isClang [ "-Wno-elaborated-enum-base" + # 5.15.17: need to silence these two warnings + # https://trac.macports.org/ticket/70850 + "-Wno-enum-constexpr-conversion" + "-Wno-unused-but-set-variable" ]); } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) { NIX_CFLAGS_LINK = "-Wl,--no-warn-search-mismatch";