pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/freeimage freeimage: get building again.
details: https://anonhg.NetBSD.org/pkgsrc/rev/d1a475f69cd0
branches: trunk
changeset: 455773:d1a475f69cd0
user: markd <markd%pkgsrc.org@localhost>
date: Sun Jul 11 04:08:06 2021 +0000
description:
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.
diffstat:
graphics/freeimage/distinfo | 6 +-
graphics/freeimage/hacks.mk | 19 ++++
graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp | 21 ++++-
graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp | 44 +++++++--
4 files changed, 73 insertions(+), 17 deletions(-)
diffs (132 lines):
diff -r 775fee00ab15 -r d1a475f69cd0 graphics/freeimage/distinfo
--- a/graphics/freeimage/distinfo Sun Jul 11 03:33:02 2021 +0000
+++ b/graphics/freeimage/distinfo Sun Jul 11 04:08:06 2021 +0000
@@ -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_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
diff -r 775fee00ab15 -r d1a475f69cd0 graphics/freeimage/hacks.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/freeimage/hacks.mk Sun Jul 11 04:08:06 2021 +0000
@@ -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
diff -r 775fee00ab15 -r d1a475f69cd0 graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp
--- a/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp Sun Jul 11 03:33:02 2021 +0000
+++ b/graphics/freeimage/patches/patch-Source_FreeImage_PluginJPEG.cpp Sun Jul 11 04:08:06 2021 +0000
@@ -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 @@
}
#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
diff -r 775fee00ab15 -r d1a475f69cd0 graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp
--- a/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp Sun Jul 11 03:33:02 2021 +0000
+++ b/graphics/freeimage/patches/patch-Source_FreeImage_PluginTIFF.cpp Sun Jul 11 04:08:06 2021 +0000
@@ -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.
+ // ----------------------------------------------------------
Home |
Main Index |
Thread Index |
Old Index