[packages/photoqt] Up to 5.4.1 (Qt6)

arekm arekm at pld-linux.org
Fri Sep 25 19:52:01 CEST 2026


commit f2371d7a50bc7be09235212ffc79ef852b682826
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Sep 25 19:51:31 2026 +0200

    Up to 5.4.1 (Qt6)

 photoqt-extensions-libdir.patch  |  22 +++++++
 photoqt-pychromecast.patch       |  26 ---------
 photoqt-requested-features.patch |  15 +++++
 photoqt-resvg-include.patch      |  12 ++++
 photoqt.spec                     | 120 +++++++++++++++++++++++++--------------
 5 files changed, 127 insertions(+), 68 deletions(-)
---
diff --git a/photoqt.spec b/photoqt.spec
index a7f68c7..f53bf55 100644
--- a/photoqt.spec
+++ b/photoqt.spec
@@ -1,62 +1,81 @@
 # TODO:
-# VIDEO_MPV (upstream on by default) (BR: libmpv)
-# LIBVIPS (upstream off by default) (BR: glib2, vips, vips-cpp)
+# WITH_LIBVIPS (upstream off by default) (BR: glib2, vips, vips-cpp)
 #
 # Conditional build:
-%bcond_without	gmagick		# GraphicsMagick support
+%bcond_with	gmagick		# GraphicsMagick instead of ImageMagick
+%bcond_without	mpv		# video playback through libmpv
+%bcond_without	resvg		# SVG rendering through resvg
 
-%define	qt_ver	5.9
+%define	qt_ver	6.4
 Summary:	Simple but powerful Qt-based image viewer
 Summary(pl.UTF-8):	Prosta, ale mająca duże możliwości przeglądarka obrazków oparta na Qt
 Name:		photoqt
-Version:	3.3
-Release:	5
+Version:	5.4.1
+Release:	1
 License:	GPL v2+
 Group:		X11/Applications
 #Source0Download: http://photoqt.org/down/
 Source0:	https://photoqt.org/downloads/source/%{name}-%{version}.tar.gz
-# Source0-md5:	d06988f0c505266bffbd187b6a4e8379
-Patch0:		%{name}-pychromecast.patch
+# Source0-md5:	e4a21a840140fc66cfddd0c78a75c8fc
+Patch0:		%{name}-extensions-libdir.patch
+Patch1:		%{name}-requested-features.patch
+Patch2:		%{name}-resvg-include.patch
 URL:		https://photoqt.org/
 BuildRequires:	DevIL-devel
-BuildRequires:	FreeImage-devel
 %{?with_gmagick:BuildRequires:	GraphicsMagick-c++-devel}
-BuildRequires:	Qt5Concurrent-devel >= %{qt_ver}
-BuildRequires:	Qt5Core-devel >= %{qt_ver}
-BuildRequires:	Qt5DBus-devel >= %{qt_ver}
-BuildRequires:	Qt5Gui-devel >= %{qt_ver}
-BuildRequires:	Qt5Multimedia-devel >= %{qt_ver}
-BuildRequires:	Qt5PrintSupport-devel >= %{qt_ver}
-BuildRequires:	Qt5Quick-devel >= %{qt_ver}
-BuildRequires:	Qt5Sql-devel >= %{qt_ver}
-BuildRequires:	Qt5Svg-devel >= %{qt_ver}
-BuildRequires:	Qt5Widgets-devel >= %{qt_ver}
-BuildRequires:	Qt5Xml-devel >= %{qt_ver}
+%{!?with_gmagick:BuildRequires:	ImageMagick-c++-devel}
+BuildRequires:	Qt6Concurrent-devel >= %{qt_ver}
+BuildRequires:	Qt6Core-devel >= %{qt_ver}
+BuildRequires:	Qt6DBus-devel >= %{qt_ver}
+BuildRequires:	Qt6Gui-devel >= %{qt_ver}
+BuildRequires:	Qt6Multimedia-devel >= %{qt_ver}
+BuildRequires:	Qt6PrintSupport-devel >= %{qt_ver}
+BuildRequires:	Qt6Qml-devel >= %{qt_ver}
+BuildRequires:	Qt6Quick-devel >= %{qt_ver}
+BuildRequires:	Qt6Sql-devel >= %{qt_ver}
+BuildRequires:	Qt6Svg-devel >= %{qt_ver}
+BuildRequires:	Qt6Widgets-devel >= %{qt_ver}
+BuildRequires:	Qt6Xml-devel >= %{qt_ver}
 BuildRequires:	cmake >= 3.16
 BuildRequires:	exiv2-devel >= 0.26
+BuildRequires:	kf6-extra-cmake-modules
+BuildRequires:	lcms2-devel
 BuildRequires:	libarchive-devel
 BuildRequires:	libraw-devel
 BuildRequires:	libstdc++-devel >= 6:4.7
+%{?with_mpv:BuildRequires:	mpv-client-devel}
+BuildRequires:	openssl-devel
 BuildRequires:	pkgconfig
-BuildRequires:	poppler-qt5-devel
-BuildRequires:	pugixml-devel
+BuildRequires:	poppler-qt6-devel
+BuildRequires:	python3
 BuildRequires:	python3-pychromecast
-BuildRequires:	qt5-build >= %{qt_ver}
-BuildRequires:	qt5-linguist >= %{qt_ver}
-BuildRequires:	qt5-qmake >= %{qt_ver}
-BuildRequires:	rpmbuild(macros) >= 1.596
+BuildRequires:	qt6-build >= %{qt_ver}
+BuildRequires:	qt6-linguist >= %{qt_ver}
+%{?with_resvg:BuildRequires:	resvg-devel}
+BuildRequires:	rpmbuild(macros) >= 1.742
+BuildRequires:	wayland-devel
+BuildRequires:	yaml-cpp-devel
+BuildRequires:	zxing-cpp-nu-devel
 Requires(post,postun):	desktop-file-utils
 Requires(post,postun):	gtk-update-icon-cache
-Requires:	Qt5Core >= %{qt_ver}
-Requires:	Qt5Gui >= %{qt_ver}
-Requires:	Qt5Quick >= %{qt_ver}
-Requires:	Qt5Sql >= %{qt_ver}
-Requires:	Qt5Sql-sqldriver-sqlite3 >= %{qt_ver}
-Requires:	Qt5Svg >= %{qt_ver}
-Requires:	Qt5Widgets >= %{qt_ver}
+# Chromecast helper scripts are run with "python" from PATH
+Requires:	/usr/bin/python
+Requires:	Qt6Core >= %{qt_ver}
+Requires:	Qt6Gui >= %{qt_ver}
+Requires:	Qt6Location >= %{qt_ver}
+Requires:	Qt6MultimediaQuick >= %{qt_ver}
+Requires:	Qt6Positioning >= %{qt_ver}
+Requires:	Qt6Quick >= %{qt_ver}
+Requires:	Qt6Quick3D >= %{qt_ver}
+Requires:	Qt6Sql >= %{qt_ver}
+Requires:	Qt6Sql-sqldriver-sqlite3 >= %{qt_ver}
+Requires:	Qt6Svg >= %{qt_ver}
+Requires:	Qt6Widgets >= %{qt_ver}
 Requires:	hicolor-icon-theme
-# psd imageformat plugin
-Suggests:	libqpsd-qt5
+Requires:	python3-pychromecast
+Suggests:	ffmpegthumbnailer
+# psd and other imageformat plugins
+Suggests:	kf6-kimageformats
 Suggests:	xcftools
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -69,12 +88,33 @@ Prosta, ale mająca duże możliwości przeglądarka obrazków oparta na Qt.
 %prep
 %setup -q
 %patch -P 0 -p1
+%patch -P 1 -p1
+%patch -P 2 -p1
 
 %build
+# upstream uses NDEBUG as its release switch: without it the build directory
+# becomes the system extension dir and unverified extensions get loaded
+CXXFLAGS="%{rpmcxxflags} -DNDEBUG"
 %cmake -B build \
-	-DEXIV2=ON \
-	%{!?with_gmagick:-DGM=OFF} \
-	-DVIDEO_MPV=OFF
+	-DWITH_CHROMECAST=ON \
+	-DWITH_DEVIL=ON \
+	-DWITH_EXIV2=ON \
+	-DWITH_EXTENSIONS_SUPPORT=ON \
+	%{cmake_on_off gmagick WITH_GRAPHICSMAGICK} \
+	-DWITH_IMAGEMAGICK=%{!?with_gmagick:ON}%{?with_gmagick:OFF} \
+	-DWITH_LCMS2=ON \
+	-DWITH_LIBARCHIVE=ON \
+	-DWITH_LIBRAW=ON \
+	-DWITH_LOCATION=ON \
+	-DWITH_PHOTOSPHERE=ON \
+	-DWITH_POPPLER=ON \
+	-DWITH_PUGIXML=OFF \
+	-DWITH_QTPDF=OFF \
+	%{cmake_on_off resvg WITH_RESVG} \
+	-DWITH_VIDEO_QT=ON \
+	%{cmake_on_off mpv WITH_VIDEO_MPV} \
+	-DWITH_WAYLANDSPECIFIC=ON \
+	-DWITH_ZXING=ON
 
 %{__make} -C build
 
@@ -84,9 +124,6 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-# no longer installed by default?
-cp -p org.photoqt.PhotoQt.standalone.desktop $RPM_BUILD_ROOT%{_desktopdir}
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -104,5 +141,4 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/photoqt
 %{_datadir}/metainfo/org.photoqt.PhotoQt.metainfo.xml
 %{_desktopdir}/org.photoqt.PhotoQt.desktop
-%{_desktopdir}/org.photoqt.PhotoQt.standalone.desktop
 %{_iconsdir}/hicolor/*x*/apps/org.photoqt.PhotoQt.png
diff --git a/photoqt-extensions-libdir.patch b/photoqt-extensions-libdir.patch
new file mode 100644
index 0000000..238c524
--- /dev/null
+++ b/photoqt-extensions-libdir.patch
@@ -0,0 +1,22 @@
+# CMAKE_INSTALL_LIBDIR may be absolute (PLD passes /usr/lib64), so PREFIX/LIBDIR yields /usr//usr/lib64
+--- photoqt-5.4.1/CMakeLists.txt.orig
++++ photoqt-5.4.1/CMakeLists.txt
+@@ -911,6 +911,7 @@
+     # This avoids hardcoding 'lib' as subdir for the shared libraries
+     include(GNUInstallDirs)
+     target_compile_definitions(photoqt PRIVATE PQMSHAREDLIBDIR="${CMAKE_INSTALL_LIBDIR}")
++    target_compile_definitions(photoqt PRIVATE PQMFULLSHAREDLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
+ 
+     if(TARGET yaml-cpp::yaml-cpp)
+         target_link_libraries(photoqt PRIVATE yaml-cpp::yaml-cpp)
+--- photoqt-5.4.1/cplusplus/extensions/pqc_extensionshandler.cpp.orig
++++ photoqt-5.4.1/cplusplus/extensions/pqc_extensionshandler.cpp
+@@ -117,7 +117,7 @@
+         const QStringList checkDirs = {PQCConfigFiles::get().EXTENSION_DATA_DIR(),
+                                        m_systemExtensionDir};
+       #else
+-        m_systemExtensionDir = QString(PQMINSTALLPREFIX) % "/" % QString(PQMSHAREDLIBDIR) % "/PhotoQt/extensions";
++        m_systemExtensionDir = QString(PQMFULLSHAREDLIBDIR) % "/PhotoQt/extensions";
+         const QStringList checkDirs = {PQCConfigFiles::get().EXTENSION_DATA_DIR(),
+                                        m_systemExtensionDir};
+       #endif
diff --git a/photoqt-pychromecast.patch b/photoqt-pychromecast.patch
deleted file mode 100644
index d45a98c..0000000
--- a/photoqt-pychromecast.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- photoqt-3.3/CMakeLists.txt.orig	2023-07-28 19:02:47.757061621 +0200
-+++ photoqt-3.3/CMakeLists.txt	2023-07-28 19:05:21.542895158 +0200
-@@ -370,22 +370,10 @@ if(CHROMECAST)
-     elseif(NOT ${Python3_Interpreter_FOUND})
-         message(FATAL_ERROR "** Unable to locate Python3 Interpreter... is it installed?")
-     else()
--        execute_process(COMMAND ${Python3_EXECUTABLE} -c "import pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
-+        execute_process(COMMAND ${Python3_EXECUTABLE} -c "import pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 10)
-         if(NOT ${EXIT_CODE} EQUAL 0)
--            if(CHROMECAST_PIPINSTALL)
--                # try installing it with pip
--                message(">> Attempt to install pychromecast locally using pip...")
--                execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install pychromecast)
--                execute_process(COMMAND ${Python3_EXECUTABLE} -c "import pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
--                if(NOT ${EXIT_CODE} EQUAL 0)
--                    message(FATAL_ERROR "** Unable to locate Python3 module pychromecast. Please first install it or disable Chromecast support.")
--                else()
--                    message(">> Success!")
--                endif()
--            else()
-                 message(FATAL_ERROR "** Unable to import PyChromecast, make sure it is installed. "
-                                     "Enabling the CHROMECAST_PIPINSTALL option allows CMake to try to install it locally using pip.")
--            endif()
-         endif()
-         include_directories(${Python3_INCLUDE_DIRS})
-         target_link_libraries(${PROJECT_NAME} ${Python3_LIBRARIES})
diff --git a/photoqt-requested-features.patch b/photoqt-requested-features.patch
new file mode 100644
index 0000000..d260510
--- /dev/null
+++ b/photoqt-requested-features.patch
@@ -0,0 +1,15 @@
+# upstream turns off a requested feature whose dependency is missing or broken instead of failing
+--- photoqt-5.4.1/CMakeLists.txt.orig
++++ photoqt-5.4.1/CMakeLists.txt
+@@ -1191,6 +1191,11 @@
+     message("")
+ endif()
+ 
++list(LENGTH STATUS_FORMATS_FAILED formatsfailedlength)
++if(failedlength GREATER 0 OR formatsfailedlength GREATER 0)
++    message(FATAL_ERROR "** Requested options could not be enabled: ${STATUS_FORMATS_FAILED} ${STATUS_FAILED}")
++endif()
++
+ 
+ if(_WITH_EXTENSIONS_SUPPORT)
+     message("")
diff --git a/photoqt-resvg-include.patch b/photoqt-resvg-include.patch
new file mode 100644
index 0000000..72bfa5a
--- /dev/null
+++ b/photoqt-resvg-include.patch
@@ -0,0 +1,12 @@
+# PLD resvg-devel installs resvg.h directly in /usr/include
+--- photoqt-5.4.1/cplusplus/images/plugins/pqc_imageplugin_resvg.cpp.orig
++++ photoqt-5.4.1/cplusplus/images/plugins/pqc_imageplugin_resvg.cpp
+@@ -32,7 +32,7 @@
+ #ifdef PQMRESVG_QT
+ #include <ResvgQt.h>
+ #else
+-#include <resvg/resvg.h>
++#include <resvg.h>
+ #endif
+ #endif
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/photoqt.git/commitdiff/f2371d7a50bc7be09235212ffc79ef852b682826



More information about the pld-cvs-commit mailing list