From ccbd59a1a246014bf441e44a9f2bd8632a70c20e Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sun, 24 Dec 2017 12:30:20 +0100 Subject: sci-biology/cufflinks: Fix building with GCC 7 Closes: https://bugs.gentoo.org/641580 Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- sci-biology/cufflinks/cufflinks-2.2.1-r2.ebuild | 2 + .../files/cufflinks-2.2.1-format-security.patch | 16 +++ .../cufflinks/files/cufflinks-2.2.1-gcc7.patch | 121 +++++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 sci-biology/cufflinks/files/cufflinks-2.2.1-format-security.patch create mode 100644 sci-biology/cufflinks/files/cufflinks-2.2.1-gcc7.patch (limited to 'sci-biology/cufflinks') diff --git a/sci-biology/cufflinks/cufflinks-2.2.1-r2.ebuild b/sci-biology/cufflinks/cufflinks-2.2.1-r2.ebuild index 89f8484fad6a..745baffad99d 100644 --- a/sci-biology/cufflinks/cufflinks-2.2.1-r2.ebuild +++ b/sci-biology/cufflinks/cufflinks-2.2.1-r2.ebuild @@ -31,6 +31,8 @@ PATCHES=( "${FILESDIR}"/${P}-flags.patch "${FILESDIR}"/${P}-gcc6.patch "${FILESDIR}"/${P}-boost-1.65-tr1-removal.patch + "${FILESDIR}"/${P}-gcc7.patch + "${FILESDIR}"/${P}-format-security.patch ) src_prepare() { diff --git a/sci-biology/cufflinks/files/cufflinks-2.2.1-format-security.patch b/sci-biology/cufflinks/files/cufflinks-2.2.1-format-security.patch new file mode 100644 index 000000000000..fa13f78d8b52 --- /dev/null +++ b/sci-biology/cufflinks/files/cufflinks-2.2.1-format-security.patch @@ -0,0 +1,16 @@ +Author: Andreas Tille +Date: Wed, 22 May 2013 13:27:40 +0200 +Description: When building with --format-security (Debhelper 9 hardening) + this patch is needed to build successfully + +--- a/src/locfit/makecmd.c ++++ b/src/locfit/makecmd.c +@@ -200,7 +200,7 @@ char *cmdline; + /* vs is used to store the command line string. */ + sprintf(vn,"=clstr%d",clcount); + vs = createvar(vn,STSYSTEM,1+strlen(cmdline),VCHAR); +- sprintf((char *)vdptr(vs),cmdline); ++ sprintf((char *)vdptr(vs),"%s",cmdline); + + /* va is used to store pointers to the command line fields. */ + sprintf(vn,"=cline%d",clcount); diff --git a/sci-biology/cufflinks/files/cufflinks-2.2.1-gcc7.patch b/sci-biology/cufflinks/files/cufflinks-2.2.1-gcc7.patch new file mode 100644 index 000000000000..48fe6e10ac96 --- /dev/null +++ b/sci-biology/cufflinks/files/cufflinks-2.2.1-gcc7.patch @@ -0,0 +1,121 @@ +Author: Alex Mestiashvili +Origin: https://lists.debian.org/debian-med/2017/09/msg00021.html +Bug-Debian: https://bugs.debian.org/871234 +Description: Fix gcc-7 build issue, thanks to Jeff Epler +--- a/src/GHash.hh ++++ b/src/GHash.hh +@@ -88,7 +88,7 @@ + //nextkey is SET to the corresponding key + GHashEntry* NextEntry() { //returns a pointer to a GHashEntry + register int pos=fCurrentEntry; +- while (pos char* GHash::NextKey() { + register int pos=fCurrentEntry; +- while (pos OBJ* GHash::NextData() { + register int pos=fCurrentEntry; +- while (pos OBJ* GHash::NextData(char* &nextkey) { + register int pos=fCurrentEntry; +- while (pos int GHash::First() const { + register int pos=0; +- while(pos int GHash::Last() const { + register int pos=fCapacity-1; +- while(0<=pos){ if(0<=hash[pos].hash) break; pos--; } +- GASSERT(pos<0 || 0<=hash[pos].hash); ++ while(0<=pos){ if(0<=(hash[pos].hash)) break; pos--; } ++ GASSERT(pos<0 || 0<=(hash[pos].hash)); + return pos; + } + +@@ -474,8 +474,8 @@ + // Find next valid entry + template int GHash::Next(int pos) const { + GASSERT(0<=pos && pos int GHash::Prev(int pos) const { + GASSERT(0<=pos && pos= 0){ if(0<=hash[pos].hash) break; } +- GASSERT(pos<0 || 0<=hash[pos].hash); ++ while(--pos >= 0){ if(0<=(hash[pos].hash)) break; } ++ GASSERT(pos<0 || 0<=(hash[pos].hash)); + return pos; + } + -- cgit v1.2.3-65-gdbad