# HG changeset patch # User Markus Mützel # Date 1695977483 -7200 # Node ID a0e9deadb2215db7edda9c4b85b5d7dae5900b6f # Parent 30d5d0df1cee1a457142e91af9d18b665455939f Qt6 QtTools: Tolerate incomplete installation of libclang-dev on host. * qt6-qttools-1-libclang.patch: Skip checking for libclang if it won't be used. * qt6-tools.mk: Replace deprecated QT_BUILD_TOOLS_WHEN_CROSSCOMPILING flag with QT_FORCE_BUILD_TOOLS. * dist-files.mk: Add new patch file to list. diff -r 30d5d0df1cee -r a0e9deadb221 dist-files.mk --- a/dist-files.mk Wed Sep 27 18:41:16 2023 +0200 +++ b/dist-files.mk Fri Sep 29 10:51:23 2023 +0200 @@ -658,6 +658,7 @@ qt6-qtimageformats.mk \ qt6-qtsvg.mk \ qt6-qttranslations.mk \ + qt6-qttools-1-libclang.patch \ qt6-qttools.mk \ qwt-1-fixes.patch \ qwt.mk \ diff -r 30d5d0df1cee -r a0e9deadb221 src/qt6-qttools-1-libclang.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/qt6-qttools-1-libclang.patch Fri Sep 29 10:51:23 2023 +0200 @@ -0,0 +1,15 @@ +Don't check for libclang when building without it. + +diff -urN qttools-everywhere-src-6.5.2/configure.cmake qttools-everywhere-src-6.5.2/configure.cmake.orig +--- qttools-everywhere-src-6.5.2/configure.cmake.orig 2023-07-07 14:29:26.000000000 +0200 ++++ qttools-everywhere-src-6.5.2/configure.cmake 2023-09-29 10:39:40.324294579 +0200 +@@ -17,7 +17,9 @@ + # Presumably because 6.0 ClangConfig.cmake files are not good enough? + # In any case explicitly request a minimum version of 8.x for now, otherwise + # building with CMake will fail at compilation time. ++if (QT_FEATURE_clang) + qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang) ++endif() + # special case end + + if(TARGET WrapLibClang::WrapLibClang) diff -r 30d5d0df1cee -r a0e9deadb221 src/qt6-qttools.mk --- a/src/qt6-qttools.mk Wed Sep 27 18:41:16 2023 +0200 +++ b/src/qt6-qttools.mk Fri Sep 29 10:51:23 2023 +0200 @@ -29,15 +29,15 @@ if [ "$(MXE_NATIVE_BUILD)" = "no" ]; then \ ln -sf '$(BUILD_TOOLS_PREFIX)/qt6/bin/lconvert' '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'lconvert; \ ln -sf '$(BUILD_TOOLS_PREFIX)/qt6/bin/lrelease' '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'lrelease; \ - echo -e "#!/bin/sh\necho $$0 $$*" > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qhelpgenerator && chmod a+rx '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qhelpgenerator; \ - echo -e "#!/bin/sh\necho $$0 $$*" > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qcollectiongenerator && chmod a+rx '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qcollectiongenerator; \ + echo -e "#!/bin/sh\necho $$0 $$*" > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qhelpgenerator && chmod a+rx '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qhelpgenerator; \ + echo -e "#!/bin/sh\necho $$0 $$*" > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qcollectiongenerator && chmod a+rx '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)'qcollectiongenerator; \ fi mkdir '$(1).build' && cd '$(1).build' && \ '$(HOST_PREFIX)/qt6/bin/qt-cmake-private' -S '$(1)' -DCMAKE_INSTALL_PREFIX='$(HOST_PREFIX)/qt6' \ -DFEATURE_clang=OFF \ -DFEATURE_clangcpp=OFF \ - -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON + -DQT_FORCE_BUILD_TOOLS=ON # not built for some reason. make dummy so install won't fail