[packages/FreeImage] - added libwebp-cpp patch (fix preprocessor tokens in internal libwebp); release 2

qboosh qboosh at pld-linux.org
Mon May 23 20:37:54 CEST 2016


commit 16d31c959656472b06f97b78badd21f06ca51ede
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon May 23 20:38:22 2016 +0200

    - added libwebp-cpp patch (fix preprocessor tokens in internal libwebp); release 2

 FreeImage-libwebp-cpp.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
 FreeImage.spec              |  4 +++-
 2 files changed, 45 insertions(+), 1 deletion(-)
---
diff --git a/FreeImage.spec b/FreeImage.spec
index ee3f5a0..0e4acd9 100644
--- a/FreeImage.spec
+++ b/FreeImage.spec
@@ -13,13 +13,14 @@ Summary:	Library for handling different graphics files formats
 Summary(pl.UTF-8):	Biblioteka do manipulacji różnymi formatami plików graficznych
 Name:		FreeImage
 Version:	3.17.0
-Release:	1
+Release:	2
 License:	GPL and FIPL v1.0 (see the license-fi.txt)
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/freeimage/%{name}%{fver}.zip
 # Source0-md5:	459e15f0ec75d6efa3c7bd63277ead86
 Source1:	http://downloads.sourceforge.net/freeimage/%{name}%{fver}.pdf
 # Source1-md5:	9d7e12d5062b51082407a6d69aa7d020
+Patch0:		%{name}-libwebp-cpp.patch
 URL:		http://freeimage.sourceforge.net/index.html
 BuildRequires:	libstdc++-devel
 BuildRequires:	unzip
@@ -63,6 +64,7 @@ Statyczna biblioteka FreeImage.
 
 %prep
 %setup -q -n %{name}
+%patch0 -p1
 
 %build
 CFLAGS="%{rpmcflags} -fPIC -fvisibility=hidden" \
diff --git a/FreeImage-libwebp-cpp.patch b/FreeImage-libwebp-cpp.patch
new file mode 100644
index 0000000..1c17869
--- /dev/null
+++ b/FreeImage-libwebp-cpp.patch
@@ -0,0 +1,42 @@
+--- FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c.orig	2015-02-20 03:34:36.000000000 +0100
++++ FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c	2016-05-23 15:13:46.386879788 +0200
+@@ -34,15 +34,15 @@
+     G = G - t2 + kGCst;                                                        \
+     B = B + kBCst;                                                             \
+     __asm__ volatile (                                                         \
+-      "shll_s.w         %["#R"],      %["#R"],        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  %["#G"],      %["#G"],        $zero          \n\t"     \
+-      "precrqu_s.qb.ph  %["#B"],      %["#B"],        $zero          \n\t"     \
+-      "srl              %["#R"],      %["#R"],        24             \n\t"     \
+-      "srl              %["#G"],      %["#G"],        24             \n\t"     \
+-      "srl              %["#B"],      %["#B"],        24             \n\t"     \
++      "shll_s.w         %[" #R "],      %[" #R "],        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  %[" #G "],      %[" #G "],        $zero          \n\t"     \
++      "precrqu_s.qb.ph  %[" #B "],      %[" #B "],        $zero          \n\t"     \
++      "srl              %[" #R "],      %[" #R "],        24             \n\t"     \
++      "srl              %[" #G "],      %[" #G "],        24             \n\t"     \
++      "srl              %[" #B "],      %[" #B "],        24             \n\t"     \
+       : [R]"+r"(R), [G]"+r"(G), [B]"+r"(B)                                     \
+       :                                                                        \
+     );                                                                         \
+--- FreeImage/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c.orig	2015-02-20 03:34:38.000000000 +0100
++++ FreeImage/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c	2016-05-23 15:15:34.452490572 +0200
+@@ -54,9 +54,9 @@
+   "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               %[temp6],   "#G"(%[dst])                    \n\t"          \
+-  "sb               %[temp7],   "#B"(%[dst])                    \n\t"          \
++  "sb               %[temp5],   " #R "(%[dst])                    \n\t"          \
++  "sb               %[temp6],   " #G "(%[dst])                    \n\t"          \
++  "sb               %[temp7],   " #B "(%[dst])                    \n\t"          \
+ 
+ #define ASM_CLOBBER_LIST()                                                     \
+   : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),             \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/FreeImage.git/commitdiff/16d31c959656472b06f97b78badd21f06ca51ede



More information about the pld-cvs-commit mailing list