libjpeg(-turbo): fix on mingw
By porting a patch from msys2.
This commit is contained in:
parent
bd3d377e5e
commit
7d4ebb526c
@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0gi349hp1x7mb98s4mf66sb2xay2kjjxj9ihrriw0yiy0k9va6sj";
|
sha256 = "0gi349hp1x7mb98s4mf66sb2xay2kjjxj9ihrriw0yiy0k9va6sj";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches =
|
||||||
|
stdenv.lib.optional (stdenv.cross.libc or null == "msvcrt")
|
||||||
|
./mingw-boolean.patch;
|
||||||
|
|
||||||
outputs = [ "dev" "out" "doc" "bin" ];
|
outputs = [ "dev" "out" "doc" "bin" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ nasm ];
|
nativeBuildInputs = [ nasm ];
|
||||||
|
19
pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch
Normal file
19
pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Ported to updated libjpeg-turbo from
|
||||||
|
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch
|
||||||
|
--- a/jmorecfg.h 2012-02-10 06:47:55 +0300
|
||||||
|
+++ b/jmorecfg.h 2012-05-03 10:29:13 +0400
|
||||||
|
@@ -224,7 +224,13 @@
|
||||||
|
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#ifndef HAVE_BOOLEAN
|
||||||
|
+#if defined(_WIN32) && !defined(HAVE_BOOLEAN)
|
||||||
|
+#ifndef __RPCNDR_H__
|
||||||
|
+typedef unsigned char boolean;
|
||||||
|
+#endif
|
||||||
|
+#define HAVE_BOOLEAN
|
||||||
|
+#endif
|
||||||
|
+#if !defined(HAVE_BOOLEAN) && !defined(__RPCNDR_H__)
|
||||||
|
typedef int boolean;
|
||||||
|
#endif
|
||||||
|
#ifndef FALSE /* in case these macros already exist */
|
Loading…
x
Reference in New Issue
Block a user