lol

libjpeg(-turbo): fix on mingw

By porting a patch from msys2.

+23
+4
pkgs/development/libraries/libjpeg-turbo/default.nix
··· 8 8 sha256 = "0gi349hp1x7mb98s4mf66sb2xay2kjjxj9ihrriw0yiy0k9va6sj"; 9 9 }; 10 10 11 + patches = 12 + stdenv.lib.optional (stdenv.cross.libc or null == "msvcrt") 13 + ./mingw-boolean.patch; 14 + 11 15 outputs = [ "dev" "out" "doc" "bin" ]; 12 16 13 17 nativeBuildInputs = [ nasm ];
+19
pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch
··· 1 + Ported to updated libjpeg-turbo from 2 + https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch 3 + --- a/jmorecfg.h 2012-02-10 06:47:55 +0300 4 + +++ b/jmorecfg.h 2012-05-03 10:29:13 +0400 5 + @@ -224,7 +224,13 @@ 6 + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. 7 + */ 8 + 9 + -#ifndef HAVE_BOOLEAN 10 + +#if defined(_WIN32) && !defined(HAVE_BOOLEAN) 11 + +#ifndef __RPCNDR_H__ 12 + +typedef unsigned char boolean; 13 + +#endif 14 + +#define HAVE_BOOLEAN 15 + +#endif 16 + +#if !defined(HAVE_BOOLEAN) && !defined(__RPCNDR_H__) 17 + typedef int boolean; 18 + #endif 19 + #ifndef FALSE /* in case these macros already exist */