summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2022-05-31 11:49:09 +0000
committergdt <gdt@pkgsrc.org>2022-05-31 11:49:09 +0000
commite8496f127e99b52e6ceafa92337b596d15fa62a4 (patch)
tree81408cf0e1cda978616595e13d2b232414f5ad0e
parent1cfd4fb096c911f4076ddb856346bddf4b585953 (diff)
downloadpkgsrc-e8496f127e99b52e6ceafa92337b596d15fa62a4.tar.gz
graphics/freeimage: Remediate upstream use of internal TIFF function
freeimage uses an internal libtiff function (by declaring it and calling it). tiff (4.4.0) changed internals, but this was never part of the public API/ABI. Add patch taken from upstream forum (which seems to be their bugtracker) to use a different function newly added to the public API in 4.4.0.
-rw-r--r--graphics/freeimage/Makefile4
-rw-r--r--graphics/freeimage/Makefile.common3
-rw-r--r--graphics/freeimage/distinfo4
-rw-r--r--graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp36
4 files changed, 25 insertions, 22 deletions
diff --git a/graphics/freeimage/Makefile b/graphics/freeimage/Makefile
index 1db6d003991..c039b47ef44 100644
--- a/graphics/freeimage/Makefile
+++ b/graphics/freeimage/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.17 2021/09/28 10:28:36 nia Exp $
+# $NetBSD: Makefile,v 1.18 2022/05/31 11:49:09 gdt Exp $
.include "Makefile.common"
PKGNAME= freeimage-3.18.0
-PKGREVISION= 5
+PKGREVISION= 6
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Library for supporting PNG, BMP, JPEG, and TIFF
diff --git a/graphics/freeimage/Makefile.common b/graphics/freeimage/Makefile.common
index 98f2cb89654..17645ee8e2c 100644
--- a/graphics/freeimage/Makefile.common
+++ b/graphics/freeimage/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.2 2020/06/14 10:07:48 nia Exp $
+# $NetBSD: Makefile.common,v 1.3 2022/05/31 11:49:09 gdt Exp $
# used by graphics/freeimage/Makefile
# used by graphics/freeimageplus/Makefile
@@ -51,5 +51,6 @@ NOT_FOR_PLATFORM= Darwin-*-*
.include "../../graphics/openexr/buildlink3.mk"
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
+BUILDLINK_API_DEPENDS+= tiff>=4.4.0
.include "../../graphics/tiff/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
diff --git a/graphics/freeimage/distinfo b/graphics/freeimage/distinfo
index 1c024b10587..9b4e33e5335 100644
--- a/graphics/freeimage/distinfo
+++ b/graphics/freeimage/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2021/10/26 10:46:08 nia Exp $
+$NetBSD: distinfo,v 1.16 2022/05/31 11:49:09 gdt Exp $
BLAKE2s (FreeImage3180.zip) = 08cd435f40d668418a710a63bebdd02763d4d7abab1b2eb6958d58c35aab4f7f
SHA512 (FreeImage3180.zip) = 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818
@@ -20,7 +20,7 @@ SHA1 (patch-Source_FreeImage_PluginTIFF.cpp) = bfa869452929f62162c15982b58013b0d
SHA1 (patch-Source_FreeImage_PluginWebP.cpp) = d7b57cfcb1379c6a849edb219c8a59edae83ff5c
SHA1 (patch-Source_FreeImage_ZLibInterface.cpp) = 73211e8ecefb7972f1fcb579dc4a17409c81c480
SHA1 (patch-Source_Metadata_TagConversion.cpp) = 0785cc5dd395bca538e9a82cadbb7ef450eebe86
-SHA1 (patch-Source_Metadata_XTIFF.cpp) = bfcafc31b8407258c52f30fa0c62d062ce108c00
+SHA1 (patch-Source_Metadata_XTIFF.cpp) = 60f8a0af9e2928a0675bc9dafae3c3741f8ae13e
SHA1 (patch-Source_Utilities.h) = bb9cdd7d72c46e72cd3a636beb27541783609191
SHA1 (patch-genfipsrclist.sh) = 9b22593e0ca5ff869ea22ddb91f46785ae45d5cd
SHA1 (patch-gensrclist.sh) = 2582848736654138b3ebdda9d8469046e992745b
diff --git a/graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp b/graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp
index ca2903720ba..66675179838 100644
--- a/graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp
+++ b/graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp
@@ -1,10 +1,14 @@
-$NetBSD: patch-Source_Metadata_XTIFF.cpp,v 1.1 2020/05/14 16:42:14 nia Exp $
+$NetBSD: patch-Source_Metadata_XTIFF.cpp,v 1.2 2022/05/31 11:49:09 gdt Exp $
Unbundle image libraries.
---- Source/Metadata/XTIFF.cpp.orig 2015-03-04 00:07:10.000000000 +0000
+Remediate upstream use of a tiff internal function, which no longer exists in tiff 4.4.0.
+Upstream bug report (in forum; there is no issue tracker):
+ https://sourceforge.net/p/freeimage/discussion/36109/thread/2018fdc6e7/?limit=25
+
+--- Source/Metadata/XTIFF.cpp.orig 2015-03-04 05:07:10.000000000 +0000
+++ Source/Metadata/XTIFF.cpp
-@@ -29,13 +29,18 @@
+@@ -29,7 +29,7 @@
#pragma warning (disable : 4786) // identifier was truncated to 'number' characters
#endif
@@ -13,18 +17,7 @@ Unbundle image libraries.
#include "FreeImage.h"
#include "Utilities.h"
- #include "FreeImageTag.h"
- #include "FIRational.h"
-
-+extern "C"
-+{
-+ int _TIFFDataSize(TIFFDataType type);
-+}
-+
- // ----------------------------------------------------------
- // Extended TIFF Directory GEO Tag Support
- // ----------------------------------------------------------
-@@ -224,6 +229,33 @@ tiff_write_geotiff_profile(TIFF *tif, FI
+@@ -224,6 +224,33 @@ tiff_write_geotiff_profile(TIFF *tif, FI
// TIFF EXIF tag reading & writing
// ----------------------------------------------------------
@@ -58,7 +51,7 @@ Unbundle image libraries.
/**
Read a single Exif tag
-@@ -575,45 +607,11 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M
+@@ -575,45 +602,11 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M
// loop over all Core Directory Tags
// ### uses private data, but there is no other way
@@ -107,7 +100,7 @@ Unbundle image libraries.
}
return TRUE;
-@@ -723,10 +721,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::
+@@ -723,10 +716,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::
TagLib& tag_lib = TagLib::instance();
@@ -121,3 +114,12 @@ Unbundle image libraries.
if(skip_write_field(tif, tag_id)) {
// skip tags that are already handled by the LibTIFF writing process
+@@ -749,7 +741,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(TIFFFieldSetGetSize(fld) != FreeImage_TagDataWidth(tag_type)) {
+ // skip tag or _TIFFmemcpy will fail
+ continue;
+ }