media-gfx/ufraw: Fix build with gcc 7.
authorAlexis Ballier <aballier@gentoo.org>
Sun, 18 Jun 2017 09:51:06 +0000 (11:51 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Sun, 18 Jun 2017 09:51:19 +0000 (11:51 +0200)
Patch by Johannes Hirte, bug #618068

Package-Manager: Portage-2.3.6, Repoman-2.3.2

media-gfx/ufraw/files/ufraw-0.22-drop_superfluous_abs.patch [new file with mode: 0644]
media-gfx/ufraw/ufraw-0.22-r1.ebuild

diff --git a/media-gfx/ufraw/files/ufraw-0.22-drop_superfluous_abs.patch b/media-gfx/ufraw/files/ufraw-0.22-drop_superfluous_abs.patch
new file mode 100644 (file)
index 0000000..8c11f66
--- /dev/null
@@ -0,0 +1,16 @@
+Fixes build with gcc 7, by Johannes Hirte.
+https://bugs.gentoo.org/show_bug.cgi?id=618068
+
+diff --git a/../old/dcraw.cc b/dcraw.cc
+index 88c8068..cedf86b 100644
+--- a/../old/dcraw.cc
++++ b/dcraw.cc
+@@ -9242,7 +9242,7 @@ canon_a5:
+     if (make[0] == 'O') {
+       i = find_green (12, 32, 1188864, 3576832);
+       c = find_green (12, 32, 2383920, 2387016);
+-      if (abs(i) < abs(c)) {
++      if (i < c) {
+       SWAP(i,c);
+       load_flags = 24;
+       }
index 225999943e4eac6417b11aec2817b8bb8ae27f01..155af1ce17094505c32d886e1b04ac998d27b817 100644 (file)
@@ -40,6 +40,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
        "${FILESDIR}"/${P}-jasper-automagic.patch
        "${FILESDIR}"/${P}-crashfix.patch
+       "${FILESDIR}"/${P}-drop_superfluous_abs.patch
 )
 
 src_prepare() {