Name: gwenview Version: 26.08.0 Release: 4%{?dist} Summary: Image viewer License: BSD-2-Clause AND CC0-1.0 AND GFDL-1.2-only AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND MIT URL: https://apps.kde.org/gwenview Source0: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz BuildRequires: desktop-file-utils BuildRequires: extra-cmake-modules BuildRequires: kf6-rpm-macros BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: cmake(KF6Baloo) BuildRequires: cmake(KF6Crash) BuildRequires: cmake(KF6GuiAddons) BuildRequires: cmake(KF6I18n) BuildRequires: cmake(KF6IconThemes) BuildRequires: cmake(KF6ItemModels) BuildRequires: cmake(KF6KIO) BuildRequires: cmake(KF6Notifications) BuildRequires: cmake(KF6Parts) BuildRequires: cmake(KF6Purpose) BuildRequires: cmake(KF6WidgetsAddons) BuildRequires: cmake(KF6WindowSystem) BuildRequires: cmake(Qt6Qml) BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Concurrent) BuildRequires: cmake(Qt6DBus) BuildRequires: cmake(Qt6Svg) BuildRequires: cmake(Qt6SvgWidgets) BuildRequires: cmake(Qt6OpenGLWidgets) BuildRequires: cmake(Qt6PrintSupport) BuildRequires: cmake(Qt6Widgets) BuildRequires: qt6-qtbase-private-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: exiv2-devel BuildRequires: lcms2-devel BuildRequires: libtiff-devel BuildRequires: cfitsio-devel BuildRequires: libX11-devel Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description Gwenview is KDE's image viewer. Full CMakeLists.txt read recursively (everything centrally declared in the top-level CMakeLists.txt, same clean layout as Okular -- confirmed via a full source-tree grep that app/, importer/, part/ add zero further find_package/pkg_check_modules calls). Real Azure Linux package availability checked directly against a live mcr.microsoft.com/azurelinux-beta/base/core:4.0 container via tdnf search before deciding anything: exiv2-devel, lcms2-devel, libtiff-devel, cfitsio-devel all confirmed real and kept required/ enabled. Two genuinely absent hard-REQUIRED dependencies were handled differently based on how narrow the gated feature actually is: 1. kImageAnnotator-Qt6/kColorPicker-Qt6 (confirmed absent, third-party annotation-tools libraries, not packaged anywhere on this distro): the whole feature is behind a normal CMake option (GWENVIEW_IMAGEANNOTATOR, default ON) so simply passed -DGWENVIEW_IMAGEANNOTATOR=OFF -- no source patch needed, loses only the built-in image annotation toolbar. 2. Qt6::Multimedia/Qt6::MultimediaWidgets (confirmed absent throughout this entire build): unlike kImageAnnotator this is NOT behind a CMake option, it's unconditionally in the top-level find_package(Qt6 ... REQUIRED ...) component list. But a full source grep showed only ONE file anywhere in the tree actually uses Multimedia APIs -- lib/documentview/videoviewadapter.cpp, the polymorphic "view a video file inline" adapter selected only for MimeTypeUtils::KIND_VIDEO documents (Gwenview is fundamentally an image viewer; inline video playback is one adapter among several, not core functionality). Removed via a tested source patch: Multimedia/MultimediaWidgets dropped from the top find_package() component list and from lib/CMakeLists.txt's SOURCES/target_link_libraries, and the KIND_VIDEO case in DocumentView::createAdapterForDocument() falls through to the existing default: branch (a benign qCWarning + a friendly MessageViewAdapter, the same path already used for any other undisplayable document kind) rather than instantiating VideoViewAdapter. Video files simply aren't previewable inline; every other Gwenview feature (the actual image-viewing/browsing/ editing core) is unaffected. Also passed -DGWENVIEW_NO_WAYLAND_GESTURES=ON: on Linux this block is unconditionally REQUIRED (WaylandProtocols, Wayland::Client, and Qt6::WaylandClient), and tdnf search confirmed no wayland-protocols package and no Qt6 Wayland-client module exist on this distro at all -- this is a real CMake option gate (not a hidden hard requirement), so no patch needed. KF6Baloo is already built earlier in this repo (Dolphin phase) so the Baloo semantic-info backend resolves normally with no extra flags. %package libs Summary: Runtime libraries for %{name} %description libs %{summary}. %prep %autosetup -p1 python3 - <<'PYEOF' import re def sub_file(path, pattern, repl, count=1, flags=0): with open(path, encoding="utf-8") as f: content = f.read() new_content, n = re.subn(pattern, repl, content, count=count, flags=flags) assert n == count, f"{path}: expected {count} replacement(s) for pattern {pattern!r}, got {n}" with open(path, "w", encoding="utf-8") as f: f.write(new_content) sub_file( "CMakeLists.txt", r"find_package\(Qt6 \$\{QT_MIN_VERSION\} CONFIG REQUIRED Core Widgets Concurrent Svg PrintSupport Multimedia MultimediaWidgets\)", "find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets Concurrent Svg PrintSupport)", ) sub_file( "lib/CMakeLists.txt", r" documentview/videoviewadapter\.cpp\n", "", ) sub_file( "lib/CMakeLists.txt", r" Qt::Multimedia\n Qt::MultimediaWidgets\n", "", ) sub_file( "lib/documentview/documentview.cpp", r" case MimeTypeUtils::KIND_VIDEO:\n" r" adapter = new VideoViewAdapter;\n" r" connect\(adapter, SIGNAL\(videoFinished\(\)\), SIGNAL\(videoFinished\(\)\)\);\n" r" break;\n", "", ) print("OK: Qt6Multimedia video-preview adapter removed cleanly") PYEOF %build %cmake_kf6 -DGWENVIEW_IMAGEANNOTATOR=OFF -DGWENVIEW_NO_WAYLAND_GESTURES=ON -DGWENVIEW_SEMANTICINFO_BACKEND=Baloo %cmake_build_kf6 %install %cmake_install_kf6 %find_lang %{name} --with-html %files -f %{name}.lang %license COPYING COPYING.DOC %doc README.md %{_kf6_bindir}/gwenview %{_kf6_bindir}/gwenview_importer %{_datadir}/applications/org.kde.gwenview.desktop %{_datadir}/applications/org.kde.gwenview_importer.desktop %{_kf6_metainfodir}/org.kde.gwenview.appdata.xml %{_datadir}/icons/hicolor/*/apps/gwenview.png %{_datadir}/icons/hicolor/*/actions/document-share.png %{_datadir}/solid/actions/gwenview_importer.desktop %{_datadir}/solid/actions/gwenview_importer_camera.desktop %{_kf6_plugindir}/kfileitemaction/slideshowfileitemaction.so %{_kf6_plugindir}/parts/gvpart.so %{_kf6_datadir}/gwenview/ %{_kf6_datadir}/qlogging-categories6/gwenview.categories %files libs %{_kf6_libdir}/libgwenviewlib.so.* %changelog * Sun Aug 30 2026 Smech - 26.08.0-4 - R3 overcorrected: real SOVERSION really is 5 as originally read from source (VERSION 4.97.0, SOVERSION 5 are two DIFFERENT numbers, both real, both installed -- libgwenviewlib.so.4.97.0 AND the separate libgwenviewlib.so.5 soname symlink). R3's glob only matched the first. Switched to a single %{_kf6_libdir}/libgwenviewlib.so.* glob that catches both real suffixes without re-matching the nonexistent unversioned .so (NAMELINK_SKIP). * Sun Aug 30 2026 Smech - 26.08.0-3 - R2 compiled and installed cleanly, only two real %%files gaps: the actual installed soname is libgwenviewlib.so.4.97.0 (SOVERSION 4), not .so.5* as guessed from an initial misread of set_target_properties -- fixed the glob to match the real installed filename. Also missed the qlogging-categories6/gwenview.categories file entirely (present in every other app this phase but dropped here by oversight). Added both. * Sun Aug 30 2026 Smech - 26.08.0-2 - R1 compiled cleanly, confirming both the Qt6Multimedia removal patch and the IMAGEANNOTATOR/WAYLAND_GESTURES CMake flags worked exactly as intended. Only real error: this tarball has no LICENSES/ directory at all (unlike Kate/Ark/Okular, which all use the REUSE- style layout) -- confirmed via direct listing of the real extracted source, it ships a plain top-level COPYING + COPYING.DOC instead. Switched %%license accordingly. * Sun Aug 30 2026 Smech - 26.08.0-1 - Real upstream source. Real Azure Linux package availability checked directly against a live container for every optional/hard dep before deciding what to force off (see %%description). Two absent hard REQUIREDs handled two different ways depending on how narrow the gated feature was: kImageAnnotator via a plain CMake option flip (-DGWENVIEW_IMAGEANNOTATOR=OFF), Qt6Multimedia via a tested source patch removing the single video-preview adapter that used it (matching the Konsole precedent from earlier this phase). %%files built entirely from real install()/kcoreaddons_add_plugin call sites in the actual downloaded source, including the slideshowfileitemaction Dolphin context-menu plugin that a plain grep for install( would have missed (same class of gap fixed for Ark's compress/extract plugins this round).