summaryrefslogtreecommitdiff
path: root/sci-biology/lagan
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-biology/lagan
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-biology/lagan')
-rw-r--r--sci-biology/lagan/Manifest9
-rw-r--r--sci-biology/lagan/files/lagan-2.0-fix-c++14.patch473
-rw-r--r--sci-biology/lagan/files/lagan-2.0-flags.patch107
-rw-r--r--sci-biology/lagan/files/lagan-2.0-gcc4.3.patch23
-rw-r--r--sci-biology/lagan/files/lagan-2.0-qa-implicit-declarations.patch96
-rw-r--r--sci-biology/lagan/lagan-2.0-r3.ebuild71
-rw-r--r--sci-biology/lagan/metadata.xml8
7 files changed, 787 insertions, 0 deletions
diff --git a/sci-biology/lagan/Manifest b/sci-biology/lagan/Manifest
new file mode 100644
index 000000000000..db4846150a7a
--- /dev/null
+++ b/sci-biology/lagan/Manifest
@@ -0,0 +1,9 @@
+AUX lagan-2.0-fix-c++14.patch 13525 SHA256 d7c7a98101911c15cdbea1b4f1ce3ace93299151e9665a7c8b0f1148427ed3b9 SHA512 f62b523cf9692a1394276ac674ccf7ce9a0070c646c95d1f20b8e0ace61afffd04aae3a098511bb106ab62089e70bebfae6ba25aaffcccbbe7f8397a30c2900a WHIRLPOOL 2332dd6fbf1831c74b1e8e863bbaa7649e2ea70872d9890cfa0cec0ad4f64c16dd0791eacf3bb52d17981920de07234c8642e85fe1df3a5e5de48f27fe719ff5
+AUX lagan-2.0-flags.patch 5848 SHA256 258c3fdcf1eddb4f2282cb45d6113d3e056f42c87442cceef24af463d0e9cf4f SHA512 63917ed217c44cade1c87dd6498cb7f6180c30eaba3875fa77f7e73b894aadab1469aca87650d1017a44fcac548552c3bdfcaff29b24023d23c7424079ad91cf WHIRLPOOL 895cc7aedc3c3504acc94796002abe8d6be36e1ab799e272d9034ed19cdb1f37f8d3481b925c63797d32ff5fbb343b7b07151fe4dbdf42a10de9632cf675b498
+AUX lagan-2.0-gcc4.3.patch 821 SHA256 e0575359288e7de97d35a7cce7b92c5619d2f75026beefc9139042280aa20a22 SHA512 91b56b0cfc27f799fed164a8a32b4840ea2e7f7796d334b2bce8bd27bc2fb96b4cdb0912c737c874f767a16ffcdd4e4623a0f80a35082aa4289882d1502cc0df WHIRLPOOL dd6cbe280e3fe69c3e1b3c1cf706cafb3521be394575481eb3595c578f2df069f8717195213abfcb6ce1f3576a8943d7f9823112052b169c24f8d03bc8e6807b
+AUX lagan-2.0-qa-implicit-declarations.patch 2371 SHA256 2fdaf4c16206300f89d447d05f06a66a77620f6aa1a402f5e2a08e28a97a0b0e SHA512 eec54cec02a5c8c875a4d64238276f116baa8f3d780573ca5143621ca62a1e96ba4045ae37d45321fc040b78216607d787c2c6c909a8264f17f99a0e07295bf5 WHIRLPOOL 63dd394b1aa076c1b0a46a9afa96033bab468370dbb7888de351168015feb0ba21124a0fef571de5b82eed3d525aa443f2e647dafda686f7faa0c9e41f180bab
+DIST lagan20.tar.gz 589115 SHA256 a65e61ed4fd6608f4e5ad5b11a1b77f4fec1a207d822c5885b3e86727496e1fe SHA512 f77217ab534df33834a725eb6e1b716f7bbffa98768a42c2294a6ab62404192e560bb05ffd41e4cdccb5b96ef9efceb8ecdc06472bbc6a301e1d11572ba29b98 WHIRLPOOL 3400b8da7dae1431f18f8aeada17161f48d8e548f79d312cf153dc9b360f1bb7103fc6ff799d798c46898d6f62928a241146e09871f1b40e93d10118ca71a553
+EBUILD lagan-2.0-r3.ebuild 1659 SHA256 8ae3f84d205c9064b40dc32a709e470457f74774d21e6ab477a659711835b97f SHA512 b5efe429851ae0a3676a6e63017ebabdcae169667d091b2e69c0c2daa401f34e0ff3b789f8bacd78376befc466bb20de8f0d80bae63c332a6c412f01794f457b WHIRLPOOL ad8741e76441265976d75e1b8a0b3c3c204b60a437cd6dfb8db65b08dcf54dd9b485142b0b44072b5b258ecbe2ea256b79a198563615d0b0212b425349aac1f7
+MISC ChangeLog 3075 SHA256 4ae47c42c216508fc7efe046bfcc256d60a2130fad10930f4fba7f9cd5445647 SHA512 ec9097994dd597f31f0c7998a3b69370d5870729c2a84366206ec2008e46b265ec3254b829bd3c7b6cc3155d899e938664bbb34dd6d95625db2ef2ca6249fbca WHIRLPOOL b3a696f08a9306ed58349b112d6764eaa4ffa0fd7016a71960670230c5d17e4ac1c3069e8f3f8669dd5920fc635f743809647a1d823017de9308218060c2b3d2
+MISC ChangeLog-2015 990 SHA256 f6053e432b2071a1b37fd0d1f99bcff716693104eb3b0194e66bdf751c786dcd SHA512 8c0583b884882009dc1c431dd44cd93ac4b8c3e8a8623255027ececa12ace992141db5ac75cd4562504131c85c0f471b208faf8a36508b92028280bd41447c31 WHIRLPOOL aacfaa6f338065282b1c37ac3dfbc67ba4a60086bb2e2e74699a63877d07c75f68daa8b32770ef114abc3c516c0fdfdd8b5fb3d615f3ff15eda718669b88c7f2
+MISC metadata.xml 267 SHA256 b3535fccca0fc8511c1245214c1a7c105447b35f21093bda132991874ce82d48 SHA512 91ab266d9ab24401bc0fec759c5b6cfcf44a3c5669fc31c7301d79770839bb5dfa0e155d949392ef06176b4a0b2c32b91b1b54b0027f972db61f0a5e54644403 WHIRLPOOL d841a2f928c50434f2e8c65f583ea3aa2d04e5cebd664b1531ab5373260f735219131991000bbb2b21aa3add05dcdce29548b78eac8d8c0eced6dc5505b64e13
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
new file mode 100644
index 000000000000..9865f2756c5a
--- /dev/null
+++ b/sci-biology/lagan/files/lagan-2.0-fix-c++14.patch
@@ -0,0 +1,473 @@
+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 <stdlib.h>
+ #include <stdio.h>
+
+-using namespace std;
+
+ #include "util.cpp"
+ #include "faindex.cpp"
+--- a/src/ancseqrest.cpp
++++ b/src/ancseqrest.cpp
+@@ -31,7 +31,6 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+
+-using namespace std;
+
+ #define fastaRowLength 50
+ typedef char* pchar;
+--- a/src/cutmfa.cpp
++++ b/src/cutmfa.cpp
+@@ -45,7 +45,6 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+
+-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<Fragment> fragments;
+-vector<Point>startPoints;
+-vector<Point>endPoints;
++std::vector<Fragment> fragments;
++std::vector<Point>startPoints;
++std::vector<Point>endPoints;
+ 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<class Score*> scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)];
++std::vector<class Score*> scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)];
+
+ Name allNames;
+
+--- a/src/glocal/io.cpp
++++ b/src/glocal/io.cpp
+@@ -3,9 +3,9 @@
+ #include<io.h>
+ #include<algorithm>
+
+-extern vector <Fragment> fragments;
+-extern vector <Point> startPoints;
+-extern vector <Point> endPoints;
++extern std::vector <Fragment> fragments;
++extern std::vector <Point> startPoints;
++extern std::vector <Point> 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<Point,LI*> pairp(temp, LeftInfluence);
++ std::pair<Point,LI*> 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<Fragment*> Owner;
+-typedef map <long long int ,Owner::iterator,longlongCompare2> CBound;
++typedef std::list<Fragment*> Owner;
++typedef std::map <long long int ,Owner::iterator,longlongCompare2> CBound;
+
+-typedef multimap <Point ,struct LI *,paircomp> InterPoint;
++typedef std::multimap <Point ,struct LI *,paircomp> InterPoint;
+
+-typedef map <long long int ,InterPoint::iterator,longlongCompare2> CInter;
+-typedef map <long long int,Owner::iterator,longlongCompare2> DBound;
++typedef std::map <long long int ,InterPoint::iterator,longlongCompare2> CInter;
++typedef std::map <long long int,Owner::iterator,longlongCompare2> DBound;
+
+-typedef map <long long int,InterPoint::iterator,longlongCompare2> DInter;
++typedef std::map <long long int,InterPoint::iterator,longlongCompare2> DInter;
+
+
+
+--- a/src/glocal/rightinfluence.h
++++ b/src/glocal/rightinfluence.h
+@@ -17,7 +17,7 @@
+ };
+
+
+-typedef map<const long long int , Fragment*,longlongCompare> Active;
++typedef std::map<const long long int , Fragment*,longlongCompare> Active;
+
+ typedef struct RI {
+ //List of active regions
+--- a/src/glocal/score.cpp
++++ b/src/glocal/score.cpp
+@@ -4,7 +4,7 @@
+ #include<rightinfluence.h>
+ #include<fstream>
+
+-extern vector<class Score*> scoreFunctions[1<<(UPSTRANDBITS+DOWNSTRANDBITS+RELPOSBITS)];
++extern std::vector<class Score*> 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 <list>
+ #include <string.h>
+
+-using namespace std;
+
+ #define RIGHT 0
+ #define LEFT 1
+@@ -49,7 +48,7 @@
+ };
+
+
+-typedef map<const char*,long long int ,ltstr> Name;
++typedef std::map<const char*,long long int ,ltstr> Name;
+
+
+ typedef struct Fragment {
+--- a/src/lagan2mfa.cpp
++++ b/src/lagan2mfa.cpp
+@@ -6,7 +6,6 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+
+-using namespace std;
+
+ // TODO refactor in classes and normal make project
+
+--- a/src/makecons.cpp
++++ b/src/makecons.cpp
+@@ -18,7 +18,6 @@
+ #include <ctype.h>
+ #include <time.h>
+
+-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<char> &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<int> 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<char> temp1 (begin1 - 1, 'N');
+ SafeVector<char> 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<char> &data, string comment, int numColumns){
++void printMFA (std::ostream &outfile, SafeVector<char> &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 <assert.h>
+ #include <vector>
+
+-using namespace std;
+
+ // class derived from the STL std::vector
+ template<class TYPE>
+@@ -19,9 +18,9 @@
+
+ // miscellaneous constructors
+ SafeVector () {}
+- SafeVector (size_t size) : vector<TYPE>(size) {}
+- SafeVector (size_t size, const TYPE &value) : vector<TYPE>(size, value) {}
+- SafeVector (const SafeVector &source) : vector<TYPE>(source) {}
++ SafeVector (size_t size) : std::vector<TYPE>(size) {}
++ SafeVector (size_t size, const TYPE &value) : std::vector<TYPE>(size, value) {}
++ SafeVector (const SafeVector &source) : std::vector<TYPE>(source) {}
+
+ #ifdef ENABLE_CHECKS
+
+--- a/src/utils/Sequence.h
++++ b/src/utils/Sequence.h
+@@ -8,15 +8,14 @@
+ #include <string>
+ #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<char> data, string comment) : data(data), comment(comment) {
++ Sequence (SafeVector<char> 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
new file mode 100644
index 000000000000..e324ef64c4c6
--- /dev/null
+++ b/sci-biology/lagan/files/lagan-2.0-flags.patch
@@ -0,0 +1,107 @@
+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-gcc4.3.patch b/sci-biology/lagan/files/lagan-2.0-gcc4.3.patch
new file mode 100644
index 000000000000..a4b1d6808e2f
--- /dev/null
+++ b/sci-biology/lagan/files/lagan-2.0-gcc4.3.patch
@@ -0,0 +1,23 @@
+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<score.h>
+ #include<leftinfluence.h>
+ #include<rightinfluence.h>
+-#include<fstream.h>
++#include<fstream>
+
+ extern vector<class Score*> 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 <string.h>
+ #include <math.h>
+ #include <assert.h>
+ #include <fstream>
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
new file mode 100644
index 000000000000..4ba4ce49d770
--- /dev/null
+++ b/sci-biology/lagan/files/lagan-2.0-qa-implicit-declarations.patch
@@ -0,0 +1,96 @@
+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 <string.h>
+ #include <stdio.h>
+ #include <assert.h>
++#include <ctype.h>
+
+ #ifdef CHAOS__FLAG
+ char* alphabet = "ATCGNPCMHDEKRQSILVFYWX*";
+--- a/src/mlagan.c
++++ b/src/mlagan.c
+@@ -934,6 +934,7 @@
+ return k;
+ }
+
++int printXMFAAlign(FILE* outfile, align* myalign);
+
+ int main(int argc, char** argv) {
+ FileBuffer seqfile;
+--- a/src/order.c
++++ b/src/order.c
+@@ -398,6 +398,9 @@
+ free(ends);
+ }
+
++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");
+--- a/src/prolagan.c
++++ b/src/prolagan.c
+@@ -949,6 +949,7 @@
+ return k;
+ }
+
++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);
+ }
+
+--- a/src/utils/cstat.c
++++ b/src/utils/cstat.c
+@@ -3,6 +3,7 @@
+ #include <string.h>
+ #include <math.h>
+ #include <assert.h>
++#include <ctype.h>
+
+ #define MAX_SEQ 31
+ #define MAX(a,b) ((a)>(b)?(a):(b))
+--- a/src/utils/overlay.c
++++ b/src/utils/overlay.c
+@@ -2,6 +2,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include <string.h>
++#include <ctype.h>
+
+ #define MAX_SEQS 63
+ #define MIN2(y,z) ((y)<(z))?(y):(z)
+--- a/src/utils/scorecontigs.c
++++ b/src/utils/scorecontigs.c
+@@ -3,6 +3,7 @@
+ #include <string.h>
+ #include <math.h>
+ #include <assert.h>
++#include <ctype.h>
+
+ #define MAX_SEQ 1024
+ #define MAX(a,b) ((a)>(b)?(a):(b))
diff --git a/sci-biology/lagan/lagan-2.0-r3.ebuild b/sci-biology/lagan/lagan-2.0-r3.ebuild
new file mode 100644
index 000000000000..e326331e09fb
--- /dev/null
+++ b/sci-biology/lagan/lagan-2.0-r3.ebuild
@@ -0,0 +1,71 @@
+# 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/metadata.xml b/sci-biology/lagan/metadata.xml
new file mode 100644
index 000000000000..959160fe46b1
--- /dev/null
+++ b/sci-biology/lagan/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-biology@gentoo.org</email>
+ <name>Gentoo Biology Project</name>
+ </maintainer>
+</pkgmetadata>