From 2acc2fa3ec3be62b10103d2b0b0e76693739e0ed Mon Sep 17 00:00:00 2001
From: Luigi Baldoni <aloisio@gmx.com>
Date: Mon, 26 Aug 2019 14:20:52 +0000
Subject: [PATCH] Accepting request 726189 from home:alois:branches:graphics

Update to version 0.8.1

OBS-URL: https://build.opensuse.org/request/show/726189
OBS-URL: https://build.opensuse.org/package/show/graphics/qimgv?expand=0&rev=13
---
 qimgv-0.7.3.tar.gz      |  3 ---
 qimgv-0.8.1.tar.gz      |  3 +++
 qimgv-nosharedlib.patch | 18 +++++++++++++++++
 qimgv.changes           | 45 +++++++++++++++++++++++++++++++++++++++++
 qimgv.spec              | 13 ++++++++++--
 5 files changed, 77 insertions(+), 5 deletions(-)
 delete mode 100644 qimgv-0.7.3.tar.gz
 create mode 100644 qimgv-0.8.1.tar.gz
 create mode 100644 qimgv-nosharedlib.patch

diff --git a/qimgv-0.7.3.tar.gz b/qimgv-0.7.3.tar.gz
deleted file mode 100644
index 858e9f0..0000000
--- a/qimgv-0.7.3.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:54594495d2fe8540634cdfc9940b68257fef5be1ae012a7ec27034bea00735b7
-size 265171
diff --git a/qimgv-0.8.1.tar.gz b/qimgv-0.8.1.tar.gz
new file mode 100644
index 0000000..ac9bb4e
--- /dev/null
+++ b/qimgv-0.8.1.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cac11a82f2da6e7442a51de3e86640c6a6f85e09e634b914852e68d7205db30d
+size 237192
diff --git a/qimgv-nosharedlib.patch b/qimgv-nosharedlib.patch
new file mode 100644
index 0000000..38909e6
--- /dev/null
+++ b/qimgv-nosharedlib.patch
@@ -0,0 +1,18 @@
+Index: qimgv-0.8.1/qimgv_libs/qimgv_player_mpv/CMakeLists.txt
+===================================================================
+--- qimgv-0.8.1.orig/qimgv_libs/qimgv_player_mpv/CMakeLists.txt
++++ qimgv-0.8.1/qimgv_libs/qimgv_player_mpv/CMakeLists.txt
+@@ -10,7 +10,7 @@ find_package(Qt5Widgets REQUIRED)
+ 
+ include(GNUInstallDirs)
+ 
+-add_library(qimgv_player_mpv SHARED
++add_library(qimgv_player_mpv STATIC
+     src/videoplayer.cpp
+     src/mpvwidget.cpp
+     src/videoplayermpv.cpp)
+@@ -25,4 +25,3 @@ target_include_directories(qimgv_player_
+ 
+ add_definitions(-DQIMGV_PLAYER_MPV_LIBRARY)
+ 
+-install(TARGETS qimgv_player_mpv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/qimgv.changes b/qimgv.changes
index c968219..cd61af0 100644
--- a/qimgv.changes
+++ b/qimgv.changes
@@ -1,3 +1,48 @@
+-------------------------------------------------------------------
+Mon Aug 26 12:45:36 UTC 2019 - Luigi Baldoni <aloisio@gmx.com>
+
+- Update to version 0.8.1
+  New stuff:
+  * qimgv will now track changes in the current directory. May
+    not work for remote locations like smb shares.
+  * You can now change sorting mode on-the-fly. It Just Werks.
+  * Add sorting mode combobox in folder view, as well as
+    shortcuts Shift + 1 / 2 / 3.
+  * You can now rename files by pressing F2.
+  * Added sxiv-like info bar at the bottom.
+  * Added info panel that shows exif tags. Press I to toggle.
+  * Copy current file to clipboard by pressing Ctrl+C.
+  * Copy current file path by pressing Ctrl+Shift+C.
+  * Force reload file F5.
+  * Context menu now can be accessed by pressing Menu key.
+  * You can now assign a different shortcut to context menu, it
+    is no longer hardcoded to right click.
+  * You can now assign a shortcut to toggle transparency grid
+    display.
+  * Improve folder view performance.
+  * Improve touchpad scrolling when using libinput driver.
+  * A more polished UI theme. I plan on implementing totally
+    configurable theme via config files, but that is for another
+    release.
+  * Split config file in two parts. The main one will not change
+    every time you open program.
+  Bug fixes:
+  * (important one) Fixed long startup times by moving
+    videoplayer into a separate library that is loaded ondemand.
+    I've seen some complaints about this, please give this
+    version a try.
+  * Fix some issues with mouse event handling.
+  * Fix scaling working incorrectly for webp files.
+  * Fix opening wrong directory when passed . as an argument.
+  * Previously when you used "Open dialog" qimgv would sometimes
+    hang. Now it doesn't do that.
+  * Saving PNG files will no longed produce huge file sizes.
+  Notes:
+  * This release may be a bit buggy as it included quite a bit
+    of refactoring. Stuff will get fixed promptly.
+
+- Added qimgv-nosharedlib.patch
+
 -------------------------------------------------------------------
 Wed Jan 30 09:24:01 UTC 2019 - aloisio@gmx.com
 
diff --git a/qimgv.spec b/qimgv.spec
index e1b3799..028ac3c 100644
--- a/qimgv.spec
+++ b/qimgv.spec
@@ -17,28 +17,37 @@
 
 
 Name:           qimgv
-Version:        0.7.3
+Version:        0.8.1
 Release:        0
 Summary:        Qt5 image viewer
 License:        GPL-3.0-only
 Group:          Productivity/Graphics/Viewers
 URL:            https://github.com/easymodo/qimgv
 Source0:        https://github.com/easymodo/qimgv/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# PATCH-FEATURE-OPENSUSE qimgv-nosharedlib.patch # aloisio@gmx.com build helper library statically
+Patch0:         qimgv-nosharedlib.patch
 BuildRequires:  cmake
+%if 0%{?suse_version} > 1500
 BuildRequires:  gcc-c++
+%else
+BuildRequires:  gcc8-c++
+%endif
 BuildRequires:  hicolor-icon-theme
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(Qt5Concurrent) >= 5.9
 BuildRequires:  pkgconfig(Qt5Widgets) >= 5.9
+BuildRequires:  pkgconfig(exiv2)
 BuildRequires:  pkgconfig(mpv) >= 1.22.0
 
 %description
 Qt5 image viewer with webm support.
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
+export CXX=g++
+test -x "$(type -p g++-8)" && export CXX=g++-8
 %cmake
 make %{?_smp_mflags}