From 2b8dae823a3a751e5afab16f2f7b347275a52af4 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 11 Oct 2025 19:32:39 +0300 Subject: [PATCH] Add patch for qt 6.10 --- pkg.info | 2 +- source-files/qt-6.10.patch | 26 ++++++++++++++++++++++++++ source.sh | 7 +++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 source-files/qt-6.10.patch diff --git a/pkg.info b/pkg.info index 3d1274a..3da5c65 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: 1 +revision: 2 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 new file mode 100644 index 0000000..b569d35 --- /dev/null +++ b/source-files/qt-6.10.patch @@ -0,0 +1,26 @@ +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) + 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() + + 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 @@ + Qt6::Gui + Qt6::Svg + ) ++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 diff --git a/source.sh b/source.sh index 29d6dbf..e68d58c 100644 --- a/source.sh +++ b/source.sh @@ -2,6 +2,13 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/qt-6.10.patch +} + # The build function is executed in the source directory # This function is used to compile the source code build() {