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

Collapse All | Expand All

(-)b/graphics/oyranos/Makefile (-1 / +1 lines)
Lines 1-6 Link Here
1
PORTNAME=	oyranos
1
PORTNAME=	oyranos
2
PORTVERSION=	0.9.6
2
PORTVERSION=	0.9.6
3
PORTREVISION=	15
3
PORTREVISION=	16
4
CATEGORIES=	graphics
4
CATEGORIES=	graphics
5
5
6
MAINTAINER=	ports@FreeBSD.org
6
MAINTAINER=	ports@FreeBSD.org
(-)b/graphics/oyranos/files/patch-src_modules_color_modules_devices_oyranos__cmm__oyRE.cpp (-2 / +76 lines)
Lines 4-9 https://gitlab.com/oyranos/oyranos/-/commit/7fd1eabdf9f59727c0f516d33663d895f812 Link Here
4
4
5
--- src/modules/color/modules/devices/oyranos_cmm_oyRE.cpp.orig	2016-12-09 10:36:53 UTC
5
--- src/modules/color/modules/devices/oyranos_cmm_oyRE.cpp.orig	2016-12-09 10:36:53 UTC
6
+++ src/modules/color/modules/devices/oyranos_cmm_oyRE.cpp
6
+++ src/modules/color/modules/devices/oyranos_cmm_oyRE.cpp
7
@@ -140,7 +140,7 @@ static int _initialised = 0;
8
 extern oyCMMapi8_s_ _api8;
9
 
10
 
11
-bool is_raw( int id );
12
+bool is_raw( Exiv2::ImageType id );
13
 int DeviceFromContext(oyConfig_s **config, libraw_output_params_t *params);
14
 int DeviceFromHandle_opt(oyConfig_s *device, oyOption_s *option);
15
 
7
@@ -482,7 +482,7 @@ oyProfile_s * createMatrixProfile      ( libraw_colord
16
@@ -482,7 +482,7 @@ oyProfile_s * createMatrixProfile      ( libraw_colord
8
       oyOptions_s * result = 0;
17
       oyOptions_s * result = 0;
9
 
18
 
Lines 13-19 https://gitlab.com/oyranos/oyranos/-/commit/7fd1eabdf9f59727c0f516d33663d895f812 Link Here
13
       oyOptions_Handle( reg, opts, "create_profile.icc_profile.color_matrix",
22
       oyOptions_Handle( reg, opts, "create_profile.icc_profile.color_matrix",
14
                         &result );
23
                         &result );
15
 
24
 
16
@@ -1447,7 +1447,7 @@ int DeviceFromContext(oyConfig_s **config, libraw_outp
25
@@ -558,7 +558,7 @@ class exif2options {
26
  *
27
  * \todo { Untested }
28
  */
29
-int DeviceFromHandle(oyOptions_s **options, Exiv2::Image::AutoPtr image)
30
+int DeviceFromHandle(oyOptions_s **options, Exiv2::Image::UniquePtr image)
31
 {
32
    int error = 0;
33
 
34
@@ -1447,14 +1447,14 @@ int DeviceFromContext(oyConfig_s **config, libraw_outp
17
    DFC_OPT_ADD_INT_ARR(greybox,1) //4
35
    DFC_OPT_ADD_INT_ARR(greybox,1) //4
18
    DFC_OPT_ADD_INT_ARR(greybox,2) //4
36
    DFC_OPT_ADD_INT_ARR(greybox,2) //4
19
    DFC_OPT_ADD_INT_ARR(greybox,3) //4
37
    DFC_OPT_ADD_INT_ARR(greybox,3) //4
Lines 22-24 https://gitlab.com/oyranos/oyranos/-/commit/7fd1eabdf9f59727c0f516d33663d895f812 Link Here
22
 
40
 
23
    return error;
41
    return error;
24
 }
42
 }
25
- 
43
 
44
 int DeviceFromHandle_opt(oyConfig_s *device, oyOption_s *handle_opt)
45
 {
46
-   Exiv2::Image::AutoPtr device_handle;
47
+   Exiv2::Image::UniquePtr device_handle;
48
    oyAlloc_f allocateFunc = malloc;
49
    if (handle_opt) {
50
       char * filename = NULL;
51
@@ -1484,7 +1484,7 @@ int DeviceFromHandle_opt(oyConfig_s *device, oyOption_
52
 
53
       //The std::auto_ptr::get() method returns the pointer owned by the auto_ptr
54
       if (device_handle.get() && device_handle->good())
55
-         DeviceFromHandle(oyConfig_GetOptions(device,"backend_core"), device_handle);
56
+         DeviceFromHandle(oyConfig_GetOptions(device,"backend_core"), std::move(device_handle));
57
       else {
58
          int level = oyMSG_WARN;
59
          if(filename && strcmp( filename, "dummy" ) == 0)
60
@@ -1502,23 +1502,23 @@ int DeviceFromHandle_opt(oyConfig_s *device, oyOption_
61
    return 0;
62
 }
63
 
64
-bool is_raw( int id )
65
+bool is_raw( Exiv2::ImageType id )
66
 {
67
-   //using namespace Exiv2::ImageType;
68
+   // using namespace Exiv2::ImageType;
69
    switch (id) {
70
-      case 3: //crw:
71
-      case 4: //tiff
72
-      case 5: //mrw:
73
-      case 7: //cr2:
74
-      case 8: //raf:
75
-      case 9: //orf:
76
-      case 16: //rw2:
77
-         return true;
78
-         break;
79
-      default:
80
-         if(id == 0)
81
-           return false;
82
-         else
83
-           return true;
84
+	   case Exiv2::ImageType::crw:
85
+	   case Exiv2::ImageType::tiff:
86
+	   case Exiv2::ImageType::mrw:
87
+	   case Exiv2::ImageType::cr2:
88
+	   case Exiv2::ImageType::raf:
89
+	   case Exiv2::ImageType::orf:
90
+	   case Exiv2::ImageType::rw2:
91
+		   return true;
92
+		   break;
93
+	   default:
94
+		   if(Exiv2::ImageType::none == id)
95
+			   return false;
96
+		   else
97
+			   return true;
98
    }
99
 }

Return to bug 272311