nufraw: fix build

Sources would include glib-headers from within an extern-C scope.
Since glib-headers contained templates, this would fail. Add a patch
to move the header includes outside of the extern-C scope.

polygon 5e903ee0 42e9a2cc

+25
+4
pkgs/applications/graphics/nufraw/default.nix
··· 54 54 substituteAll ${./nufraw.thumbnailer} $out/share/thumbnailers/${pname}.thumbnailer 55 55 ''; 56 56 57 + # Fixes an upstream issue where headers with templates were included in an extern-C scope 58 + # which caused the build to fail 59 + patches = [ ./move-extern-c.patch ]; 60 + 57 61 meta = with lib; { 58 62 homepage = "https://nufraw.sourceforge.io/"; 59 63 description = "Utility to read and manipulate raw images from digital cameras";
+21
pkgs/applications/graphics/nufraw/move-extern-c.patch
··· 1 + diff --git a/uf_glib.h b/uf_glib.h 2 + index c1a17bd..8a10800 100644 3 + --- a/uf_glib.h 4 + +++ b/uf_glib.h 5 + @@ -13,13 +13,13 @@ 6 + #ifndef _UF_GLIB_H 7 + #define _UF_GLIB_H 8 + 9 + +#include <glib.h> 10 + +#include <glib/gstdio.h> 11 + + 12 + #ifdef __cplusplus 13 + extern "C" { 14 + #endif 15 + 16 + -#include <glib.h> 17 + -#include <glib/gstdio.h> 18 + - 19 + // g_win32_locale_filename_from_utf8 is needed only on win32 20 + #ifdef _WIN32 21 + #define uf_win32_locale_filename_from_utf8(__some_string__) \