From 4a13f93328459fb887655ba06dbe3b3e7ff95871 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Thu, 7 Jul 2022 21:56:50 +0200 Subject: sci-biology/dialign2: update EAPI 6 -> 8 Signed-off-by: David Seifert --- sci-biology/dialign2/dialign2-2.2.1-r1.ebuild | 39 ++++ sci-biology/dialign2/dialign2-2.2.1.ebuild | 37 ---- .../dialign2/files/dialign2-2.2.1-Wimplicit.patch | 205 +++++++++++++++++++++ .../files/dialign2-2.2.1-fix-build-system.patch | 6 +- 4 files changed, 248 insertions(+), 39 deletions(-) create mode 100644 sci-biology/dialign2/dialign2-2.2.1-r1.ebuild delete mode 100644 sci-biology/dialign2/dialign2-2.2.1.ebuild create mode 100644 sci-biology/dialign2/files/dialign2-2.2.1-Wimplicit.patch diff --git a/sci-biology/dialign2/dialign2-2.2.1-r1.ebuild b/sci-biology/dialign2/dialign2-2.2.1-r1.ebuild new file mode 100644 index 000000000000..13b56b66c37b --- /dev/null +++ b/sci-biology/dialign2/dialign2-2.2.1-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Multiple sequence alignment" +HOMEPAGE="http://bibiserv.techfak.uni-bielefeld.de/dialign" +SRC_URI="http://bibiserv.techfak.uni-bielefeld.de/applications/dialign/resources/downloads/dialign-${PV}-src.tar.gz" +S="${WORKDIR}/dialign_package" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +PATCHES=( + "${FILESDIR}"/${PN}-2.2.1-fix-build-system.patch + "${FILESDIR}"/${PN}-2.2.1-Wimplicit.patch +) + +src_configure() { + tc-export CC +} + +src_compile() { + emake -C src +} + +src_install() { + dobin src/dialign2-2 + + insinto /usr/share/dialign2 + doins -r dialign2_dir/. + + newenvd - 80dialign2 <<- EOF + DIALIGN2_DIR="${EPREFIX}/usr/share/dialign2" + EOF +} diff --git a/sci-biology/dialign2/dialign2-2.2.1.ebuild b/sci-biology/dialign2/dialign2-2.2.1.ebuild deleted file mode 100644 index db310e3fe8d3..000000000000 --- a/sci-biology/dialign2/dialign2-2.2.1.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit flag-o-matic toolchain-funcs - -DESCRIPTION="Multiple sequence alignment" -HOMEPAGE="http://bibiserv.techfak.uni-bielefeld.de/dialign" -SRC_URI="http://bibiserv.techfak.uni-bielefeld.de/applications/dialign/resources/downloads/dialign-${PV}-src.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" - -S=${WORKDIR}/dialign_package -PATCHES=( "${FILESDIR}"/${PN}-2.2.1-fix-build-system.patch ) - -src_configure() { - tc-export CC - append-cppflags -I. -DCONS -} - -src_compile() { - emake -C src -} - -src_install() { - dobin src/${PN}-2 - insinto /usr/share/${PN} - doins -r dialign2_dir/. - - cat >> "${T}"/80${PN} <<- EOF || die - DIALIGN2_DIR="${EPREFIX}/usr/share/${PN}" - EOF - doenvd "${T}"/80${PN} -} diff --git a/sci-biology/dialign2/files/dialign2-2.2.1-Wimplicit.patch b/sci-biology/dialign2/files/dialign2-2.2.1-Wimplicit.patch new file mode 100644 index 000000000000..3f886171b070 --- /dev/null +++ b/sci-biology/dialign2/files/dialign2-2.2.1-Wimplicit.patch @@ -0,0 +1,205 @@ +--- a/src/alig_graph_closure.c ++++ b/src/alig_graph_closure.c +@@ -27,7 +27,7 @@ + void init_seq(CLOSURE *clos, int nbreseq, int *longseq); + void desinit_seq(CLOSURE *clos); + +-int print_aligSets(CLOSURE *clos, int nseq, int i); ++void print_aligSets(CLOSURE *clos, int nseq, int i); + + char DEBUG=0; + +@@ -309,7 +309,7 @@ + } + + +-int print_aligSets(CLOSURE *clos, int nseq, int i) ++void print_aligSets(CLOSURE *clos, int nseq, int i) + { + char nouveau_, terminer; + int n, ng, nd, nn, k; +@@ -395,7 +395,7 @@ + liberer(clos); + } + +-int addAlignedPositions(CLOSURE *clos, int seq1, int i, int seq2, int j) ++void addAlignedPositions(CLOSURE *clos, int seq1, int i, int seq2, int j) + { + char nouveau_, terminer; + int n, n1, n2, ng1, ng2, nd1, nd2, nn, k; +@@ -623,7 +623,7 @@ + return(!path(clos, y, j, x, i)); + } + +-int addAlignedSegments(CLOSURE *clos, int x, int i, int y, int j, int l) ++void addAlignedSegments(CLOSURE *clos, int x, int i, int y, int j, int l) + { + int k; + +--- a/src/alig_graph_closure.h ++++ b/src/alig_graph_closure.h +@@ -43,13 +43,13 @@ + + void freeAligGraphClosure(CLOSURE *clos); + +-int addAlignedPositions(CLOSURE *clos, int x, int i, int y, int j); ++void addAlignedPositions(CLOSURE *clos, int x, int i, int y, int j); + + int alignablePositions(CLOSURE *clos, int x, int i, int y, int j); + + int alignedPositions(CLOSURE *clos, int x, int i, int y, int j); + +-int addAlignedSegments(CLOSURE *clos, int x, int i, int y, int j, int l); ++void addAlignedSegments(CLOSURE *clos, int x, int i, int y, int j, int l); + + int alignableSegments(CLOSURE *clos, int x, int i, int y, int j, int l); + +--- a/src/anchor.c ++++ b/src/anchor.c +@@ -17,6 +17,7 @@ + #include "define.h" + #include "dialign.h" + #include "alig_graph_closure.h" ++#include "pratique.h" + + + extern int anc_num, *seqlen ; +@@ -24,6 +25,8 @@ + extern char *seq[MAX_SEQNUM]; + extern struct multi_frag *anchor_frg ; + ++extern int word_count( char *seq ); ++ + void anchor_check( int s1, int s2, int b1, int b2, int l , float scr ) { + + if( +@@ -101,7 +104,7 @@ + } + + +-int multi_anc_read( char *file_name ) { ++void multi_anc_read( char *file_name ) { + + char anc_file_name[ NAME_LEN ] ; + FILE *fp; +--- a/src/dialign.c ++++ b/src/dialign.c +@@ -218,7 +218,7 @@ + extern void subst_mat(char *file_name, int fragno , struct multi_frag *smp ); + extern int seq_read( char *in_file , char *sq[MAX_SEQNUM] , char **sqn , char **fsqn) ; + extern int anc_read( char *file_name ) ; +- extern int multi_anc_read( char *file_name ) ; ++ extern void multi_anc_read( char *file_name ) ; + extern void randomize( int r_numb , FILE *fp1 ); + extern int mini2(int a, int b); + extern int maxi2(int a, int b); +@@ -250,6 +250,9 @@ + extern void av_tree_print(); + extern void matrix_read( FILE *fp_mat ) ; + extern void mem_alloc( ) ; ++ extern void regex_parse( char *mot_regex ) ; ++ extern void seq_parse( char *mot_regex ) ; ++ extern void exclude_frg_read( char *file_name , int ***exclude_list) ; + + + /******************************/ +@@ -258,7 +261,7 @@ + + + +-main(int argc, char **argv) ++int main(int argc, char **argv) + { + int k, anc1, dia_counter, tmpi1, tmpi2 ; + +--- a/src/functions.c ++++ b/src/functions.c +@@ -853,7 +853,7 @@ + } + } + +-wgt_type_count( int num , int e_len, int *plus_cnt, int *minus_cnt, ++void wgt_type_count( int num , int e_len, int *plus_cnt, int *minus_cnt, + int *nuc_cnt , int *frg_inv, struct multi_frag *dia ) { + + int i, dc, pc, s1, pos; +@@ -882,7 +882,7 @@ + + + +-plot_calc( int num , int e_len, float *w_count, float *pl, ++void plot_calc( int num , int e_len, float *w_count, float *pl, + struct multi_frag *dia , FILE *fp_csc ) + { + int i, dc, pc, s1, pos; +--- a/src/input.c ++++ b/src/input.c +@@ -17,6 +17,7 @@ + #include "define.h" + #include "dialign.h" + #include "alig_graph_closure.h" ++#include "pratique.h" + + extern int max_dia , self_comparison ; + extern int sim_score[21][21]; +@@ -370,8 +371,11 @@ + } + + +- if ( fgets( line , MLINE , fp ) == NULL ) +- erreur("\n\n problem with file %s \n\n", file_name ); ++ if ( fgets( line , MLINE , fp ) == NULL ) { ++ char buffer [500]; ++ snprintf ( buffer, 500, "\n\n problem with file %s \n\n", file_name ); ++ erreur( buffer ); ++ } + else + if( w_type % 2 ) + av_sim_score_nuc = atof( line ); +--- a/src/output.c ++++ b/src/output.c +@@ -61,9 +61,9 @@ + extern void mini(int *a, int b); + extern void maxi(int *a, int b); + extern int int_test(float f); +- extern plot_calc( int num , int e_len, float *w_count, float *pl, ++ extern void plot_calc( int num , int e_len, float *w_count, float *pl, + struct multi_frag *dia , FILE *fp_csc ) ; +- extern wgt_type_count( int num , int e_len, int *plus_cnt, int *minus_cnt, ++ extern void wgt_type_count( int num , int e_len, int *plus_cnt, int *minus_cnt, + int *nuc_cnt , int *frg_inv, struct multi_frag *dia ) ; + + +--- a/src/pratique.c ++++ b/src/pratique.c +@@ -4,7 +4,7 @@ + + /* ------------------------------------------------------------*/ + +-void erreur(char *message) ++_Noreturn void erreur(char *message) + { + printf("%s\n", message); + exit(1); +--- a/src/pratique.h ++++ b/src/pratique.h +@@ -12,7 +12,7 @@ + + #define TAILLE_MAX_LIGNE_FICHIER 10000 + +-void erreur(char *message); ++_Noreturn void erreur(char *message); + + void *allouer(size_t taille); + void *reallouer(void *pointeur, size_t taille); +--- a/src/regex.c ++++ b/src/regex.c +@@ -151,7 +151,7 @@ + + } + +-seq_parse( char *mot_regex ) { ++void seq_parse( char *mot_regex ) { + int sn, ok , i ; + int sp, ap, rp, hv, match; + max_mot_offset = sqrt ( - log ( 0.1 ) * 10 / mot_factor ) * mot_offset_factor; diff --git a/sci-biology/dialign2/files/dialign2-2.2.1-fix-build-system.patch b/sci-biology/dialign2/files/dialign2-2.2.1-fix-build-system.patch index 45365c56e3a4..a4940ee867ee 100644 --- a/sci-biology/dialign2/files/dialign2-2.2.1-fix-build-system.patch +++ b/sci-biology/dialign2/files/dialign2-2.2.1-fix-build-system.patch @@ -1,14 +1,16 @@ --- a/src/makefile +++ b/src/makefile -@@ -10,8 +10,6 @@ +@@ -10,9 +10,7 @@ ############################### -CC = gcc -CFLAGS = -c -O -I$ -DCONS - #CFLAGS = -g -c -I$ -DCONS +-#CFLAGS = -g -c -I$ -DCONS ++CPPFLAGS += -I. -DCONS LIBS = -lm # + @@ -23,33 +21,4 @@ # -- cgit v1.2.3-65-gdbad