pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/gimp-ufraw



Module Name:    pkgsrc
Committed By:   gdt
Date:           Fri Aug  4 13:11:24 UTC 2023

Modified Files:
        pkgsrc/graphics/gimp-ufraw: Makefile distinfo
        pkgsrc/graphics/gimp-ufraw/patches: patch-ufraw__exiv2.cc
Added Files:
        pkgsrc/graphics/gimp-ufraw/patches: patch-uf__glib.h

Log Message:
gimp-ufraw: Adapt to newer glib and exiv2

  - patch ufraw for newer error and pointer (AutoPtr to UniquePtr) types
  - avoid extern C around glib includes
  - don't force --std=c++03, because exiv2 fails with that


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 pkgsrc/graphics/gimp-ufraw/Makefile
cvs rdiff -u -r1.40 -r1.41 pkgsrc/graphics/gimp-ufraw/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/gimp-ufraw/patches/patch-uf__glib.h
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/graphics/gimp-ufraw/patches/patch-ufraw__exiv2.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/gimp-ufraw/Makefile
diff -u pkgsrc/graphics/gimp-ufraw/Makefile:1.138 pkgsrc/graphics/gimp-ufraw/Makefile:1.139
--- pkgsrc/graphics/gimp-ufraw/Makefile:1.138   Sat Jul  1 22:16:36 2023
+++ pkgsrc/graphics/gimp-ufraw/Makefile Fri Aug  4 13:11:24 2023
@@ -1,12 +1,8 @@
-# $NetBSD: Makefile,v 1.138 2023/07/01 22:16:36 wiz Exp $
+# $NetBSD: Makefile,v 1.139 2023/08/04 13:11:24 gdt Exp $
 
-# Note that upstream has replaced tarballs without changing the
-# version number (e.g., 0.19.2 had two different tarballs).
-# Therefore, it is suggested to wait a week after a release before
-# updating pkgsrc.
 DISTNAME=              ufraw-0.22
 PKGNAME=               gimp-${DISTNAME}
-PKGREVISION=           34
+PKGREVISION=           35
 CATEGORIES=            graphics
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=ufraw/}
 
@@ -22,7 +18,12 @@ GNU_CONFIGURE=               yes
 
 USE_TOOLS+=            gmake pkg-config msgfmt
 USE_TOOLS+=            perl:run pod2man
-USE_LANGUAGES=         c99 c++03
+USE_LANGUAGES=         c99 c++
+
+# exiv2 is declared to need filesystem, but as of 2023-08 it fails if
+# called with --std=c++03.  We avoid forcing std.  (pkgsrc lacks a
+# mechanism to declare which --stds are acceptable and thus exiv2
+# doesn't declare this.)
 
 CONFIGURE_ARGS+=       --enable-mime
 

Index: pkgsrc/graphics/gimp-ufraw/distinfo
diff -u pkgsrc/graphics/gimp-ufraw/distinfo:1.40 pkgsrc/graphics/gimp-ufraw/distinfo:1.41
--- pkgsrc/graphics/gimp-ufraw/distinfo:1.40    Sat May 13 11:55:55 2023
+++ pkgsrc/graphics/gimp-ufraw/distinfo Fri Aug  4 13:11:24 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.40 2023/05/13 11:55:55 gdt Exp $
+$NetBSD: distinfo,v 1.41 2023/08/04 13:11:24 gdt Exp $
 
 BLAKE2s (ufraw-0.22.tar.gz) = 37f6aa87db1a0ccb0497364a8bf40eaf17cf0082b617b8603b74a8e7bc791cf2
 SHA512 (ufraw-0.22.tar.gz) = a42eff5052c18afec90245cf97ceeade78e3f288186cf697ac4abf2e8290d4081db8ac4de3ae47b3774f30a6cb4cbda392099e6fd2125fe751abb40d9b065ad2
@@ -6,4 +6,5 @@ Size (ufraw-0.22.tar.gz) = 1103554 bytes
 SHA1 (patch-dcraw.cc) = 5e9ff01930802b2f92ce28030313c60ef24e1897
 SHA1 (patch-dcraw__api.cc) = 96220c6cca793684122839310883c5d5754916f4
 SHA1 (patch-dcraw__indi.c) = 48415d0d0e00f6652cb745e4f7a86ce71ed82739
-SHA1 (patch-ufraw__exiv2.cc) = c6f3c6bd9ec8cdc3dee1801f9b1972bbe827cd8d
+SHA1 (patch-uf__glib.h) = 522210acde32e1b363f5049628db80f97ff02f7a
+SHA1 (patch-ufraw__exiv2.cc) = cd0d6bd55672393650ecc327566ad27259b58197

Index: pkgsrc/graphics/gimp-ufraw/patches/patch-ufraw__exiv2.cc
diff -u pkgsrc/graphics/gimp-ufraw/patches/patch-ufraw__exiv2.cc:1.1 pkgsrc/graphics/gimp-ufraw/patches/patch-ufraw__exiv2.cc:1.2
--- pkgsrc/graphics/gimp-ufraw/patches/patch-ufraw__exiv2.cc:1.1        Tue Aug 20 14:31:03 2019
+++ pkgsrc/graphics/gimp-ufraw/patches/patch-ufraw__exiv2.cc    Fri Aug  4 13:11:24 2023
@@ -1,8 +1,14 @@
-$NetBSD: patch-ufraw__exiv2.cc,v 1.1 2019/08/20 14:31:03 gdt Exp $
+$NetBSD: patch-ufraw__exiv2.cc,v 1.2 2023/08/04 13:11:24 gdt Exp $
 
-Adjust to newer exiv2.
+Adjust to newer exiv2:
+  - Change AutoPtr to UniquePtr.
+  - Increase specificity of thrown errors.
+  - Adapt from AnyError to the Error class.
+  - value() now has fixed-width accessors, and not toLong
+
+Not sent upstream because upstream does not seem to be maintaining
+this.
 
-Not yet sent upstream.
 
 --- ufraw_exiv2.cc.orig        2015-06-16 03:58:38.000000000 +0000
 +++ ufraw_exiv2.cc
@@ -16,12 +22,68 @@ Not yet sent upstream.
  #include <sstream>
  #include <cassert>
  
+@@ -51,7 +53,7 @@ extern "C" int ufraw_exif_read_input(ufr
+         uf->inputExifBuf = NULL;
+         uf->inputExifBufLen = 0;
+ 
+-        Exiv2::Image::AutoPtr image;
++        Exiv2::Image::UniquePtr image;
+         if (uf->unzippedBuf != NULL) {
+             image = Exiv2::ImageFactory::open(
+                         (const Exiv2::byte*)uf->unzippedBuf, uf->unzippedBufLen);
 @@ -67,7 +69,7 @@ extern "C" int ufraw_exif_read_input(ufr
          if (exifData.empty()) {
              std::string error(uf->filename);
              error += ": No Exif data found in the file";
 -            throw Exiv2::Error(1, error);
-+            throw Exiv2::Error(Exiv2::kerGeneralError, error);
++            throw Exiv2::Error(Exiv2::ErrorCode::kerGeneralError, error);
          }
  
          /* List of tag names taken from exiv2's printSummary() in actions.cpp */
+@@ -132,7 +134,7 @@ extern "C" int ufraw_exif_read_input(ufr
+         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
+ 
+         return UFRAW_SUCCESS;
+-    } catch (Exiv2::AnyError& e) {
++    } catch (Exiv2::Error& e) {
+         std::cerr.rdbuf(savecerr);
+         std::string s(e.what());
+         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());
+@@ -152,8 +154,8 @@ static Exiv2::ExifData ufraw_prepare_exi
+         /* Reset orientation tag since UFRaw already rotates the image */
+         if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation")))
+                 != exifData.end()) {
+-            ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%d' to '1'\n",
+-                          pos->key().c_str(), pos->value().toLong());
++            ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%" PRId64 "' to '1'\n",
++                          pos->key().c_str(), pos->value().toInt64());
+             pos->setValue("1"); /* 1 = Normal orientation */
+         }
+     }
+@@ -324,7 +326,7 @@ extern "C" int ufraw_exif_prepare_output
+         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
+ 
+         return UFRAW_SUCCESS;
+-    } catch (Exiv2::AnyError& e) {
++    } catch (Exiv2::Error& e) {
+         std::cerr.rdbuf(savecerr);
+         std::string s(e.what());
+         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());
+@@ -344,7 +346,7 @@ extern "C" int ufraw_exif_write(ufraw_da
+ 
+         char *filename =
+             uf_win32_locale_filename_from_utf8(uf->conf->outputFilename);
+-        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
++        Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
+         uf_win32_locale_filename_free(filename);
+         assert(image.get() != 0);
+ 
+@@ -364,7 +366,7 @@ extern "C" int ufraw_exif_write(ufraw_da
+         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
+ 
+         return UFRAW_SUCCESS;
+-    } catch (Exiv2::AnyError& e) {
++    } catch (Exiv2::Error& e) {
+         std::cerr.rdbuf(savecerr);
+         std::string s(e.what());
+         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());

Added files:

Index: pkgsrc/graphics/gimp-ufraw/patches/patch-uf__glib.h
diff -u /dev/null pkgsrc/graphics/gimp-ufraw/patches/patch-uf__glib.h:1.1
--- /dev/null   Fri Aug  4 13:11:24 2023
+++ pkgsrc/graphics/gimp-ufraw/patches/patch-uf__glib.h Fri Aug  4 13:11:24 2023
@@ -0,0 +1,27 @@
+$NetBSD: patch-uf__glib.h,v 1.1 2023/08/04 13:11:24 gdt Exp $
+
+Avoid extern C around glib includes.  Apparently they do C++ things
+when compiled in C++ mode and this causes gcc10 to complain.
+
+Not sent upstream because upstream does not seem to be maintaining
+this.
+
+--- uf_glib.h.orig     2015-06-16 03:58:38.000000000 +0000
++++ uf_glib.h
+@@ -13,13 +13,13 @@
+ #ifndef _UF_GLIB_H
+ #define _UF_GLIB_H
+ 
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+-#include <glib.h>
+-#include <glib/gstdio.h>
+-
+ // g_win32_locale_filename_from_utf8 is needed only on win32
+ #ifdef _WIN32
+ #define uf_win32_locale_filename_from_utf8(__some_string__) \



Home | Main Index | Thread Index | Old Index