aboutsummaryrefslogtreecommitdiff
blob: 5af64c16bcf2fc27264380f1b56fbffa0bc51bd4 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit autotools
SRC_URI="${P}.tar.gz"

DESCRIPTION="Clustering software for microarray analysis"
HOMEPAGE="http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/software.htm#ctv"
LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="X"

DEPEND="X? ( virtual/motif )"
RDEPEND="X? ( x11-misc/xdg-utils app-text/xpdf )"

RESTRICT="fetch"

pkg_nofetch() {
        einfo "Please obtain ${P}.tar.gz from ${HOMEPAGE} and place it in ${DISTDIR}"
}

src_unpack() {
	unpack "${A}"
	cd "${S}"
	sed -i \
		-e 's:^docdir = $(prefix)/cluster/doc:docdir = @docdir@:' \
		-e 's:^htmldir = $(prefix)/cluster/html:htmldir = @htmldir@:' \
		-e 's:^imagedir = $(prefix)/cluster/html/images:imagedir = @htmldir@/images:' \
		-e 's:^fileformatdir = $(prefix)/cluster:fileformatdir = @docdir@:' \
		X11/Makefile.in || die "sed failed"

	epatch "${FILESDIR}/${P}-helpmenu-fix.patch" || die "failed to patch helpmenu"

}

src_compile() {

	econf $(use_with X x) \
		--docdir="/usr/share/doc/${P}" \
		--htmldir="/usr/share/doc/${P}/html" \
		|| die "econf failed"

	emake || die "emake failed"
}

src_install() {
	cd ${S}
	emake DESTDIR="${D}" install || die "Install failed"

	dodoc README COPYING AUTHORS ChangeLog NEWS TODO || die "failed to install docs"
	insinto /usr/share/doc/${P}/examples
	doins example/example.c example/README || die "failed to install docs"
	insinto /usr/share/doc/${P}
	doins doc/cluster.pdf || die "failed to install docs"

}