diff --git a/devel/qt6-tools/Makefile b/devel/qt6-tools/Makefile index f698e7729c97..63b3deb3d8df 100644 --- a/devel/qt6-tools/Makefile +++ b/devel/qt6-tools/Makefile @@ -1,30 +1,38 @@ PORTNAME= tools DISTVERSION= ${QT6_VERSION} CATEGORIES= devel PKGNAMEPREFIX= qt6- MAINTAINER= kde@FreeBSD.org COMMENT= Qt declarative framework for dynamic user interfaces BUILD_DEPENDS= ${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers LIB_DEPENDS= libxkbcommon.so:x11/libxkbcommon \ libzstd.so:archivers/zstd -USES= cmake compiler:c++17-lang gl llvm:min=17,lib,noexport python:build \ - qt-dist:6 +USES= cmake compiler:c++17-lang gl llvm:min=17,max=20,lib,noexport \ + python:build qt-dist:6 USE_GL= opengl USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL} USE_QT= base declarative sqldriver-sqlite:run -CMAKE_ARGS+= -DClang_DIR:PATH="${LLVM_PREFIX}/lib/cmake/clang" \ - -DLLVM_DIR:PATH="${LLVM_PREFIX}/lib/cmake/llvm" +# QDOC_USER_CLANG_VERSION is an unofficial CMake variable intended to override +# the list of supported LLVM versions, i.e., QDOC_SUPPORTED_CLANG_VERSIONS in +# .cmake.conf with the chosen version of LLVM. We must be careful here and adjust +# llvm min/max in USES to align with the versions of LLVM that future releases +# support. LLVM_VERSION only provides the major version, but at least the minor +# version must also be passed, hence the use of "black magic" to determine this +# value, which does not respect relative paths. +CMAKE_ARGS= -DClang_DIR:PATH="${LLVM_PREFIX}/lib/cmake/clang" \ + -DLLVM_DIR:PATH="${LLVM_PREFIX}/lib/cmake/llvm" \ + -DQDOC_USER_CLANG_VERSION:STRING="`${MAKE} -C ${PORTSDIR}/devel/llvm${LLVM_VERSION} -VDISTVERSION:R`" post-install: # Install symlinks for user-facing tools while read line; do \ source="$$(${ECHO_CMD} $${line} | ${AWK} '{print $$1}')"; \ target="${STAGEDIR}${PREFIX}/$$(${ECHO_CMD} $${line} | ${AWK} '{print $$2}')"; \ ${RLN} $${source} $${target}; \ done <${BUILD_WRKSRC}/user_facing_tool_links.txt .include diff --git a/devel/qt6-tools/files/patch-.cmake.conf b/devel/qt6-tools/files/patch-.cmake.conf new file mode 100644 index 000000000000..ec629a036b7e --- /dev/null +++ b/devel/qt6-tools/files/patch-.cmake.conf @@ -0,0 +1,19 @@ +Supply the version of LLVM we are intending to use via QDOC_USER_CLANG_VERSION, +a made-up CMake varible derived from LLVM_VERSION in the port Makefile, instead +of iterating through potential candidates. This avoids mismatches during the +configure stage when a user has a version of LLVM installed greater than what is +set in DEFAULT_VERSIONS. + +PR: 287430 + +--- .cmake.conf.orig 2025-05-29 00:19:42 UTC ++++ .cmake.conf +@@ -3,7 +3,7 @@ set(QDOC_SUPPORTED_CLANG_VERSIONS + set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") + set(QDOC_MINIMUM_CLANG_VERSION "17") + set(QDOC_SUPPORTED_CLANG_VERSIONS +- "20.1" "19.1" "18.1" "17.0" ++ ${QDOC_USER_CLANG_VERSION} + ) + list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") + list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_CONTEXTLESS_CONNECT=1")