[packages/exact-image] - added ub patch (fix some undefined behavious issues, mainly signed type overflow abuse) - added ma
qboosh
qboosh at pld-linux.org
Tue Feb 28 21:46:15 CET 2017
commit b5d616e4121900bb1bfb495edeb11414715b2729
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 28 21:48:14 2017 +0100
- added ub patch (fix some undefined behavious issues, mainly signed type overflow abuse)
- added make patch (avoid recompiling frontends on make install)
- compile in GNU C++98 mode (code is not ready for C++11)
exact-image-make.patch | 9 +++++++++
exact-image-ub.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
exact-image.spec | 6 +++++-
3 files changed, 58 insertions(+), 1 deletion(-)
---
diff --git a/exact-image.spec b/exact-image.spec
index cc8dafc..14efb7e 100644
--- a/exact-image.spec
+++ b/exact-image.spec
@@ -21,6 +21,8 @@ Group: Applications/Graphics
Source0: http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
# Source0-md5: bb9c8be82a4b5126be0224529ea7c4c7
Patch0: %{name}-libs.patch
+Patch1: %{name}-ub.patch
+Patch2: %{name}-make.patch
Patch3: %{name}-evas.patch
Patch4: %{name}-install.patch
Patch5: swig.patch
@@ -113,6 +115,8 @@ API ExactImage dla Pythona.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
@@ -137,7 +141,7 @@ API ExactImage dla Pythona.
CC="%{__cc}" \
CXX="%{__cxx}" \
CFLAGS="%{rpmcflags}" \
- CXXFLAGS="%{rpmcflags}" \
+ CXXFLAGS="%{rpmcflags} -std=gnu++98" \
Q=
%install
diff --git a/exact-image-make.patch b/exact-image-make.patch
new file mode 100644
index 0000000..ccb4840
--- /dev/null
+++ b/exact-image-make.patch
@@ -0,0 +1,9 @@
+--- exact-image-0.9.2/build/top.make.orig 2008-03-01 22:57:38.000000000 +0100
++++ exact-image-0.9.2/build/top.make 2017-02-28 20:50:28.812532829 +0100
+@@ -47,4 +47,6 @@
+
+ .SUFFIXES:
+
++.SECONDARY:
++
+ endif
diff --git a/exact-image-ub.patch b/exact-image-ub.patch
new file mode 100644
index 0000000..82bc647
--- /dev/null
+++ b/exact-image-ub.patch
@@ -0,0 +1,44 @@
+--- exact-image-0.9.2/codecs/dcraw.h.orig 2015-07-16 17:20:12.000000000 +0200
++++ exact-image-0.9.2/codecs/dcraw.h 2017-02-27 21:56:41.760310486 +0100
+@@ -4387,7 +4387,7 @@
+ */
+ void CLASS vng_interpolate()
+ {
+- static const signed char *cp, terms[] = {
++ static const short *cp, terms[] = {
+ -2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01,
+ -2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01,
+ -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,
+@@ -6979,7 +6979,7 @@
+ {
+ static const struct {
+ const char *prefix;
+- short black, maximum, trans[12];
++ unsigned short black, maximum; short trans[12];
+ } table[] = {
+ { "AgfaPhoto DC-833m", 0, 0, /* DJC */
+ { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } },
+@@ -7915,11 +7915,11 @@
+ sprintf (name, "%s %s", make, model);
+ for (i=0; i < sizeof table / sizeof *table; i++)
+ if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) {
+- if (table[i].black) black = (ushort) table[i].black;
+- if (table[i].maximum) maximum = (ushort) table[i].maximum;
++ if (table[i].black) black = table[i].black;
++ if (table[i].maximum) maximum = table[i].maximum;
+ if (table[i].trans[0]) {
+ for (raw_color = j=0; j < 12; j++)
+- cam_xyz[0][j] = table[i].trans[j] / 10000.0;
++ cam_xyz[j / 3][j % 3] = table[i].trans[j] / 10000.0;
+ cam_xyz_coeff (rgb_cam, cam_xyz);
+ }
+ break;
+@@ -9547,7 +9547,7 @@
+ strncpy (th->desc, desc, 512);
+ strncpy (th->make, make, 64);
+ strncpy (th->model, model, 64);
+- strcpy (th->soft, "dcraw v"DCRAW_VERSION);
++ strcpy (th->soft, "dcraw v" DCRAW_VERSION);
+ t = localtime (×tamp);
+ sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d",
+ t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/exact-image.git/commitdiff/b5d616e4121900bb1bfb495edeb11414715b2729
More information about the pld-cvs-commit
mailing list