summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-04-13 21:05:49 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-04-13 21:59:43 +0200
commit562d2464e9c757a3005865796b10ad7bc2a960e7 (patch)
tree7b63c0ada0ee3a224672ae653809cd6e448d81cf /media-gfx
parentmedia-gfx/nomacs: version bump to 3.8.1 (diff)
downloadgentoo-562d2464e9c757a3005865796b10ad7bc2a960e7.tar.gz
gentoo-562d2464e9c757a3005865796b10ad7bc2a960e7.tar.bz2
gentoo-562d2464e9c757a3005865796b10ad7bc2a960e7.zip
media-gfx/nomacs: Fix cmake with Qt 5.11
Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/nomacs/files/nomacs-3.8.1-qt-5.11.patch103
-rw-r--r--media-gfx/nomacs/nomacs-3.8.1.ebuild2
2 files changed, 105 insertions, 0 deletions
diff --git a/media-gfx/nomacs/files/nomacs-3.8.1-qt-5.11.patch b/media-gfx/nomacs/files/nomacs-3.8.1-qt-5.11.patch
new file mode 100644
index 000000000000..e9e68af826fb
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.8.1-qt-5.11.patch
@@ -0,0 +1,103 @@
+From 8480a1c62aa99b6a73a76c9af80392568e0dae5e Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Fri, 13 Apr 2018 21:09:17 +0200
+Subject: [PATCH 1/2] Fix cmake with Qt 5.11_beta3
+
+---
+ cmake/MacBuildTarget.cmake | 4 ++--
+ cmake/UnixBuildTarget.cmake | 4 ++--
+ cmake/WinBuildTarget.cmake | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/cmake/MacBuildTarget.cmake b/cmake/MacBuildTarget.cmake
+index eae9a76b..54633ca1 100644
+--- a/cmake/MacBuildTarget.cmake
++++ b/cmake/MacBuildTarget.cmake
+@@ -66,8 +66,8 @@ add_dependencies(
+ ${QUAZIP_DEPENDENCY}
+ ${LIBQPSD_LIBRARY})
+
+-qt5_use_modules(${BINARY_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
+-qt5_use_modules(${DLL_CORE_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
++qt5_use_modules(${BINARY_NAME} Qt5::Widgets Qt5::Gui Qt5::Network Qt5::PrintSupport Qt5::Concurrent Qt5::Svg)
++qt5_use_modules(${DLL_CORE_NAME} Qt5::Widgets Qt5::Gui Qt5::Network Qt5::PrintSupport Qt5::Concurrent Qt5::Svg)
+
+ # core flags
+ set_target_properties(${DLL_CORE_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/libs)
+diff --git a/cmake/UnixBuildTarget.cmake b/cmake/UnixBuildTarget.cmake
+index 4eb3108e..3f592764 100644
+--- a/cmake/UnixBuildTarget.cmake
++++ b/cmake/UnixBuildTarget.cmake
+@@ -58,8 +58,8 @@ add_dependencies(
+ ${QUAZIP_DEPENDENCY}
+ ${LIBQPSD_LIBRARY})
+
+-qt5_use_modules(${BINARY_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
+-qt5_use_modules(${DLL_CORE_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
++target_link_libraries(${BINARY_NAME} Qt5::Widgets Qt5::Gui Qt5::Network Qt5::PrintSupport Qt5::Concurrent Qt5::Svg)
++target_link_libraries(${DLL_CORE_NAME} Qt5::Widgets Qt5::Gui Qt5::Network Qt5::PrintSupport Qt5::Concurrent Qt5::Svg)
+
+ # core flags
+ set_target_properties(${DLL_CORE_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/libs)
+diff --git a/cmake/WinBuildTarget.cmake b/cmake/WinBuildTarget.cmake
+index 9a71d508..63a4b27d 100644
+--- a/cmake/WinBuildTarget.cmake
++++ b/cmake/WinBuildTarget.cmake
+@@ -62,8 +62,8 @@ add_dependencies(
+ target_include_directories(${BINARY_NAME} PRIVATE ${OpenCV_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
+ target_include_directories(${DLL_CORE_NAME} PRIVATE ${OpenCV_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
+
+-qt5_use_modules(${BINARY_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg WinExtras)
+-qt5_use_modules(${DLL_CORE_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg WinExtras)
++target_link_libraries(${BINARY_NAME} Qt5::Widgets Qt5::Gui Qt5::Network Qt5::PrintSupport Qt5::Concurrent Qt5::Svg Qt5::WinExtras)
++target_link_libraries(${DLL_CORE_NAME} Qt5::Widgets Qt5::Gui Qt5::Network Qt5::PrintSupport Qt5::Concurrent Qt5::Svg Qt5::WinExtras)
+
+ # set(_moc ${CMAKE_CURRENT_BINARY_DIR}/GeneratedFiles)
+ file(GLOB NOMACS_AUTOMOC "${CMAKE_BINARY_DIR}/*_automoc.cpp ${CMAKE_BINARY_DIR}/moc_.cpp")
+--
+2.17.0
+
+
+From 6c400cb6341e4c15413b0406d575779a6f3ce6c5 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Fri, 13 Apr 2018 21:36:15 +0200
+Subject: [PATCH 2/2] Require minimum Qt5 version as documented in README.md
+
+---
+ CMakeLists.txt | 2 ++
+ cmake/Utils.cmake | 4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5869c2c6..5b9abe67 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -36,6 +36,8 @@ set(NOMACS_BUILD_DIRECTORY ${CMAKE_BINARY_DIR})
+ # include macros needed
+ include("cmake/Utils.cmake")
+
++set(QT5_MIN_VERSION 5.2.1)
++
+ # different compile options
+ option(ENABLE_OPENCV "Compile with Opencv (needed for RAW and TIFF)" ON)
+ option(ENABLE_RAW "Compile with raw images support (libraw)" ON)
+diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake
+index 5ea88a69..bdd547cb 100644
+--- a/cmake/Utils.cmake
++++ b/cmake/Utils.cmake
+@@ -17,10 +17,10 @@ macro(NMC_FINDQT)
+ set(QT_ROOT ${QT_QMAKE_PATH}/)
+ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QT_QMAKE_PATH}\\..\\lib\\cmake\\Qt5)
+
+- find_package(Qt5 REQUIRED Core Widgets Network LinguistTools PrintSupport Concurrent Gui Svg)
++ find_package(Qt5 ${QT5_MIN_VERSION} REQUIRED COMPONENTS Core Widgets Network LinguistTools PrintSupport Concurrent Gui Svg)
+
+ if (MSVC)
+- find_package(Qt5 REQUIRED WinExtras)
++ find_package(Qt5 ${QT5_MIN_VERSION} REQUIRED WinExtras)
+ endif()
+
+ if (NOT Qt5_FOUND)
+--
+2.17.0
+
diff --git a/media-gfx/nomacs/nomacs-3.8.1.ebuild b/media-gfx/nomacs/nomacs-3.8.1.ebuild
index 819f349f01c7..c3951a6a70e3 100644
--- a/media-gfx/nomacs/nomacs-3.8.1.ebuild
+++ b/media-gfx/nomacs/nomacs-3.8.1.ebuild
@@ -45,6 +45,8 @@ S="${WORKDIR}/${P}/ImageLounge"
DOCS=( src/changelog.txt )
+PATCHES=( "${FILESDIR}"/${P}-qt-5.11.patch )
+
src_prepare() {
cmake-utils_src_prepare