aboutsummaryrefslogtreecommitdiff
blob: b798e579b88a863ff8ef8082e15a2b4c76bbca86 (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

DESCRIPTION="Hierarchical, k-means, k-medians clustering for expression/microarray analysis"
HOMEPAGE="http://bonsai.hgc.jp/~mdehoon/software/cluster
	http://bonsai.hgc.jp/~mdehoon/software/cluster/software.htm#ctv"
SRC_URI="${P}.tar.gz"

LICENSE="Eisen"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="X"

DEPEND="X? ( x11-libs/motif:0= )"
RDEPEND="
	X? (
		x11-misc/xdg-utils
		app-text/mupdf
	)"

RESTRICT="fetch"

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

src_prepare() {
	sed -i \
		-e 's:^docdir = .*$:docdir = @docdir@:' \
		-e 's:^htmldir = .*$:htmldir = @htmldir@:' \
		-e 's:^imagedir = .*$:imagedir = @htmldir@/images:' \
		-e 's:^fileformatdir = .*$:fileformatdir = @docdir@:' \
		X11/Makefile.in || die "sed failed"
}

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

src_install() {
	default

	mv "${ED}"/usr/bin/cluster{,3} || die

	insinto /usr/share/doc/${P}/examples
	doins example/example.c example/README
	insinto /usr/share/doc/${PR}
	doins doc/cluster.pdf
}

pkg_postinst() {
	elog "We renamed the cluster binary to cluster3"
}