aboutsummaryrefslogtreecommitdiff
blob: b54bd6ac26281d2756373b7740756f8cdb2279fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit toolchain-funcs

DESCRIPTION="Maximum likelihood superpositioning and analysis of macromolecular structures"
HOMEPAGE="http://www.theseus3d.org/"
RESTRICT="fetch"
ORIG_URI="${PN}.tar.gz"
SRC_URI="${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc ~x86"
IUSE=""
RDEPEND="virtual/lapack
	virtual/blas
	sci-biology/muscle"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${PN}"

pkg_nofetch() {
	elog "Download ${ORIG_URI} from ${HOMEPAGE}"
	elog "Rename it to ${SRC_URI} and place it in ${DISTDIR}."
}

src_unpack() {
	unpack ${A}

	sed -i \
		-e "s:^\(SYSLIBS\).*:\1 = -lm -lc:g" \
		-e "s:^\(BLASLIB\).*:\1 = -lblas:g" \
		-e "s:^\(LAPACKLIB\).*:\1 = -llapack:g" \
		-e "s:^\(INSTALLDIR\).*:\1 = \"${D}usr/bin\":g" \
		-e "s:^\(OPT\).*:\1 = ${CFLAGS}:g" \
		-e "s:^\(WARN\).*:\1 = :g" \
		-e "s:^\(CFLAGS\).*:\1 = \$(WARN) -std=c99 -pthread:g" \
		-e "s:^\(CC\).*:\1 = $(tc-getCC):g" \
		"${S}"/make.inc

	sed -i \
		-e "s:/local::g" \
		-e "s:clustlaw:clustalw:g" \
		"${S}"/theseus_align
}

src_compile() {
	emake || die "emake failed"
}

src_install() {
	dodir /usr/bin
	emake install || die "emake install failed"

	doman theseus.1
	# the README is just a copy of the formatted man page, don't install it
	dodoc AUTHORS
	docinto examples; dodoc examples/*
}

pkg_postinst() {
	elog "You may use theseus_align to create a sequence alignment, then superpose"
	elog "the aligned sequences. It is not a structure-based alignment."
	elog "By default, it uses MUSCLE. You may edit the script to change this."
}