--- /dev/null
+--- photoqt-3.1/CMakeLists.txt.orig 2023-03-08 01:12:44.000000000 +0100
++++ photoqt-3.1/CMakeLists.txt 2023-03-26 22:07:55.517322764 +0200
+@@ -349,17 +349,9 @@ 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)
+- # try installing it with pip
+- message(">> Attempt to install pychromecast locally using pip...")
+- execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install pychromecast --user RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
+- 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()
+ endif()
+ include_directories(${Python3_INCLUDE_DIRS})
+ target_link_libraries(${PROJECT_NAME} ${Python3_LIBRARIES})
# Conditional build:
%bcond_without gmagick # GraphicsMagick support
-%define qt_ver 5.3
+%define qt_ver 5.9
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: 2.5
-Release: 3
+Version: 3.1
+Release: 1
License: GPL v2+
Group: X11/Applications
#Source0Download: http://photoqt.org/down/
-Source0: http://photoqt.org/pkgs/%{name}-%{version}.tar.gz
-# Source0-md5: fa8d5330aa17cf1eb8c49b08e8aea478
-URL: http://photoqt.org/
+Source0: https://photoqt.org/downloads/source/%{name}-%{version}.tar.gz
+# Source0-md5: fdc30d88a147b6639e73cffea98d2c44
+Patch0: %{name}-pychromecast.patch
+URL: https://photoqt.org/
+# TODO (upstream off by default): mpv, vips(+glib2)
BuildRequires: DevIL-devel
+BuildRequires: FreeImage-devel
%{?with_gmagick:BuildRequires: GraphicsMagick-c++-devel}
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: cmake >= 2.8
+BuildRequires: Qt5Xml-devel >= %{qt_ver}
+BuildRequires: cmake >= 3.16
BuildRequires: exiv2-devel
+BuildRequires: libarchive-devel
BuildRequires: libraw-devel
BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: pkgconfig
BuildRequires: poppler-qt5-devel
+BuildRequires: pugixml-devel
BuildRequires: python3-pychromecast
BuildRequires: qt5-build >= %{qt_ver}
BuildRequires: qt5-linguist >= %{qt_ver}
%prep
%setup -q
+%patch0 -p1
%build
install -d build
cd build
%cmake .. \
- %{!?with_gmagick:-DGM=OFF} \
- -DEXIV2=ON
+ -DEXIV2=ON \
+ %{!?with_gmagick:-DGM=OFF}
%{__make}
%install
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
%files
%defattr(644,root,root,755)
-%doc README CHANGELOG
+%doc CHANGELOG README.md
%attr(755,root,root) %{_bindir}/photoqt
-%{_datadir}/appdata/org.photoqt.PhotoQt.appdata.xml
+%{_datadir}/metainfo/org.photoqt.PhotoQt.metainfo.xml
%{_desktopdir}/org.photoqt.PhotoQt.desktop
%{_desktopdir}/org.photoqt.PhotoQt.standalone.desktop
-%{_iconsdir}/hicolor/*x*/apps/photoqt.png
+%{_iconsdir}/hicolor/*x*/apps/org.photoqt.PhotoQt.png