summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-09-18 19:59:16 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2016-09-18 19:59:31 +0100
commiteb4328c13b45b7b8e945bbf599443b8254bb2772 (patch)
tree6f7a951d0e7ac4ad12ae055a8a9999ba9a7096b1
parentnet-misc/curl: Stable for PPC64 (bug #593716). (diff)
downloadgentoo-eb4328c13b45b7b8e945bbf599443b8254bb2772.tar.gz
gentoo-eb4328c13b45b7b8e945bbf599443b8254bb2772.tar.bz2
gentoo-eb4328c13b45b7b8e945bbf599443b8254bb2772.zip
dev-util/bdelta: tweak for gcc-6, bug #594246
c++11 intruduced next() helper http://en.cppreference.com/w/cpp/iterator/next which does exactly the same. Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/594246 Package-Manager: portage-2.3.0
-rw-r--r--dev-util/bdelta/bdelta-0.3.1.ebuild3
-rw-r--r--dev-util/bdelta/files/bdelta-0.3.1-gcc-6.patch18
2 files changed, 20 insertions, 1 deletions
diff --git a/dev-util/bdelta/bdelta-0.3.1.ebuild b/dev-util/bdelta/bdelta-0.3.1.ebuild
index adb6de1f5e9..9e75a60fb9b 100644
--- a/dev-util/bdelta/bdelta-0.3.1.ebuild
+++ b/dev-util/bdelta/bdelta-0.3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -28,6 +28,7 @@ IUSE=""
src_prepare() {
epatch "${FILESDIR}"/${P}-soname.patch
+ epatch "${FILESDIR}"/${P}-gcc-6.patch
}
src_compile() {
diff --git a/dev-util/bdelta/files/bdelta-0.3.1-gcc-6.patch b/dev-util/bdelta/files/bdelta-0.3.1-gcc-6.patch
new file mode 100644
index 00000000000..9c998de37c3
--- /dev/null
+++ b/dev-util/bdelta/files/bdelta-0.3.1-gcc-6.patch
@@ -0,0 +1,18 @@
+diff --git a/src/libbdelta.cpp b/src/libbdelta.cpp
+index b11bb2b..d769b0d 100644
+--- a/src/libbdelta.cpp
++++ b/src/libbdelta.cpp
+@@ -117,7 +117,3 @@ unsigned match_backward(BDelta_Instance *b, unsigned p1, unsigned p2, unsigned b
+ // Iterator helper function
+-template <class T>
+-inline T prior(T i) {return --i;}
+-template <class T>
+-inline T next(T i) {return ++i;}
+-
++template <class T> inline T bdelta_next(T i) {return ++i;}
+
+@@ -423,3 +419,3 @@ void bdelta_pass(BDelta_Instance *b, unsigned blocksize, unsigned minMatchSize,
+ if (! maxHoleSize || (u1.num <= maxHoleSize && u2.num <= maxHoleSize))
+- if (! (flags & BDELTA_SIDES_ORDERED) || (next(u1.ml) == u1.mr && next(u2.ml) == u2.mr))
++ if (! (flags & BDELTA_SIDES_ORDERED) || (bdelta_next(u1.ml) == u1.mr && bdelta_next(u2.ml) == u2.mr))
+ bdelta_pass_2(b, blocksize, minMatchSize, &u1, 1, &u2, 1);