summaryrefslogtreecommitdiff
blob: d7a76b123db90edab37b626b4535d0b8ddcc5d09 (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/tablix/tablix-0.3.5-r1.ebuild,v 1.3 2010/06/21 21:08:12 mr_bones_ Exp $

EAPI="2"
inherit eutils autotools

MY_PV="${PN}2-${PV}"

DESCRIPTION="Tablix is a powerful free software kernel for solving general timetabling problems."
HOMEPAGE="http://www.tablix.org/"
SRC_URI="http://www.tablix.org/releases/stable/${MY_PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="pvm"

DEPEND=">=dev-libs/libxml2-2.4.3
	pvm?	( sys-cluster/pvm )"

S="${WORKDIR}/${MY_PV}"

pkg_setup() {
	if ! use pvm; then
		ewarn
		ewarn "Without parallel virtual machine support, tablix will not be able"
		ewarn "to solve even moderately complex problems.  Even if you are using"
		ewarn "a single machine, USE=pvm is highly recommended."
		ewarn
		epause 5
	fi
}

src_prepare() {
	sed -i "/^localedir/s:/locale:/share/${PN}/locale:" configure.in \
		|| die "sed failed"
	sed -i "/^ACLOCAL_AMFLAGS/s:^:#:" Makefile.am \
		|| die "sed failed"
	eautoreconf
	# fix compilation when no optimizations are enabled wrt bug #240046
	sed -i -e '32 d' -e '34 d' src/master.c || die "sed failed"
	sed -i -e '31 d' -e '33 d' src/main.c || die "sed failed"
	sed -i -e '30 d' -e '32 d' src/output.c || die "sed failed"

}

src_configure() {
	econf \
		$(use_with pvm pvm3) \
		|| die
}

src_install() {
	emake DESTDIR="${D}" install || die
	dodoc AUTHORS BUGS ChangeLog NEWS README
	cd doc
	dodoc manual.pdf modules.pdf modules2.pdf morphix.pdf
}