public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-biology/dialign-tx/, sci-biology/dialign-tx/files/
@ 2015-12-31 15:14 Justin Lecher
  0 siblings, 0 replies; 2+ messages in thread
From: Justin Lecher @ 2015-12-31 15:14 UTC (permalink / raw
  To: gentoo-commits

commit:     7423912f5bd2b50c626cc0e60f8a4ecc1929baf1
Author:     Ted Tanberry <ted.tanberry <AT> gmail <DOT> com>
AuthorDate: Thu Dec 31 14:55:26 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Dec 31 14:55:26 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7423912f

sci-biology/dialign-tx: fixes GCC-5 inline semantics and -Wformat= warnings, #570252

Package-Manager: portage-2.2.26

 sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild  |   3 +-
 .../files/dialign-tx-1.0.2-modernize.patch         | 130 +++++++++++++++++++++
 2 files changed, 132 insertions(+), 1 deletion(-)

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
index c73d043..b93f908 100644
--- a/sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild
+++ b/sci-biology/dialign-tx/dialign-tx-1.0.2-r1.ebuild
@@ -22,7 +22,8 @@ S=${WORKDIR}/${MY_P}
 src_prepare() {
 	sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \
 		-i source/Makefile || die #336533
-	epatch "${FILESDIR}"/${P}-implicits.patch
+	epatch	"${FILESDIR}"/${P}-implicits.patch \
+		"${FILESDIR}"/${P}-modernize.patch
 }
 
 src_compile() {

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
new file mode 100644
index 0000000..b732e34
--- /dev/null
+++ b/sci-biology/dialign-tx/files/dialign-tx-1.0.2-modernize.patch
@@ -0,0 +1,130 @@
+Fix changed gnu89->gnu11 inline semantics with GCC-5, Gentoo Bug #570252
+https://bugs.gentoo.org/show_bug.cgi?id=570252
+
+In addition, fixed multiple -Wformat= warnings, such as
+
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 3 has type ‘int *’ [-Wformat=]
+   while( fscanf(fp,"%li %li %li %li %li %le\n",&s1,&s2,&sp1,&sp2,&len,&score ) == 6) {
+                    ^
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 4 has type ‘int *’ [-Wformat=]
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 5 has type ‘int *’ [-Wformat=]
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 6 has type ‘int *’ [-Wformat=]
+io.c:535:20: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 7 has type ‘int *’ [-Wformat=]
+
+--- DIALIGN-TX_1.0.2/source/alig.c
++++ DIALIGN-TX_1.0.2/source/alig.c
+@@ -10,9 +10,9 @@
+ 
+ extern void error(char *message);
+ extern void merror(char *msg1, char *msg2);
+-extern inline void calc_weight(struct diag* dg, struct scr_matrix* smatrix, 
++extern void calc_weight(struct diag* dg, struct scr_matrix* smatrix, 
+ 			struct prob_dist *pdist);
+-extern inline void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, 
++extern void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, 
+ 		    struct prob_dist *pdist);
+ //extern struct seq_part* create_seq_part(int num, struct seq* aSeq, unsigned int startpos);
+ extern struct diag* create_diag(struct seq_part* part1, struct seq_part* part2, 
+@@ -520,7 +520,7 @@
+  * datastructure (i.e. frontiers). The given diag must be consistent
+  * to the given alignment !
+  */
+-inline char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg) {
++char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg) {
+ 
+   char alignedSomething = 0;
+   int i,j,k;
+--- DIALIGN-TX_1.0.2/source/assemble.c
++++ DIALIGN-TX_1.0.2/source/assemble.c
+@@ -10,9 +10,9 @@
+ 
+ extern void error(char *message);
+ extern void merror(char *msg1, char *msg2);
+-extern inline void calc_weight(struct diag* dg, struct scr_matrix* smatrix, 
++extern void calc_weight(struct diag* dg, struct scr_matrix* smatrix, 
+ 			struct prob_dist *pdist);
+-extern inline void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, 
++extern void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix, 
+ 		    struct prob_dist *pdist);
+ //extern struct seq_part* create_seq_part(int num, struct seq* aSeq, unsigned int startpos);
+ extern long double** create_tmp_pdist(struct prob_dist *pdist);
+@@ -22,7 +22,7 @@
+                          int n2, struct seq* sq2, unsigned int sp2,
+                          int dlength);
+ extern void free_diag(struct diag* dg);
+-extern inline struct simple_diag_col* find_diags_guided(struct scr_matrix *smatrix,  
++extern struct simple_diag_col* find_diags_guided(struct scr_matrix *smatrix,  
+ 							struct prob_dist *pdist, 
+ 							struct gt_node* n1,  
+ 							struct gt_node* n2, 
+@@ -34,10 +34,10 @@
+ 
+ extern struct alignment* create_empty_alignment(struct seq_col *scol);
+ extern void free_alignment(struct alignment *algn);
+-extern inline struct algn_pos *find_eqc(struct algn_pos **ap, int seqnum, int pos);
++extern struct algn_pos *find_eqc(struct algn_pos **ap, int seqnum, int pos);
+ extern struct alignment* copy_alignment( struct alignment *o_algn, struct alignment *algn, char doDgc);
+ //extern char adapt_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg);
+-extern inline char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg);
++extern char align_diag(struct alignment *algn, struct scr_matrix *smatrix, struct diag* dg);
+ //extern inline struct diag_cont* enter_sorted(struct diag_cont* backlog_diags, struct diag_cont *cand);
+ //extern inline char fit_fpos_diag(struct alignment *algn, struct diag* dg);
+ 
+--- DIALIGN-TX_1.0.2/source/diag.c
++++ DIALIGN-TX_1.0.2/source/diag.c
+@@ -183,7 +183,7 @@
+  * omitScore = 0:  normal 
+  * omitScore = 1:  no score calculation 
+  */ 
+-inline void real_calc_weight(struct diag* dg, struct scr_matrix* smatrix,  
++void real_calc_weight(struct diag* dg, struct scr_matrix* smatrix,  
+ 		 struct prob_dist *pdist, char omitScore, long double **tmp_dist, struct alignment *algn ) { 
+    
+   if(dg->multi_dg) {
+@@ -302,7 +302,7 @@
+   } 
+ } 
+  
+-inline void calc_weight(struct diag* dg, struct scr_matrix* smatrix,  
++void calc_weight(struct diag* dg, struct scr_matrix* smatrix,  
+ 		 struct prob_dist *pdist) { 
+   real_calc_weight(dg, smatrix, pdist, 0,NULL,NULL); 
+ } 
+--- DIALIGN-TX_1.0.2/source/io.c
++++ DIALIGN-TX_1.0.2/source/io.c
+@@ -267,7 +267,7 @@
+     for( c=r; c<length; c++) {
+       // check whether it is a regular acid or a special character like '$',...
+       if( (r<length-additional) && (c<length-additional)) {
+-		fscanf( fp, "%i", &is);
++		if( fscanf( fp, "%i", &is) ){};
+       } else {
+ 		is = 0;
+       }
+@@ -279,7 +279,7 @@
+       // ensure symmetry of the weight matrix
+       data[length*c+r] = is;
+     }
+-    fscanf(fp, "%s\n", rline);
++    if( fscanf(fp, "%s\n", rline) ){};
+   }
+   fclose(fp);
+ 
+@@ -368,7 +368,7 @@
+     }
+     for(scr=0;scr<=mxscr;scr++) {
+       dist[i][scr]=1.0;
+-      fscanf( fp, "%li %li %Le\n", &ti,&tscr,&weight );
++      if( fscanf( fp, "%li %li %Le\n", &ti,&tscr,&weight ) ){};
+       //if(i!=ti || tscr!=scr) merror("read_scr_matrix(): (4) Invalid format of file ",filename);
+       scr = tscr;
+       if(weight==0.0) weight = 1.0;
+@@ -532,7 +532,7 @@
+   sdcol->data = malloc(sizeof (struct diag*)*alloc_size);
+   sdcol->length=0;
+ 
+-  while( fscanf(fp,"%li %li %li %li %li %le\n",&s1,&s2,&sp1,&sp2,&len,&score ) == 6) {
++  while( fscanf(fp,"%i %i %i %i %i %le\n",&s1,&s2,&sp1,&sp2,&len,&score ) == 6) {
+     if(sdcol->length >= alloc_size) {
+       alloc_size+=16;
+       sdcol->data = realloc(sdcol->data,sizeof (struct diag*)*alloc_size);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-biology/dialign-tx/, sci-biology/dialign-tx/files/
@ 2020-11-01 18:37 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2020-11-01 18:37 UTC (permalink / raw
  To: gentoo-commits

commit:     4344861bbf45ec0e259a986b19942ce284f93fc9
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  1 18:35:50 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov  1 18:35:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4344861b

sci-biology/dialign-tx: Fix -fno-common

Closes: https://bugs.gentoo.org/707008
Closes: https://bugs.gentoo.org/727966
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-biology/dialign-tx/dialign-tx-1.0.2-r2.ebuild  | 13 +++++++------
 .../files/dialign-tx-1.0.2-fno-common.patch        | 22 ++++++++++++++++++++++
 .../files/dialign-tx-1.0.2-gnu89-inline.patch      | 20 ++++++++++++++++++++
 3 files changed, 49 insertions(+), 6 deletions(-)

diff --git a/sci-biology/dialign-tx/dialign-tx-1.0.2-r2.ebuild b/sci-biology/dialign-tx/dialign-tx-1.0.2-r2.ebuild
index 123977916f0..78681265a0b 100644
--- a/sci-biology/dialign-tx/dialign-tx-1.0.2-r2.ebuild
+++ b/sci-biology/dialign-tx/dialign-tx-1.0.2-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 inherit toolchain-funcs
 
@@ -15,12 +15,13 @@ LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
 PATCHES=(
 	"${FILESDIR}"/${P}-fix-build-system.patch
 	"${FILESDIR}"/${P}-implicits.patch
 	"${FILESDIR}"/${P}-modernize.patch
 	"${FILESDIR}"/${P}-gnu89-inline.patch
+	"${FILESDIR}"/${P}-fno-common.patch
 )
 
 src_configure() {
@@ -34,12 +35,12 @@ src_compile() {
 
 src_install() {
 	dobin source/dialign-tx
-	insinto /usr/$(get_libdir)/${PN}/conf
+	insinto /usr/$(get_libdir)/dialign-tx/conf
 	doins -r conf/.
 }
 
 pkg_postinst() {
 	einfo "The configuration directory is"
-	einfo "${EROOT%/}/usr/$(get_libdir)/${PN}/conf"
-	einfo "You will need to pass this to ${PN} on every run."
+	einfo "${EROOT}/usr/$(get_libdir)/dialign-tx/conf"
+	einfo "You will need to pass this to dialign-tx on every run."
 }

diff --git a/sci-biology/dialign-tx/files/dialign-tx-1.0.2-fno-common.patch b/sci-biology/dialign-tx/files/dialign-tx-1.0.2-fno-common.patch
new file mode 100644
index 00000000000..de3104fa0eb
--- /dev/null
+++ b/sci-biology/dialign-tx/files/dialign-tx-1.0.2-fno-common.patch
@@ -0,0 +1,22 @@
+--- a/source/parameters.c
++++ b/source/parameters.c
+@@ -26,6 +26,8 @@
+ 
+ extern char *optarg;
+ extern int optind, opterr, optopt;
++
++struct parameters* para;
+ /****************************
+ * PROTEIN DEFAULT VALUES!   *
+ ****************************/
+--- a/source/parameters.h
++++ b/source/parameters.h
+@@ -138,7 +138,7 @@
+     /*              global variable                 */
+     /*                                              */
+     /************************************************/
+-struct parameters* para;
++extern struct parameters* para;
+ 
+ 
+ 

diff --git a/sci-biology/dialign-tx/files/dialign-tx-1.0.2-gnu89-inline.patch b/sci-biology/dialign-tx/files/dialign-tx-1.0.2-gnu89-inline.patch
index 21f576f0705..fc8d0284e6a 100644
--- a/sci-biology/dialign-tx/files/dialign-tx-1.0.2-gnu89-inline.patch
+++ b/sci-biology/dialign-tx/files/dialign-tx-1.0.2-gnu89-inline.patch
@@ -1,5 +1,25 @@
+--- a/source/assemble.c
++++ b/source/assemble.c
+@@ -574,7 +574,7 @@
+  * returns a value <0 if there is an non-conflicting overlap
+  * returns 0 in all other non-conflicting cases
+  */
+-inline char confl_diag(struct alignment *algn, char *layer, struct diag *dg1, struct diag *dg2) {
++static inline char confl_diag(struct alignment *algn, char *layer, struct diag *dg1, struct diag *dg2) {
+   //  if(dg1->multi_dg || dg2->multi_dg) error(" confl_diag(): cannot accept multi dgs!");
+   int s1_1 = dg1->seq_p1.num;
+   int s1_2 = dg1->seq_p2.num;
 --- a/source/diag.c
 +++ b/source/diag.c
+@@ -312,7 +312,7 @@
+ /** 
+  * calculates the overlap weight for the given diag 
+  */ 
+-inline void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix,  
++void calc_ov_weight(struct diag* dg, struct diag_col *dcol, struct scr_matrix* smatrix,  
+ 		    struct prob_dist *pdist) { 
+   int sn1 = dg->seq_p1.num; 
+   int sn2 = dg->seq_p2.num; 
 @@ -958,7 +958,7 @@
   * The pointer returned (and the ones included in the struct)  
   * has to be deallocted explicitely from memory. 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-01 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-31 15:14 [gentoo-commits] repo/gentoo:master commit in: sci-biology/dialign-tx/, sci-biology/dialign-tx/files/ Justin Lecher
  -- strict thread matches above, loose matches on Subject: below --
2020-11-01 18:37 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox