commit:     ec69f56bc3a7550b3c5018017b762e109ff19e5a
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 08:57:37 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 09:21:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec69f56b

sci-biology/trnascan-se: fix build w/ clang16, pass -std=gnu89

Closes: https://bugs.gentoo.org/874477
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/trnascan-se-1.31-clang16.patch           | 62 ++++++++++++++++++++++
 ...e-1.31-r2.ebuild => trnascan-se-1.31-r3.ebuild} |  4 +-
 2 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/sci-biology/trnascan-se/files/trnascan-se-1.31-clang16.patch 
b/sci-biology/trnascan-se/files/trnascan-se-1.31-clang16.patch
new file mode 100644
index 000000000000..33889c90cf69
--- /dev/null
+++ b/sci-biology/trnascan-se/files/trnascan-se-1.31-clang16.patch
@@ -0,0 +1,62 @@
+https://bugs.gentoo.org/874477
+--- a/eufind_main.c
++++ b/eufind_main.c
+@@ -23,4 +23,5 @@
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include "squid.h"
+ #include "sqfuncs.h"
+@@ -47,4 +48,14 @@
+ -i <integer>   : start nucleotide numbering at <integer> (def=1)\n\n";
+ 
++int GetBbox(float*, int*, char*, int, int, int);
++int GetBestABox(TRNA_TYPE*, char*, char*, int, int, int, int, int);
++int GetBestTrxTerm(TRNA_TYPE*, char*, int, float);
++int GetSecABox(TRNA_TYPE*, char*);
++void Get_tRNA_stats(TRNA_TYPE*, char*, int, int);
++int Init_tRNA(TRNA_TYPE*);
++int IntEncodeSeq(char*, char*, int);
++void Save_tRNA(TRNA_TYPE*, SQINFO*, char*, int, int, long int);
++int tRNAOverlap(TRNA_TYPE*, TRNA_TYPE*, int);
++
+ int
+ main (int argc, char **argv)
+--- a/scan_main.c
++++ b/scan_main.c
+@@ -8,4 +8,5 @@
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <time.h>
+ #include <math.h>
+--- a/score_main.c
++++ b/score_main.c
+@@ -10,4 +10,5 @@
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <time.h>
+ #include <math.h>
+--- a/trnascan.c
++++ b/trnascan.c
+@@ -69,4 +69,5 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <ctype.h>
+ 
+@@ -333,5 +334,5 @@
+           );
+ 
+-main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+   /* pointers to the different files fpi=input file, fpo=output file, 
+@@ -1419,5 +1420,5 @@
+ /* Calls to this function eliminated for efficiency  T. Lowe  11/95  */
+ 
+-myindex (char *s, char *t)
++int myindex (char *s, char *t)
+ {
+ int i, j, k;

diff --git a/sci-biology/trnascan-se/trnascan-se-1.31-r2.ebuild 
b/sci-biology/trnascan-se/trnascan-se-1.31-r3.ebuild
similarity index 84%
rename from sci-biology/trnascan-se/trnascan-se-1.31-r2.ebuild
rename to sci-biology/trnascan-se/trnascan-se-1.31-r3.ebuild
index f35c31b22798..f43243921f2f 100644
--- a/sci-biology/trnascan-se/trnascan-se-1.31-r2.ebuild
+++ b/sci-biology/trnascan-se/trnascan-se-1.31-r3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit perl-functions toolchain-funcs
+inherit flag-o-matic perl-functions toolchain-funcs
 
 DESCRIPTION="tRNA detection in large-scale genome sequences"
 HOMEPAGE="http://lowelab.ucsc.edu/tRNAscan-SE/";
@@ -20,10 +20,12 @@ BDEPEND="${RDEPEND}"
 PATCHES=(
        "${FILESDIR}"/${P}-makefile.patch
        "${FILESDIR}"/${P}-portable-perl-shebangs.patch
+       "${FILESDIR}"/${P}-clang16.patch
 )
 
 src_configure() {
        tc-export CC
+       append-cflags -std=gnu89 # mid-migration from K&R C, incompatible with 
c2x
 }
 
 src_test() {

Reply via email to