From 1ad5d7656891f53b76efd6783d75d14b9cbb4daa Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Mon, 4 Dec 2017 21:18:56 +0100
Subject: [PATCH] Support (and require) libopenraw 0.1.0+

---
 configure.ac                  | 4 ++--
 operations/external/openraw.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 30d306e..febdddb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +47,7 @@ m4_define([lensfun_required_version], [0.2.5])
 m4_define([librsvg_required_version], [2.14.0])
 m4_define([lua_required_version], [5.1.0])
 m4_define([openexr_required_version], [0.0.0])
-m4_define([openraw_required_version], [0.0.5])
+m4_define([openraw_required_version], [0.1.0])
 m4_define([pango_required_version], [0.0.0])
 m4_define([pangocairo_required_version], [0.0.0])
 m4_define([png_required_version], [0.0.0])
@@ -790,7 +790,7 @@ AC_ARG_WITH(libopenraw, [  --without-libopenraw    build without openraw support
 
 have_libopenraw="no"
 if test "x$with_libopenraw" != "xno"; then
-  PKG_CHECK_MODULES(OPENRAW, libopenraw-1.0 >= openraw_required_version,
+  PKG_CHECK_MODULES(OPENRAW, libopenraw-0.1 >= openraw_required_version,
     have_libopenraw="yes",
     have_libopenraw="no  (openraw library not found)")
 fi
diff --git a/operations/external/openraw.c b/operations/external/openraw.c
index 9fc1e95..b4b4a13 100644
--- a/operations/external/openraw.c
+++ b/operations/external/openraw.c
@@ -116,7 +116,7 @@ load_buffer (GeglOperation *operation)
       goto clean_file;
     }
 
-  if(or_rawdata_format (rawdata) != OR_DATA_TYPE_CFA)
+  if(or_rawdata_format (rawdata) != OR_DATA_TYPE_RAW)
     {
       goto clean_file;
     }
-- 
2.15.0

