1 |
commit: 7423912f5bd2b50c626cc0e60f8a4ecc1929baf1 |
2 |
Author: Ted Tanberry <ted.tanberry <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Dec 31 14:55:26 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 31 14:55:26 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7423912f |
7 |
|
8 |
sci-biology/dialign-tx: fixes GCC-5 inline semantics and -Wformat= warnings, #570252 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild | 3 +- |
13 |
.../files/dialign-tx-1.0.2-modernize.patch | 130 +++++++++++++++++++++ |
14 |
2 files changed, 132 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild b/sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild |
17 |
index c73d043..b93f908 100644 |
18 |
--- a/sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild |
19 |
+++ b/sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild |
20 |
@@ -22,7 +22,8 @@ S=${WORKDIR}/${MY_P} |
21 |
src_prepare() { |
22 |
sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \ |
23 |
-i source/Makefile || die #336533 |
24 |
- epatch "${FILESDIR}"/${P}-implicits.patch |
25 |
+ epatch "${FILESDIR}"/${P}-implicits.patch \ |
26 |
+ "${FILESDIR}"/${P}-modernize.patch |
27 |
} |
28 |
|
29 |
src_compile() { |
30 |
|
31 |
diff --git a/sci-biology/dialign-tx/files/dialign-tx-1.0.2-modernize.patch b/sci-biology/dialign-tx/files/dialign-tx-1.0.2-modernize.patch |
32 |
new file mode 100644 |
33 |
index 0000000..b732e34 |
34 |
--- /dev/null |
35 |
+++ b/sci-biology/dialign-tx/files/dialign-tx-1.0.2-modernize.patch |
36 |
@@ -0,0 +1,130 @@ |
37 |
+Fix changed gnu89->gnu11 inline semantics with GCC-5, Gentoo Bug #570252 |
38 |
+https://bugs.gentoo.org/show_bug.cgi?id=570252 |
39 |
+ |
40 |
+In addition, fixed multiple -Wformat= warnings, such as |
41 |
+ |
42 |
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 3 has type ‘int *’ [-Wformat=] |
43 |
+ while( fscanf(fp,"%li %li %li %li %li %le\n",&s1,&s2,&sp1,&sp2,&len,&score ) == 6) { |
44 |
+ ^ |
45 |
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 4 has type ‘int *’ [-Wformat=] |
46 |
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 5 has type ‘int *’ [-Wformat=] |
47 |
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 6 has type ‘int *’ [-Wformat=] |
48 |
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 7 has type ‘int *’ [-Wformat=] |
49 |
+ |
50 |
+--- DIALIGN-TX_1.0.2/source/alig.c |
51 |
++++ DIALIGN-TX_1.0.2/source/alig.c |
52 |
+@@ -10,9 +10,9 @@ |
53 |
+ |
54 |
+ extern void error(char *message); |
55 |
+ extern void merror(char *msg1, char *msg2); |
56 |
+-extern inline void calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
57 |
++extern void calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
58 |
+ struct prob_dist *pdist); |
59 |
+-extern inline void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, |
60 |
++extern void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, |
61 |
+ struct prob_dist *pdist); |
62 |
+ //extern struct seq_part* create_seq_part(int num, struct seq* aSeq, unsigned int startpos); |
63 |
+ extern struct diag* create_diag(struct seq_part* part1, struct seq_part* part2, |
64 |
+@@ -520,7 +520,7 @@ |
65 |
+ * datastructure (i.e. frontiers). The given diag must be consistent |
66 |
+ * to the given alignment ! |
67 |
+ */ |
68 |
+-inline char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg) { |
69 |
++char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg) { |
70 |
+ |
71 |
+ char alignedSomething = 0; |
72 |
+ int i,j,k; |
73 |
+--- DIALIGN-TX_1.0.2/source/assemble.c |
74 |
++++ DIALIGN-TX_1.0.2/source/assemble.c |
75 |
+@@ -10,9 +10,9 @@ |
76 |
+ |
77 |
+ extern void error(char *message); |
78 |
+ extern void merror(char *msg1, char *msg2); |
79 |
+-extern inline void calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
80 |
++extern void calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
81 |
+ struct prob_dist *pdist); |
82 |
+-extern inline void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, |
83 |
++extern void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, |
84 |
+ struct prob_dist *pdist); |
85 |
+ //extern struct seq_part* create_seq_part(int num, struct seq* aSeq, unsigned int startpos); |
86 |
+ extern long double** create_tmp_pdist(struct prob_dist *pdist); |
87 |
+@@ -22,7 +22,7 @@ |
88 |
+ int n2, struct seq* sq2, unsigned int sp2, |
89 |
+ int dlength); |
90 |
+ extern void free_diag(struct diag* dg); |
91 |
+-extern inline struct simple_diag_col* find_diags_guided(struct scr_matrix *smatrix, |
92 |
++extern struct simple_diag_col* find_diags_guided(struct scr_matrix *smatrix, |
93 |
+ struct prob_dist *pdist, |
94 |
+ struct gt_node* n1, |
95 |
+ struct gt_node* n2, |
96 |
+@@ -34,10 +34,10 @@ |
97 |
+ |
98 |
+ extern struct alignment* create_empty_alignment(struct seq_col *scol); |
99 |
+ extern void free_alignment(struct alignment *algn); |
100 |
+-extern inline struct algn_pos *find_eqc(struct algn_pos **ap, int seqnum, int pos); |
101 |
++extern struct algn_pos *find_eqc(struct algn_pos **ap, int seqnum, int pos); |
102 |
+ extern struct alignment* copy_alignment( struct alignment *o_algn, struct alignment *algn, char doDgc); |
103 |
+ //extern char adapt_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg); |
104 |
+-extern inline char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg); |
105 |
++extern char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg); |
106 |
+ //extern inline struct diag_cont* enter_sorted(struct diag_cont* backlog_diags, struct diag_cont *cand); |
107 |
+ //extern inline char fit_fpos_diag(struct alignment *algn, struct diag* dg); |
108 |
+ |
109 |
+--- DIALIGN-TX_1.0.2/source/diag.c |
110 |
++++ DIALIGN-TX_1.0.2/source/diag.c |
111 |
+@@ -183,7 +183,7 @@ |
112 |
+ * omitScore = 0: normal |
113 |
+ * omitScore = 1: no score calculation |
114 |
+ */ |
115 |
+-inline void real_calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
116 |
++void real_calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
117 |
+ struct prob_dist *pdist, char omitScore, long double **tmp_dist, struct alignment *algn ) { |
118 |
+ |
119 |
+ if(dg->multi_dg) { |
120 |
+@@ -302,7 +302,7 @@ |
121 |
+ } |
122 |
+ } |
123 |
+ |
124 |
+-inline void calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
125 |
++void calc_weight(struct diag* dg, struct scr_matrix* smatrix, |
126 |
+ struct prob_dist *pdist) { |
127 |
+ real_calc_weight(dg, smatrix, pdist, 0,NULL,NULL); |
128 |
+ } |
129 |
+--- DIALIGN-TX_1.0.2/source/io.c |
130 |
++++ DIALIGN-TX_1.0.2/source/io.c |
131 |
+@@ -267,7 +267,7 @@ |
132 |
+ for( c=r; c<length; c++) { |
133 |
+ // check whether it is a regular acid or a special character like '$',... |
134 |
+ if( (r<length-additional) && (c<length-additional)) { |
135 |
+- fscanf( fp, "%i", &is); |
136 |
++ if( fscanf( fp, "%i", &is) ){}; |
137 |
+ } else { |
138 |
+ is = 0; |
139 |
+ } |
140 |
+@@ -279,7 +279,7 @@ |
141 |
+ // ensure symmetry of the weight matrix |
142 |
+ data[length*c+r] = is; |
143 |
+ } |
144 |
+- fscanf(fp, "%s\n", rline); |
145 |
++ if( fscanf(fp, "%s\n", rline) ){}; |
146 |
+ } |
147 |
+ fclose(fp); |
148 |
+ |
149 |
+@@ -368,7 +368,7 @@ |
150 |
+ } |
151 |
+ for(scr=0;scr<=mxscr;scr++) { |
152 |
+ dist[i][scr]=1.0; |
153 |
+- fscanf( fp, "%li %li %Le\n", &ti,&tscr,&weight ); |
154 |
++ if( fscanf( fp, "%li %li %Le\n", &ti,&tscr,&weight ) ){}; |
155 |
+ //if(i!=ti || tscr!=scr) merror("read_scr_matrix(): (4) Invalid format of file ",filename); |
156 |
+ scr = tscr; |
157 |
+ if(weight==0.0) weight = 1.0; |
158 |
+@@ -532,7 +532,7 @@ |
159 |
+ sdcol->data = malloc(sizeof (struct diag*)*alloc_size); |
160 |
+ sdcol->length=0; |
161 |
+ |
162 |
+- while( fscanf(fp,"%li %li %li %li %li %le\n",&s1,&s2,&sp1,&sp2,&len,&score ) == 6) { |
163 |
++ while( fscanf(fp,"%i %i %i %i %i %le\n",&s1,&s2,&sp1,&sp2,&len,&score ) == 6) { |
164 |
+ if(sdcol->length >= alloc_size) { |
165 |
+ alloc_size+=16; |
166 |
+ sdcol->data = realloc(sdcol->data,sizeof (struct diag*)*alloc_size); |