pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/freeimage



Module Name:    pkgsrc
Committed By:   markd
Date:           Sun Jul 11 04:08:06 UTC 2021

Modified Files:
        pkgsrc/graphics/freeimage: distinfo
        pkgsrc/graphics/freeimage/patches:
            patch-Source_FreeImage_PluginJPEG.cpp
            patch-Source_FreeImage_PluginTIFF.cpp
Added Files:
        pkgsrc/graphics/freeimage: hacks.mk

Log Message:
freeimage: get building again.

In PluginJPEG.cpp avoid a name clash with jpeglib function.
Restore accidentally deleted part of patch-Source_FreeImage_PluginTIFF.cpp.
On Linux PluginTIFF.cpp extracts with carriage return/linefeeds whereas
NetBSD only has linefeeds so strip carriage returns so patch will apply on
both.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/graphics/freeimage/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/freeimage/hacks.mk
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/freeimage/distinfo
diff -u pkgsrc/graphics/freeimage/distinfo:1.11 pkgsrc/graphics/freeimage/distinfo:1.12
--- pkgsrc/graphics/freeimage/distinfo:1.11     Thu Jul  8 21:26:12 2021
+++ pkgsrc/graphics/freeimage/distinfo  Sun Jul 11 04:08:06 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2021/07/08 21:26:12 markd Exp $
+$NetBSD: distinfo,v 1.12 2021/07/11 04:08:06 markd Exp $
 
 SHA1 (FreeImage3180.zip) = 38daa9d8f1bca2330a2eaa42ec66fbe6ede7dce9
 RMD160 (FreeImage3180.zip) = b791715fccf49355a3cb27b6250d8ed809c2454e
@@ -14,10 +14,10 @@ SHA1 (patch-Source_FreeImage_Plugin.cpp)
 SHA1 (patch-Source_FreeImage_PluginEXR.cpp) = ce97b25f8968eea7c3216143b766b1c51ccd5e43
 SHA1 (patch-Source_FreeImage_PluginJ2K.cpp) = bbc44884aba8be3af2aa824da5cf788d91c27fb6
 SHA1 (patch-Source_FreeImage_PluginJP2.cpp) = 9a6d27e039b2050004a2d331389bdfa32dffe681
-SHA1 (patch-Source_FreeImage_PluginJPEG.cpp) = a3998454b11c2f73890828b24c0ea276bff7ee7f
+SHA1 (patch-Source_FreeImage_PluginJPEG.cpp) = 9ed3ce6d70871c9657a69daa4f68ae8423e100a2
 SHA1 (patch-Source_FreeImage_PluginPNG.cpp) = 0d9c71856a9355f56c3e9a571a414098d8af2e88
 SHA1 (patch-Source_FreeImage_PluginRAW.cpp) = 1d67ad2b634e2a5b1fa82be240a4d6edfad7c05d
-SHA1 (patch-Source_FreeImage_PluginTIFF.cpp) = 2b1a899471139059d928c46db5d1f8dee0856a6d
+SHA1 (patch-Source_FreeImage_PluginTIFF.cpp) = bfa869452929f62162c15982b58013b0d43e9f8e
 SHA1 (patch-Source_FreeImage_PluginWebP.cpp) = d7b57cfcb1379c6a849edb219c8a59edae83ff5c
 SHA1 (patch-Source_FreeImage_ZLibInterface.cpp) = 73211e8ecefb7972f1fcb579dc4a17409c81c480
 SHA1 (patch-Source_Metadata_TagConversion.cpp) = 0785cc5dd395bca538e9a82cadbb7ef450eebe86

Index: pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp
diff -u pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp:1.1 pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp:1.2
--- pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp:1.1 Thu May 14 16:42:14 2020
+++ pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp     Sun Jul 11 04:08:06 2021
@@ -1,6 +1,7 @@
-$NetBSD: patch-Source_FreeImage_PluginJPEG.cpp,v 1.1 2020/05/14 16:42:14 nia Exp $
+$NetBSD: patch-Source_FreeImage_PluginJPEG.cpp,v 1.2 2021/07/11 04:08:06 markd Exp $
 
 Unbundle image libraries.
+Dont clash name with actual jpeglib function
 
 --- Source/FreeImage/PluginJPEG.cpp.orig       2018-07-28 18:22:24.000000000 +0000
 +++ Source/FreeImage/PluginJPEG.cpp
@@ -17,3 +18,21 @@ Unbundle image libraries.
  }
  
  #include "FreeImage.h"
+@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr mark
+   return FALSE.  You might want to issue an error message instead.
+ */
+ static BOOL 
+-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
++jpeg_read_icc_profileX(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
+       jpeg_saved_marker_ptr marker;
+       int num_markers = 0;
+       int seq_no;
+@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIB
+       BYTE *icc_profile = NULL;
+       unsigned icc_length = 0;
+ 
+-      if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
++      if( jpeg_read_icc_profileX(cinfo, &icc_profile, &icc_length) ) {
+               // copy ICC profile data
+               FreeImage_CreateICCProfile(dib, icc_profile, icc_length);
+               // clean up

Index: pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp
diff -u pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp:1.2 pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp:1.3
--- pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp:1.2 Thu Jul  8 21:26:12 2021
+++ pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp     Sun Jul 11 04:08:06 2021
@@ -1,18 +1,36 @@
-$NetBSD: patch-Source_FreeImage_PluginTIFF.cpp,v 1.2 2021/07/08 21:26:12 markd Exp $
+$NetBSD: patch-Source_FreeImage_PluginTIFF.cpp,v 1.3 2021/07/11 04:08:06 markd Exp $
 
 Unbundle image libraries.
+handle openexr3
 
---- Source/FreeImage/PluginTIFF.cpp.orig       2018-07-28 23:24:44.000000000 +0000
+--- Source/FreeImage/PluginTIFF.cpp.orig       2018-07-28 12:24:44.000000000 +0000
 +++ Source/FreeImage/PluginTIFF.cpp
 @@ -37,9 +37,9 @@
- 
- #include "FreeImage.h"
- #include "Utilities.h"
--#include "../LibTIFF4/tiffiop.h"
-+#include <tiffio.h>
- #include "../Metadata/FreeImageTag.h"
--#include "../OpenEXR/Half/half.h"
-+#include <Imath/half.h>
- 
- #include "FreeImageIO.h"
- #include "PSDParser.h"
+ 
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../LibTIFF4/tiffiop.h"
++#include <tiffio.h>
+ #include "../Metadata/FreeImageTag.h"
+-#include "../OpenEXR/Half/half.h"
++#include <Imath/half.h>
+ 
+ #include "FreeImageIO.h"
+ #include "PSDParser.h"
+@@ -194,16 +194,6 @@ TIFFFdOpen(thandle_t handle, const char 
+       return tif;
+ }
+ 
+-/**
+-Open a TIFF file for reading or writing
+-@param name
+-@param mode
+-*/
+-TIFF*
+-TIFFOpen(const char* name, const char* mode) {
+-      return 0;
+-}
+-
+ // ----------------------------------------------------------
+ //   TIFF library FreeImage-specific routines.
+ // ----------------------------------------------------------

Added files:

Index: pkgsrc/graphics/freeimage/hacks.mk
diff -u /dev/null pkgsrc/graphics/freeimage/hacks.mk:1.1
--- /dev/null   Sun Jul 11 04:08:06 2021
+++ pkgsrc/graphics/freeimage/hacks.mk  Sun Jul 11 04:08:06 2021
@@ -0,0 +1,19 @@
+# $NetBSD: hacks.mk,v 1.1 2021/07/11 04:08:06 markd Exp $
+
+.if !defined(FREEIMAGE_HACKS_MK)
+FREEIMAGE_HACKS_MK=    defined
+
+###
+### For some reason on Linux PluginTIFF.cpp extracts with CR LF
+### so strip CR before patch is applied.
+###
+.if ${OPSYS} == "Linux"
+PKG_HACKS+=            strip-cr
+
+SUBST_CLASSES+=                cr
+SUBST_STAGE.cr=                pre-patch
+SUBST_FILES.cr=                Source/FreeImage/PluginTIFF.cpp
+SUBST_SED.cr=          -e 's|\r||'
+.endif
+
+.endif # FREEIMAGE_HACKS_MK



Home | Main Index | Thread Index | Old Index