From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0A7F215810F for ; Thu, 8 Jun 2023 14:05:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB9E2E0878; Thu, 8 Jun 2023 14:05:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9F81BE086F for ; Thu, 8 Jun 2023 14:05:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3F787340928 for ; Thu, 8 Jun 2023 14:05:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9A165A8E for ; Thu, 8 Jun 2023 14:05:21 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1686233103.45054d191a69f21406abb12f69f42e2836dc2efa.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/luminance-hdr/, media-gfx/luminance-hdr/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-exiv2-0.28.patch media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r1.ebuild X-VCS-Directories: media-gfx/luminance-hdr/files/ media-gfx/luminance-hdr/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 45054d191a69f21406abb12f69f42e2836dc2efa X-VCS-Branch: master Date: Thu, 8 Jun 2023 14:05:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0156deba-bd74-48bd-97b0-4618738ab1ac X-Archives-Hash: c4dabf92160d91a768d602243f14a297 commit: 45054d191a69f21406abb12f69f42e2836dc2efa Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu Jun 8 13:44:08 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu Jun 8 14:05:03 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45054d19 media-gfx/luminance-hdr: Fix build with >=exiv2-0.28 Closes: https://bugs.gentoo.org/906490 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/luminance-hdr-2.6.1.1-exiv2-0.28.patch | 143 +++++++++++++++++++++ .../luminance-hdr/luminance-hdr-2.6.1.1-r1.ebuild | 6 +- 2 files changed, 146 insertions(+), 3 deletions(-) diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-exiv2-0.28.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-exiv2-0.28.patch new file mode 100644 index 000000000000..704b768c005b --- /dev/null +++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-exiv2-0.28.patch @@ -0,0 +1,143 @@ +diff --git a/src/Exif/ExifOperations.cpp b/src/Exif/ExifOperations.cpp +index dd3d22a6..4cfe6b70 100644 +--- a/src/Exif/ExifOperations.cpp ++++ b/src/Exif/ExifOperations.cpp +@@ -108,7 +108,11 @@ void copyExifData(const std::string &from, const std::string &to, + #endif + + try { ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ Exiv2::Image::UniquePtr sourceImage; ++#else + Exiv2::Image::AutoPtr sourceImage; ++#endif + Exiv2::ExifData srcExifData; + + if (!from.empty()) { +@@ -128,7 +132,11 @@ void copyExifData(const std::string &from, const std::string &to, + } + + // get destination exif data ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ Exiv2::Image::UniquePtr destinationImage = Exiv2::ImageFactory::open(to); ++#else + Exiv2::Image::AutoPtr destinationImage = Exiv2::ImageFactory::open(to); ++#endif + + if (dontOverwrite) { + // doesn't throw anything if it is empty +@@ -212,7 +220,11 @@ void copyExifData(const std::string &from, const std::string &to, + destinationImage->setExifData(srcExifData); + } + destinationImage->writeMetadata(); ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ } catch (Exiv2::Error &e) { ++#else + } catch (Exiv2::AnyError &e) { ++#endif + #ifndef NDEBUG + qDebug() << e.what(); + #endif +@@ -338,7 +350,11 @@ allowed for ev computation purposes. + + float getExposureTime(const std::string &filename) { + try { ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename); ++#else + Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); ++#endif + image->readMetadata(); + Exiv2::ExifData &exifData = image->exifData(); + if (exifData.empty()) return -1; +@@ -374,14 +390,22 @@ float getExposureTime(const std::string &filename) { + } else { + return -1; + } ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ } catch (Exiv2::Error &e) { ++#else + } catch (Exiv2::AnyError &e) { ++#endif + return -1; + } + } + + float getAverageLuminance(const std::string &filename) { + try { ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename); ++#else + Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); ++#endif + image->readMetadata(); + Exiv2::ExifData &exifData = image->exifData(); + +@@ -403,7 +427,11 @@ float getAverageLuminance(const std::string &filename) { + << std::endl; + + return -1.0; ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ } catch (Exiv2::Error &e) { ++#else + } catch (Exiv2::AnyError &e) { ++#endif + return -1.0; + } + } +diff --git a/src/Libpfs/exif/exifdata.cpp b/src/Libpfs/exif/exifdata.cpp +index 38472eff..79085e43 100644 +--- a/src/Libpfs/exif/exifdata.cpp ++++ b/src/Libpfs/exif/exifdata.cpp +@@ -52,7 +52,11 @@ ExifData::ExifData(const std::string &filename) { fromFile(filename); } + void ExifData::fromFile(const std::string &filename) { + reset(); + try { ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ ::Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename); ++#else + ::Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); ++#endif + image->readMetadata(); + ::Exiv2::ExifData &exifData = image->exifData(); + +@@ -121,7 +125,11 @@ void ExifData::fromFile(const std::string &filename) { + */ + if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) != + exifData.end()) { ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ long rotation = it->toUint32(); ++#else + long rotation = it->toLong(); ++#endif + switch (rotation) { + case 3: + m_orientation = 180; +@@ -134,7 +142,11 @@ void ExifData::fromFile(const std::string &filename) { + break; + } + } ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ } catch (Exiv2::Error &e) { ++#else + } catch (Exiv2::AnyError &e) { ++#endif + return; + } + } +diff --git a/src/TransplantExif/TransplantExifDialog.cpp b/src/TransplantExif/TransplantExifDialog.cpp +index 8364b595..a7683703 100644 +--- a/src/TransplantExif/TransplantExifDialog.cpp ++++ b/src/TransplantExif/TransplantExifDialog.cpp +@@ -347,7 +347,11 @@ void TransplantExifDialog::transplant_requested() { + QFile::encodeName((*i_dest)).constData(), + m_Ui->checkBox_dont_overwrite->isChecked()); + m_Ui->rightlist->item(index)->setBackground(QBrush("#a0ff87")); ++#if EXIV2_TEST_VERSION (0, 28, 0) ++ } catch (Exiv2::Error &e) { ++#else + } catch (Exiv2::AnyError &e) { ++#endif + add_log_message("ERROR:" + QString::fromStdString(e.what())); + m_Ui->rightlist->item(index)->setBackground(QBrush("#ff743d")); + } diff --git a/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r1.ebuild b/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r1.ebuild index 1b286cc00976..ab363c98a273 100644 --- a/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r1.ebuild +++ b/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r1.ebuild @@ -15,9 +15,6 @@ KEYWORDS="amd64 ~x86" IUSE="cpu_flags_x86_sse2 fits openmp test" RESTRICT="!test? ( test )" -BDEPEND=" - dev-qt/linguist-tools:5 -" RDEPEND=" dev-libs/boost:= dev-qt/qtconcurrent:5 @@ -46,6 +43,7 @@ DEPEND="${RDEPEND} dev-cpp/eigen:3 test? ( dev-cpp/gtest ) " +BDEPEND="dev-qt/linguist-tools:5" PATCHES=( "${FILESDIR}"/${P}-openexr3.patch @@ -54,6 +52,8 @@ PATCHES=( "${FILESDIR}"/${PN}-2.6.0-no-git.patch "${FILESDIR}"/${PN}-2.6.0-docs.patch "${FILESDIR}"/${PN}-2.5.1-openmp-automagic.patch + # patch by ArchLinux + "${FILESDIR}"/${P}-exiv2-0.28.patch ) pkg_pretend() {