summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-02-20 19:47:02 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-02-23 20:52:28 +0100
commit7cd2ccbbdbfcb61f94a5f51dcabdce0074d061a2 (patch)
treea85cdd3804eb7439a6099db00ae747cd7cb513ac /media-gfx/nomacs/files
parentapp-misc/rbutil: Drop 1.4.1-r1 (diff)
downloadgentoo-7cd2ccbbdbfcb61f94a5f51dcabdce0074d061a2.tar.gz
gentoo-7cd2ccbbdbfcb61f94a5f51dcabdce0074d061a2.tar.bz2
gentoo-7cd2ccbbdbfcb61f94a5f51dcabdce0074d061a2.zip
media-gfx/nomacs: Support build with >=dev-libs/quazip-1.0
Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-gfx/nomacs/files')
-rw-r--r--media-gfx/nomacs/files/nomacs-3.16.224-quazip1.patch127
1 files changed, 127 insertions, 0 deletions
diff --git a/media-gfx/nomacs/files/nomacs-3.16.224-quazip1.patch b/media-gfx/nomacs/files/nomacs-3.16.224-quazip1.patch
new file mode 100644
index 00000000000..06f6b8c2fb8
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.16.224-quazip1.patch
@@ -0,0 +1,127 @@
+From b4a1e98a83598072ea6d720ae4d56d380bee5a75 Mon Sep 17 00:00:00 2001
+From: Petr Vanek <petr@yarpen.cz>
+Date: Sun, 15 Nov 2020 19:15:59 +0100
+Subject: [PATCH] fixed #569 Build fails with quazip 1.0 (#576)
+
+---
+ cmake/Unix.cmake | 28 +++++++++++++++------
+ src/DkCore/DkBasicLoader.cpp | 4 +++
+ src/DkCore/DkImageContainer.cpp | 4 +++
+ src/DkCore/DkImageLoader.cpp | 6 ++++-
+ src/DkGui/DkDialog.cpp | 4 +++
+ 5 files changed, 37 insertions(+), 9 deletions(-)
+
+diff --git a/cmake/Unix.cmake b/cmake/Unix.cmake
+index 5567084b..c90ba320 100644
+--- a/cmake/Unix.cmake
++++ b/cmake/Unix.cmake
+@@ -102,14 +102,26 @@ unset(QT_ROOT CACHE)
+
+ if(ENABLE_QUAZIP)
+ if(USE_SYSTEM_QUAZIP)
+- SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+-
+- find_package(QuaZip5 QUIET)
+- if(NOT QUAZIP_FOUND)
+- message(FATAL_ERROR "QUAZIP not found. It's mandatory when used with ENABLE_QUAZIP enabled, you can also disable USE_SYSTEM_QUAZIP")
+- else()
+- add_definitions(-DWITH_QUAZIP)
+- endif()
++ # Let's try QuaZip1 first (it's the bright future)
++ find_package(QuaZip-Qt5 QUIET)
++ if (QuaZip-Qt5_FOUND)
++ message(STATUS "QUAZIP: QuaZip-1 for Qt5 found")
++ set(QUAZIP_LIBRARIES QuaZip::QuaZip)
++ add_definitions(-DWITH_QUAZIP1)
++ else ()
++ message(WARNING "QUAZIP: 1.x not found. Trying to find 0.x")
++ # QuaZip < 1.0. This leg can be removed (including cmake/FindQuaZip5.cmake)
++ # ater the final migration to 1.x in Linux distros
++ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
++
++ find_package(QuaZip5 QUIET)
++ if(NOT QUAZIP_FOUND)
++ message(FATAL_ERROR "QUAZIP: even 0.x not found. It's mandatory when used with ENABLE_QUAZIP enabled, you can also disable USE_SYSTEM_QUAZIP")
++ endif()
++
++ endif (QuaZip-Qt5_FOUND)
++ # we have any QuaZip after all
++ add_definitions(-DWITH_QUAZIP)
+ else()
+ find_package(ZLIB REQUIRED)
+ set(QUAZIP_INCLUDE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/quazip-0.7/quazip ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/quazip-0.7/)
+diff --git a/src/DkCore/DkBasicLoader.cpp b/src/DkCore/DkBasicLoader.cpp
+index 7f9e889c..b7edfd43 100644
+--- a/src/DkCore/DkBasicLoader.cpp
++++ b/src/DkCore/DkBasicLoader.cpp
+@@ -54,8 +54,12 @@
+
+ // quazip
+ #ifdef WITH_QUAZIP
++#ifdef WITH_QUAZIP1
++#include <quazip/JlCompress.h>
++#else
+ #include <quazip5/JlCompress.h>
+ #endif
++#endif
+
+ // opencv
+ #ifdef WITH_OPENCV
+diff --git a/src/DkCore/DkImageContainer.cpp b/src/DkCore/DkImageContainer.cpp
+index 810994d3..150da9c2 100644
+--- a/src/DkCore/DkImageContainer.cpp
++++ b/src/DkCore/DkImageContainer.cpp
+@@ -41,8 +41,12 @@
+
+ // quazip
+ #ifdef WITH_QUAZIP
++#ifdef WITH_QUAZIP1
++#include <quazip/JlCompress.h>
++#else
+ #include <quazip5/JlCompress.h>
+ #endif
++#endif
+ #pragma warning(pop) // no warnings from includes - end
+
+ #pragma warning(disable: 4251) // TODO: remove
+diff --git a/src/DkCore/DkImageLoader.cpp b/src/DkCore/DkImageLoader.cpp
+index 09d25d23..e4186f2b 100644
+--- a/src/DkCore/DkImageLoader.cpp
++++ b/src/DkCore/DkImageLoader.cpp
+@@ -79,8 +79,12 @@
+
+ // quazip
+ #ifdef WITH_QUAZIP
++#ifdef WITH_QUAZIP1
++#include <quazip/JlCompress.h>
++#else
+ #include <quazip5/JlCompress.h>
+ #endif
++#endif
+
+ // opencv
+ #ifdef WITH_OPENCV
+@@ -2212,4 +2216,4 @@ QString DkImageLoader::fileName() const {
+ return mCurrentImage->fileName();
+ }
+
+-}
+\ No newline at end of file
++}
+diff --git a/src/DkGui/DkDialog.cpp b/src/DkGui/DkDialog.cpp
+index 008c9a3b..85842eca 100644
+--- a/src/DkGui/DkDialog.cpp
++++ b/src/DkGui/DkDialog.cpp
+@@ -97,8 +97,12 @@
+
+ // quazip
+ #ifdef WITH_QUAZIP
++#ifdef WITH_QUAZIP1
++#include <quazip/JlCompress.h>
++#else
+ #include <quazip5/JlCompress.h>
+ #endif
++#endif
+
+ #pragma warning(pop) // no warnings from includes - end
+