+++ /dev/null
-diff -u MUSTANG_v.3.orig/src/ew_2.cpp MUSTANG_v.3/src/ew_2.cpp
---- MUSTANG_v.3.orig/src/ew_2.cpp 2008-01-15 11:18:34.000000000 -0700
-+++ MUSTANG_v.3/src/ew_2.cpp 2008-12-09 10:47:22.000000000 -0700
-@@ -36,6 +36,7 @@
- using std::ifstream;
-
- #include<math.h>
-+#include <cstdlib>
- #include "macros.h"
- #include "globals.h"
- #include "ew.h"
-diff -u MUSTANG_v.3.orig/src/multiple_superposition.cpp MUSTANG_v.3/src/multiple_superposition.cpp
---- MUSTANG_v.3.orig/src/multiple_superposition.cpp 2008-01-15 11:18:34.000000000 -0700
-+++ MUSTANG_v.3/src/multiple_superposition.cpp 2008-12-09 10:49:00.000000000 -0700
-@@ -51,6 +51,7 @@
- #include "alloc_routines.h"
- #include "de_alloc_routines.h"
- #include <cmath>
-+#include <cstdlib>
- #define THRESH 0.0001
-
- void MOVE_TO_CENTER_OF_GRAVITY( int NSTRUC , int NRES , float ***R , float **CMs )
-diff -u MUSTANG_v.3.orig/src/multiple_superposition.h MUSTANG_v.3/src/multiple_superposition.h
---- MUSTANG_v.3.orig/src/multiple_superposition.h 2008-01-15 11:18:34.000000000 -0700
-+++ MUSTANG_v.3/src/multiple_superposition.h 2008-12-09 10:48:11.000000000 -0700
-@@ -25,3 +25,4 @@
- #define MULT_SUPERPOSE
- void M_SUPERPOSE( int , int , float***, float** , float*** ) ;
- #endif
-+#include <cstdlib>
-diff -u MUSTANG_v.3.orig/src/pdb_ripper.h MUSTANG_v.3/src/pdb_ripper.h
---- MUSTANG_v.3.orig/src/pdb_ripper.h 2008-01-15 11:18:34.000000000 -0700
-+++ MUSTANG_v.3/src/pdb_ripper.h 2008-12-09 10:46:47.000000000 -0700
-@@ -29,4 +29,5 @@
- void PARSE_ENTIRE_PDB_STRUCTURE( char * , int ) ;
-
- #endif
-+#include <cstdlib>
-
-diff -u MUSTANG_v.3.orig/src/progress_align.h MUSTANG_v.3/src/progress_align.h
---- MUSTANG_v.3.orig/src/progress_align.h 2008-01-15 11:18:34.000000000 -0700
-+++ MUSTANG_v.3/src/progress_align.h 2008-12-09 10:47:50.000000000 -0700
-@@ -25,3 +25,4 @@
- #define PROG_ALGN_H
- void PROGRESSIVE_ALIGNMENT_USING_EXTENDED_EDGE_WEIGHTS() ;
- #endif
-+#include <cstdlib>
-diff -u MUSTANG_v.3.orig/src/read_structures.h MUSTANG_v.3/src/read_structures.h
---- MUSTANG_v.3.orig/src/read_structures.h 2008-01-15 11:18:34.000000000 -0700
-+++ MUSTANG_v.3/src/read_structures.h 2008-12-09 10:46:22.000000000 -0700
-@@ -26,3 +26,4 @@
- void READ_STRUCTURES( char **paths );
- void READ_ENTIRE_PDBS( char **paths) ;
- #endif
-+#include <cstdlib>
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+MY_PN="MUSTANG"
+SRC_P="${PN}_v${PV}"
+MY_P="${MY_PN}_v${PV}"
+
+DESCRIPTION="MUltiple STructural AligNment AlGorithm"
+HOMEPAGE="http://www.csse.monash.edu.au/~karun/Site/mustang.html"
+SRC_URI="http://www.csse.monash.edu.au/~karun/${PN}/${PN}_v${PV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.2.1-gcc-4.7.patch
+ sed -e 's:3.2.1:3.2.2:g' -i Makefile || die
+}
+
+src_compile() {
+ emake \
+ CPP=$(tc-getCXX) \
+ CPPFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_test() {
+ ./bin/${P} -f ./data/test/test_zf-CCHH || die
+}
+
+src_install() {
+ newbin bin/${P} ${PN}
+ doman man/${PN}.1
+ dodoc README
+}
+
+pkg_postinst() {
+ elog "If you use this program for an academic paper, please cite:"
+ elog "Arun S. Konagurthu, James C. Whisstock, Peter J. Stuckey, and Arthur M. Lesk"
+ elog "Proteins: Structure, Function, and Bioinformatics. 64(3):559-574, Aug. 2006"
+}