me
/
guix
Archived
1
0
Fork 0

gnu: freeimage: Adjust for LibTIFF 4.4.

* gnu/packages/patches/freeimage-libtiff-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/image.scm (freeimage)[source](patches): Add it.
master
Marius Bakke 2022-09-16 03:22:03 +02:00
parent 6703ff4d3b
commit 757aeb1d3a
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
3 changed files with 22 additions and 1 deletions

View File

@ -1089,6 +1089,7 @@ dist_patch_DATA = \
%D%/packages/patches/fp16-system-libraries.patch \
%D%/packages/patches/fpc-reproducibility.patch \
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
%D%/packages/patches/freeimage-libtiff-compat.patch \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/fuse-glibc-2.34.patch \
%D%/packages/patches/fuse-overlapping-headers.patch \

View File

@ -1082,7 +1082,8 @@ supplies a generic doubly-linked list and some string functions.")
"LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
(patches
(append
(search-patches "freeimage-unbundle.patch")
(search-patches "freeimage-unbundle.patch"
"freeimage-libtiff-compat.patch")
;; Take one patch from Arch Linux that adds LibRaw 0.20 compatibility.
(list (origin
(method url-fetch)

View File

@ -0,0 +1,19 @@
Use the new TIFFFieldSetGetSize API from libtiff 4.4 instead of the
private and removed _TIFFDataSize declared in the unbundling patch.
Patch taken from Fedora:
https://src.fedoraproject.org/rpms/freeimage/blob/rawhide/f/freeimage-libtiff44.patch
diff -rupN --no-dereference freeimage-svn-r1889-FreeImage-trunk/Source/Metadata/XTIFF.cpp freeimage-svn-r1889-FreeImage-trunk-new/Source/Metadata/XTIFF.cpp
--- freeimage-svn-r1889-FreeImage-trunk/Source/Metadata/XTIFF.cpp 2022-06-23 11:56:32.561043826 +0200
+++ freeimage-svn-r1889-FreeImage-trunk-new/Source/Metadata/XTIFF.cpp 2022-06-23 11:56:32.764043827 +0200
@@ -747,7 +747,7 @@ tiff_write_exif_tags(TIFF *tif, TagLib::
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;
}