nufraw: refactor, add patch for exiv2 0.28

+21 -27
+21 -6
pkgs/applications/graphics/nufraw/default.nix
··· 1 - { stdenv 1 + { lib 2 + , stdenv 2 3 , fetchurl 3 - , lib 4 + , fetchpatch 4 5 5 6 , autoreconfHook 6 7 , bzip2 ··· 49 50 "--enable-dst-correction" 50 51 ]; 51 52 53 + env.NIX_CFLAGS_COMPILE = "-Wno-narrowing"; 54 + 52 55 postInstall = lib.optionalString addThumbnailer '' 53 56 mkdir -p $out/share/thumbnailers 54 57 substituteAll ${./nufraw.thumbnailer} $out/share/thumbnailers/${pname}.thumbnailer 55 58 ''; 56 59 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 + patches = [ 61 + # Fixes an upstream issue where headers with templates were included in an extern-C scope 62 + # which caused the build to fail 63 + (fetchpatch { 64 + name = "0001-nufraw-glib-2.70.patch"; 65 + url = "https://gitlab.archlinux.org/archlinux/packaging/packages/gimp-nufraw/-/raw/3405bc864752dbd04f2d182a21b4108d6cc3aa95/0001-nufraw-glib-2.70.patch"; 66 + hash = "sha256-XgzgjikWTcqymHa7bKmruNZaeb2/lpN19HXoRUt5rTk="; 67 + }) 68 + ] ++ lib.optionals (lib.versionAtLeast exiv2.version "0.28") [ 69 + (fetchpatch { 70 + name = "0002-exiv2-error.patch"; 71 + url = "https://gitlab.archlinux.org/archlinux/packaging/packages/gimp-nufraw/-/raw/3405bc864752dbd04f2d182a21b4108d6cc3aa95/0002-exiv2-error.patch"; 72 + hash = "sha256-40/Wwk1sWiaIWp077EYgP8jFO4k1cvf30heRDMYJw3M="; 73 + }) 74 + ]; 60 75 61 76 meta = with lib; { 62 77 homepage = "https://nufraw.sourceforge.io/"; ··· 70 85 ''; 71 86 license = licenses.gpl2Plus; 72 87 maintainers = with maintainers; [ asbachb ]; 73 - platforms = [ "x86_64-linux" "i686-linux" ]; 88 + platforms = platforms.linux; 74 89 }; 75 90 }
-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__) \