commit:     482233a91158648368385cc8dd54fb0a77059020
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 24 11:53:03 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 18:00:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=482233a9

sci-biology/mosaik: Fix building with GCC 7

Closes: https://bugs.gentoo.org/638362
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sci-biology/mosaik/files/mosaik-2.2.30-gcc7.patch | 40 +++++++++++++++++++++++
 sci-biology/mosaik/mosaik-2.2.30.ebuild           | 13 +++-----
 2 files changed, 45 insertions(+), 8 deletions(-)

diff --git a/sci-biology/mosaik/files/mosaik-2.2.30-gcc7.patch 
b/sci-biology/mosaik/files/mosaik-2.2.30-gcc7.patch
new file mode 100644
index 00000000000..ebf925a0cbb
--- /dev/null
+++ b/sci-biology/mosaik/files/mosaik-2.2.30-gcc7.patch
@@ -0,0 +1,40 @@
+--- a/CommonSource/ExternalReadFormats/BamWriter.cpp
++++ b/CommonSource/ExternalReadFormats/BamWriter.cpp
+@@ -496,7 +496,7 @@
+       buffer[6] = 0xffffffff;  // mate_pos
+       buffer[7] = 0;           // ins_size
+ 
+-      const char* startChar = '\0';
++      const char* startChar = NULL;
+       
+       // write the block size
+       const unsigned int dataBlockSize = nameLen + packedCigarLen + 
encodedQueryLen + queryLen;
+@@ -652,7 +652,7 @@
+       unsigned int zaTagLen = 0;
+       string zaTag;
+       char* pZaTag;
+-      if ((zaString != 0) && (zaString != (char)0)) {
++      if ((zaString != 0) && (zaString[0] != '\0')) {
+               zaTagLen = 3 + strlen( zaString ) + 1;
+               zaTag.resize( zaTagLen );
+               pZaTag = (char*)zaTag.data();
+@@ -776,7 +776,7 @@
+       BgzfWrite(mdTag.data(), mdTagLen);
+ 
+       // write the ZA tag
+-      if ( zaString != 0 && (zaString != (char)0))
++      if ( zaString != 0 && (zaString[0] != '\0'))
+               BgzfWrite(zaTag.data(), zaTagLen);
+       
+       // write the ZN tag
+--- a/MosaikAligner/AlignmentThread.cpp
++++ b/MosaikAligner/AlignmentThread.cpp
+@@ -591,7 +591,7 @@
+       buffer.al              = al;
+       buffer.noCigarMdNm     = noCigarMdNm;
+       buffer.notShowRnamePos = notShowRnamePos;
+-      if ( zaString == (char)0 ) 
++      if ( zaString == NULL ) 
+               buffer.zaString.clear();
+       else
+               buffer.zaString = zaString;

diff --git a/sci-biology/mosaik/mosaik-2.2.30.ebuild 
b/sci-biology/mosaik/mosaik-2.2.30.ebuild
index 45633c47dab..874edba4504 100644
--- a/sci-biology/mosaik/mosaik-2.2.30.ebuild
+++ b/sci-biology/mosaik/mosaik-2.2.30.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -11,18 +11,15 @@ 
SRC_URI="https://github.com/wanpinglee/MOSAIK/archive/5c25216d3522d6a33e53875cd7
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE=""
 KEYWORDS="~amd64 ~x86"
 
-DEPEND=""
-RDEPEND=""
-
 S="${WORKDIR}/${P}/src"
 
 PATCHES=(
-       "${FILESDIR}/${P}-remove-platform-code.patch"
-       "${FILESDIR}/${P}-fix-build-system.patch"
-       "${FILESDIR}/${P}-Wformat-security.patch"
+       "${FILESDIR}"/${P}-remove-platform-code.patch
+       "${FILESDIR}"/${P}-fix-build-system.patch
+       "${FILESDIR}"/${P}-Wformat-security.patch
+       "${FILESDIR}"/${P}-gcc7.patch
 )
 
 src_configure() {

Reply via email to