sci-biology/allpathslg: Fix building with GCC 7
authorDavid Seifert <soap@gentoo.org>
Sun, 24 Dec 2017 17:11:30 +0000 (18:11 +0100)
committerDavid Seifert <soap@gentoo.org>
Sun, 24 Dec 2017 18:00:22 +0000 (19:00 +0100)
Closes: https://bugs.gentoo.org/638724
Package-Manager: Portage-2.3.19, Repoman-2.3.6

sci-biology/allpathslg/allpathslg-52488-r2.ebuild
sci-biology/allpathslg/files/allpathslg-52488-gcc7.patch [new file with mode: 0644]

index e68430e2462dcaf677d4b102e3e2fbee296ea191..391575f4f0576a61b007d49812397dccea571469 100644 (file)
@@ -23,8 +23,9 @@ DEPEND="
        dev-libs/boost:="
 
 PATCHES=(
-       "${WORKDIR}/${P}-patchset/${P}_fix-buildsystem.patch"
-       "${WORKDIR}/${P}-patchset/${P}_remove-namespace-std.patch"
+       "${WORKDIR}"/${P}-patchset/${P}_fix-buildsystem.patch
+       "${WORKDIR}"/${P}-patchset/${P}_remove-namespace-std.patch
+       "${FILESDIR}"/${P}-gcc7.patch
 )
 
 pkg_pretend() {
diff --git a/sci-biology/allpathslg/files/allpathslg-52488-gcc7.patch b/sci-biology/allpathslg/files/allpathslg-52488-gcc7.patch
new file mode 100644 (file)
index 0000000..7c5e126
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/src/paths/long/VariantCallTools.cc
++++ b/src/paths/long/VariantCallTools.cc
+@@ -1870,8 +1870,8 @@
+         bool i_is_indel = (change[i].first.size() != change[i].second.size());
+         if (i_is_indel) inserted_base += change[i].second.size()-1;
+         size_t j = i + 1;
+-        while (j < edits.size() && abs(edits[j].second - edits[j-1].second 
+-                    - change[j-1].first.size()) < MinClumpSep) {
++        while (j < edits.size() && std::abs(edits[j].second - edits[j-1].second 
++                    - static_cast<int>(change[j-1].first.size())) < MinClumpSep) {
+             nmatch += edits[j].second - edits[j-1].second - change[j-1].first.size();
+             bool j_is_indel = (change[j].first.size() != change[j].second.size());
+             if (j_is_indel)