public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/
@ 2016-01-14 16:04 Michael Palimaka
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Palimaka @ 2016-01-14 16:04 UTC (permalink / raw
  To: gentoo-commits

commit:     1c670dcff7734dbb86f8dbfeb9495a1cbfeefd0a
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 14 16:04:03 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Jan 14 16:04:28 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c670dcf

media-gfx/nomacs: version bump

Gentoo-bug: 571534

Package-Manager: portage-2.2.26

 media-gfx/nomacs/Manifest                          |  1 +
 .../nomacs/files/nomacs-3.0.0-quazip-build.patch   | 32 ++++++++++
 .../nomacs/files/nomacs-3.0.0-quazip-link.patch    | 25 ++++++++
 .../nomacs/files/nomacs-3.0.0-tiff-build.patch     | 28 +++++++++
 media-gfx/nomacs/nomacs-3.0.0.ebuild               | 68 ++++++++++++++++++++++
 5 files changed, 154 insertions(+)

diff --git a/media-gfx/nomacs/Manifest b/media-gfx/nomacs/Manifest
index acc003c..eabafb6 100644
--- a/media-gfx/nomacs/Manifest
+++ b/media-gfx/nomacs/Manifest
@@ -1,3 +1,4 @@
 DIST nomacs-2.4.2-source.tar.bz2 1443270 SHA256 b0f52b919025a48a0e0300ea15c90b40d6ad892b055088fca02a8137e229bc3a SHA512 e3fae11ae8c385f9548bda32b2364967a457e9645fa4375da9d1cf85dc8fb150a56a19c3eab12ddef90d58f20a57d02a8720ddb8fef22c569ab6c28d54654f02 WHIRLPOOL ac21dd3afe3b45324daa6e07030203611c9f2de4ad1427ce4bb388d84ade5e38a686b42e0d757adbaa3a91fbb658d94f9f47de61e9ccf4ccc339af4ce1c4fd8d
 DIST nomacs-2.4.4-source.tar.bz2 1448716 SHA256 01b0cb48936ca0214c120a126069c50a9b8fe7ecbdb69bb4e5fe283d6b198257 SHA512 76cd5efaba09584757843e895b5b8293adcdab7df68a7d5bdcf38e9e5df04e38382944cf64293c9820815b9e6328793dd8e46afef5ffeaa80ddc4f7d43290fc2 WHIRLPOOL d858887f66cbbed858c1985313107839a8162052bfb825bc48f344516444a1e184e839c9a067283d7503b98a6993126ade3f39c0a85b50ca534f963335c85513
 DIST nomacs-2.4.6-source.tar.bz2 1457529 SHA256 b846e335c768593e9f36cdee1a5c186e7794c76770ea3cadc87cf264153e8960 SHA512 9389df46635e619e198388e8b161a840d15227dd902cf04c250e71211098a10fd808d710ebab71f3e9a437bdca9451f966c46d22c2ce2379b94b678e79e92d71 WHIRLPOOL 97ccd02cbeabda62888ed25065cd24ce9a297b7bae3f9343e903d0223e8107cab601834fbc6dcf31a0b7f8d9e93052ba5a1a08e9c5e006027994c27bdb6f3940
+DIST nomacs-3.0.0-source.tar.bz2 1465264 SHA256 a0e30cf2795dc18d1af29435145ea37f0cbb8dfb4013e01f5af267039560e476 SHA512 2a536012eed6ba59227aab9374fc22b7c9d49340d335c6c124cdc8f366f279a62edc37407dff47f1444b0d52f9df13e165ee76d44d453badefbffe5effbf8449 WHIRLPOOL 9a75bba86531b87025b8a01d96c9a12a2549d6d462cc0baeb37e06e37e419cb6e81d3be5c2b4894adb001210429f851dea4035aa281104566d1b168c9a81938d

diff --git a/media-gfx/nomacs/files/nomacs-3.0.0-quazip-build.patch b/media-gfx/nomacs/files/nomacs-3.0.0-quazip-build.patch
new file mode 100644
index 0000000..5f33b65
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.0.0-quazip-build.patch
@@ -0,0 +1,32 @@
+From 204dd809ae0d6287385905d44c1a60a38a7c4084 Mon Sep 17 00:00:00 2001
+From: diemmarkus <diemmarkus@gmail.com>
+Date: Thu, 14 Jan 2016 16:35:55 +0100
+Subject: [PATCH] #44 (github) fix proposed by @kensingtion
+
+---
+ ImageLounge/src/DkImageLoader.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ImageLounge/src/DkImageLoader.cpp b/ImageLounge/src/DkImageLoader.cpp
+index 5d66e09..3a00010 100644
+--- a/ImageLounge/src/DkImageLoader.cpp
++++ b/ImageLounge/src/DkImageLoader.cpp
+@@ -512,6 +512,7 @@ QSharedPointer<DkImageContainerT> DkImageLoader::getSkippedImage(int skipIdx, bo
+ 
+ 	}
+ 
++#ifdef WITH_QUAZIP
+ 	if (mCurrentImage && (newFileIdx < 0 || newFileIdx >= mImages.size()) && mCurrentImage->isFromZip() && mCurrentImage->getZipData()) {
+ 
+ 		// load the zip again and go on from there
+@@ -522,6 +523,7 @@ QSharedPointer<DkImageContainerT> DkImageLoader::getSkippedImage(int skipIdx, bo
+ 
+ 		return getSkippedImage(newFileIdx);
+ 	}
++#endif
+ 
+ 	// this should never happen!
+ 	if (mImages.empty()) {
+-- 
+2.4.10
+

diff --git a/media-gfx/nomacs/files/nomacs-3.0.0-quazip-link.patch b/media-gfx/nomacs/files/nomacs-3.0.0-quazip-link.patch
new file mode 100644
index 0000000..d31f650
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.0.0-quazip-link.patch
@@ -0,0 +1,25 @@
+From 060f4e972fec0308404a7e535b43254b06908a84 Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Thu, 14 Jan 2016 00:24:05 +1100
+Subject: [PATCH] Fix linking failure with system quazip.
+
+---
+ ImageLounge/cmake/UnixBuildTarget.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ImageLounge/cmake/UnixBuildTarget.cmake b/ImageLounge/cmake/UnixBuildTarget.cmake
+index ce95617..8a59c97 100644
+--- a/ImageLounge/cmake/UnixBuildTarget.cmake
++++ b/ImageLounge/cmake/UnixBuildTarget.cmake
+@@ -93,7 +93,7 @@ else()
+ 		  
+   add_library(${DLL_NAME} SHARED ${NOMACS_SOURCES} ${NOMACS_UI} ${NOMACS_HEADERS} ${NOMACS_RC} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS} ${WEBP_SOURCE}  ${QUAZIP_SOURCES} ${NOMACS_RESOURCES} ${NOMACS_RCC})
+   target_include_directories(${DLL_NAME} PRIVATE  ${OpenCV_INCLUDE_DIRS})
+-  target_link_libraries(${DLL_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBRARIES} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${WEBP_LIBRARIES} ${WEBP_STATIC_LIBRARIES})
++  target_link_libraries(${DLL_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBRARIES} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${WEBP_LIBRARIES} ${QUAZIP_LIBRARIES} ${WEBP_STATIC_LIBRARIES})
+   add_dependencies(${BINARY_NAME} ${DLL_NAME})
+   set_target_properties(${DLL_NAME} PROPERTIES PREFIX "")
+ 
+-- 
+2.4.10
+

diff --git a/media-gfx/nomacs/files/nomacs-3.0.0-tiff-build.patch b/media-gfx/nomacs/files/nomacs-3.0.0-tiff-build.patch
new file mode 100644
index 0000000..71f564c
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.0.0-tiff-build.patch
@@ -0,0 +1,28 @@
+From 0ac51051b7e9460a2958917750d7c31072318313 Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Thu, 14 Jan 2016 00:55:24 +1100
+Subject: [PATCH] Fix build with tiff disabled.
+
+---
+ ImageLounge/src/DkBasicLoader.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ImageLounge/src/DkBasicLoader.cpp b/ImageLounge/src/DkBasicLoader.cpp
+index 67ef31f..8c2c71e 100644
+--- a/ImageLounge/src/DkBasicLoader.cpp
++++ b/ImageLounge/src/DkBasicLoader.cpp
+@@ -98,9 +98,11 @@
+ #endif
+ 
+ #else
++#ifdef WIN32
+ #include <olectl.h>
+ #pragma comment(lib, "oleaut32.lib")
+ #endif
++#endif
+ 
+ #pragma warning(pop)
+ 
+-- 
+2.4.10
+

diff --git a/media-gfx/nomacs/nomacs-3.0.0.ebuild b/media-gfx/nomacs/nomacs-3.0.0.ebuild
new file mode 100644
index 0000000..67552f9
--- /dev/null
+++ b/media-gfx/nomacs/nomacs-3.0.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fdo-mime
+
+DESCRIPTION="Qt-based image viewer"
+HOMEPAGE="http://www.nomacs.org/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}-source.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux"
+IUSE="opencv raw tiff webp zip"
+
+REQUIRED_USE="
+	raw? ( opencv )
+	tiff? ( opencv )
+"
+
+RDEPEND="
+	dev-qt/qtconcurrent:5
+	dev-qt/qtcore:5
+	dev-qt/qtgui:5
+	dev-qt/qtnetwork:5
+	dev-qt/qtprintsupport:5
+	dev-qt/qtsvg:5
+	dev-qt/qtwidgets:5
+	>=media-gfx/exiv2-0.25:=
+	opencv? ( media-libs/opencv:=[qt5] )
+	raw? ( >=media-libs/libraw-0.14:= )
+	tiff? ( media-libs/tiff:0 )
+	webp? ( >=media-libs/libwebp-0.3.1:= )
+	zip? ( dev-libs/quazip[qt5] )
+"
+DEPEND="${RDEPEND}
+	dev-qt/linguist-tools:5
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-tiff-build.patch"
+	"${FILESDIR}/${P}-quazip-build.patch"
+	"${FILESDIR}/${P}-quazip-link.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_enable opencv)
+		$(cmake-utils_use_enable raw)
+		$(cmake-utils_use_enable tiff)
+		$(cmake-utils_use_enable webp)
+		$(cmake-utils_use_enable zip QUAZIP)
+		-DUSE_SYSTEM_WEBP=ON
+		-DUSE_SYSTEM_QUAZIP=ON
+	)
+	cmake-utils_src_configure
+}
+
+pkg_postinst() {
+	fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/
@ 2016-10-23 16:59 Michael Palimaka
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Palimaka @ 2016-10-23 16:59 UTC (permalink / raw
  To: gentoo-commits

commit:     8a158a4cebd6ae94a54e8191b83c73ac6507956c
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sat Oct 22 14:59:18 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 16:58:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a158a4c

media-gfx/nomacs: Add USE=jpeg, fix build with !opencv

Gentoo-bug: 592118, 592134

Package-Manager: portage-2.3.0

 media-gfx/nomacs/files/nomacs-3.4-no-opencv.patch | 11 +++++++++++
 media-gfx/nomacs/nomacs-3.4.ebuild                |  6 ++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/media-gfx/nomacs/files/nomacs-3.4-no-opencv.patch b/media-gfx/nomacs/files/nomacs-3.4-no-opencv.patch
new file mode 100644
index 00000000..698b45c
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.4-no-opencv.patch
@@ -0,0 +1,11 @@
+--- a/src/DkLoader/DkBasicLoader.h
++++ b/src/DkLoader/DkBasicLoader.h
+@@ -258,7 +258,7 @@ class DllLoaderExport DkBasicLoader : public QObject {
+ 	bool readHeader(const unsigned char** dataPtr, int& fileCount, int& vecSize) const;
+ 	void getPatchSizeFromFileName(const QString& fileName, int& width, int& height) const;
+ #else
+-	bool loadOpenCVVecFile(const QString&, QSharedPointer<QByteArray> = QSharedPointer<QByteArray>(), QSize = QSize()) { return false; };
++	bool loadOpenCVVecFile(const QString&, QImage&, QSharedPointer<QByteArray> = QSharedPointer<QByteArray>(), QSize = QSize()) { return false; };
+ 	int mergeVecFiles(const QStringList&, QString&) const { return 0; };
+ 	bool readHeader(const unsigned char**, int&, int&) const { return false; };
+ 	void getPatchSizeFromFileName(const QString&, int&, int&) const {};

diff --git a/media-gfx/nomacs/nomacs-3.4.ebuild b/media-gfx/nomacs/nomacs-3.4.ebuild
index 51f52db..564fc85 100644
--- a/media-gfx/nomacs/nomacs-3.4.ebuild
+++ b/media-gfx/nomacs/nomacs-3.4.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/3.4.tar.gz -> ${P}.tar.gz"
 LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS="~amd64 ~amd64-linux"
-IUSE="opencv raw tiff zip"
+IUSE="+jpeg opencv raw tiff zip"
 
 REQUIRED_USE="
 	raw? ( opencv )
@@ -23,7 +23,7 @@ REQUIRED_USE="
 RDEPEND="
 	dev-qt/qtconcurrent:5
 	dev-qt/qtcore:5
-	dev-qt/qtgui:5
+	dev-qt/qtgui:5[jpeg?]
 	dev-qt/qtnetwork:5
 	dev-qt/qtprintsupport:5
 	dev-qt/qtsvg:5
@@ -41,6 +41,8 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/${P}/ImageLounge"
 
+PATCHES=( "${FILESDIR}/${P}-no-opencv.patch" ) # bug 592134
+
 src_configure() {
 	local mycmakeargs=(
 		-DENABLE_OPENCV=$(usex opencv)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/
@ 2017-08-30 13:40 Michael Palimaka
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Palimaka @ 2017-08-30 13:40 UTC (permalink / raw
  To: gentoo-commits

commit:     d380638becc3a9476fa45c5489a03a10bfa38be6
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 30 13:39:46 2017 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Aug 30 13:40:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d380638b

media-gfx/nomacs: backport patch from upstream fixing batch resize issue

Gentoo-bug: 629330
Package-Manager: Portage-2.3.6, Repoman-2.3.3

 .../nomacs/files/nomacs-3.6.1-batch-resize.patch   | 23 +++++++
 media-gfx/nomacs/nomacs-3.6.1-r1.ebuild            | 75 ++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/media-gfx/nomacs/files/nomacs-3.6.1-batch-resize.patch b/media-gfx/nomacs/files/nomacs-3.6.1-batch-resize.patch
new file mode 100644
index 00000000000..b2dd078d0e9
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.6.1-batch-resize.patch
@@ -0,0 +1,23 @@
+From 11cbd66ca66ea9d97d72546a92fe2b487e62481b Mon Sep 17 00:00:00 2001
+From: diemmarkus <diemmarkus@gmail.com>
+Date: Wed, 17 May 2017 10:08:05 +0200
+Subject: [PATCH] fixes #118 batch resizing - used to only work if rotate was
+ active
+
+---
+ ImageLounge/src/DkCore/DkProcess.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/ImageLounge/src/DkCore/DkProcess.cpp b/ImageLounge/src/DkCore/DkProcess.cpp
+index a47b4194..d0dfd97f 100644
+--- a/src/DkCore/DkProcess.cpp
++++ b/src/DkCore/DkProcess.cpp
+@@ -255,8 +255,6 @@ bool DkBatchTransform::compute(QSharedPointer<DkImageContainer> container, QStri
+ 		rotationMatrix.rotate((double)mAngle);
+ 		tmpImg = tmpImg.transformed(rotationMatrix);
+ 	}
+-	else
+-		tmpImg = img;
+ 
+ 	// logs
+ 	if (!tmpImg.isNull()) {

diff --git a/media-gfx/nomacs/nomacs-3.6.1-r1.ebuild b/media-gfx/nomacs/nomacs-3.6.1-r1.ebuild
new file mode 100644
index 00000000000..719d2960818
--- /dev/null
+++ b/media-gfx/nomacs/nomacs-3.6.1-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils xdg-utils
+
+DESCRIPTION="Qt-based image viewer"
+HOMEPAGE="https://nomacs.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="+jpeg opencv raw tiff zip"
+
+REQUIRED_USE="
+	raw? ( opencv )
+	tiff? ( opencv )
+"
+
+RDEPEND="
+	dev-qt/qtconcurrent:5
+	dev-qt/qtcore:5
+	dev-qt/qtgui:5[jpeg?]
+	dev-qt/qtnetwork:5
+	dev-qt/qtprintsupport:5
+	dev-qt/qtsvg:5
+	dev-qt/qtwidgets:5
+	>=media-gfx/exiv2-0.25:=
+	opencv? ( media-libs/opencv:=[-qt4(-)] )
+	raw? ( >=media-libs/libraw-0.14:= )
+	tiff? ( media-libs/tiff:0 )
+	zip? ( >=dev-libs/quazip-0.7.2[qt5] )
+"
+DEPEND="${RDEPEND}
+	dev-qt/linguist-tools:5
+	virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P}/ImageLounge"
+
+PATCHES=( "${FILESDIR}/${P}-batch-resize.patch" )
+
+src_prepare() {
+	default
+
+	# fix build with quazip-0.7.2 - bug 598354
+	sed -i -e "s/find_package(QuaZIP/find_package(QuaZip5/" cmake/Unix.cmake || die
+	sed -e "s/include <quazip/&5/" \
+		-i src/DkCore/DkImageLoader.cpp \
+		-i src/DkCore/DkImageContainer.cpp \
+		-i src/DkCore/DkBasicLoader.cpp \
+		-i src/DkGui/DkDialog.cpp || die
+
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DENABLE_OPENCV=$(usex opencv)
+		-DENABLE_RAW=$(usex raw)
+		-DENABLE_TIFF=$(usex tiff)
+		-DENABLE_QUAZIP=$(usex zip)
+		-DUSE_SYSTEM_QUAZIP=ON
+	)
+	cmake-utils_src_configure
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/
@ 2018-04-13 20:00 Andreas Sturmlechner
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2018-04-13 20:00 UTC (permalink / raw
  To: gentoo-commits

commit:     562d2464e9c757a3005865796b10ad7bc2a960e7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 13 19:05:49 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Apr 13 19:59:43 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=562d2464

media-gfx/nomacs: Fix cmake with Qt 5.11

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 media-gfx/nomacs/files/nomacs-3.8.1-qt-5.11.patch | 103 ++++++++++++++++++++++
 media-gfx/nomacs/nomacs-3.8.1.ebuild              |   2 +
 2 files changed, 105 insertions(+)

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 00000000000..e9e68af826f
--- /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 819f349f01c..c3951a6a70e 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
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/
@ 2018-10-11 11:44 Michael Palimaka
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Palimaka @ 2018-10-11 11:44 UTC (permalink / raw
  To: gentoo-commits

commit:     fdef1668253c80e7ca1fa7d6dbc4ebc0424a9a72
Author:     band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Mon Oct  1 23:43:38 2018 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Oct 11 11:44:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdef1668

media-gfx/nomacs: 3.10.2 version bump

Nomacs-3.10.2 was released on 5 July 2018 and brings several enhancements:

* anti-aliasing improved
* printing improved
* print multiple pages from thumbnail preview
* animiated WebP support
* JPG compressed TIFFs supported
* batch cropping added
* PSD lib updated
* new translations: Bosnian, Croation, and Serbian
* adds Qt style/ plugins
* adds padding to HUD labels (e.g. zoom)
* fixes disabling update interactions
* adds config.ini that can be used for multi-user systems
* adds mng & jp2 support (again)

Closes: https://bugs.gentoo.org/664962
Closes: https://github.com/gentoo/gentoo/pull/10041

Signed-off-by: Sergey Torokhov <torokhov_s_a <AT> mail.ru>
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>

 media-gfx/nomacs/Manifest                          |  1 +
 .../nomacs-3.10.2_fix_move_crop_area_tooltip.patch | 38 ++++++++++
 media-gfx/nomacs/nomacs-3.10.2.ebuild              | 82 ++++++++++++++++++++++
 3 files changed, 121 insertions(+)

diff --git a/media-gfx/nomacs/Manifest b/media-gfx/nomacs/Manifest
index 10318c615c6..c1c1c77ff1f 100644
--- a/media-gfx/nomacs/Manifest
+++ b/media-gfx/nomacs/Manifest
@@ -1 +1,2 @@
+DIST nomacs-3.10.2.tar.gz 32302506 BLAKE2B 14f9eb9188f74c91cf088bac757a4023f6590bc05687b4809794a70bdd1e2dbcc2b58ad65062db14cfec9f4c639ceb21e64df19f1c1584256ee9586ab588d8af SHA512 977dbe24e09b00001dd8a33b18c1dbbb3a59106715746b07892f289918205818664fd7b4213028d4288009bcf14a0195759ac1eafca076f81ee72a1e2ae027dd
 DIST nomacs-3.8.1.tar.gz 32184536 BLAKE2B 3ba4e0b0220797991c5999164e27fb3c57218d87d17858f5cf6098d8b91ddd0b3330836642999ce953f3ce9b538dcb35ecb48400f94f11805cd8eedeed05b110 SHA512 ff27570bc15096d0e331ad2c871b2f504a414927b8e64166668dedbbbc41f8cd031d9fb142c89c22cff76bf79156f93decf1038e30eecfc3de3e328a325f0134

diff --git a/media-gfx/nomacs/files/nomacs-3.10.2_fix_move_crop_area_tooltip.patch b/media-gfx/nomacs/files/nomacs-3.10.2_fix_move_crop_area_tooltip.patch
new file mode 100644
index 00000000000..ace6f3d5152
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.10.2_fix_move_crop_area_tooltip.patch
@@ -0,0 +1,38 @@
+From e963ab5870945b40055b8fc7eb2708ee11f8d4fd Mon Sep 17 00:00:00 2001
+From: Markus Diem <diemmarkus@gmail.com>
+Date: Fri, 7 Sep 2018 15:11:18 +0200
+Subject: [PATCH] show crop info when moving
+
+- fixes #253
+---
+ ImageLounge/src/DkGui/DkWidgets.cpp | 6 +++---
+ ImageLounge/src/nomacs.rc           | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ImageLounge/src/DkGui/DkWidgets.cpp b/ImageLounge/src/DkGui/DkWidgets.cpp
+index 61c0c05e..b6a5eadb 100644
+--- a/src/DkGui/DkWidgets.cpp
++++ b/src/DkGui/DkWidgets.cpp
+@@ -1820,7 +1820,7 @@ void DkEditableRect::mouseMoveEvent(QMouseEvent *event) {
+ 		setAngle(angle, false);
+ 	}
+ 
+-	if (event->buttons() == Qt::LeftButton && mState != moving) {
++	if (event->buttons() == Qt::LeftButton) {
+ 
+ 		QPolygonF p = mRect.getPoly();
+ 
+@@ -1833,11 +1833,11 @@ void DkEditableRect::mouseMoveEvent(QMouseEvent *event) {
+ 		QPoint tl;
+ 
+ 		if (sAngle == 0.0f || fabs(sAngle) == 90.0f) {
+-			tl = mRect.getTopLeft().toPoint();
++			tl = mRtform.map(mRect.getTopLeft()).toPoint();
+ 			info += "x: ";
+ 		}
+ 		else {
+-			tl = mRect.getCenter().toPoint();
++			tl = mRtform.map(mRect.getCenter()).toPoint();
+ 			info += "center x: ";
+ 		}
+ 		info += QString::number(tl.x()) + ", y: ";

diff --git a/media-gfx/nomacs/nomacs-3.10.2.ebuild b/media-gfx/nomacs/nomacs-3.10.2.ebuild
new file mode 100644
index 00000000000..bd6b71e7f27
--- /dev/null
+++ b/media-gfx/nomacs/nomacs-3.10.2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils xdg-utils
+
+DESCRIPTION="Qt-based image viewer"
+HOMEPAGE="https://nomacs.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="+jpeg +opencv raw tiff zip"
+
+REQUIRED_USE="
+	raw? ( opencv )
+	tiff? ( opencv )
+"
+
+RDEPEND="
+	dev-qt/qtconcurrent:5
+	dev-qt/qtcore:5
+	dev-qt/qtgui:5[jpeg?]
+	dev-qt/qtnetwork:5
+	dev-qt/qtprintsupport:5
+	dev-qt/qtsvg:5
+	dev-qt/qtwidgets:5
+	>=media-gfx/exiv2-0.25:=
+	opencv? ( media-libs/opencv:=[-qt4(-)] )
+	raw? ( >=media-libs/libraw-0.14:= )
+	tiff? (
+		dev-qt/qtimageformats:5
+		media-libs/tiff:0
+	)
+	zip? ( >=dev-libs/quazip-0.7.2[qt5(+)] )
+"
+DEPEND="${RDEPEND}
+	dev-qt/linguist-tools:5
+	virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P}/ImageLounge"
+
+DOCS=( src/changelog.txt )
+
+PATCHES=( "${FILESDIR}/${P}_fix_move_crop_area_tooltip.patch" )
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	# fix build with quazip-0.7.2 - bug 598354
+	sed -i -e "s/find_package(QuaZIP/find_package(QuaZip5/" cmake/Unix.cmake || die
+	sed -e "s/include <quazip/&5/" \
+		-i src/DkCore/DkImageLoader.cpp \
+		-i src/DkCore/DkImageContainer.cpp \
+		-i src/DkCore/DkBasicLoader.cpp \
+		-i src/DkGui/DkDialog.cpp || die
+
+	sed -i -e "/setup_target_for_coverage/s/^/#/" CMakeLists.txt || die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DENABLE_OPENCV=$(usex opencv)
+		-DENABLE_RAW=$(usex raw)
+		-DENABLE_TIFF=$(usex tiff)
+		-DENABLE_QUAZIP=$(usex zip)
+		-DUSE_SYSTEM_QUAZIP=ON
+		-DENABLE_TRANSLATIONS=ON
+	)
+	cmake-utils_src_configure
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/
@ 2020-07-18  8:41 Andreas Sturmlechner
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2020-07-18  8:41 UTC (permalink / raw
  To: gentoo-commits

commit:     c97e7b1c25f32e8e6b0fb70a74b9af2ad607db4c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 18 00:53:48 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jul 18 08:31:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c97e7b1c

media-gfx/nomacs: Drop 3.12

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/nomacs/Manifest                     |  1 -
 media-gfx/nomacs/files/nomacs-3.12-gcc9.patch | 39 ---------------
 media-gfx/nomacs/nomacs-3.12.ebuild           | 69 ---------------------------
 3 files changed, 109 deletions(-)

diff --git a/media-gfx/nomacs/Manifest b/media-gfx/nomacs/Manifest
index 8b3319018db..b35cedb5a0a 100644
--- a/media-gfx/nomacs/Manifest
+++ b/media-gfx/nomacs/Manifest
@@ -1,3 +1,2 @@
-DIST nomacs-3.12.tar.gz 1736648 BLAKE2B 533e18dec4be5d945213ccd629262a2cbae1eba93599f43be0a98d32d0b54d9caad7d963809f2fc9bb5c1ba682a39f44763b5d04e50c6e86658f6cd84324f3d2 SHA512 4508354d48a6115cd40f701cc90cbbcb84490e99eaac0295db48f6fea99550d5e2b3e7365128d0c9cc4eeb621906f55e275603d84cb8b6bb164d0b5e2e192119
 DIST nomacs-3.14.2.tar.gz 2169504 BLAKE2B 6050ddba3ddbdeb7d1fbd29831d5dfbee066b61398ef46be4145a287d565eb2d55d59f47bc9e9e34a10379f8e0e676ca1f5373389a0d35c27fe85cff5da3fded SHA512 58104c85078bdbff7f65625658bb01b152631470eea93a43494eed55ae5e2441b7bcf3ed6c8f1aef07831bc99c80af94467fcc0e15dc1d282ef313bfcb3c81e9
 DIST nomacs-plugins-3.14.tar.gz 514472 BLAKE2B fe8e1608c0a0ed502ea82efe80a9cfab3a9aff3ca7e8cbecfcb199377d137f5c19ad176940ef1f1109938634af3548008da1311339e6da78b8b5b983102bebb6 SHA512 c0bca87e50b7b91d80a9d6afd95eeb1d6730b17b9a28ad4109514b36c42781b3f67b25f68f48c0953110d1e02bb03762e813af9c1ec2851c072b4aea74969cbd

diff --git a/media-gfx/nomacs/files/nomacs-3.12-gcc9.patch b/media-gfx/nomacs/files/nomacs-3.12-gcc9.patch
deleted file mode 100644
index ccf6ea31d9d..00000000000
--- a/media-gfx/nomacs/files/nomacs-3.12-gcc9.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 37805e3bc8753970127db101f4aa0c061bc5a70d Mon Sep 17 00:00:00 2001
-From: Michael Palimaka <kensington@gentoo.org>
-Date: Sun, 9 Jun 2019 19:15:28 +1000
-Subject: [PATCH] Fix build with GCC9
-
----
- ImageLounge/src/DkCore/DkMetaData.cpp | 2 ++
- ImageLounge/src/DkGui/DkNoMacs.cpp    | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/ImageLounge/src/DkCore/DkMetaData.cpp b/ImageLounge/src/DkCore/DkMetaData.cpp
-index 7540f7b9..fe2bc7ec 100644
---- a/src/DkCore/DkMetaData.cpp
-+++ b/src/DkCore/DkMetaData.cpp
-@@ -42,6 +42,8 @@
- #include <QApplication>
- #pragma warning(pop)		// no warnings from includes - end
- 
-+#include <iostream>
-+
- namespace nmc {
- 
- // DkMetaDataT --------------------------------------------------------------------
-diff --git a/ImageLounge/src/DkGui/DkNoMacs.cpp b/ImageLounge/src/DkGui/DkNoMacs.cpp
-index edda14cd..8fcdb59c 100644
---- a/src/DkGui/DkNoMacs.cpp
-+++ b/src/DkGui/DkNoMacs.cpp
-@@ -99,6 +99,8 @@
- 
- #include <assert.h>
- 
-+#include <iostream>
-+
- namespace nmc {
- 
- DkNomacsOSXEventFilter::DkNomacsOSXEventFilter(QObject *parent) : QObject(parent) {
--- 
-2.21.0
-

diff --git a/media-gfx/nomacs/nomacs-3.12.ebuild b/media-gfx/nomacs/nomacs-3.12.ebuild
deleted file mode 100644
index a527bc46b3e..00000000000
--- a/media-gfx/nomacs/nomacs-3.12.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake xdg-utils
-
-DESCRIPTION="Qt-based image viewer"
-HOMEPAGE="https://nomacs.org/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="amd64 x86 ~amd64-linux"
-IUSE="+jpeg +opencv raw tiff zip"
-
-REQUIRED_USE="
-	raw? ( opencv )
-	tiff? ( opencv )
-"
-
-RDEPEND="
-	dev-qt/qtconcurrent:5
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5[jpeg?]
-	dev-qt/qtnetwork:5
-	dev-qt/qtprintsupport:5
-	dev-qt/qtsvg:5
-	dev-qt/qtwidgets:5
-	media-gfx/exiv2:=
-	opencv? ( >=media-libs/opencv-3.4:= )
-	raw? ( media-libs/libraw:= )
-	tiff? (
-		dev-qt/qtimageformats:5
-		media-libs/tiff:0
-	)
-	zip? ( dev-libs/quazip[qt5(+)] )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	dev-qt/linguist-tools:5
-	virtual/pkgconfig
-"
-
-S="${WORKDIR}/${P}/ImageLounge"
-
-DOCS=( src/changelog.txt )
-PATCHES=( "${FILESDIR}/${P}-gcc9.patch" )
-
-src_configure() {
-	local mycmakeargs=(
-		-DENABLE_CODE_COV=OFF
-		-DUSE_SYSTEM_QUAZIP=ON
-		-DENABLE_TRANSLATIONS=ON
-		-DENABLE_OPENCV=$(usex opencv)
-		-DENABLE_RAW=$(usex raw)
-		-DENABLE_TIFF=$(usex tiff)
-		-DENABLE_QUAZIP=$(usex zip)
-	)
-	cmake_src_configure
-}
-
-pkg_postinst() {
-	xdg_desktop_database_update
-}
-
-pkg_postrm() {
-	xdg_desktop_database_update
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/
@ 2023-09-03 12:19 Andreas Sturmlechner
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2023-09-03 12:19 UTC (permalink / raw
  To: gentoo-commits

commit:     7707a66f2b6329bed44fb75c9478cebac0888ce5
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  3 11:45:47 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Sep  3 12:18:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7707a66f

media-gfx/nomacs: Fix build with >=exiv2-0.28

Closes: https://bugs.gentoo.org/906488
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../nomacs/files/nomacs-3.16.224-exiv2-0.28.patch  | 241 +++++++++++++++++++++
 media-gfx/nomacs/nomacs-3.16.224-r6.ebuild         |   5 +-
 2 files changed, 245 insertions(+), 1 deletion(-)

diff --git a/media-gfx/nomacs/files/nomacs-3.16.224-exiv2-0.28.patch b/media-gfx/nomacs/files/nomacs-3.16.224-exiv2-0.28.patch
new file mode 100644
index 000000000000..280d7ec59e8b
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-3.16.224-exiv2-0.28.patch
@@ -0,0 +1,241 @@
+From 6785f15d9ed05ebc66ee200b3c94451c6c633646 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 3 Sep 2023 13:30:43 +0200
+Subject: [PATCH] Fix 3.16.224 build with exiv2-0.28
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ ImageLounge/src/DkCore/DkMetaData.cpp | 59 ++++++++++++++++++---------
+ ImageLounge/src/DkCore/DkMetaData.h   |  4 +-
+ 2 files changed, 41 insertions(+), 22 deletions(-)
+
+diff --git a/ImageLounge/src/DkCore/DkMetaData.cpp b/ImageLounge/src/DkCore/DkMetaData.cpp
+index bf1d111e..5eaeebf4 100644
+--- a/ImageLounge/src/DkCore/DkMetaData.cpp
++++ b/ImageLounge/src/DkCore/DkMetaData.cpp
+@@ -73,8 +73,12 @@ void DkMetaDataT::readMetaData(const QString& filePath, QSharedPointer<QByteArra
+ 			mExifImg = Exiv2::ImageFactory::open(strFilePath);
+ 		}
+ 		else {
++#if EXIV2_TEST_VERSION(0, 28, 0)
++			mExifImg = Exiv2::ImageFactory::open((const byte *)ba->constData(), ba->size());
++#else
+ 			Exiv2::BasicIo::AutoPtr exifBuffer(new Exiv2::MemIo((const byte*)ba->constData(), ba->size()));
+ 			mExifImg = Exiv2::ImageFactory::open(exifBuffer);
++#endif
+ 		}
+ 	} 
+ 	catch (...) {
+@@ -155,14 +159,18 @@ bool DkMetaDataT::saveMetaData(QSharedPointer<QByteArray>& ba, bool force) {
+ 	Exiv2::ExifData &exifData = mExifImg->exifData();
+ 	Exiv2::XmpData &xmpData = mExifImg->xmpData();
+ 	Exiv2::IptcData &iptcData = mExifImg->iptcData();
+-
+-	Exiv2::Image::AutoPtr exifImgN;
++	std::unique_ptr<Exiv2::Image> exifImgN;
++#if !EXIV2_TEST_VERSION(0, 28, 0)
+ 	Exiv2::MemIo::AutoPtr exifMem;
++#endif
+ 
+ 	try {
+-
++#if EXIV2_TEST_VERSION(0, 28, 0)
++		exifImgN = Exiv2::ImageFactory::open((byte *)ba->data(), ba->size());
++#else
+ 		exifMem = Exiv2::MemIo::AutoPtr(new Exiv2::MemIo((byte*)ba->data(), ba->size()));
+ 		exifImgN = Exiv2::ImageFactory::open(exifMem);
++#endif
+ 	} 
+ 	catch (...) {
+ 
+@@ -186,8 +194,13 @@ bool DkMetaDataT::saveMetaData(QSharedPointer<QByteArray>& ba, bool force) {
+ 
+ 	// now get the data again
+ 	Exiv2::DataBuf exifBuf = exifImgN->io().read((long)exifImgN->io().size());
++#if EXIV2_TEST_VERSION(0, 28, 0)
++	if (!exifBuf.empty()) {
++		QSharedPointer<QByteArray> tmp = QSharedPointer<QByteArray>(new QByteArray((const char *)exifBuf.c_data(), exifBuf.size()));
++#else
+ 	if (exifBuf.pData_) {
+ 		QSharedPointer<QByteArray> tmp = QSharedPointer<QByteArray>(new QByteArray((const char*)exifBuf.pData_, exifBuf.size_));
++#endif
+ 
+ 		if (tmp->size() > qRound(ba->size()*0.5f))
+ 			ba = tmp;
+@@ -197,7 +210,7 @@ bool DkMetaDataT::saveMetaData(QSharedPointer<QByteArray>& ba, bool force) {
+ 	else
+ 		return false;
+ 
+-	mExifImg = exifImgN;
++	mExifImg.swap(exifImgN);
+ 	mExifState = loaded;
+ 
+ 	return true;
+@@ -250,7 +263,7 @@ int DkMetaDataT::getOrientationDegree() const {
+ 
+ 			if (pos != exifData.end() && pos->count() != 0) {
+ 			
+-				Exiv2::Value::AutoPtr v = pos->getValue();
++				std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 				orientation = (int)pos->toFloat();
+ 
+ 				switch (orientation) {
+@@ -315,7 +328,7 @@ int DkMetaDataT::getRating() const {
+ 		Exiv2::ExifData::iterator pos = exifData.findKey(key);
+ 
+ 		if (pos != exifData.end() && pos->count() != 0) {
+-			Exiv2::Value::AutoPtr v = pos->getValue();
++			std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 			exifRating = v->toFloat();
+ 		}
+ 	}
+@@ -327,7 +340,7 @@ int DkMetaDataT::getRating() const {
+ 
+ 		//xmp Rating tag
+ 		if (pos != xmpData.end() && pos->count() != 0) {
+-			Exiv2::Value::AutoPtr v = pos->getValue();
++			std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 			xmpRating = v->toFloat();
+ 		}
+ 
+@@ -336,7 +349,7 @@ int DkMetaDataT::getRating() const {
+ 			key = Exiv2::XmpKey("Xmp.MicrosoftPhoto.Rating");
+ 			pos = xmpData.findKey(key);
+ 			if (pos != xmpData.end() && pos->count() != 0) {
+-				Exiv2::Value::AutoPtr v = pos->getValue();
++				std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 				xmpRating = v->toFloat();
+ 			}
+ 		}
+@@ -399,7 +412,7 @@ QString DkMetaDataT::getNativeExifValue(const QString& key) const {
+ 			if (pos->count () < 2000) {	// diem: this is about performance - adobe obviously embeds whole images into tiff exiv data 
+ 
+ 				//qDebug() << "pos count: " << pos->count();
+-				//Exiv2::Value::AutoPtr v = pos->getValue();
++				//std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 				info = exiv2ToQString(pos->toString());
+ 
+ 			}
+@@ -436,7 +449,7 @@ QString DkMetaDataT::getXmpValue(const QString& key) const {
+ 		}
+ 
+ 		if (pos != xmpData.end() && pos->count() != 0) {
+-			Exiv2::Value::AutoPtr v = pos->getValue();
++			std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 			info = exiv2ToQString(pos->toString());
+ 		}
+ 	}
+@@ -478,7 +491,7 @@ QString DkMetaDataT::getExifValue(const QString& key) const {
+ 		}
+ 
+ 		if (pos != exifData.end() && pos->count() != 0) {
+-			//Exiv2::Value::AutoPtr v = pos->getValue();
++			//std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 			info = exiv2ToQString(pos->toString());
+ 		}
+ 	}
+@@ -508,7 +521,7 @@ QString DkMetaDataT::getIptcValue(const QString& key) const {
+ 		}
+ 
+ 		if (pos != iptcData.end() && pos->count() != 0) {
+-			Exiv2::Value::AutoPtr v = pos->getValue();
++			std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 			info = exiv2ToQString(pos->toString());
+ 		}
+ 	}
+@@ -653,8 +666,11 @@ QImage DkMetaDataT::getThumbnail() const {
+ 	try {
+ 		Exiv2::ExifThumb thumb(exifData);
+ 		Exiv2::DataBuf buffer = thumb.copy();
+-
++#if EXIV2_TEST_VERSION(0, 28, 0)
++		QByteArray ba = QByteArray((char *)buffer.c_data(), buffer.size());
++#else
+ 		QByteArray ba = QByteArray((char*)buffer.pData_, buffer.size_);
++#endif
+ 		qThumb.loadFromData(ba);
+ 	}
+ 	catch (...) {
+@@ -931,9 +947,12 @@ void DkMetaDataT::setThumbnail(QImage thumb) {
+ 
+ 		try {
+ 			// whipe all exif data of the thumbnail
++#if EXIV2_TEST_VERSION(0, 28, 0)
++			Exiv2::Image::UniquePtr exifImgThumb = Exiv2::ImageFactory::open((const byte *)ba.constData(), ba.size());
++#else
+ 			Exiv2::MemIo::AutoPtr exifBufferThumb(new Exiv2::MemIo((const byte*)ba.constData(), ba.size()));
+ 			Exiv2::Image::AutoPtr exifImgThumb = Exiv2::ImageFactory::open(exifBufferThumb);
+-
++#endif
+ 			if (exifImgThumb.get() != 0 && exifImgThumb->good())
+ 				exifImgThumb->clearExifData();
+ 		}
+@@ -1045,11 +1064,11 @@ void DkMetaDataT::setOrientation(int o) {
+ 		pos = exifData.findKey(key);
+ 	}
+ 
+-	Exiv2::Value::AutoPtr v = pos->getValue();
++	std::unique_ptr<Exiv2::Value> v = pos->getValue();
+ 	Exiv2::UShortValue* prv = dynamic_cast<Exiv2::UShortValue*>(v.release());
+ 	if (!prv) return;
+ 
+-	Exiv2::UShortValue::AutoPtr rv = Exiv2::UShortValue::AutoPtr(prv);
++	std::unique_ptr<Exiv2::UShortValue> rv = std::unique_ptr<Exiv2::UShortValue>(prv);
+ 	if (rv->value_.empty())	return;
+ 
+ 	orientation = (int) rv->value_[0];
+@@ -1110,7 +1129,7 @@ void DkMetaDataT::setRating(int r) {
+ 		exifData["Exif.Image.Rating"] = uint16_t(r);
+ 		exifData["Exif.Image.RatingPercent"] = uint16_t(r);
+ 
+-		Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::xmpText);
++		std::unique_ptr<Exiv2::Value> v = Exiv2::Value::create(Exiv2::xmpText);
+ 		v->read(sRating);
+ 		xmpData.add(Exiv2::XmpKey("Xmp.xmp.Rating"), v.get());
+ 		v->read(sRatingPercent);
+@@ -1354,9 +1373,9 @@ DkRotatingRect DkMetaDataT::getXMPRect(const QSize& size) const {
+ 	return DkRotatingRect(rr);
+ }
+ 
+-Exiv2::Image::AutoPtr DkMetaDataT::loadSidecar(const QString& filePath) const {
++std::unique_ptr<Exiv2::Image> DkMetaDataT::loadSidecar(const QString& filePath) const {
+ 
+-	Exiv2::Image::AutoPtr xmpImg;
++	std::unique_ptr<Exiv2::Image> xmpImg;
+ 
+ 	//TODO: check if the file type supports xmp
+ 
+@@ -1409,7 +1428,7 @@ bool DkMetaDataT::setXMPValue(Exiv2::XmpData& xmpData, QString xmpKey, QString x
+ 				setXMPValueSuccessful = true;
+ 		}
+ 		else {
+-			Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::xmpText);
++			std::unique_ptr<Exiv2::Value> v = Exiv2::Value::create(Exiv2::xmpText);
+ 			if (!v->read(xmpValue.toStdString())) {
+ 				if (!xmpData.add(Exiv2::XmpKey(key), v.get()))
+ 					setXMPValueSuccessful = true;
+diff --git a/ImageLounge/src/DkCore/DkMetaData.h b/ImageLounge/src/DkCore/DkMetaData.h
+index c1f73c93..183a906a 100644
+--- a/ImageLounge/src/DkCore/DkMetaData.h
++++ b/ImageLounge/src/DkCore/DkMetaData.h
+@@ -148,7 +148,7 @@ public:
+ 
+ protected:
+ 	
+-	Exiv2::Image::AutoPtr loadSidecar(const QString& filePath) const;
++	std::unique_ptr<Exiv2::Image> loadSidecar(const QString& filePath) const;
+ 
+ 	enum {
+ 		not_loaded,
+@@ -157,7 +157,7 @@ protected:
+ 		dirty,
+ 	};
+ 
+-	Exiv2::Image::AutoPtr mExifImg;
++	std::unique_ptr<Exiv2::Image> mExifImg;
+ 	QString mFilePath;
+ 	QStringList mQtKeys;
+ 	QStringList mQtValues;
+-- 
+2.42.0
+

diff --git a/media-gfx/nomacs/nomacs-3.16.224-r6.ebuild b/media-gfx/nomacs/nomacs-3.16.224-r6.ebuild
index d7020dcb57d8..ddfa980d7e71 100644
--- a/media-gfx/nomacs/nomacs-3.16.224-r6.ebuild
+++ b/media-gfx/nomacs/nomacs-3.16.224-r6.ebuild
@@ -48,7 +48,10 @@ BDEPEND="
 
 DOCS=( src/changelog.txt )
 
-PATCHES=( "${FILESDIR}"/${P}-libdir.patch )
+PATCHES=(
+	"${FILESDIR}"/${P}-libdir.patch
+	"${FILESDIR}"/${P}-exiv2-0.28.patch # bug 906488
+)
 
 src_prepare() {
 	if use plugins ; then


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-09-03 12:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-23 16:59 [gentoo-commits] repo/gentoo:master commit in: media-gfx/nomacs/files/, media-gfx/nomacs/ Michael Palimaka
  -- strict thread matches above, loose matches on Subject: below --
2023-09-03 12:19 Andreas Sturmlechner
2020-07-18  8:41 Andreas Sturmlechner
2018-10-11 11:44 Michael Palimaka
2018-04-13 20:00 Andreas Sturmlechner
2017-08-30 13:40 Michael Palimaka
2016-01-14 16:04 Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox