summaryrefslogtreecommitdiff
path: root/sci-astronomy/siril/files/siril-1.2-exiv2-0.28.patch
blob: 8678316bfc87c41dbdef48a2513ffdd946ae0541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
* asturm 2023-08-20: Combination of two commits from upstream git master
  3c2579cd: Pick the only hunk relevant for exiv2-0.28...
  64583490: Blend with that to fix build w/o exiv2 and fix indendation...

  
From 3c2579cd171314f7e408c00bc8e793330dcc07ba Mon Sep 17 00:00:00 2001
From: Cyril Richard <cyril.richard42@gmail.com>
Date: Sun, 4 Jun 2023 22:10:55 +0000
Subject: [PATCH] XISF image import

From 64583490214302f4057cf223d7591be9d2172a4f Mon Sep 17 00:00:00 2001
From: Vincent Hourdin <vh@free-astro.org>
Date: Mon, 5 Jun 2023 00:27:56 +0200
Subject: [PATCH] fixing exiv2 as optional

--- a/src/core/exif.cpp
+++ b/src/core/exif.cpp
@@ -121,10 +121,18 @@
 #endif
 }
 
+#ifdef HAVE_EXIV2
+#if EXIV2_TEST_VERSION(0,28,0)
+typedef Exiv2::Image::UniquePtr ImagePtr;
+#else
+typedef Exiv2::Image::AutoPtr ImagePtr;
+#endif
+#endif
+
 gchar* siril_get_date_from_exif(const char *filename) {
 #ifdef HAVE_EXIV2
 	try {
-		Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(WIDEN(filename));
+		ImagePtr image = Exiv2::ImageFactory::open(WIDEN(filename));
 		if (image.get() == 0) {
 			fprintf(stderr, "Error Cannot open the file.\n");
 			return NULL;
-- 
GitLab