From d934827bf44b7cfcf6711964418148fa60877668 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Nov 2020 22:39:15 +0000 Subject: gentoo resync : 25.11.2020 --- sci-biology/lagan/Manifest | 14 +- .../lagan/files/lagan-2.0-C99-static-inline.patch | 258 +++++++++++ .../lagan/files/lagan-2.0-ambiguous-end.patch | 49 +++ .../files/lagan-2.0-conflicting-getline.patch | 24 ++ sci-biology/lagan/files/lagan-2.0-fix-c++14.patch | 473 --------------------- sci-biology/lagan/files/lagan-2.0-flags.patch | 107 ----- sci-biology/lagan/files/lagan-2.0-gcc-10.patch | 27 ++ sci-biology/lagan/files/lagan-2.0-gcc-4.8.patch | 25 ++ sci-biology/lagan/files/lagan-2.0-gcc-9.patch | 25 ++ sci-biology/lagan/files/lagan-2.0-gcc4.3.patch | 23 - sci-biology/lagan/files/lagan-2.0-makefile.patch | 120 ++++++ .../files/lagan-2.0-qa-implicit-declarations.patch | 63 +-- sci-biology/lagan/lagan-2.0-r3.ebuild | 71 ---- sci-biology/lagan/lagan-2.0-r4.ebuild | 67 +++ 14 files changed, 618 insertions(+), 728 deletions(-) create mode 100644 sci-biology/lagan/files/lagan-2.0-C99-static-inline.patch create mode 100644 sci-biology/lagan/files/lagan-2.0-ambiguous-end.patch create mode 100644 sci-biology/lagan/files/lagan-2.0-conflicting-getline.patch delete mode 100644 sci-biology/lagan/files/lagan-2.0-fix-c++14.patch delete mode 100644 sci-biology/lagan/files/lagan-2.0-flags.patch create mode 100644 sci-biology/lagan/files/lagan-2.0-gcc-10.patch create mode 100644 sci-biology/lagan/files/lagan-2.0-gcc-4.8.patch create mode 100644 sci-biology/lagan/files/lagan-2.0-gcc-9.patch delete mode 100644 sci-biology/lagan/files/lagan-2.0-gcc4.3.patch create mode 100644 sci-biology/lagan/files/lagan-2.0-makefile.patch delete mode 100644 sci-biology/lagan/lagan-2.0-r3.ebuild create mode 100644 sci-biology/lagan/lagan-2.0-r4.ebuild (limited to 'sci-biology/lagan') diff --git a/sci-biology/lagan/Manifest b/sci-biology/lagan/Manifest index bb94011e3eae..6b6322158a4d 100644 --- a/sci-biology/lagan/Manifest +++ b/sci-biology/lagan/Manifest @@ -1,7 +1,11 @@ -AUX lagan-2.0-fix-c++14.patch 13525 BLAKE2B 79037fa65301393f3a007adb424f4a88f72f46ad0cf7c310a07f14b64437fb8fd3dc6da90df5c79e468b424a895797cf01e5b30413435a18ea933d912eb0428e SHA512 f62b523cf9692a1394276ac674ccf7ce9a0070c646c95d1f20b8e0ace61afffd04aae3a098511bb106ab62089e70bebfae6ba25aaffcccbbe7f8397a30c2900a -AUX lagan-2.0-flags.patch 5848 BLAKE2B 41394e65d15be217dea753a9641ee72833ff87f5101fa19ba009f4ca4b97d8fe22594d041105ba03ddb53ad83f635fec79e9125f539eff3cd1cbcdc186d3023e SHA512 63917ed217c44cade1c87dd6498cb7f6180c30eaba3875fa77f7e73b894aadab1469aca87650d1017a44fcac548552c3bdfcaff29b24023d23c7424079ad91cf -AUX lagan-2.0-gcc4.3.patch 821 BLAKE2B c25d5afef654a27a61fb658de4fc26afe713400133123b47202fab8861c95b6ed56a229b0f88a811b5dc36e94125d0c333c6b13a14e1f1ff944c68c2ee3acd1c SHA512 91b56b0cfc27f799fed164a8a32b4840ea2e7f7796d334b2bce8bd27bc2fb96b4cdb0912c737c874f767a16ffcdd4e4623a0f80a35082aa4289882d1502cc0df -AUX lagan-2.0-qa-implicit-declarations.patch 2371 BLAKE2B e6ad9e67c322271fab92bf32094903d201f5cd81ce6cbf5f5f14708d53eac649024ca1c7e378a2a7ee26b0e4a7d99b275476f32ec32d1e20575d09dc9e2845c5 SHA512 eec54cec02a5c8c875a4d64238276f116baa8f3d780573ca5143621ca62a1e96ba4045ae37d45321fc040b78216607d787c2c6c909a8264f17f99a0e07295bf5 +AUX lagan-2.0-C99-static-inline.patch 7673 BLAKE2B 42b4ab27fa4a86786cdf02c8d7b16b1dc1439d2a6af15b6b9a7bfd46c97debf150140b5a9697d8d47d40d983388cd2f7f9167971b8166f385be83870ea095790 SHA512 db1798730a3dc093d56e6f778dd7380d8dab8f1919b74e3eb752cde353e85385755cdabf61c2692e666acf50b21f34d341c79a3c67ddefbc824d8c78d077345d +AUX lagan-2.0-ambiguous-end.patch 1445 BLAKE2B 3d5e0467dfe60e2d5c25b8f90ba5d25e22bfcf63f8cf3b016cd02a837b51a1e653f8cb2ff5afb73ab7dbd38a22bc9d7fb7646080b6b02cde50fbe4beb55cce60 SHA512 85a9d3d1ce9efd00fdb98835e849fe4d22c059d5e4b8b3c11b7c227d5fd74ae522e3189c38c2ea62fb98c21228591dcaa8ea5a80c9d56c46420e716c30ce8a4d +AUX lagan-2.0-conflicting-getline.patch 711 BLAKE2B 7ab19955c833e47dee06f214b52a79a55313ce7abf338cdeb4121a84b93027af601eb4379686bb2e4a5ebe215bf4321f8504ad4d91d8e7434575e0dead871d54 SHA512 867613347b50ab20e6640c7250609cd697d2217fe1c7731ee2688ccaff5e959fd1f0c96c80eabcb878d35bd679eb28931c75be808502fd4ad0fe184ddc2a6ea2 +AUX lagan-2.0-gcc-10.patch 506 BLAKE2B 0c35eb155a80e3c71f70d2013d47e77f38f1c6a6f7db8cace6f80a3839b9d6ea97429802a4c4081195c5fb3dd17680ee0d1f37a9ffd3cb2c47223812ef8245e3 SHA512 fe71d037d89a888e14c7c5d411ef2dd80f4cd3627fdc706c0d78d89a9befbec55cd06a5eb763d5d16d708156f067cad6f515c04235dbc5f9e842f663eb44b8e7 +AUX lagan-2.0-gcc-4.8.patch 649 BLAKE2B 4a4f76ce4709a3ae6210574604549aedc66ecbe27b6276d4470bb910765326028b94d2fdc1a28b5cfc63ff6b44005e2a33b42b42adb3f633af1649897e08b522 SHA512 504b9dbddbca07fd1bb3ebec8a8087af6548ac17c96acb8e76740ca2e63d40b695aed1e1e94cfbd24c6b2836c98e787dffddbb9884c338fd69a8b4e37046f7cb +AUX lagan-2.0-gcc-9.patch 781 BLAKE2B 8280ebd4f445441d41a73e786568e4d1e17bbd2e73ac52f828651576bfb128986911efb8ce8b988bc540643f647d992bbf6793e0081adffe6aacace81174e0c7 SHA512 ecc007c8e266e5d859f9f5db99c9ea9d1048b7faba7dbad29ee9c04ee8cbd628e052615cec4123446d54f05f5c906a58e6e90cf6ac449e245c02d721750998ff +AUX lagan-2.0-makefile.patch 6257 BLAKE2B 284dc6f21dd303f4b10f6e8cb30054c4ddd8df62c7c43c42a20351f4d81db4360c75feea8f55d32323c3349dc896c94213da7ab9074ee78f78e8ed82b0a0e211 SHA512 fc255585fc53c66b0a2f4e46788a59f8fdfae67b5f9ca4f4b0ac9224a7a915a387d991cb20315aa18a42df82ffa2b832270f0919f9939faf3b979d026e562c81 +AUX lagan-2.0-qa-implicit-declarations.patch 1396 BLAKE2B 556a43acf76e20a8484fd6ab5d0682b4b29206568b657b8daf09f79577890afd8a594b3897fc2322fffb5e2810a018638af0488c872e9d0794cb685a55b91e79 SHA512 4275aacf1dfa7d712a14ea5d8eafe11045c3b47a02c92915703d095af7b00f2206687eec568d14bfd00718f6b2430bd38cf70ac86cc5d550870d19f5fe6c6d97 DIST lagan20.tar.gz 589115 BLAKE2B 8aaee40b767d7c1828760449e3bf2718210ad345447524ec2c391eb9f2856023f9258618d3d2625b15c42af814615870082bff6320ba0372dff79221798d2618 SHA512 f77217ab534df33834a725eb6e1b716f7bbffa98768a42c2294a6ab62404192e560bb05ffd41e4cdccb5b96ef9efceb8ecdc06472bbc6a301e1d11572ba29b98 -EBUILD lagan-2.0-r3.ebuild 1659 BLAKE2B 0ee31ba110a6238ac9218fc3d59347c9ee97fa11ce097c0a1f5e53c45fefa74ed83e35a1314e2f7fd57fbb3bdb64863109400af32f39f6dba13c273d722ded99 SHA512 b5efe429851ae0a3676a6e63017ebabdcae169667d091b2e69c0c2daa401f34e0ff3b789f8bacd78376befc466bb20de8f0d80bae63c332a6c412f01794f457b +EBUILD lagan-2.0-r4.ebuild 1493 BLAKE2B 81a03c4ab005e5190a2275fa160b86fb16bfb3d8ef1dc794363df692cce7eb8389974af99acbaa5677903db2d75e02e63920cae712abcd7aa421fe7326b8afda SHA512 b9b8e5e12a9ea1276f38806f933cbe7e73b63782510f4e66336ab0a5e1ceeb634d46b81eecf953421d5eaf7e1ce42e130df40b66e6137f0aa8af68155e36363f MISC metadata.xml 267 BLAKE2B 7cf386952842945148119de3263231db4d1046d5f54811f7e303ed8ec4d27cbc1960b99c92daf6f32e5b981c2fb9f50ec666be6193865d6e18541b7427a152a9 SHA512 91ab266d9ab24401bc0fec759c5b6cfcf44a3c5669fc31c7301d79770839bb5dfa0e155d949392ef06176b4a0b2c32b91b1b54b0027f972db61f0a5e54644403 diff --git a/sci-biology/lagan/files/lagan-2.0-C99-static-inline.patch b/sci-biology/lagan/files/lagan-2.0-C99-static-inline.patch new file mode 100644 index 000000000000..2c9d88111aee --- /dev/null +++ b/sci-biology/lagan/files/lagan-2.0-C99-static-inline.patch @@ -0,0 +1,258 @@ +--- a/src/fchaos.c ++++ b/src/fchaos.c +@@ -985,7 +985,7 @@ + SLremove(mylist, tbf->mysles[i]); + } + +-inline int CHmatchscore(unsigned char a, unsigned char b) { ++static inline int CHmatchscore(unsigned char a, unsigned char b) { + return substmatrix[a][b]; + /* + if (translated) +--- a/src/multial.c ++++ b/src/multial.c +@@ -59,16 +59,16 @@ + int normf; + int normprev; + +-inline int ismatch(char a, char b) { ++static inline int ismatch(char a, char b) { + return (a == b); + } + +-inline int isGap(align* ali, int seqn, int loc) { ++static inline int isGap(align* ali, int seqn, int loc) { + int i = !((ali->algn[loc] >> seqn) & 1); + return i; + } + +-inline int scoreLocal(int which, align* ali, int loc) { ++static inline int scoreLocal(int which, align* ali, int loc) { + int i, lets = 0; + for (i=0; i < 4; i++) + lets += ali->cnts[i][loc]; +@@ -83,7 +83,7 @@ + return lets+ali->cnts[CNTS_GS][loc] * gapcont; + } + +-inline hll* reverseHLL(hll* tbr) { ++static inline hll* reverseHLL(hll* tbr) { + hll *nn, *prev=0; + while (tbr) { + nn = tbr->next; +@@ -171,7 +171,7 @@ + return res; + } + +-inline void reverse (long long int* a, int length) { ++static inline void reverse (long long int* a, int length) { + long long int lft; + int i; + for (i=0; i < length/2; i++) { +@@ -409,7 +409,7 @@ + */ + } + +-inline int scoreGap(int numgs, int numgc, int numge, int numseq) { ++static inline int scoreGap(int numgs, int numgc, int numge, int numseq) { + return (MIN2(numgc, numseq-numgc) * gapcont) + + (MIN2(numgs, numseq-numgs) * gapstart) + + (MIN2(numge, numseq-numge) * gapend); +@@ -493,7 +493,7 @@ + fclose (file); + } + +-inline int chmatchscore (unsigned char a, unsigned char b, int substmatrix[256][256]) { ++static inline int chmatchscore (unsigned char a, unsigned char b, int substmatrix[256][256]) { + return substmatrix[a][b]; + } + +@@ -539,14 +539,14 @@ + // printcache(); + } + +-inline int v (int y){ ++static inline int v (int y){ + if (y >= 0 && y <= MAX_SEQ) return y; + fprintf(stderr, "Got %d in v\n", y); + assert (0); + return 0; + } + +-inline int matchscore (align*a, int ai, align *b, int bi){ ++static inline int matchscore (align*a, int ai, align *b, int bi){ + + return + matchcache[v(a->cnts[0][ai] + b->cnts[0][bi]) | +@@ -559,30 +559,30 @@ + (v(a->numseq + b->numseq - (a->cnts[CNTS_CB][ai] + b->cnts[CNTS_CB][bi])) << 18)]; + } + +-inline int scoreOpp (align *other, int ow, int oppnum){ ++static inline int scoreOpp (align *other, int ow, int oppnum){ + return matchcache[v(other->cnts[0][ow]) | + (v(other->cnts[1][ow]) << 6) | + (v(other->cnts[2][ow]) << 12) | + (v(other->cnts[3][ow]) << 18)]; + } + +-inline int endGap0 (align* a, int ai, align* b, int bi){ ++static inline int endGap0 (align* a, int ai, align* b, int bi){ + return gapcache[(v(a->cnts[CNTS_GE][ai]+b->cnts[CNTS_GE][bi])<<12) | + (v(a->numseq + b->numseq-(b->cnts[CNTS_CB][bi]+a->cnts[CNTS_CB][ai])) << 18)]; + } + +-inline int endGap1 (align* a, int ai, align* b, int bi){ ++static inline int endGap1 (align* a, int ai, align* b, int bi){ + + return gapcache[(v((b->numseq - b->cnts[CNTS_GS][bi] - b->cnts[CNTS_GC][bi]) + a->cnts[CNTS_GE][ai]) << 12) | + (v(a->numseq + b->numseq - (b->cnts[CNTS_CB][bi]+a->cnts[CNTS_CB][ai])) << 18)]; + } + +-inline int endGap2 (align* a, int ai, align* b, int bi){ ++static inline int endGap2 (align* a, int ai, align* b, int bi){ + return gapcache[(v((a->numseq - a->cnts[CNTS_GS][ai] - a->cnts[CNTS_GC][ai]) + b->cnts[CNTS_GE][bi])<<12) | + (v(a->numseq + b->numseq - (b->cnts[CNTS_CB][bi]+a->cnts[CNTS_CB][ai])) << 18)]; + } + +-inline int contGap(align* ali, int myw, align* other, int ow, int *sopp) { ++static inline int contGap(align* ali, int myw, align* other, int ow, int *sopp) { + return gapcache[(v(other->cnts[CNTS_GS][ow])) | + (v(ali->numseq + other->cnts[CNTS_GC][ow]) << 6) | + (v(other->cnts[CNTS_GE][ow]) << 12) | +@@ -590,7 +590,7 @@ + sopp[ow]; + } + +-inline int openGap(align* ali, int w, align* other, int ow, int *sopp, char *desc) { ++static inline int openGap(align* ali, int w, align* other, int ow, int *sopp, char *desc) { + int alopen, pen, sav, i; + + alopen = ali->cnts[CNTS_GC][w] + ali->cnts[CNTS_GE][w]; +--- a/src/order.c ++++ b/src/order.c +@@ -454,11 +454,11 @@ + } + + +-inline int ismatch(char a, char b) { ++static inline int ismatch(char a, char b) { + return a == b; + } + +-inline int matchscore (unsigned char a, unsigned char b) { ++static inline int matchscore (unsigned char a, unsigned char b) { + return substmatrix[a][b]; + /* + +--- a/src/utils/cstat.c ++++ b/src/utils/cstat.c +@@ -121,7 +121,7 @@ + return res; + } + +-inline int getScore (align* a, int i){ ++static inline int getScore (align* a, int i){ + return + ((a->cnts[0][i] * (a->cnts[0][i] - 1)) + + (a->cnts[1][i] * (a->cnts[1][i] - 1)) + +--- a/src/utils/getbounds.c ++++ b/src/utils/getbounds.c +@@ -6,8 +6,8 @@ + + #define EXPAND 2 + +-inline int max (int a, int b){ if (a > b) return a; return b; } +-inline int min (int a, int b){ if (a < b) return a; return b; } ++static inline int max (int a, int b){ if (a > b) return a; return b; } ++static inline int min (int a, int b){ if (a < b) return a; return b; } + + int getLength (char *filename){ + FILE *file; +--- a/src/utils/scorealign.c ++++ b/src/utils/scorealign.c +@@ -18,17 +18,17 @@ + int matchscore[256][256]; + int gapopen = -1500, gapcont = -50; + +-inline int min (int a, int b){ ++static inline int min (int a, int b){ + if (a < b) return a; + return b; + } + +-inline int max (int a, int b){ ++static inline int max (int a, int b){ + if (a > b) return a; + return b; + } + +-inline int scoreMatch (char c, char d){ ++static inline int scoreMatch (char c, char d){ + if (c == '-' && d == '-') return 0; + if (c == '-' || d == '-') return gapcont; + return matchscore[(unsigned char) c][(unsigned char) d]; +@@ -235,7 +235,7 @@ + } + } + +-inline int issymbol (char ch){ ++static inline int issymbol (char ch){ + return ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T' || ch == 'N' || ch == '.' || ch == '-'; + } + +--- a/src/utils/scorecontigs.c ++++ b/src/utils/scorecontigs.c +@@ -133,7 +133,7 @@ + return res; + } + +-inline int getstate (char c, char d){ ++static inline int getstate (char c, char d){ + if (c == '-' || d == '-') return 2; + if (c == 'N' || d == 'N') return 3; + return c == d; +@@ -235,7 +235,7 @@ + return r; + } + +-inline int getdata (rangelist **ranges, int *offs, int j, int i){ ++static inline int getdata (rangelist **ranges, int *offs, int j, int i){ + i -= offs[j]; + if (i >= 0 && i < ranges[j]->seqlen) + return ranges[j]->score[i]; +@@ -243,14 +243,14 @@ + } + + +-inline int match (rangelist **ranges, int numContigs, int i, int j, int *offs){ ++static inline int match (rangelist **ranges, int numContigs, int i, int j, int *offs){ + int k; + for (k = 0; k < numContigs; k++) + if ((getdata (ranges, offs, k, i) != 0) != (getdata (ranges, offs, k, j) != 0)) return 0; + return 1; + } + +-inline int allzeroes (rangelist **ranges, int numContigs, int pos, int *offs){ ++static inline int allzeroes (rangelist **ranges, int numContigs, int pos, int *offs){ + int i; + + for (i = 0; i < numContigs; i++) +@@ -258,7 +258,7 @@ + return 1; + } + +-inline void print (int start, int end, int *score, int numContigs){ ++static inline void print (int start, int end, int *score, int numContigs){ + int j; + + printf ("(%7d %7d)", start, end); +@@ -303,7 +303,7 @@ + free (pattern); + } + +-inline double scoregap (int gaplen){ ++static inline double scoregap (int gaplen){ + if (gaplen == 0) return 0; + //return (gaplen - 1) * -1 - 50; + return (log (gaplen) / log (10) + 1) * scoreGapOpen; diff --git a/sci-biology/lagan/files/lagan-2.0-ambiguous-end.patch b/sci-biology/lagan/files/lagan-2.0-ambiguous-end.patch new file mode 100644 index 000000000000..945120b1fc47 --- /dev/null +++ b/sci-biology/lagan/files/lagan-2.0-ambiguous-end.patch @@ -0,0 +1,49 @@ +Author: Steffen Moeller +Last-Update: 2018-09-07 15:08:19 +0200 +Description: Fix build issue + +Index: lagan/src/glocal/rightinfluence.cpp +=================================================================== +--- lagan.orig/src/glocal/rightinfluence.cpp ++++ lagan/src/glocal/rightinfluence.cpp +@@ -1,6 +1,6 @@ + #include + +-Fragment origin, end; ++static Fragment originFrag, endFrag; + + // Sets the first default owner of the whole region + void initRI(RI *RightInfluence, long long int scoreIndex) { +@@ -13,22 +13,22 @@ void initRI(RI *RightInfluence, long lon + } + + // will lose to anyone +- origin.seq1End = 0; origin.seq2End = 0; +- origin.seq1Start = 0; origin.seq2Start = 0; ++ originFrag.seq1End = 0; originFrag.seq2End = 0; ++ originFrag.seq1Start = 0; originFrag.seq2Start = 0; + + // hack to aid winner selection +- origin.score = -1; +- end.score = -2; +- origin.totalScore = end.totalScore = 0; ++ originFrag.score = -1; ++ endFrag.score = -2; ++ originFrag.totalScore = endFrag.totalScore = 0; + + // will win against anyone +- end.seq1End = 0; end.seq2End = 0; +- end.seq1Start = 0; end.seq2Start = 0; ++ endFrag.seq1End = 0; endFrag.seq2End = 0; ++ endFrag.seq1Start = 0; endFrag.seq2Start = 0; + +- origin.back = NULL; ++ originFrag.back = NULL; + +- RightInfluence->act[-INF] = &origin; +- RightInfluence->act[+INF] = &end; ++ RightInfluence->act[-INF] = &originFrag; ++ RightInfluence->act[+INF] = &endFrag; + } + + diff --git a/sci-biology/lagan/files/lagan-2.0-conflicting-getline.patch b/sci-biology/lagan/files/lagan-2.0-conflicting-getline.patch new file mode 100644 index 000000000000..075753a924c9 --- /dev/null +++ b/sci-biology/lagan/files/lagan-2.0-conflicting-getline.patch @@ -0,0 +1,24 @@ +Author: Andreas Tille +LastChanged: Fri, 15 Nov 2013 10:31:20 +0100 +Description: Prevent conflicting getline by simply renaming it + +--- a/src/anchors.c ++++ b/src/anchors.c +@@ -225,7 +225,7 @@ char* rolltonum(char* str) { + return &str[i]; + } + +-int getline(FILE* infile, hll* tt) { ++int anchors_getline(FILE* infile, hll* tt) { + char temp[1024]; + char* help; + int z, h; +@@ -248,7 +248,7 @@ hll* parseCHAOS(FILE* infile, int* totnu + *totnum = 0; + while(!feof(infile)) { + tt = (hll*) malloc(sizeof(hll)); +- while (!feof(infile) && !getline(infile, tt)) ++ while (!feof(infile) && !anchors_getline(infile, tt)) + ; + if (feof(infile)) break; + if (gapfreechunks) { diff --git a/sci-biology/lagan/files/lagan-2.0-fix-c++14.patch b/sci-biology/lagan/files/lagan-2.0-fix-c++14.patch deleted file mode 100644 index 9865f2756c5a..000000000000 --- a/sci-biology/lagan/files/lagan-2.0-fix-c++14.patch +++ /dev/null @@ -1,473 +0,0 @@ -Fix building with C++14, which errors out due to namespace collisions with std::end -in C++14 mode, due to crappy 'using namespace std' declared everywhere. -See also: https://bugs.gentoo.org/show_bug.cgi?id=594148 - ---- a/src/ancseq.cpp -+++ b/src/ancseq.cpp -@@ -30,7 +30,6 @@ - #include - #include - --using namespace std; - - #include "util.cpp" - #include "faindex.cpp" ---- a/src/ancseqrest.cpp -+++ b/src/ancseqrest.cpp -@@ -31,7 +31,6 @@ - #include - #include - --using namespace std; - - #define fastaRowLength 50 - typedef char* pchar; ---- a/src/cutmfa.cpp -+++ b/src/cutmfa.cpp -@@ -45,7 +45,6 @@ - #include - #include - --using namespace std; - - // TODO refactor in classes and normal make project - ---- a/src/glocal/glocal.cpp -+++ b/src/glocal/glocal.cpp -@@ -7,9 +7,9 @@ - } - - //vectors that would be needed globally --vector fragments; --vectorstartPoints; --vectorendPoints; -+std::vector fragments; -+std::vectorstartPoints; -+std::vectorendPoints; - long long int numFragments; - InterPoint inter; - -@@ -19,7 +19,7 @@ - RI RI_regions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; - LI LI_regions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; - --vector scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; -+std::vector scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; - - Name allNames; - ---- a/src/glocal/io.cpp -+++ b/src/glocal/io.cpp -@@ -3,9 +3,9 @@ - #include - #include - --extern vector fragments; --extern vector startPoints; --extern vector endPoints; -+extern std::vector fragments; -+extern std::vector startPoints; -+extern std::vector endPoints; - extern Name allNames; - - bool PointCompare(const Point &f1, const Point &f2) { -@@ -223,8 +223,8 @@ - startPoints.push_back(startPoint); - endPoints.push_back(endPoint); - } -- sort(startPoints.begin(), startPoints.end(), PointCompare); -- sort(endPoints.begin(), endPoints.end(), PointCompare); -+ std::sort(startPoints.begin(), startPoints.end(), PointCompare); -+ std::sort(endPoints.begin(), endPoints.end(), PointCompare); - } - - ---- a/src/glocal/leftinfluence.cpp -+++ b/src/glocal/leftinfluence.cpp -@@ -154,8 +154,8 @@ - - if (second->score == -1) { return TRUE; } - -- dummy.seq1Start = max(first->seq1End, second->seq1End) + 2; -- dummy.seq2Start = max(first->getSeq2End(LeftInfluence->reflectFlag), second->getSeq2End(LeftInfluence->reflectFlag)) + 1; -+ dummy.seq1Start = std::max(first->seq1End, second->seq1End) + 2; -+ dummy.seq2Start = std::max(first->getSeq2End(LeftInfluence->reflectFlag), second->getSeq2End(LeftInfluence->reflectFlag)) + 1; - - if (first->getSeq2End(LeftInfluence->reflectFlag) > second->getSeq2End(LeftInfluence->reflectFlag)) { - dummy.nameIter = first->nameIter; -@@ -444,7 +444,7 @@ - temp.seq1 = col - diag; - temp.seq2 = col; - -- pair pairp(temp, LeftInfluence); -+ std::pair pairp(temp, LeftInfluence); - tempinter = inter.insert(pairp); - - colInter->second = tempinter; ---- a/src/glocal/leftinfluence.h -+++ b/src/glocal/leftinfluence.h -@@ -39,15 +39,15 @@ - - - --typedef list Owner; --typedef map CBound; -+typedef std::list Owner; -+typedef std::map CBound; - --typedef multimap InterPoint; -+typedef std::multimap InterPoint; - --typedef map CInter; --typedef map DBound; -+typedef std::map CInter; -+typedef std::map DBound; - --typedef map DInter; -+typedef std::map DInter; - - - ---- a/src/glocal/rightinfluence.h -+++ b/src/glocal/rightinfluence.h -@@ -17,7 +17,7 @@ - }; - - --typedef map Active; -+typedef std::map Active; - - typedef struct RI { - //List of active regions ---- a/src/glocal/score.cpp -+++ b/src/glocal/score.cpp -@@ -4,7 +4,7 @@ - #include - #include - --extern vector scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; -+extern std::vector scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; - - - float Score::getScore(Fragment *up, Fragment * down) { -@@ -36,7 +36,7 @@ - - - void initScoreFunctionPointers(char * scoreFileName) { -- ifstream SFP; -+ std::ifstream SFP; - char line[255]; - - SFP.open(scoreFileName); ---- a/src/glocal/structs.h -+++ b/src/glocal/structs.h -@@ -12,7 +12,6 @@ - #include - #include - --using namespace std; - - #define RIGHT 0 - #define LEFT 1 -@@ -49,7 +48,7 @@ - }; - - --typedef map Name; -+typedef std::map Name; - - - typedef struct Fragment { ---- a/src/lagan2mfa.cpp -+++ b/src/lagan2mfa.cpp -@@ -6,7 +6,6 @@ - #include - #include - --using namespace std; - - // TODO refactor in classes and normal make project - ---- a/src/makecons.cpp -+++ b/src/makecons.cpp -@@ -18,7 +18,6 @@ - #include - #include - --using namespace std; - - #define fastaRowLength 50 - #define bufSize 2000 ---- a/src/utils/Glue.cpp -+++ b/src/utils/Glue.cpp -@@ -170,7 +170,7 @@ - } - - void printCoordinates (int seq, int begin, int end){ -- cout << seqs[seq].getID() << ":" << getSeqCoord(seq, begin) << "-" << getSeqCoord(seq, end) << " "; -+ std::cout << seqs[seq].getID() << ":" << getSeqCoord(seq, begin) << "-" << getSeqCoord(seq, end) << " "; - } - - int printRegion (int begin, int end){ -@@ -183,7 +183,7 @@ - score += rescoreRegion (seqs[i], seqs[j], begin, end); - } - } -- cout << score << endl; -+ std::cout << score << std::endl; - return score; - } - -@@ -223,7 +223,7 @@ - } - } - -- cout << "= score=" << score << endl; -+ std::cout << "= score=" << score << std::endl; - } - - int countLets (SafeVector &data){ -@@ -355,7 +355,7 @@ - FILE* outfile; - - if (argc < 2 || argc > 3){ -- cerr << "Usage: Glue align.mfa \n" << endl; -+ std::cerr << "Usage: Glue align.mfa \n" << std::endl; - exit (1); - } - -@@ -375,7 +375,7 @@ - SafeVector merged1label, merged2label; - int begin1 = 1, end1 = 1; - -- ifstream data (argv[1]); -+ std::ifstream data (argv[1]); - int alignNum = 0; - strand.push_back ('?'); // nothing for alignNum 0 - -@@ -452,7 +452,7 @@ - SafeVector temp1 (begin1 - 1, 'N'); - SafeVector temp2 (begin1 - 1, '-'); - -- for (int i = 0; i < min ((int) temp2.size(), CNTG_BRK_N); i++) -+ for (int i = 0; i < std::min ((int) temp2.size(), CNTG_BRK_N); i++) - temp2[i] = 'N'; - - merged1 = merge (temp1, merged1); -@@ -471,12 +471,12 @@ - if (isalpha(merged2[j])) pos2++; - - if (merged1label[j] == i){ -- min1 = min (min1, pos1); -- max1 = max (max1, pos1); -+ min1 = std::min (min1, pos1); -+ max1 = std::max (max1, pos1); - } - if (merged2label[j] == i){ -- min2 = min (min2, pos2); -- max2 = max (max2, pos2); -+ min2 = std::min (min2, pos2); -+ max2 = std::max (max2, pos2); - } - } - -@@ -489,6 +489,6 @@ - fprintf (outfile, "%d %d %d 0 0 0 0 %c 0 %d %d\n", i, min1, max1, strand[i], min2, max2); - } - -- printMFA (cout, merged1, string ("first"), 60); -- printMFA (cout, merged2, string ("second"), 60); -+ printMFA (std::cout, merged1, std::string ("first"), 60); -+ printMFA (std::cout, merged2, std::string ("second"), 60); - } ---- a/src/utils/MultiSequence.h -+++ b/src/utils/MultiSequence.h -@@ -12,7 +12,6 @@ - #include "Sequence.h" - #include "SafeVector.h" - --using namespace std; - - class MultiSequence { - private: -@@ -54,10 +53,10 @@ - - // Read in all of the Sequences in an MFA file and append them to the - // existing MultiSequence object. -- void addRawFromMFA (const string& filename){ -+ void addRawFromMFA (const std::string& filename){ - - // open up file for reading -- ifstream infile (filename.c_str()); -+ std::ifstream infile (filename.c_str()); - - // check for error - assert (!infile.fail()); -@@ -75,7 +74,7 @@ - - // Read in all of the Sequences in an MFA file and append them to the - // existing MultiSequence object. -- void addRawFromMFA (ifstream &infile){ -+ void addRawFromMFA (std::ifstream &infile){ - - // check for error - assert (!infile.fail()); -@@ -89,7 +88,7 @@ - } - - // Writes sequences to outfile in XMFA format. -- void writeToXMFA (ostream &outfile, int numColumns) const { -+ void writeToXMFA (std::ostream &outfile, int numColumns) const { - for (int i = 0; i < (int) sequences.size(); ++i){ - sequences[i].writeToXMFA (outfile, numColumns); - } ---- a/src/utils/Output.h -+++ b/src/utils/Output.h -@@ -2,18 +2,18 @@ - #define OUTPUT_H - - // print reversed string in MFA format --void printMFA (ostream &outfile, SafeVector &data, string comment, int numColumns){ -+void printMFA (std::ostream &outfile, SafeVector &data, std::string comment, int numColumns){ - - int charsWritten = 0; - -- outfile << ">" << comment << endl; -+ outfile << ">" << comment << std::endl; - for (int i = 0; i < (int) data.size(); i++){ - outfile << data[i]; - charsWritten++; -- if (charsWritten % numColumns == 0) outfile << endl; -+ if (charsWritten % numColumns == 0) outfile << std::endl; - } - -- if (charsWritten % numColumns != 0) outfile << endl; -+ if (charsWritten % numColumns != 0) outfile << std::endl; - } - - ---- a/src/utils/SafeVector.h -+++ b/src/utils/SafeVector.h -@@ -10,7 +10,6 @@ - #include - #include - --using namespace std; - - // class derived from the STL std::vector - template -@@ -19,9 +18,9 @@ - - // miscellaneous constructors - SafeVector () {} -- SafeVector (size_t size) : vector(size) {} -- SafeVector (size_t size, const TYPE &value) : vector(size, value) {} -- SafeVector (const SafeVector &source) : vector(source) {} -+ SafeVector (size_t size) : std::vector(size) {} -+ SafeVector (size_t size, const TYPE &value) : std::vector(size, value) {} -+ SafeVector (const SafeVector &source) : std::vector(source) {} - - #ifdef ENABLE_CHECKS - ---- a/src/utils/Sequence.h -+++ b/src/utils/Sequence.h -@@ -8,15 +8,14 @@ - #include - #include "SafeVector.h" - --using namespace std; - - class Sequence { - - private: - - // Read header of MFA/XMFA file. -- bool readHeader (ifstream &infile, bool &isXMFA){ -- string header; -+ bool readHeader (std::ifstream &infile, bool &isXMFA){ -+ std::string header; - - while (true){ - -@@ -24,7 +23,7 @@ - if (infile.fail() || infile.eof()) return false; - - // get new header line -- getline (infile, header); -+ std::getline (infile, header); - - // check that header line is not empty - if (header.length() != 0) break; -@@ -64,7 +63,7 @@ - int startCoord; // sequence position of first character - int endCoord; // sequence position of last character - char direction; // + or - -- string comment; // comments -+ std::string comment; // comments - - public: - -@@ -77,7 +76,7 @@ - } - - // Constructor. Reads in a sequence from the input file. -- Sequence (ifstream &infile){ -+ Sequence (std::ifstream &infile){ - - bool isXMFA = true; - -@@ -147,7 +146,7 @@ - } - - // Constructor. Gets sequence from array data. -- Sequence (SafeVector data, string comment) : data(data), comment(comment) { -+ Sequence (SafeVector data, std::string comment) : data(data), comment(comment) { - length = data.size() - 1; - id = 0; - startCoord = 1; -@@ -165,7 +164,7 @@ - return temp; - } - -- const string getComment () const { -+ const std::string getComment () const { - return comment; - } - -@@ -197,9 +196,9 @@ - const int getEndCoord () const { assert (isValid); return endCoord; } - - // Print XMFA header only. -- void writeXMFAHeader (ostream &outfile) const { -+ void writeXMFAHeader (std::ostream &outfile) const { - assert (isValid); -- outfile << '>' << id << ':' << startCoord << '-' << endCoord << ' ' << direction << ' ' << comment << endl; -+ outfile << '>' << id << ':' << startCoord << '-' << endCoord << ' ' << direction << ' ' << comment << std::endl; - } - - // Return sequence ID. -@@ -209,20 +208,20 @@ - void setID (int id) { assert (isValid); this->id = id; } - - // Writes sequence to XMFA format. -- void writeToXMFA (ostream &outfile, int numColumns) const { -+ void writeToXMFA (std::ostream &outfile, int numColumns) const { - - assert (isValid); - - // print XMFA header -- outfile << ">" << comment << endl; -+ outfile << ">" << comment << std::endl; - // outfile << '>' << id << ':' << startCoord << '-' << endCoord << ' ' << direction << ' ' << comment << endl; - - // print character data - for (int i = 1; i <= length; ++i){ - outfile << data[i]; -- if (i % numColumns == 0) outfile << endl; -+ if (i % numColumns == 0) outfile << std::endl; - } -- if (length % numColumns != 0) outfile << endl; -+ if (length % numColumns != 0) outfile << std::endl; - } - }; - diff --git a/sci-biology/lagan/files/lagan-2.0-flags.patch b/sci-biology/lagan/files/lagan-2.0-flags.patch deleted file mode 100644 index e324ef64c4c6..000000000000 --- a/sci-biology/lagan/files/lagan-2.0-flags.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff --git a/Makefile b/Makefile -index fbbbe79..a1d449b 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,5 +1,5 @@ - all: -- (cd src; $(MAKE)) -+ $(MAKE) -C src - clean: - rm -f chaos anchors order glocal utils/bin2bl mlagan utils/cstat utils/bin2mf utils/rc *~ utils/contigorder utils/getbounds utils/cextract utils/seqmerge utils/getlength utils/getoverlap utils/*~ utils/scorealign utils/scorecontigs mlagan.purify utils/getcontigpos utils/fa2xfa utils/Glue utils/dotplot utils/overlay - (cd src; $(MAKE) clean) -diff --git a/src/Makefile b/src/Makefile -index 7f6b6fd..dd6309b 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -4,51 +4,51 @@ CFLAGS = -O3 # -Wall -W - TRGT_DIR = .. - - all: ../anchors ../chaos ../order ../mlagan ../prolagan ../utils/bin2mf ../utils/bin2bl ../utils/cextract ../utils/cstat ../utils/contigorder ../utils/getbounds ../utils/getlength ../utils/getoverlap ../utils/rc ../utils/seqmerge ../utils/scorealign ../utils/scorecontigs ../utils/getcontigpos ../utils/fa2xfa ../utils/Glue ../utils/dotplot ../utils/overlay -- (cd glocal; $(MAKE)) -+ $(MAKE) -C glocal - clean: - rm -f *.o *~ utils/*~ mlagan.purify core - (cd glocal; $(MAKE) clean) - ../anchors: anchors.c skiplist.c -- $(CC) -o $(TRGT_DIR)/anchors anchors.c skiplist.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/anchors anchors.c skiplist.c - ../chaos: fchaos.c thrtrie.c skiplist.c global.c translate.c mempage.c filebuffer.c -- $(CC) -o $(TRGT_DIR)/chaos fchaos.c thrtrie.c skiplist.c global.c translate.c filebuffer.c -lm -DCHAOS__FLAG -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/chaos fchaos.c thrtrie.c skiplist.c global.c translate.c filebuffer.c -lm -DCHAOS__FLAG - ../order: order.c diagmatrix.c filebuffer.c -- $(CC) -o $(TRGT_DIR)/order order.c diagmatrix.c filebuffer.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/order order.c diagmatrix.c filebuffer.c - ../mlagan: mlagan.c diagmatrix.c multial.c skiplist.c filebuffer.c -- $(CC) -o $(TRGT_DIR)/mlagan mlagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/mlagan mlagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG - ../prolagan: prolagan.c diagmatrix.c multial.c skiplist.c filebuffer.c -- $(CC) -o $(TRGT_DIR)/prolagan prolagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/prolagan prolagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG - ../utils/bin2mf: utils/bin2mf.c -- $(CC) -o $(TRGT_DIR)/utils/bin2mf utils/bin2mf.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/bin2mf utils/bin2mf.c - ../utils/bin2bl: utils/bin2bl.c -- $(CC) -o $(TRGT_DIR)/utils/bin2bl utils/bin2bl.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/bin2bl utils/bin2bl.c - ../utils/cextract: utils/cextract.c -- $(CC) -o $(TRGT_DIR)/utils/cextract utils/cextract.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/cextract utils/cextract.c - ../utils/cstat: utils/cstat.c -- $(CC) -o $(TRGT_DIR)/utils/cstat utils/cstat.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/cstat utils/cstat.c - ../utils/contigorder: utils/contigorder.c -- $(CC) -o $(TRGT_DIR)/utils/contigorder utils/contigorder.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/contigorder utils/contigorder.c - ../utils/getbounds: utils/getbounds.c -- $(CC) -o $(TRGT_DIR)/utils/getbounds utils/getbounds.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getbounds utils/getbounds.c - ../utils/getcontigpos: utils/getcontigpos.c -- $(CC) -o $(TRGT_DIR)/utils/getcontigpos utils/getcontigpos.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getcontigpos utils/getcontigpos.c - ../utils/getlength: utils/getlength.c -- $(CC) -o $(TRGT_DIR)/utils/getlength utils/getlength.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getlength utils/getlength.c - ../utils/getoverlap: utils/getoverlap.c -- $(CC) -o $(TRGT_DIR)/utils/getoverlap utils/getoverlap.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getoverlap utils/getoverlap.c - ../utils/rc: utils/rc.c -- $(CC) -o $(TRGT_DIR)/utils/rc utils/rc.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/rc utils/rc.c - ../utils/seqmerge: utils/seqmerge.c -- $(CC) -o $(TRGT_DIR)/utils/seqmerge utils/seqmerge.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/seqmerge utils/seqmerge.c - ../utils/scorealign: utils/scorealign.c -- $(CC) -o $(TRGT_DIR)/utils/scorealign utils/scorealign.c -lm -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/scorealign utils/scorealign.c -lm - ../utils/scorecontigs: utils/scorecontigs.c -- $(CC) -o $(TRGT_DIR)/utils/scorecontigs utils/scorecontigs.c -lm -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/scorecontigs utils/scorecontigs.c -lm - ../utils/fa2xfa: utils/fa2xfa.c -- $(CC) -o $(TRGT_DIR)/utils/fa2xfa utils/fa2xfa.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/fa2xfa utils/fa2xfa.c - ../utils/overlay: utils/overlay.c -- $(CC) -o $(TRGT_DIR)/utils/overlay utils/overlay.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/overlay utils/overlay.c - ../utils/Glue: utils/Glue.cpp -- $(CPP) -o $(TRGT_DIR)/utils/Glue utils/Glue.cpp -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/Glue utils/Glue.cpp - ../utils/dotplot: utils/dotplot.cpp -- $(CPP) -o $(TRGT_DIR)/utils/dotplot utils/dotplot.cpp -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/dotplot utils/dotplot.cpp -diff --git a/src/glocal/Makefile b/src/glocal/Makefile -index ce1421a..b82507f 100755 ---- a/src/glocal/Makefile -+++ b/src/glocal/Makefile -@@ -10,10 +10,10 @@ TRGT = glocal - OBJECTS = glocal.o io.o rightinfluence.o leftinfluence.o score.o - - .cpp.o: -- $(CC) -Wno-deprecated $(CFLAGS) $(INCDIR) -c $*.cpp -+ $(CXX) $(CXXFLAGS) $(INCDIR) -c $*.cpp - - $(TRGT): $(OBJECTS) -- $(CLINKER) $(OPTFLAGS) $(OBJECTS) -o $(TRGT_DIR)/$(TRGT) $(MLIB) -+ $(CXX) $(LDFLAGS) $(OBJECTS) -o $(TRGT_DIR)/$(TRGT) $(MLIB) - - clean : - rm -f *.o ./*~ *~ core diff --git a/sci-biology/lagan/files/lagan-2.0-gcc-10.patch b/sci-biology/lagan/files/lagan-2.0-gcc-10.patch new file mode 100644 index 000000000000..bd9824cf2ed0 --- /dev/null +++ b/sci-biology/lagan/files/lagan-2.0-gcc-10.patch @@ -0,0 +1,27 @@ +Description: Add patch to build with GCC-10 +Bug-Debian: https://bugs.debian.org/957415 +Author: Nilesh Patra +Date: Fri Apr 17 21:13:21 2020 +0530 + +--- a/src/fchaos.c ++++ b/src/fchaos.c +@@ -29,7 +29,7 @@ + int offset; + } match; + +-extern int indeces[256]; ++int indeces[256]; + + + void remElem(LList* tbf, int i); +--- a/src/thrtrie.h ++++ b/src/thrtrie.h +@@ -2,7 +2,7 @@ + #define MAX_DEGEN 2 + + +-int indeces[256]; ++extern int indeces[256]; + + typedef struct PrevHits { + int* inds1; diff --git a/sci-biology/lagan/files/lagan-2.0-gcc-4.8.patch b/sci-biology/lagan/files/lagan-2.0-gcc-4.8.patch new file mode 100644 index 000000000000..3d7ed780445f --- /dev/null +++ b/sci-biology/lagan/files/lagan-2.0-gcc-4.8.patch @@ -0,0 +1,25 @@ +Author: Andreas Tille +LastChanged: Fri, 15 Nov 2013 10:31:20 +0100 +Description: Fix some includes to build using gcc-4.8 + +--- a/src/utils/Glue.cpp ++++ b/src/utils/Glue.cpp +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #define NUCLEOTIDE_MATRIX_FILE "nucmatrix.txt" + #define MAX_LINE_LENGTH 1024 +--- a/src/glocal/score.cpp ++++ b/src/glocal/score.cpp +@@ -2,7 +2,7 @@ + #include + #include + #include +-#include ++#include + + extern vector scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; + diff --git a/sci-biology/lagan/files/lagan-2.0-gcc-9.patch b/sci-biology/lagan/files/lagan-2.0-gcc-9.patch new file mode 100644 index 000000000000..6ea30e57a854 --- /dev/null +++ b/sci-biology/lagan/files/lagan-2.0-gcc-9.patch @@ -0,0 +1,25 @@ +# Two patches to bring lagan up to speed with gcc-9 +Index: lagan/src/fchaos.c +=================================================================== +--- lagan.orig/src/fchaos.c ++++ lagan/src/fchaos.c +@@ -430,7 +430,7 @@ int chain(LList* second, int off2, LList + int tc =0; + int wc = 0; + +-inline void findPrev(LList* curr, int position, int offset, float baseval) { ++void findPrev(LList* curr, int position, int offset, float baseval) { + int j,k; + LList* temp; + sle* iterator; +Index: lagan/src/filebuffer.c +=================================================================== +--- lagan.orig/src/filebuffer.c ++++ lagan/src/filebuffer.c +@@ -1,5 +1,6 @@ + #include "filebuffer.h" + #include ++#include + #include + #include + #include diff --git a/sci-biology/lagan/files/lagan-2.0-gcc4.3.patch b/sci-biology/lagan/files/lagan-2.0-gcc4.3.patch deleted file mode 100644 index a4b1d6808e2f..000000000000 --- a/sci-biology/lagan/files/lagan-2.0-gcc4.3.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -durr lagan20-orig/src/glocal/score.cpp lagan20/src/glocal/score.cpp ---- lagan20-orig/src/glocal/score.cpp 2009-02-04 15:25:57.698333297 +0000 -+++ lagan20/src/glocal/score.cpp 2009-02-04 15:27:23.894092890 +0000 -@@ -2,7 +2,7 @@ - #include - #include - #include --#include -+#include - - extern vector scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)]; - -diff -durr lagan20-orig/src/utils/Glue.cpp lagan20/src/utils/Glue.cpp ---- lagan20-orig/src/utils/Glue.cpp 2009-02-04 15:25:57.702333182 +0000 -+++ lagan20/src/utils/Glue.cpp 2009-02-04 15:27:04.190822654 +0000 -@@ -1,6 +1,7 @@ - #include "MultiSequence.h" - #include "SafeVector.h" - #include "Output.h" -+#include - #include - #include - #include diff --git a/sci-biology/lagan/files/lagan-2.0-makefile.patch b/sci-biology/lagan/files/lagan-2.0-makefile.patch new file mode 100644 index 000000000000..1bef6721ab9b --- /dev/null +++ b/sci-biology/lagan/files/lagan-2.0-makefile.patch @@ -0,0 +1,120 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,8 @@ + all: +- (cd src; $(MAKE)) ++ $(MAKE) -C src + clean: + rm -f chaos anchors order glocal utils/bin2bl mlagan utils/cstat utils/bin2mf utils/rc *~ utils/contigorder utils/getbounds utils/cextract utils/seqmerge utils/getlength utils/getoverlap utils/*~ utils/scorealign utils/scorecontigs mlagan.purify utils/getcontigpos utils/fa2xfa utils/Glue utils/dotplot utils/overlay +- (cd src; $(MAKE) clean) ++ $(MAKE) -C src clean ++ ++check: all ++ (LAGAN_DIR="." ./mlagan -h || true) | grep -q version && echo "[ok]" || echo "[fail]" +--- a/src/glocal/Makefile ++++ b/src/glocal/Makefile +@@ -1,19 +1,13 @@ +-CC = g++ +-OPTFLAGS = +-CFLAGS = $(OPTFLAGS) -O3 +-CLINKER = g++ +-# LIBDIR = -L/usr/local/lib ++CXXFLAGS += -Wno-deprecated ++CPPFLAGS += -I./ ++ + MLIB = -lm +-INCDIR = -I./ + TRGT_DIR = ../.. + TRGT = glocal + OBJECTS = glocal.o io.o rightinfluence.o leftinfluence.o score.o + +-.cpp.o: +- $(CC) -Wno-deprecated $(CFLAGS) $(INCDIR) -c $*.cpp +- + $(TRGT): $(OBJECTS) +- $(CLINKER) $(OPTFLAGS) $(OBJECTS) -o $(TRGT_DIR)/$(TRGT) $(MLIB) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $(TRGT_DIR)/$(TRGT) $(MLIB) + + clean : + rm -f *.o ./*~ *~ core +--- a/src/Makefile ++++ b/src/Makefile +@@ -1,54 +1,51 @@ +-CC = gcc $(CFLAGS) +-CPP = g++ $(CFLAGS) +-CFLAGS = -O3 # -Wall -W + TRGT_DIR = .. + + all: ../anchors ../chaos ../order ../mlagan ../prolagan ../utils/bin2mf ../utils/bin2bl ../utils/cextract ../utils/cstat ../utils/contigorder ../utils/getbounds ../utils/getlength ../utils/getoverlap ../utils/rc ../utils/seqmerge ../utils/scorealign ../utils/scorecontigs ../utils/getcontigpos ../utils/fa2xfa ../utils/Glue ../utils/dotplot ../utils/overlay +- (cd glocal; $(MAKE)) ++ (cd glocal && $(MAKE)) + clean: + rm -f *.o *~ utils/*~ mlagan.purify core +- (cd glocal; $(MAKE) clean) ++ (cd glocal && $(MAKE) clean) + ../anchors: anchors.c skiplist.c +- $(CC) -o $(TRGT_DIR)/anchors anchors.c skiplist.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/anchors anchors.c skiplist.c + ../chaos: fchaos.c thrtrie.c skiplist.c global.c translate.c mempage.c filebuffer.c +- $(CC) -o $(TRGT_DIR)/chaos fchaos.c thrtrie.c skiplist.c global.c translate.c filebuffer.c -lm -DCHAOS__FLAG ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/chaos fchaos.c thrtrie.c skiplist.c global.c translate.c filebuffer.c -lm -DCHAOS__FLAG + ../order: order.c diagmatrix.c filebuffer.c +- $(CC) -o $(TRGT_DIR)/order order.c diagmatrix.c filebuffer.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/order order.c diagmatrix.c filebuffer.c + ../mlagan: mlagan.c diagmatrix.c multial.c skiplist.c filebuffer.c +- $(CC) -o $(TRGT_DIR)/mlagan mlagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/mlagan mlagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG + ../prolagan: prolagan.c diagmatrix.c multial.c skiplist.c filebuffer.c +- $(CC) -o $(TRGT_DIR)/prolagan prolagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/prolagan prolagan.c multial.c diagmatrix.c skiplist.c filebuffer.c -lm -DMULTIAL__FLAG + ../utils/bin2mf: utils/bin2mf.c +- $(CC) -o $(TRGT_DIR)/utils/bin2mf utils/bin2mf.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/bin2mf utils/bin2mf.c + ../utils/bin2bl: utils/bin2bl.c +- $(CC) -o $(TRGT_DIR)/utils/bin2bl utils/bin2bl.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/bin2bl utils/bin2bl.c + ../utils/cextract: utils/cextract.c +- $(CC) -o $(TRGT_DIR)/utils/cextract utils/cextract.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/cextract utils/cextract.c + ../utils/cstat: utils/cstat.c +- $(CC) -o $(TRGT_DIR)/utils/cstat utils/cstat.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/cstat utils/cstat.c + ../utils/contigorder: utils/contigorder.c +- $(CC) -o $(TRGT_DIR)/utils/contigorder utils/contigorder.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/contigorder utils/contigorder.c + ../utils/getbounds: utils/getbounds.c +- $(CC) -o $(TRGT_DIR)/utils/getbounds utils/getbounds.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getbounds utils/getbounds.c + ../utils/getcontigpos: utils/getcontigpos.c +- $(CC) -o $(TRGT_DIR)/utils/getcontigpos utils/getcontigpos.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getcontigpos utils/getcontigpos.c + ../utils/getlength: utils/getlength.c +- $(CC) -o $(TRGT_DIR)/utils/getlength utils/getlength.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getlength utils/getlength.c + ../utils/getoverlap: utils/getoverlap.c +- $(CC) -o $(TRGT_DIR)/utils/getoverlap utils/getoverlap.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/getoverlap utils/getoverlap.c + ../utils/rc: utils/rc.c +- $(CC) -o $(TRGT_DIR)/utils/rc utils/rc.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/rc utils/rc.c + ../utils/seqmerge: utils/seqmerge.c +- $(CC) -o $(TRGT_DIR)/utils/seqmerge utils/seqmerge.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/seqmerge utils/seqmerge.c + ../utils/scorealign: utils/scorealign.c +- $(CC) -o $(TRGT_DIR)/utils/scorealign utils/scorealign.c -lm ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/scorealign utils/scorealign.c -lm + ../utils/scorecontigs: utils/scorecontigs.c +- $(CC) -o $(TRGT_DIR)/utils/scorecontigs utils/scorecontigs.c -lm ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/scorecontigs utils/scorecontigs.c -lm + ../utils/fa2xfa: utils/fa2xfa.c +- $(CC) -o $(TRGT_DIR)/utils/fa2xfa utils/fa2xfa.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/fa2xfa utils/fa2xfa.c + ../utils/overlay: utils/overlay.c +- $(CC) -o $(TRGT_DIR)/utils/overlay utils/overlay.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/overlay utils/overlay.c + ../utils/Glue: utils/Glue.cpp +- $(CPP) -o $(TRGT_DIR)/utils/Glue utils/Glue.cpp ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/Glue utils/Glue.cpp + ../utils/dotplot: utils/dotplot.cpp +- $(CPP) -o $(TRGT_DIR)/utils/dotplot utils/dotplot.cpp ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TRGT_DIR)/utils/dotplot utils/dotplot.cpp diff --git a/sci-biology/lagan/files/lagan-2.0-qa-implicit-declarations.patch b/sci-biology/lagan/files/lagan-2.0-qa-implicit-declarations.patch index 4ba4ce49d770..29db043d5f34 100644 --- a/sci-biology/lagan/files/lagan-2.0-qa-implicit-declarations.patch +++ b/sci-biology/lagan/files/lagan-2.0-qa-implicit-declarations.patch @@ -1,69 +1,34 @@ -Fix QA warnings due to implicit declarations: -* filebuffer.c:123:34: warning: implicit declaration of function ‘toupper’ [-Wimplicit-function-declaration] -* temp[i] = (strchr (alphabet, toupper ((char) i)) != 0) ? - ---- a/src/filebuffer.c -+++ b/src/filebuffer.c -@@ -3,6 +3,7 @@ - #include - #include - #include -+#include - - #ifdef CHAOS__FLAG - char* alphabet = "ATCGNPCMHDEKRQSILVFYWX*"; --- a/src/mlagan.c +++ b/src/mlagan.c -@@ -934,6 +934,7 @@ - return k; +@@ -46,6 +46,7 @@ + return 1; } +int printXMFAAlign(FILE* outfile, align* myalign); - int main(int argc, char** argv) { - FileBuffer seqfile; + void usage(void) { + printf("mlagan seqfile_1 seqfile_2 [... seqfile_%d] [-parameters]\n\n", --- a/src/order.c +++ b/src/order.c -@@ -398,6 +398,9 @@ - free(ends); - } +@@ -28,6 +28,8 @@ + + align* makeAlign(dmat* mydm, char* seq1, char* seq2); +int printMFAAlign(char* seq1, char* seq2, align* myalign, char* n1, char* n2); +int printXMFAAlign(char* seq1, char* seq2, align* myalign, char* n1, char* n2); -+ - void doAlign(dmat* mydm, seq* seq1, seq* seq2) { - align *a = (align*) makeAlign(mydm, seq1->lets, seq2->lets); - // printf("into printing\n"); + + char* alpha = "ATCGN."; + --- a/src/prolagan.c +++ b/src/prolagan.c -@@ -949,6 +949,7 @@ - return k; +@@ -49,6 +49,7 @@ + return 1; } +int printXMFAAlign(FILE* outfile, align* myalign); - int main(int argc, char** argv) { - FileBuffer seqfile; ---- a/src/utils/contigorder.c -+++ b/src/utils/contigorder.c -@@ -12,7 +12,7 @@ - int dummy, i; - - if (!(file = fopen (filename, "r"))){ -- fprintf (stderr, "contigorder: Error opening file: %s\n"); -+ fprintf (stderr, "contigorder: Error opening file: %s\n", filename); - exit (1); - } - -@@ -49,7 +49,7 @@ - } - - if (!(file = fopen (filename, "r"))){ -- fprintf (stderr, "contigorder: Error opening file: %s\n"); -+ fprintf (stderr, "contigorder: Error opening file: %s\n", filename); - exit (1); - } - + void usage(void) { + printf("mlagan seqfile_1 seqfile_2 [... seqfile_%d] [-parameters]\n\n", --- a/src/utils/cstat.c +++ b/src/utils/cstat.c @@ -3,6 +3,7 @@ diff --git a/sci-biology/lagan/lagan-2.0-r3.ebuild b/sci-biology/lagan/lagan-2.0-r3.ebuild deleted file mode 100644 index e326331e09fb..000000000000 --- a/sci-biology/lagan/lagan-2.0-r3.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -MY_P="lagan20" - -DESCRIPTION="The LAGAN suite of tools for whole-genome multiple alignment of genomic DNA" -HOMEPAGE="http://lagan.stanford.edu/lagan_web/index.shtml" -SRC_URI="http://lagan.stanford.edu/lagan_web/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -IUSE="" -KEYWORDS="~amd64 ~x86" - -RDEPEND="dev-lang/perl" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}/${PN}-2.0-flags.patch" - "${FILESDIR}/${PN}-2.0-gcc4.3.patch" - "${FILESDIR}/${PN}-2.0-fix-c++14.patch" - "${FILESDIR}/${PN}-2.0-qa-implicit-declarations.patch" -) - -src_prepare() { - sed -i "/use Getopt::Long;/ i use lib \"/usr/$(get_libdir)/${PN}/lib\";" "${S}/supermap.pl" || die - # NB: Testing with glibc-2.10 has uncovered a bug in src/utils/Sequence.h - # where libc getline is erroneously used instead of own getline - sed -i 's/getline/my_getline/' "${S}"/src/{anchors.c,glocal/io.cpp} || die - - default -} - -src_compile() { - emake \ - CC=$(tc-getCC) \ - CXX=$(tc-getCXX) \ - CXXFLAGS="${CXXFLAGS}" \ - CFLAGS="${CFLAGS}" -} - -src_install() { - newbin lagan.pl lagan - newbin slagan.pl slagan - dobin mlagan - rm -f lagan.pl slagan.pl utils/Utils.pm || die - - insinto /usr/$(get_libdir)/${PN}/lib - doins Utils.pm - - exeinto /usr/$(get_libdir)/${PN}/utils - doexe utils/* - - exeinto /usr/$(get_libdir)/${PN} - doexe *.pl anchors chaos glocal order prolagan - - insinto /usr/$(get_libdir)/${PN} - doins *.txt - - dosym /usr/$(get_libdir)/${PN}/supermap.pl /usr/bin/supermap - - echo "LAGAN_DIR=\"/usr/$(get_libdir)/${PN}\"" > 99${PN} || die - doenvd 99${PN} - - dodoc Readmes/README.* -} diff --git a/sci-biology/lagan/lagan-2.0-r4.ebuild b/sci-biology/lagan/lagan-2.0-r4.ebuild new file mode 100644 index 000000000000..4582d8f1078e --- /dev/null +++ b/sci-biology/lagan/lagan-2.0-r4.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +MY_P="lagan20" + +DESCRIPTION="The LAGAN suite of tools for whole-genome multiple alignment of genomic DNA" +HOMEPAGE="http://lagan.stanford.edu/lagan_web/index.shtml" +SRC_URI="http://lagan.stanford.edu/lagan_web/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="dev-lang/perl" + +S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-conflicting-getline.patch + "${FILESDIR}"/${P}-gcc-4.8.patch + "${FILESDIR}"/${P}-ambiguous-end.patch + "${FILESDIR}"/${P}-gcc-9.patch + "${FILESDIR}"/${P}-gcc-10.patch + "${FILESDIR}"/${P}-C99-static-inline.patch + "${FILESDIR}"/${P}-qa-implicit-declarations.patch +) + +src_prepare() { + default + sed -i "/use Getopt::Long;/ i use lib \"/usr/$(get_libdir)/lagan/lib\";" \ + supermap.pl || die +} + +src_configure() { + tc-export CC CXX +} + +src_install() { + newbin lagan.pl lagan + newbin slagan.pl slagan + dobin mlagan + rm lagan.pl slagan.pl utils/Utils.pm || die + + insinto /usr/$(get_libdir)/lagan/lib + doins Utils.pm + + exeinto /usr/$(get_libdir)/lagan/utils + doexe utils/* + + exeinto /usr/$(get_libdir)/lagan + doexe *.pl anchors chaos glocal order prolagan + + insinto /usr/$(get_libdir)/lagan + doins *.txt + + dosym ../$(get_libdir)/lagan/supermap.pl /usr/bin/supermap + + newenvd - 99lagan <<- _EOF_ + LAGAN_DIR="${EPREFIX}/usr/$(get_libdir)/lagan" + _EOF_ + + dodoc Readmes/README.* +} -- cgit v1.2.3