sci-biology/bowtie: Allow for compiling with GCC 6
authorDavid Seifert <soap@gentoo.org>
Sun, 18 Sep 2016 22:39:18 +0000 (00:39 +0200)
committerDavid Seifert <soap@gentoo.org>
Sun, 18 Sep 2016 22:39:56 +0000 (00:39 +0200)
Gentoo-bug: 593966

Package-Manager: portage-2.3.0

sci-biology/bowtie/bowtie-2.2.9.ebuild
sci-biology/bowtie/files/bowtie-2.2.9-fix-c++14.patch [new file with mode: 0644]

index 6e664202dfdf0b435b1ab2451e2737bddacdefce..8544512a3f0dfc44031c528c88ddcb1503b4d5d1 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI=6
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="Popular short read aligner for Next-generation sequencing data"
 HOMEPAGE="http://bowtie-bio.sourceforge.net/bowtie2/"
@@ -25,6 +25,7 @@ S="${WORKDIR}/${PN}2-${PV}"
 
 DOCS=( AUTHORS NEWS TUTORIAL )
 HTML_DOCS=( doc/{manual.html,style.css} )
+PATCHES=( "${FILESDIR}/${PN}-2.2.9-fix-c++14.patch" )
 
 pkg_pretend() {
        if ! use cpu_flags_x86_sse2 ; then
diff --git a/sci-biology/bowtie/files/bowtie-2.2.9-fix-c++14.patch b/sci-biology/bowtie/files/bowtie-2.2.9-fix-c++14.patch
new file mode 100644 (file)
index 0000000..cd2a67b
--- /dev/null
@@ -0,0 +1,29 @@
+Fix building with C++14, which errors out due to differing semantics between C++98
+and C++14 with regards to allowing destructors to throw exceptions.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=593966
+
+--- a/blockwise_sa.h
++++ b/blockwise_sa.h
+@@ -87,7 +87,11 @@
+       _logger(__logger)
+       { }
+ 
+-      virtual ~BlockwiseSA() { }
++      virtual ~BlockwiseSA()
++#if __cplusplus >= 201103L
++      noexcept(false)
++#endif
++      { }
+ 
+       /**
+        * Get the next suffix; compute the next bucket if necessary.
+@@ -216,6 +220,9 @@
+     { _randomSrc.init(__seed); reset(); }
+     
+     ~KarkkainenBlockwiseSA()
++#if __cplusplus >= 201103L
++    noexcept(false)
++#endif
+     {
+ #ifdef WITH_TBB
+                   tbb_grp.wait();