pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/freeimage graphics/freeimage: Remediate upstr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d646d3cdc0c0
branches:  trunk
changeset: 380208:d646d3cdc0c0
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Tue May 31 11:49:09 2022 +0000

description:
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.

diffstat:

 graphics/freeimage/Makefile                                |   4 +-
 graphics/freeimage/Makefile.common                         |   3 +-
 graphics/freeimage/distinfo                                |   4 +-
 graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp |  36 +++++++------
 4 files changed, 25 insertions(+), 22 deletions(-)

diffs (121 lines):

diff -r 4cd8ffc23eb0 -r d646d3cdc0c0 graphics/freeimage/Makefile
--- a/graphics/freeimage/Makefile       Tue May 31 11:39:18 2022 +0000
+++ b/graphics/freeimage/Makefile       Tue May 31 11:49:09 2022 +0000
@@ -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@localhost
 COMMENT=       Library for supporting PNG, BMP, JPEG, and TIFF
diff -r 4cd8ffc23eb0 -r d646d3cdc0c0 graphics/freeimage/Makefile.common
--- a/graphics/freeimage/Makefile.common        Tue May 31 11:39:18 2022 +0000
+++ b/graphics/freeimage/Makefile.common        Tue May 31 11:49:09 2022 +0000
@@ -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 @@
 .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 -r 4cd8ffc23eb0 -r d646d3cdc0c0 graphics/freeimage/distinfo
--- a/graphics/freeimage/distinfo       Tue May 31 11:39:18 2022 +0000
+++ b/graphics/freeimage/distinfo       Tue May 31 11:49:09 2022 +0000
@@ -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_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 -r 4cd8ffc23eb0 -r d646d3cdc0c0 graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp
--- a/graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp        Tue May 31 11:39:18 2022 +0000
+++ b/graphics/freeimage/patches/patch-Source_Metadata_XTIFF.cpp        Tue May 31 11:49:09 2022 +0000
@@ -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 @@
  
  #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 @@
  /**
  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 @@
        }
  
        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 @@
  
                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;
+                       }



Home | Main Index | Thread Index | Old Index