]> git.pld-linux.org Git - packages/exact-image.git/commitdiff
- added ub patch (fix some undefined behavious issues, mainly signed type overflow... auto/th/exact-image-0.9.2-1
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 28 Feb 2017 20:48:14 +0000 (21:48 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 28 Feb 2017 20:48:14 +0000 (21:48 +0100)
- 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 [new file with mode: 0644]
exact-image-ub.patch [new file with mode: 0644]
exact-image.spec

diff --git a/exact-image-make.patch b/exact-image-make.patch
new file mode 100644 (file)
index 0000000..ccb4840
--- /dev/null
@@ -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 (file)
index 0000000..82bc647
--- /dev/null
@@ -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 (&timestamp);
+   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);
index cc8dafcfa1a884b73d4d3b36f283c59bd283bdb0..14efb7e1a15b83af5667b3c52a58118039fc8cb3 100644 (file)
@@ -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
This page took 0.089853 seconds and 4 git commands to generate.