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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 11E7F15800A for ; Sun, 20 Aug 2023 17:07:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 637112BC013; Sun, 20 Aug 2023 17:07:28 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 4A3522BC013 for ; Sun, 20 Aug 2023 17:07:28 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5E111335C78 for ; Sun, 20 Aug 2023 17:07:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D681FBF4 for ; Sun, 20 Aug 2023 17:07:25 +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: <1692551229.40c5fd9857ca17b583abc7627acfa9547f2f4283.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/gpscorrelate/files/, sci-geosciences/gpscorrelate/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-geosciences/gpscorrelate/files/gpscorrelate-2.0-exiv2-0.28.patch sci-geosciences/gpscorrelate/gpscorrelate-2.0.ebuild X-VCS-Directories: sci-geosciences/gpscorrelate/files/ sci-geosciences/gpscorrelate/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 40c5fd9857ca17b583abc7627acfa9547f2f4283 X-VCS-Branch: master Date: Sun, 20 Aug 2023 17:07:25 +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: 258b5e60-1ed4-4dfc-8cc1-a2c1b04baab4 X-Archives-Hash: 4f23188bc2104a67c603654feb7ee54e commit: 40c5fd9857ca17b583abc7627acfa9547f2f4283 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Aug 20 17:02:30 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Aug 20 17:07:09 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40c5fd98 sci-geosciences/gpscorrelate: Fix build with >=exiv2-0.28 Closes: https://bugs.gentoo.org/906498 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/gpscorrelate-2.0-exiv2-0.28.patch | 135 +++++++++++++++++++++ .../gpscorrelate/gpscorrelate-2.0.ebuild | 1 + 2 files changed, 136 insertions(+) diff --git a/sci-geosciences/gpscorrelate/files/gpscorrelate-2.0-exiv2-0.28.patch b/sci-geosciences/gpscorrelate/files/gpscorrelate-2.0-exiv2-0.28.patch new file mode 100644 index 000000000000..f15032fd7c77 --- /dev/null +++ b/sci-geosciences/gpscorrelate/files/gpscorrelate-2.0-exiv2-0.28.patch @@ -0,0 +1,135 @@ +From 7c945a5c9116325dad795dbe9682c2c4a4dea2d9 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Sun, 20 Aug 2023 18:57:43 +0200 +Subject: [PATCH] Fix build with >=exiv2-0.28 + +Fixes https://github.com/dfandrich/gpscorrelate/issues/22 + +Signed-off-by: Andreas Sturmlechner +--- + exif-gps.cpp | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +diff --git a/exif-gps.cpp b/exif-gps.cpp +index d464d62..71b46ef 100644 +--- a/exif-gps.cpp ++++ b/exif-gps.cpp +@@ -44,6 +44,7 @@ + #include "exiv2/image.hpp" + #include "exiv2/exif.hpp" + #include "exiv2/error.hpp" ++#include "exiv2/version.hpp" + + #include "gpsstructure.h" + #include "exif-gps.h" +@@ -97,7 +98,11 @@ int main(int argc, char* argv[]) + char* ReadExifDate(const char* File, int* IncludesGPS) + { + // Open and read the file. ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Image::UniquePtr Image; ++#else + Exiv2::Image::AutoPtr Image; ++#endif + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -154,7 +159,11 @@ char* ReadExifData(const char* File, double* Lat, double* Long, double* Elev, in + // much more data than the last, specifically + // for display purposes. For the GUI version. + // Open and read the file. ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Image::UniquePtr Image; ++#else + Exiv2::Image::AutoPtr Image; ++#endif + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -273,7 +282,11 @@ char* ReadExifData(const char* File, double* Lat, double* Long, double* Elev, in + + // Is the altitude below sea level? If so, negate the value. + GPSData = ExifRead["Exif.GPSInfo.GPSAltitudeRef"]; ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ if (GPSData.count() >= 1 && GPSData.toUint32() == 1) ++#else + if (GPSData.count() >= 1 && GPSData.toLong() == 1) ++#endif + { + // Negate the elevation. + *Elev = -*Elev; +@@ -292,7 +305,11 @@ char* ReadGPSTimestamp(const char* File, char* DateStamp, char* TimeStamp, int* + // much more data than the last, specifically + // for display purposes. For the GUI version. + // Open and read the file. ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Image::UniquePtr Image; ++#else + Exiv2::Image::AutoPtr Image; ++#endif + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -463,7 +480,11 @@ int WriteGPSData(const char* File, const struct GPSPoint* Point, + struct utimbuf utb; + if (NoChangeMtime) + stat(File, &statbuf); ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Image::UniquePtr Image; ++#else + Exiv2::Image::AutoPtr Image; ++#endif + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -493,7 +514,11 @@ int WriteGPSData(const char* File, const struct GPSPoint* Point, + // Do all the easy constant ones first. + // GPSVersionID tag: standard says it should be four bytes: 02 02 00 00 + // (and, must be present). ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Value::UniquePtr Value = Exiv2::Value::create(Exiv2::unsignedByte); ++#else + Exiv2::Value::AutoPtr Value = Exiv2::Value::create(Exiv2::unsignedByte); ++#endif + Value->read("2 2 0 0"); + replace(ExifToWrite, Exiv2::ExifKey("Exif.GPSInfo.GPSVersionID"), Value.get()); + // Datum: the datum of the measured data. The default is WGS-84. +@@ -643,7 +668,11 @@ int WriteFixedDatestamp(const char* File, time_t Time) + struct utimbuf utb; + stat(File, &statbuf); + ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Image::UniquePtr Image; ++#else + Exiv2::Image::AutoPtr Image; ++#endif + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -672,7 +701,11 @@ int WriteFixedDatestamp(const char* File, time_t Time) + ExifToWrite.erase(ExifToWrite.findKey(Exiv2::ExifKey("Exif.GPSInfo.GPSDateStamp"))); + ExifToWrite["Exif.GPSInfo.GPSDateStamp"] = ScratchBuf; + ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Value::UniquePtr Value = Exiv2::Value::create(Exiv2::unsignedRational); ++#else + Exiv2::Value::AutoPtr Value = Exiv2::Value::create(Exiv2::unsignedRational); ++#endif + snprintf(ScratchBuf, sizeof(ScratchBuf), "%d/1 %d/1 %d/1", + TimeStamp.tm_hour, TimeStamp.tm_min, + TimeStamp.tm_sec); +@@ -705,7 +738,11 @@ int RemoveGPSExif(const char* File, int NoChangeMtime, int NoWriteExif) + stat(File, &statbuf); + + // Open the file and start reading. ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ Exiv2::Image::UniquePtr Image; ++#else + Exiv2::Image::AutoPtr Image; ++#endif + + try { + Image = Exiv2::ImageFactory::open(File); +-- +2.41.0 + diff --git a/sci-geosciences/gpscorrelate/gpscorrelate-2.0.ebuild b/sci-geosciences/gpscorrelate/gpscorrelate-2.0.ebuild index 982684d854bb..f2d065010f21 100644 --- a/sci-geosciences/gpscorrelate/gpscorrelate-2.0.ebuild +++ b/sci-geosciences/gpscorrelate/gpscorrelate-2.0.ebuild @@ -29,6 +29,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${P}-desktop-pass-validation.patch" "${FILESDIR}/${P}-respect-users-flags.patch" + "${FILESDIR}/${P}-exiv2-0.28.patch" # bug 906498 ) src_compile() {