freeimage: Add patch to fix build with libtiff 4.4.0
This commit is contained in:
parent
25c990a60b
commit
5dcb09d3cb
|
@ -16,7 +16,7 @@ stdenv.mkDerivation {
|
|||
|
||||
# Ensure that the bundled libraries are not used at all
|
||||
prePatch = "rm -rf Source/Lib* Source/OpenEXR Source/ZLib";
|
||||
patches = [ ./unbundle.diff ];
|
||||
patches = [ ./unbundle.diff ./libtiff-4.4.0.diff ];
|
||||
|
||||
postPatch = ''
|
||||
# To support cross compilation, use the correct `pkg-config`.
|
||||
|
|
15
pkgs/development/libraries/freeimage/libtiff-4.4.0.diff
Normal file
15
pkgs/development/libraries/freeimage/libtiff-4.4.0.diff
Normal file
|
@ -0,0 +1,15 @@
|
|||
Fix build with libtiff 4.4.0 by not using a private libtiff API.
|
||||
Patch by Kurt Schwehr: https://sourceforge.net/p/freeimage/discussion/36109/thread/2018fdc6e7/
|
||||
|
||||
diff -ru a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp
|
||||
--- a/Source/Metadata/XTIFF.cpp
|
||||
+++ b/Source/Metadata/XTIFF.cpp
|
||||
@@ -749,7 +749,7 @@
|
||||
continue;
|
||||
}
|
||||
// type of storage may differ (e.g. rationnal array vs float array type)
|
||||
- if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) {
|
||||
+ if((unsigned)TIFFFieldSetGetSize(fld) != FreeImage_TagDataWidth(tag_type)) {
|
||||
// skip tag or _TIFFmemcpy will fail
|
||||
continue;
|
||||
}
|
Loading…
Reference in a new issue