From nobody Sun Jul 09 22:09:32 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QzhBN4Sgkz4mqwf; Sun, 9 Jul 2023 22:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QzhBN1y7xz3C7K; Sun, 9 Jul 2023 22:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688940572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jy43ytfcEY9lbEYzESZdT6tI+1bRMBwL/9fM+T8aQgE=; b=xYB9bovEpPh018GaFp+ot+j7bKIBIZptsauFw+HyrAZAY1VA6wUdxS2K21euJX9ADYGMe4 0llRSHpEbaT2UnBOMAah+kgEB0cv88jpyiMOVu0HGPX4zjXJigE03AE+9Tj2XmhPr+Jb+Z hvmLOyxV4e0NsfWJ5yZi7hVuwzAH7Pb+1S6mGRMqj2uZRhvcZraZqE/NHVCkmslvIJkdvL oPAoGsqgLJlW/+LrMs7BtOTNJzfi6H82nxAaFbXALONK8ZA7Bf0+l6hNSqRwsnSPHCIi6h 2++dYHIj9Sll4LNnbBICoo9ww9c1glNt+rTanX+HLKJQpv9xGFEzr0hv5QffxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688940572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jy43ytfcEY9lbEYzESZdT6tI+1bRMBwL/9fM+T8aQgE=; b=pxQonLORfYIb7GNHbnZnHZMSHQBJDxAJ4G0joGUQfYh0Zy6bE6njpK2kFHGJPwU6NpIYpa oxzJ5uCRm0P3hiZ+zNu+rtobY898OqNRpWhM41M5ropaxS2/Jagtq30bVdJRAwxNN6JDrD HFZnvtfcs+l/R9SffmLia6bWcyq4lXRdNyWTIByC81CDkLQPwwgwuYpCRg2B4rJnroHN8k Geyc4ha9okmufqoQ1lDepCVlcEsWV7U3WstSgfhAUpkXDbyKXhz7ukosWtkst4OjCqR82X aJzvhkTQUHOS5mz1oHD3JH0kuOWzXR+uVi/APrDhdamndQu1l2bUgnBI4okD9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688940572; a=rsa-sha256; cv=none; b=j+4+6PCO+Rfa/BWNF/LTUgaIt7b0MZkh1FoNQw/nltFXRLx3aZHNmC5ncGnybAcvqgANb4 Gc6EGQY76LuNp5Q31TJws4jOupwEHksk8geo27xhojwAE0kFubezVL7Kcb/k/stt/UDzED lMh/2tS/KJaRCW/evL3T1v9DObBkXtQ91UxKk/cWJxB9/CIciGsFMYpLwLcQMb6PIQkScR vh7eSBR5ysBXcl4pUg2okuswvs8VlxPqt2LISKo+ioJFBMbTI9ZH5iMSKxzJz78aOTfcZj GM01MY1GPzUGzJF8qMWVAfgoju76phYwScvQJ9q0BktSRUofdagdBm0c3ODeKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QzhBN145pzKts; Sun, 9 Jul 2023 22:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 369M9WBm034138; Sun, 9 Jul 2023 22:09:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 369M9W33034137; Sun, 9 Jul 2023 22:09:32 GMT (envelope-from git) Date: Sun, 9 Jul 2023 22:09:32 GMT Message-Id: <202307092209.369M9W33034137@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Andree Subject: git: 7684f850fde1 - main - graphics/geeqie: make compatible with exiv2 0.28 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mandree X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7684f850fde165b5cc6e9df067d2fc0e1a3a03ff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=7684f850fde165b5cc6e9df067d2fc0e1a3a03ff commit 7684f850fde165b5cc6e9df067d2fc0e1a3a03ff Author: Matthias Andree AuthorDate: 2023-07-02 12:32:40 +0000 Commit: Matthias Andree CommitDate: 2023-07-09 22:08:07 +0000 graphics/geeqie: make compatible with exiv2 0.28 Mostly https://github.com/BestImageViewer/geeqie/commit/86d5f780bae35d0fc2122646ff415633b5f15a60 without the #if mess. Note there is a remaining NEF crasher reported against newer 2.1, supposedly fixed by https://github.com/BestImageViewer/geeqie/commit/c45cca777aa3477eaf297db99f337e18d9683c61 which is not part of this commit. PR: 272311 --- graphics/geeqie/Makefile | 3 +- graphics/geeqie/files/patch-src_exiv2.cc | 95 ++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/graphics/geeqie/Makefile b/graphics/geeqie/Makefile index 18b81ae56e22..93c569abfa5a 100644 --- a/graphics/geeqie/Makefile +++ b/graphics/geeqie/Makefile @@ -1,7 +1,7 @@ PORTNAME= geeqie DISTVERSIONPREFIX= v DISTVERSION= 2.0.1 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= graphics MAINTAINER= amdmi3@FreeBSD.org @@ -21,6 +21,7 @@ USE_GNOME= cairo gdkpixbuf2 gtk30 glib20 USE_GITHUB= yes GH_ACCOUNT= BestImageViewer SHEBANG_FILES= plugins/*/geeqie-* +CFLAGS= -Wno-deprecated-declarations PORTDOCS= * diff --git a/graphics/geeqie/files/patch-src_exiv2.cc b/graphics/geeqie/files/patch-src_exiv2.cc new file mode 100644 index 000000000000..cf6ee24db1d5 --- /dev/null +++ b/graphics/geeqie/files/patch-src_exiv2.cc @@ -0,0 +1,95 @@ +--- src/exiv2.cc.orig 2022-08-12 09:36:37 UTC ++++ src/exiv2.cc +@@ -52,6 +52,11 @@ + #define EXV_PACKAGE "exiv2" + #endif + ++#if EXIV2_TEST_VERSION(0,28,0) ++#define AnyError Error ++#define AutoPtr UniquePtr ++#endif ++ + extern "C" { + #include + +@@ -176,7 +181,7 @@ struct _ExifDataOriginal : public _ExifData (public) + { + cp_data_ = NULL; + cp_length_ = 0; +- image_ = image; ++ image_ = std::move(image); + valid_ = TRUE; + } + +@@ -364,7 +369,7 @@ struct _ExifDataProcessed : public _ExifData (public) + Exiv2::Image *image = imageData_->image(); + + #ifdef HAVE_EXIV2_ERROR_CODE +- if (!image) throw Exiv2::Error(Exiv2::kerInputDataReadFailed); ++ if (!image) throw Exiv2::Error(Exiv2::ErrorCode::kerInputDataReadFailed); + #else + if (!image) throw Exiv2::Error(21); + #endif +@@ -388,7 +393,7 @@ struct _ExifDataProcessed : public _ExifData (public) + sidecar->writeMetadata(); + #else + #ifdef HAVE_EXIV2_ERROR_CODE +- throw Exiv2::Error(Exiv2::kerNotAnImage, "xmp"); ++ throw Exiv2::Error(Exiv2::ErrorCode::kerNotAnImage, "xmp"); + #else + throw Exiv2::Error(3, "xmp"); + #endif +@@ -840,7 +845,7 @@ gint exif_item_get_integer(ExifItem *item, gint *value + { + try { + if (!item || exif_item_get_elements(item) == 0) return 0; +- *value = ((Exiv2::Metadatum *)item)->toLong(); ++ *value = ((Exiv2::Metadatum *)item)->toInt64(); + return 1; + } + catch (Exiv2::AnyError& e) { +@@ -1224,11 +1229,12 @@ guchar *exif_get_preview(ExifData *exif, guint *data_l + + Exiv2::PreviewImage image = pm.getPreviewImage(*pos); + ++ // https://github.com/BestImageViewer/geeqie/issues/1090 + Exiv2::DataBuf buf = image.copy(); +- std::pair p = buf.release(); +- +- *data_len = p.second; +- return p.first; ++ *data_len = buf.size(); ++ auto b = buf.data(); ++ buf.reset(); ++ return b; + } + return NULL; + } +@@ -1489,22 +1495,22 @@ unsigned long RawFile::preview_offset(void) + if (type == Exiv2::ImageType::cr2) + { + val = find(0x111, Group::ifd0); +- if (val) return val->toLong(); ++ if (val) return val->toInt64(); + + return 0; + } + + val = find(0x201, Group::sub0_0); +- if (val) return val->toLong(); ++ if (val) return val->toInt64(); + + val = find(0x201, Group::ifd0); +- if (val) return val->toLong(); ++ if (val) return val->toInt64(); + + val = find(0x201, Group::ignr); // for PEF files, originally it was probably ifd2 +- if (val) return val->toLong(); ++ if (val) return val->toInt64(); + + val = find(0x111, Group::sub0_1); // dng +- if (val) return val->toLong(); ++ if (val) return val->toInt64(); + + return 0; + }