Name: dtk6core Version: 6.7.46 Release: 1%{?dist} Summary: DTK6 Core library for Deepin Desktop Environment License: LGPL-3.0-or-later URL: https://github.com/linuxdeepin/dtkcore Source0: %{url}/archive/%{version}/dtkcore-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake >= 3.13 BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtbase-private-devel BuildRequires: dbus-devel BuildRequires: dtkcommon >= 6.7 BuildRequires: dtklog-devel >= 6.7 BuildRequires: libicu-devel BuildRequires: uchardet-devel BuildRequires: systemd-devel Requires: dtkcommon >= 6.7 %description DTK6 Core module provides the base development toolkit for all C++/Qt6 applications in the Deepin Desktop Environment. It includes system info, settings management, D-Bus utilities, DCI icon engine, file system utilities, and more. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: dtkcommon >= 6.7 Requires: dtklog-devel >= 6.7 Requires: qt6-qtbase-devel %description devel Development files for the DTK6 Core library. %prep %autosetup -n dtkcore-%{version} # Fix for Qt 6.8.4 compatibility: # Qt 6.8.4 removed the QDir::Filters variant of beginEntryList from # QAbstractFileEngine. We need to remove it from DDE's overrides too. # Strategy: delete the lines specific to the 6.8-only block and keep 6.9 logic # since Qt 6.8.4 matches 6.9's API for this method. # In the header: remove the #elif 6.8 block entirely (lines with QDir::Filters override) # The #if 6.9.0 block already has the correct declaration. sed -i '/^#elif QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)$/,/^#else$/{ /^#elif/d /beginEntryList.*QDirListing/d /beginEntryList.*QDir::Filters/d /endEntryList.*override/d }' src/dci/private/ddcifileengine_p.h # Change the guard from 6.9.0 to 6.8.0 since Qt 6.8.4 uses the same API as 6.9 sed -i 's/QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)/QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)/' \ src/dci/private/ddcifileengine_p.h # In the .cpp: change the guard so QDir::Filters impl only compiles for < 6.8 sed -i 's/QT_VERSION < QT_VERSION_CHECK(6, 9, 0)/QT_VERSION < QT_VERSION_CHECK(6, 8, 0)/' \ src/dci/private/ddcifileengine.cpp %build %cmake \ -DDTK5=OFF \ -DBUILD_DOCS=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUIILD_TESTING=OFF \ -DBUILD_WITH_SYSTEMD=ON \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \ -DDSG_PREFIX_PATH=%{_prefix} %cmake_build %install %cmake_install %files %license LICENSE LICENSES/* %doc README.md %{_libdir}/libdtk6core.so.6* %{_libexecdir}/dtk6/DCore/ %files devel %{_includedir}/dtk6/DCore/ %{_libdir}/libdtk6core.so %{_libdir}/cmake/Dtk6CMake/ %{_libdir}/cmake/Dtk6Core/ %{_libdir}/cmake/Dtk6DConfig/ %{_libdir}/cmake/Dtk6Tools/ %{_libdir}/pkgconfig/dtk6core.pc %{_libdir}/qt6/mkspecs/modules/qt_lib_dtkcore.pri %{_libdir}/qt6/mkspecs/features/dtk_install_dconfig.prf %changelog * Fri Jul 17 2026 Yonghang Wang - 6.7.46-1 - Initial package for al-stream-2023 (Qt6/DTK6 build) - Use 6.7.46 for Qt 6.8 API compatibility fixes