summaryrefslogtreecommitdiff
blob: 5489864e65e6e9f4f6d5d13a73ec2f5396d6acbe (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/glpk/glpk-4.15.ebuild,v 1.1 2007/04/23 15:07:11 bicatali Exp $

DESCRIPTION="GNU Linear Programming Kit"
LICENSE="GPL-2"
HOMEPAGE="http://www.gnu.org/software/glpk/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"

SLOT="0"
IUSE="doc"
KEYWORDS="~x86 ~amd64 ~ppc"

DEPEND=">=sys-devel/gcc-3.2
		virtual/libc
		doc? ( virtual/ghostscript )"
RDEPEND="virtual/libc"

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

	# INSTALL include some usage docs
	dodoc AUTHORS ChangeLog INSTALL NEWS README || \
		die "failed to install docs"

	# 385Kb
	insinto /usr/share/doc/${PF}/examples
	doins examples/*.{c,mod,tsp} || \
		die "failed to install examples"

	# manual/ is 2.5Mb in size
	if use doc; then
		cd "${S}"/doc
		dvipdf refman.dvi
		dvipdf lang.dvi
		insinto /usr/share/doc/${PF}/manual
		doins *.pdf || die "failed to install manual files"
		docinto manual
		dodoc *.txt || die "failed to install manual txt"
	fi
}