public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/cufflinks/files/, sci-biology/cufflinks/
Date: Sun, 24 Dec 2017 11:30:52 +0000 (UTC)	[thread overview]
Message-ID: <1514115038.ccbd59a1a246014bf441e44a9f2bd8632a70c20e.soap@gentoo> (raw)

commit:     ccbd59a1a246014bf441e44a9f2bd8632a70c20e
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 24 11:30:20 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 11:30:38 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccbd59a1

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(+)

diff --git a/sci-biology/cufflinks/cufflinks-2.2.1-r2.ebuild b/sci-biology/cufflinks/cufflinks-2.2.1-r2.ebuild
index 89f8484fad6..745baffad99 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 00000000000..fa13f78d8b5
--- /dev/null
+++ b/sci-biology/cufflinks/files/cufflinks-2.2.1-format-security.patch
@@ -0,0 +1,16 @@
+Author: Andreas Tille <tille@debian.org>
+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 00000000000..48fe6e10ac9
--- /dev/null
+++ b/sci-biology/cufflinks/files/cufflinks-2.2.1-gcc7.patch
@@ -0,0 +1,121 @@
+Author: Alex Mestiashvili <mailatgoogl@gmail.com>
+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 <jepler@unpythonic.net>
+--- 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<fCapacity && hash[pos].hash<0) pos++;
++  	 while (pos<fCapacity && (hash[pos].hash)<0) pos++;
+   	 if (pos==fCapacity) {
+   	                 fCurrentEntry=fCapacity;
+   	                 return NULL;
+@@ -186,7 +186,7 @@
+         x=HASH2(h,n);
+         GASSERT(1<=x && x<n);
+         while(k[p].hash!=-1) p=(p+x)%n;
+-        GASSERT(k[p].hash<0);
++        GASSERT((k[p].hash)<0);
+         k[p]=hash[i];
+         }
+       }
+@@ -225,7 +225,7 @@
+   GTRACE(("GHash::insert: key=\"%s\"\n",ky));
+   //GMessage("GHash::insert: key=\"%s\"\n",ky);
+   GASSERT(0<=i && i<fCapacity);
+-  GASSERT(hash[i].hash<0);
++  GASSERT((hash[i].hash)<0);
+   hash[i].hash=h;
+   hash[i].mark=mrk;
+   hash[i].key=Gstrdup(ky);
+@@ -266,7 +266,7 @@
+   GTRACE(("GHash::insert: key=\"%s\"\n",ky));
+   //GMessage("GHash::insert: key=\"%s\"\n",ky);
+   GASSERT(0<=i && i<fCapacity);
+-  GASSERT(hash[i].hash<0);
++  GASSERT((hash[i].hash)<0);
+   hash[i].hash=h;
+   hash[i].mark=mrk;
+   hash[i].key=(char *)ky;
+@@ -310,7 +310,7 @@
+   if(i==-1) i=p;
+   GTRACE(("GHash::replace: %08x: inserting: \"%s\"\n",this,ky));
+   GASSERT(0<=i && i<fCapacity);
+-  GASSERT(hash[i].hash<0);
++  GASSERT((hash[i].hash)<0);
+   hash[i].hash=h;
+   hash[i].mark=mrk;
+   hash[i].key=Gstrdup(ky);
+@@ -412,7 +412,7 @@
+ 
+ template <class OBJ> char* GHash<OBJ>::NextKey() {
+  register int pos=fCurrentEntry;
+- while (pos<fCapacity && hash[pos].hash<0) pos++;
++ while (pos<fCapacity && (hash[pos].hash)<0) pos++;
+  if (pos==fCapacity) {
+                  fCurrentEntry=fCapacity;
+                  return NULL;
+@@ -425,7 +425,7 @@
+ 
+ template <class OBJ> OBJ* GHash<OBJ>::NextData() {
+  register int pos=fCurrentEntry;
+- while (pos<fCapacity && hash[pos].hash<0) pos++;
++ while (pos<fCapacity && (hash[pos].hash)<0) pos++;
+  if (pos==fCapacity) {
+                  fCurrentEntry=fCapacity;
+                  return NULL;
+@@ -439,7 +439,7 @@
+ 
+ template <class OBJ> OBJ* GHash<OBJ>::NextData(char* &nextkey) {
+  register int pos=fCurrentEntry;
+- while (pos<fCapacity && hash[pos].hash<0) pos++;
++ while (pos<fCapacity && (hash[pos].hash)<0) pos++;
+  if (pos==fCapacity) {
+                  fCurrentEntry=fCapacity;
+                  nextkey=NULL;
+@@ -457,16 +457,16 @@
+ // Get first non-empty entry
+ template <class OBJ> int GHash<OBJ>::First() const {
+   register int pos=0;
+-  while(pos<fCapacity){ if(0<=hash[pos].hash) break; pos++; }
+-  GASSERT(fCapacity<=pos || 0<=hash[pos].hash);
++  while(pos<fCapacity){ if(0<=(hash[pos].hash)) break; pos++; }
++  GASSERT(fCapacity<=pos || 0<=(hash[pos].hash));
+   return pos;
+   }
+ 
+ // Get last non-empty entry
+ template <class OBJ> int GHash<OBJ>::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 <class OBJ> int GHash<OBJ>::Next(int pos) const {
+   GASSERT(0<=pos && pos<fCapacity);
+-  while(++pos <= fCapacity-1){ if(0<=hash[pos].hash) break; }
+-  GASSERT(fCapacity<=pos || 0<=hash[pos].hash);
++  while(++pos <= fCapacity-1){ if(0<=(hash[pos].hash)) break; }
++  GASSERT(fCapacity<=pos || 0<=(hash[pos].hash));
+   return pos;
+   }
+ 
+@@ -483,8 +483,8 @@
+ // Find previous valid entry
+ template <class OBJ> int GHash<OBJ>::Prev(int pos) const {
+   GASSERT(0<=pos && pos<fCapacity);
+-  while(--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;
+   }
+ 


             reply	other threads:[~2017-12-25  0:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24 11:30 David Seifert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-06-30 14:59 [gentoo-commits] repo/gentoo:master commit in: sci-biology/cufflinks/files/, sci-biology/cufflinks/ David Seifert
2017-09-16 10:58 David Seifert
2017-06-25 17:02 David Seifert
2016-04-03 16:14 David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1514115038.ccbd59a1a246014bf441e44a9f2bd8632a70c20e.soap@gentoo \
    --to=soap@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox