summaryrefslogtreecommitdiff
path: root/graphics/freeimage
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2017-12-26 11:55:01 +0000
committerhe <he@pkgsrc.org>2017-12-26 11:55:01 +0000
commitc56bf2e4bb7c88538e797e415673b135bff3c4cb (patch)
tree5c31034ad51a3a6797dc098c5a3561a204755701 /graphics/freeimage
parent476875d273c65a3d4618720f16ba2ff4246d2c64 (diff)
downloadpkgsrc-c56bf2e4bb7c88538e797e415673b135bff3c4cb.tar.gz
Add a couple of patches to adapt to newer C++ where R"some string" now
has special meaning, and add a comment to an existing patch. Bump PKGREVISION.
Diffstat (limited to 'graphics/freeimage')
-rw-r--r--graphics/freeimage/Makefile4
-rw-r--r--graphics/freeimage/distinfo6
-rw-r--r--graphics/freeimage/patches/patch-Source_LibOpenJPEG_opj__malloc.h4
-rw-r--r--graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c44
-rw-r--r--graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c24
5 files changed, 77 insertions, 5 deletions
diff --git a/graphics/freeimage/Makefile b/graphics/freeimage/Makefile
index 65f93e80bc8..9b01911a04c 100644
--- a/graphics/freeimage/Makefile
+++ b/graphics/freeimage/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2017/08/11 15:26:20 nros Exp $
+# $NetBSD: Makefile,v 1.6 2017/12/26 11:55:01 he Exp $
DISTNAME= FreeImage3170
PKGNAME= freeimage-3.17.0
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeimage/}
EXTRACT_SUFX= .zip
diff --git a/graphics/freeimage/distinfo b/graphics/freeimage/distinfo
index 8931cee9388..0b51125d074 100644
--- a/graphics/freeimage/distinfo
+++ b/graphics/freeimage/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2017/07/08 08:08:25 nros Exp $
+$NetBSD: distinfo,v 1.6 2017/12/26 11:55:01 he Exp $
SHA1 (FreeImage3170.zip) = 6752c83798c2f81dee71a2e8bb11657068672669
RMD160 (FreeImage3170.zip) = c4e87846098327ee346c49ae81b6036f6d9ab36d
@@ -8,4 +8,6 @@ SHA1 (patch-Makefile) = 196331f954913d5b49ae1e2464fb356a26212168
SHA1 (patch-Makefile.fip) = c12dd636f83f774a11c91c4e3373176fd27e562d
SHA1 (patch-Source_FreeImage_PluginPCX.cpp) = 26853626d1dc6a52804f946fd0576269de380512
SHA1 (patch-Source_FreeImage_PluginXPM.cpp) = eac7be24c3d64593feebdb548df8a404db66c113
-SHA1 (patch-Source_LibOpenJPEG_opj__malloc.h) = 4ba7924e5ce04b98c9c249bc31df600b7fbdcde3
+SHA1 (patch-Source_LibOpenJPEG_opj__malloc.h) = 7e8b65d17cf1f0ed295964d477b96acac56bd927
+SHA1 (patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c) = 9725fa20d545e6482f4396487b70c104ddb37ce6
+SHA1 (patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c) = bd569e2b2fa7b79a3651f53352fc8e5d26d0b2d3
diff --git a/graphics/freeimage/patches/patch-Source_LibOpenJPEG_opj__malloc.h b/graphics/freeimage/patches/patch-Source_LibOpenJPEG_opj__malloc.h
index 751a845d308..499c488eeed 100644
--- a/graphics/freeimage/patches/patch-Source_LibOpenJPEG_opj__malloc.h
+++ b/graphics/freeimage/patches/patch-Source_LibOpenJPEG_opj__malloc.h
@@ -1,4 +1,6 @@
-$NetBSD: patch-Source_LibOpenJPEG_opj__malloc.h,v 1.1 2015/02/12 22:40:05 snj Exp $
+$NetBSD: patch-Source_LibOpenJPEG_opj__malloc.h,v 1.2 2017/12/26 11:55:01 he Exp $
+
+Add a case for NetBSD.
--- Source/LibOpenJPEG/opj_malloc.h.orig 2015-02-12 12:40:33.000000000 -0800
+++ Source/LibOpenJPEG/opj_malloc.h 2015-02-12 12:42:08.000000000 -0800
diff --git a/graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c b/graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c
new file mode 100644
index 00000000000..1004a194f71
--- /dev/null
+++ b/graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c
@@ -0,0 +1,44 @@
+$NetBSD: patch-Source_LibWebP_src_dsp_dsp.upsampling_mips_dsp_r2.c,v 1.1 2017/12/26 11:55:01 he Exp $
+
+Adapt to newer C++ where R"some string" has new meaning.
+
+--- Source/LibWebP/./src/dsp/dsp.upsampling_mips_dsp_r2.c.orig 2015-02-20 02:34:36.000000000 +0000
++++ Source/LibWebP/./src/dsp/dsp.upsampling_mips_dsp_r2.c
+@@ -21,29 +21,29 @@
+
+ #if !defined(WEBP_YUV_USE_TABLE)
+
+-#define YUV_TO_RGB(Y, U, V, R, G, B) do { \
++#define YUV_TO_RGB(Y, U, V, Red, G, B) do { \
+ const int t1 = kYScale * Y; \
+ const int t2 = kVToG * V; \
+- R = kVToR * V; \
++ Red = kVToR * V; \
+ G = kUToG * U; \
+ B = kUToB * U; \
+- R = t1 + R; \
++ Red = t1 + Red; \
+ G = t1 - G; \
+ B = t1 + B; \
+- R = R + kRCst; \
++ Red = Red + kRCst; \
+ G = G - t2 + kGCst; \
+ B = B + kBCst; \
+ __asm__ volatile ( \
+- "shll_s.w %["#R"], %["#R"], 9 \n\t" \
++ "shll_s.w %["#Red"], %["#Red"], 9 \n\t" \
+ "shll_s.w %["#G"], %["#G"], 9 \n\t" \
+ "shll_s.w %["#B"], %["#B"], 9 \n\t" \
+- "precrqu_s.qb.ph %["#R"], %["#R"], $zero \n\t" \
++ "precrqu_s.qb.ph %["#Red"], %["#Red"], $zero \n\t" \
+ "precrqu_s.qb.ph %["#G"], %["#G"], $zero \n\t" \
+ "precrqu_s.qb.ph %["#B"], %["#B"], $zero \n\t" \
+- "srl %["#R"], %["#R"], 24 \n\t" \
++ "srl %["#Red"], %["#Red"], 24 \n\t" \
+ "srl %["#G"], %["#G"], 24 \n\t" \
+ "srl %["#B"], %["#B"], 24 \n\t" \
+- : [R]"+r"(R), [G]"+r"(G), [B]"+r"(B) \
++ : [Red]"+r"(Red), [G]"+r"(G), [B]"+r"(B) \
+ : \
+ ); \
+ } while (0)
diff --git a/graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c b/graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c
new file mode 100644
index 00000000000..b85a53200ab
--- /dev/null
+++ b/graphics/freeimage/patches/patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-Source_LibWebP_src_dsp_dsp.yuv_mips_dsp_r2.c,v 1.1 2017/12/26 11:55:01 he Exp $
+
+Adapt to newer C++ where R"some string" has new meaning.
+
+--- Source/LibWebP/./src/dsp/dsp.yuv_mips_dsp_r2.c.orig 2015-02-20 02:34:38.000000000 +0000
++++ Source/LibWebP/./src/dsp/dsp.yuv_mips_dsp_r2.c
+@@ -35,7 +35,7 @@
+ "addu %[temp2], %[temp2], %[temp3] \n\t" \
+ "addu %[temp4], %[temp4], %[t_con_8] \n\t" \
+
+-#define ROW_FUNC_PART_2(R, G, B, K) \
++#define ROW_FUNC_PART_2(Red, G, B, K) \
+ "addu %[temp5], %[temp0], %[temp1] \n\t" \
+ "subu %[temp6], %[temp0], %[temp2] \n\t" \
+ "addu %[temp7], %[temp0], %[temp4] \n\t" \
+@@ -54,7 +54,7 @@
+ "srl %[temp5], %[temp5], 24 \n\t" \
+ "srl %[temp6], %[temp6], 24 \n\t" \
+ "srl %[temp7], %[temp7], 24 \n\t" \
+- "sb %[temp5], "#R"(%[dst]) \n\t" \
++ "sb %[temp5], "#Red"(%[dst]) \n\t" \
+ "sb %[temp6], "#G"(%[dst]) \n\t" \
+ "sb %[temp7], "#B"(%[dst]) \n\t" \
+