Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/eugene/files/, sci-biology/eugene/
Date: Sat, 24 Sep 2016 19:02:35
Message-Id: 1474743723.5bd35d2287f51fa70024ffc977d34d8e15d8a168.soap@gentoo
1 commit: 5bd35d2287f51fa70024ffc977d34d8e15d8a168
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 14:20:44 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 24 19:02:03 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd35d22
7
8 sci-biology/eugene: Bump to 4.1d from science-overlay
9
10 Gentoo-bug: 594700
11 * EAPI=6
12 * Fix -Wformat warnings
13
14 Package-Manager: portage-2.3.1
15
16 sci-biology/eugene/Manifest | 1 +
17 sci-biology/eugene/eugene-4.1d.ebuild | 42 +++++++++++
18 sci-biology/eugene/files/eugene-4.1d-Wformat.patch | 84 ++++++++++++++++++++++
19 .../eugene/files/eugene-4.1d-fix-c++14.patch | 17 +++++
20 4 files changed, 144 insertions(+)
21
22 diff --git a/sci-biology/eugene/Manifest b/sci-biology/eugene/Manifest
23 index 015da1f..d017c65 100644
24 --- a/sci-biology/eugene/Manifest
25 +++ b/sci-biology/eugene/Manifest
26 @@ -1 +1,2 @@
27 DIST eugene-4.1.tar.gz 7393361 SHA256 faff769f68e1ab1fdec61be34ec7fef3c73805734199765ba11cf1ea9c02f800 SHA512 f4bcf63103754f8fb577d311d181375732411fa926fb0cef86fcd00c373ed5cc5637f1b55fa375a4bb14c5181f7de1dc244570f74cdd1887b6107d5c6cea37b3 WHIRLPOOL 32f4539456c243dd3c6a9d5a986fea210e53e5566aaa0849a26f34832957100623570a0814193059420d53e553247584360635706844ed0ec55c4cc65e235ad4
28 +DIST eugene-4.1d.tar.gz 7473965 SHA256 c160e6b4206e6700c866f38fee2c8fd0d69972d51ebc5b4cb7680774a419f4c0 SHA512 dab37930e211b3783954f6e4a762450760201b77e0b4214f16724516d9be583d0a7ec44a2f510e73f4370e9c2dc67a425456a057fdba8f51cb72386e16a26ef5 WHIRLPOOL 7ab116acd48648673d2cc633bae26908bf8250c5a17b9d5e8719dfd56edcdf716406b80af26a99700d9ec81e625737c57fe16493f670245f21999fef1c6911eb
29
30 diff --git a/sci-biology/eugene/eugene-4.1d.ebuild b/sci-biology/eugene/eugene-4.1d.ebuild
31 new file mode 100644
32 index 00000000..55a73bc
33 --- /dev/null
34 +++ b/sci-biology/eugene/eugene-4.1d.ebuild
35 @@ -0,0 +1,42 @@
36 +# Copyright 1999-2016 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +# $Id$
39 +
40 +EAPI=6
41 +
42 +inherit autotools
43 +
44 +DESCRIPTION="Prokaryotic and Eukaryotic gene predictor"
45 +HOMEPAGE="http://eugene.toulouse.inra.fr/"
46 +SRC_URI="https://mulcyber.toulouse.inra.fr/frs/download.php/1359/${P}.tar.gz"
47 +
48 +LICENSE="Artistic"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +IUSE=""
52 +
53 +DEPEND="
54 + media-libs/gd[png]
55 + media-libs/libpng:0=
56 + "
57 +RDEPEND="${DEPEND}"
58 +
59 +RESTRICT="test"
60 +
61 +PATCHES=(
62 + # https://mulcyber.toulouse.inra.fr/tracker/index.php?func=detail&aid=1170
63 + "${FILESDIR}"/${PN}-3.6-overflow.patch
64 + "${FILESDIR}"/${PN}-3.6-plugins.patch
65 + "${FILESDIR}"/${PN}-4.1-format-security.patch
66 + "${FILESDIR}"/${PN}-4.1d-fix-c++14.patch
67 + "${FILESDIR}"/${PN}-4.1d-Wformat.patch
68 +)
69 +
70 +src_prepare() {
71 + default
72 + sed \
73 + -e '/SUBDIRS/ s/doc//' \
74 + -e '/INSTALL.*doc/ s/\(.*\)//' \
75 + -i Makefile.am || die
76 + eautoreconf
77 +}
78
79 diff --git a/sci-biology/eugene/files/eugene-4.1d-Wformat.patch b/sci-biology/eugene/files/eugene-4.1d-Wformat.patch
80 new file mode 100644
81 index 00000000..ab6d2bd
82 --- /dev/null
83 +++ b/sci-biology/eugene/files/eugene-4.1d-Wformat.patch
84 @@ -0,0 +1,84 @@
85 +Fix -Wformat warnings caused by wrong printf specifiers:
86 +* Sensor.Riken.cc:95:61: warning: format ‘%d’ expects argument of type ‘int’, but
87 +* argument 3 has type ‘std::vector<RAFLgene>::size_type {aka long unsigned int}’ [-Wformat=]
88 +* fprintf(stderr, "%d RAFL EST pairs read, ", RAFLtmp.size());
89 +
90 +--- a/src/Hits.cc
91 ++++ b/src/Hits.cc
92 +@@ -163,7 +163,7 @@
93 + if (ThisHit != NULL)
94 + for (int i=0; i<*NumHits-1; i++) ThisHit = ThisHit->Next;
95 +
96 +- while ((read=fscanf(HitFile,"%d %d %d %lf %d %s %d %d %as\n", &deb, &fin,
97 ++ while ((read=fscanf(HitFile,"%d %d %d %lf %d %s %d %d %ss\n", &deb, &fin,
98 + &poids, &evalue, &phase, HitId, &HSPDeb, &HSPFin,HSP)) >= 8)
99 + {
100 + if (HSP) fprintf(stderr, "%s", HSP);
101 +--- a/src/SensorPlugins/Est/Sensor.Est.cc
102 ++++ b/src/SensorPlugins/Est/Sensor.Est.cc
103 +@@ -1353,13 +1353,13 @@
104 + exit(2);
105 + }
106 +
107 +- fprintf(fp, "vPos %d\n", vPos.size());
108 ++ fprintf(fp, "vPos %zu\n", vPos.size());
109 + for (int i=0; i< vPos.size();i++ )
110 + {
111 + fprintf(fp, "vPos %d\t%d\n",i, vPos[i]);
112 + }
113 +
114 +- fprintf(fp, "vESTMatch %d\n", vESTMatch.size());
115 ++ fprintf(fp, "vESTMatch %zu\n", vESTMatch.size());
116 + for (int i=0; i< vESTMatch.size();i++ )
117 + {
118 + fprintf(fp, "vESTMatch %d\t\n", vESTMatch[i]);
119 +--- a/src/SensorPlugins/Riken/Sensor.Riken.cc
120 ++++ b/src/SensorPlugins/Riken/Sensor.Riken.cc
121 +@@ -92,7 +92,7 @@
122 +
123 +
124 +
125 +- fprintf(stderr, "%d RAFL EST pairs read, ", RAFLtmp.size());
126 ++ fprintf(stderr, "%zu RAFL EST pairs read, ", RAFLtmp.size());
127 +
128 + sort(RAFLtmp.begin(), RAFLtmp.end(), Before);
129 +
130 +@@ -148,7 +148,7 @@
131 + }
132 + }
133 +
134 +- fprintf(stderr,"resulting %d\n",RAFL.size());
135 ++ fprintf(stderr,"resulting %zu\n",RAFL.size());
136 + fflush(stderr);
137 +
138 + // for (RAFLtmpindice=0; RAFLtmpindice< (int)RAFL.size(); RAFLtmpindice++) {
139 +--- a/src/SensorPlugins/SMachine/Sensor.SMachine.cc
140 ++++ b/src/SensorPlugins/SMachine/Sensor.SMachine.cc
141 +@@ -197,7 +197,7 @@
142 + fclose(fp);
143 +
144 + if (end ==2) {
145 +- fprintf(stderr, "Error in SpliceMachine splice site file %s, line %d\n", name, len);
146 ++ fprintf(stderr, "Error in SpliceMachine splice site file %s, line %zu\n", name, len);
147 + exit(2);
148 + }
149 + }
150 +--- a/src/SoTerms.cc
151 ++++ b/src/SoTerms.cc
152 +@@ -67,14 +67,14 @@
153 + j++;
154 + if (line[0] == 'i' && line[1] == 'd')
155 + {
156 +- i = sscanf(line, "id: %s", &value);
157 ++ i = sscanf(line, "id: %s", value);
158 + if (i > 0)
159 + {
160 + char soId[60];
161 + char soName[60];
162 + strcpy (soId, value );
163 + fgets (line, MAX_LINE, fp);
164 +- i = sscanf(line, "name: %s", &value);
165 ++ i = sscanf(line, "name: %s", value);
166 + strcpy (soName, value );
167 + idToName_[to_string(soId)]=to_string(soName);
168 + nameToId_[to_string(soName)]=to_string(soId);
169
170 diff --git a/sci-biology/eugene/files/eugene-4.1d-fix-c++14.patch b/sci-biology/eugene/files/eugene-4.1d-fix-c++14.patch
171 new file mode 100644
172 index 00000000..a27261c
173 --- /dev/null
174 +++ b/sci-biology/eugene/files/eugene-4.1d-fix-c++14.patch
175 @@ -0,0 +1,17 @@
176 +Fix building with C++14, which errors out due to collisions with isinf
177 +from cmath. We don't need to fix ancient broken OSX toolchains.
178 +See also: https://bugs.gentoo.org/show_bug.cgi?id=594700
179 +
180 +--- a/src/SensorPlugins/Tester/Sensor.Tester.cc
181 ++++ b/src/SensorPlugins/Tester/Sensor.Tester.cc
182 +@@ -18,9 +18,7 @@
183 + // ------------------------------------------------------------------
184 +
185 + // MacOS-X kludge. cmath undefines these macros. Turn them into inlines
186 +-#include <math.h>
187 +-inline int (isinf)(double r) { return isinf(r); }
188 +-inline int (isnan)(double r) { return isnan(r); }
189 ++#include <cmath>
190 +
191 + #include <iomanip>
192 + #include <fstream>