View | Details | Raw Unified | Return to bug 272311 | Differences between
and this patch

Collapse All | Expand All

(-)b/graphics/ufraw/Makefile (-2 / +4 lines)
Lines 1-6 Link Here
1
PORTNAME=	ufraw
1
PORTNAME=	ufraw
2
PORTVERSION=	0.22.20210424
2
PORTVERSION=	0.22.20210424
3
PORTREVISION=	7
3
PORTREVISION=	8
4
CATEGORIES=	graphics
4
CATEGORIES=	graphics
5
5
6
MAINTAINER=	rodrigo@FreeBSD.org
6
MAINTAINER=	rodrigo@FreeBSD.org
Lines 11-16 LICENSE= GPLv2 Link Here
11
11
12
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
12
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
13
		libfreetype.so:print/freetype2 \
13
		libfreetype.so:print/freetype2 \
14
		libharfbuzz.so:print/harfbuzz \
14
		libjasper.so:graphics/jasper \
15
		libjasper.so:graphics/jasper \
15
		liblcms2.so:graphics/lcms2 \
16
		liblcms2.so:graphics/lcms2 \
16
		libpng.so:graphics/png \
17
		libpng.so:graphics/png \
Lines 18-24 LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ Link Here
18
19
19
USES=		autoreconf compiler:c++11-lang desktop-file-utils gettext \
20
USES=		autoreconf compiler:c++11-lang desktop-file-utils gettext \
20
		gmake gnome jpeg pkgconfig
21
		gmake gnome jpeg pkgconfig
21
USE_CXXSTD=	gnu++98
22
USE_CXXSTD=	gnu++14
22
USE_GITHUB=	yes
23
USE_GITHUB=	yes
23
GH_ACCOUNT=	sergiomb2
24
GH_ACCOUNT=	sergiomb2
24
GH_TAGNAME=	f34669b
25
GH_TAGNAME=	f34669b
Lines 30-35 CONFIGURE_ARGS= --enable-extras \ Link Here
30
		--disable-mime
31
		--disable-mime
31
32
32
CPPFLAGS+=	-I${LOCALBASE}/include
33
CPPFLAGS+=	-I${LOCALBASE}/include
34
#CXXFLAGS+=	-D_NOEXCEPT=noexcept
33
LDFLAGS+=	-lpthread -L${LOCALBASE}/lib
35
LDFLAGS+=	-lpthread -L${LOCALBASE}/lib
34
36
35
CONFLICTS_INSTALL=	dcraw
37
CONFLICTS_INSTALL=	dcraw
(-)b/graphics/ufraw/files/patch-ufraw__exiv2.cc (-1 / +74 lines)
Added Link Here
0
- 
1
--- ufraw_exiv2.cc.orig	2021-04-25 05:24:28 UTC
2
+++ ufraw_exiv2.cc
3
@@ -50,10 +50,10 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf)
4
         uf->inputExifBuf = NULL;
5
         uf->inputExifBufLen = 0;
6
 
7
-        Exiv2::Image::AutoPtr image;
8
+        Exiv2::Image::UniquePtr image;
9
         if (uf->unzippedBuf != NULL) {
10
-            image = Exiv2::ImageFactory::open(
11
-                        (const Exiv2::byte*)uf->unzippedBuf, uf->unzippedBufLen);
12
+            image = std::move(Exiv2::ImageFactory::open(
13
+                        (const Exiv2::byte*)uf->unzippedBuf, uf->unzippedBufLen));
14
         } else {
15
             char *filename = uf_win32_locale_filename_from_utf8(uf->filename);
16
             image = Exiv2::ImageFactory::open(filename);
17
@@ -66,7 +66,9 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf)
18
         if (exifData.empty()) {
19
             std::string error(uf->filename);
20
             error += ": No Exif data found in the file";
21
-#if EXIV2_TEST_VERSION(0,27,0)
22
+#if EXIV2_TEST_VERSION(0,28,0)
23
+            throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, error);
24
+#elif EXIV2_TEST_VERSION(0,27,0)
25
             throw Exiv2::Error(Exiv2::kerErrorMessage, error);
26
 #else
27
             throw Exiv2::Error(1, error);
28
@@ -135,7 +137,7 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf)
29
         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
30
 
31
         return UFRAW_SUCCESS;
32
-    } catch (Exiv2::AnyError& e) {
33
+    } catch (Exiv2::Error& e) {
34
         std::cerr.rdbuf(savecerr);
35
         std::string s(e.what());
36
         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());
37
@@ -155,8 +157,8 @@ static Exiv2::ExifData ufraw_prepare_exifdata(ufraw_da
38
         /* Reset orientation tag since UFRaw already rotates the image */
39
         if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation")))
40
                 != exifData.end()) {
41
-            ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%d' to '1'\n",
42
-                          pos->key().c_str(), pos->value().toLong());
43
+            ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%ld' to '1'\n",
44
+                          pos->key().c_str(), static_cast<long int>(pos->value().toInt64()));
45
             pos->setValue("1"); /* 1 = Normal orientation */
46
         }
47
     }
48
@@ -327,7 +329,7 @@ extern "C" int ufraw_exif_prepare_output(ufraw_data *u
49
         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
50
 
51
         return UFRAW_SUCCESS;
52
-    } catch (Exiv2::AnyError& e) {
53
+    } catch (Exiv2::Error& e) {
54
         std::cerr.rdbuf(savecerr);
55
         std::string s(e.what());
56
         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());
57
@@ -347,7 +349,7 @@ extern "C" int ufraw_exif_write(ufraw_data *uf)
58
 
59
         char *filename =
60
             uf_win32_locale_filename_from_utf8(uf->conf->outputFilename);
61
-        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
62
+        Exiv2::Image::UniquePtr image { Exiv2::ImageFactory::open(filename) };
63
         uf_win32_locale_filename_free(filename);
64
         assert(image.get() != 0);
65
 
66
@@ -367,7 +369,7 @@ extern "C" int ufraw_exif_write(ufraw_data *uf)
67
         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
68
 
69
         return UFRAW_SUCCESS;
70
-    } catch (Exiv2::AnyError& e) {
71
+    } catch (Exiv2::Error& e) {
72
         std::cerr.rdbuf(savecerr);
73
         std::string s(e.what());
74
         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());

Return to bug 272311