DIST mafft-7.050-without-extensions-src.tgz 380375 SHA256 29ddb276bfca24f5815acc41f1e640a705bb12c9d29b7c74902ebca68cece7bc SHA512 ffddedcd03f37241b1493a62bf843eb23caa04089bd0182006aa7669f74de27204d324817e22fec1cb4ae11c4c226db5b725d03ba9f73b30a71ca3d38368d73e WHIRLPOOL d46d7d4dfe453bfb54b9e418308772fb063bffce1d6d45d92262bee45504301daff9a6e57ecde41912a6c11852bb64510fb5ba6df04c7e79dc671e7a31444d49
DIST mafft-7.215-without-extensions-src.tgz 393239 SHA256 22099e42274ef0078302d7cb87180880ee5fd64ef15fdcafd8c95d0018191408 SHA512 1a44b968e2f9ac9db5d17487163a38a7138dc784e63b3aa4082ff6a16c8e168edd09948e2cf182bc7a466802d4a07bdd7ab23386e251df13520acdfb69ebdada WHIRLPOOL de43ba4107e3c1149d5ce47085bacc996393a7ef73535777439b7024eea1dce5f28c1b3c7e518f644345b7b5ea5e70fccbcaba18f16ecb9a6f5f5c31a6b5dca4
+DIST mafft-7.305-without-extensions-src.tgz 458448 SHA256 194503ee6dc9826f5098ac0fd9283034dfee8a1be1287def437f5854dea9317e SHA512 2aa351dd9b329024f183642cd98287239d12a00a2a65937e072560cba54925bed1fab19fafc734d9a5048ff85151560193ddb0796e0d7510d921fafc4553ebb9 WHIRLPOOL 85e9cda397853692f737a4e74159e67e0303076c28d94b85d4039ffe17b72c9d852a8af85941eaaa0fd73e0f1cbdbfe5b6a68e8ad5464506fbb38969f137a1b1
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+EXTENSIONS="-without-extensions"
+
+DESCRIPTION="Multiple sequence alignments using a variety of algorithms"
+HOMEPAGE="http://mafft.cbrc.jp/alignment/software/index.html"
+SRC_URI="http://mafft.cbrc.jp/alignment/software/${P}${EXTENSIONS}-src.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="threads"
+
+S="${WORKDIR}/${P}${EXTENSIONS}"
+
+src_prepare() {
+ default
+
+ append-cflags -Wno-unused-result
+ use threads && append-cppflags -Denablemultithread
+
+ sed \
+ -e 's/(PREFIX)\/man/(PREFIX)\/share\/man/' \
+ -e 's:$(LDFLAGS)::g' \
+ -e 's:$(CC) -o $@:$(CC) $(LDFLAGS) -o $@:g' \
+ -e 's:$(CC) -shared -o $@:$(CC) $(LDFLAGS) -shared -o $@:g' \
+ -e '/INSTALL/s: -s : :g' \
+ -i core/Makefile || die
+}
+
+src_compile() {
+ cd core || die
+ emake \
+ $(usex threads ENABLE_MULTITHREAD="-Denablemultithread" ENABLE_MULTITHREAD="") \
+ PREFIX="${EPREFIX}"/usr \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+ export MAFFT_BINARIES="${S}"/core
+ cd test || die
+ bash ../core/mafft sample > test.fftns2 || die "Tests failed"
+ bash ../core/mafft --maxiterate 100 sample > test.fftnsi || die "Tests failed"
+ bash ../core/mafft --globalpair sample > test.gins1 || die "Tests failed"
+ bash ../core/mafft --globalpair --maxiterate 100 sample > test.ginsi || die "Tests failed"
+ bash ../core/mafft --localpair sample > test.lins1 || die "Tests failed"
+ bash ../core/mafft --localpair --maxiterate 100 sample > test.linsi || die "Tests failed"
+
+ diff test.fftns2 sample.fftns2 || die "Tests failed"
+ diff test.fftnsi sample.fftnsi || die "Tests failed"
+ diff test.gins1 sample.gins1 || die "Tests failed"
+ diff test.ginsi sample.ginsi || die "Tests failed"
+ diff test.lins1 sample.lins1 || die "Tests failed"
+}
+
+src_install() {
+ DOCS=( readme )
+ einstalldocs
+
+ cd core || die
+ emake PREFIX="${ED%/}/usr" install
+}