diff --git a/pkg.info b/pkg.info index 3da5c65..5d5e07e 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: libqtxdg description: Qt implementation of freedesktop.org xdg specs version: 4.2.0 -revision: 2 +revision: 3 url: https://github.com/lxqt/libqtxdg license: LGP2.1-or-later architecture: any diff --git a/source-files/qt-6.10.patch b/source-files/qt-6.10.patch index b569d35..aa936f5 100644 --- a/source-files/qt-6.10.patch +++ b/source-files/qt-6.10.patch @@ -1,26 +1,71 @@ -diff -ru libqtxdg-4.2.0.orig/CMakeLists.txt libqtxdg-4.2.0/CMakeLists.txt ---- libqtxdg-4.2.0.orig/CMakeLists.txt 2025-10-05 10:33:04.762455622 +0200 -+++ libqtxdg-4.2.0/CMakeLists.txt 2025-10-05 10:34:45.318683750 +0200 -@@ -26,6 +26,9 @@ - find_package(Qt6 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets Svg Xml DBus) +From b01a024921acdfd5b0e97d5fda2933c726826e99 Mon Sep 17 00:00:00 2001 +From: Jimi Huotari +Date: Tue, 17 Jun 2025 08:52:44 +0300 +Subject: [PATCH] cmake: fix build with Qt 6.10 + +The 'Qt6FooPrivate' targets have been split into separate CMake files +in Qt 6.9, and require a 'find_package(Qt6FooPrivate)' call starting +with Qt 6.10. + +See also: https://bugreports.qt.io/browse/QTBUG-87776 +--- + CMakeLists.txt | 4 ++++ + src/qtxdg/CMakeLists.txt | 2 ++ + src/xdgiconloader/CMakeLists.txt | 2 ++ + src/xdgiconloader/plugin/CMakeLists.txt | 2 ++ + 4 files changed, 10 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7007a121..c12afec5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,6 +27,10 @@ find_package(Qt6 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets Svg Xml DBus) find_package(GLIB ${GLIB_MINIMUM_VERSION} REQUIRED COMPONENTS gobject gio gio-unix) find_package(XTerm) -+if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10) -+ find_package(Qt6 COMPONENTS GuiPrivate REQUIRED) -+endif() ++if (Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0") ++ find_package(Qt6GuiPrivate ${QT_MINIMUM_VERSION} REQUIRED) ++endif() ++ include(GNUInstallDirs) # Standard directories for installation include(CMakePackageConfigHelpers) -diff -ru libqtxdg-4.2.0.orig/src/xdgiconloader/CMakeLists.txt libqtxdg-4.2.0/src/xdgiconloader/CMakeLists.txt ---- libqtxdg-4.2.0.orig/src/xdgiconloader/CMakeLists.txt 2025-10-05 10:33:04.772910866 +0200 -+++ libqtxdg-4.2.0/src/xdgiconloader/CMakeLists.txt 2025-10-05 10:38:24.333285939 +0200 -@@ -54,6 +54,9 @@ + include(GenerateExportHeader) +diff --git a/src/qtxdg/CMakeLists.txt b/src/qtxdg/CMakeLists.txt +index edd37416..2e8e8482 100644 +--- a/src/qtxdg/CMakeLists.txt ++++ b/src/qtxdg/CMakeLists.txt +@@ -78,6 +78,8 @@ add_library(${QTXDGX_LIBRARY_NAME} SHARED + ) + + target_link_libraries(${QTXDGX_LIBRARY_NAME} ++ PRIVATE ++ Qt6::GuiPrivate + PUBLIC + ${QTX_LIBRARIES} + ${QTXDGX_ICONLOADER_LIBRARY_NAME} +diff --git a/src/xdgiconloader/CMakeLists.txt b/src/xdgiconloader/CMakeLists.txt +index fba72e98..1bcae060 100644 +--- a/src/xdgiconloader/CMakeLists.txt ++++ b/src/xdgiconloader/CMakeLists.txt +@@ -50,6 +50,8 @@ target_include_directories(${QTXDGX_ICONLOADER_LIBRARY_NAME} + ) + + target_link_libraries(${QTXDGX_ICONLOADER_LIBRARY_NAME} ++ PRIVATE ++ Qt6::GuiPrivate + PUBLIC Qt6::Gui Qt6::Svg +diff --git a/src/xdgiconloader/plugin/CMakeLists.txt b/src/xdgiconloader/plugin/CMakeLists.txt +index 04564c47..1c37011c 100644 +--- a/src/xdgiconloader/plugin/CMakeLists.txt ++++ b/src/xdgiconloader/plugin/CMakeLists.txt +@@ -11,6 +11,8 @@ target_compile_definitions(${QTXDGX_ICONENGINEPLUGIN_LIBRARY_NAME} + "QT_NO_KEYWORDS" ) -+if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10) -+ target_link_libraries(${QTXDGX_ICONLOADER_LIBRARY_NAME} PUBLIC Qt6::GuiPrivate) -+endif() - - set_target_properties(${QTXDGX_ICONLOADER_LIBRARY_NAME} - PROPERTIES + target_link_libraries(${QTXDGX_ICONENGINEPLUGIN_LIBRARY_NAME} ++ PRIVATE ++ Qt6::GuiPrivate + PUBLIC + Qt6::Gui + "${QTXDGX_ICONLOADER_LIBRARY_NAME}"