summaryrefslogtreecommitdiff
blob: 6fa23a4f4da1688e9c400969a8c39a44838a149d (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-sci/glpk/glpk-4.2.ebuild,v 1.2 2003/12/09 18:10:46 lanius Exp $

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

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86"

RDEPEND="java? ( >=virtual/jdk-1.4* )
		 sys-libs/glibc"
DEPEND=">=sys-devel/gcc-3.2* ${RDEPEND}
		 doc? ( virtual/ghostscript )"

src_compile() {
	LIBS="${LIBS} -lm" econf --enable-shared || die
	emake || die "emake failed"
	if use java; then
		cd ${S}/contrib/jni
		emake || die "emake java failed"
	fi
}

src_install() {
	make DESTDIR=${D} install || die "make install failed"
	# base docs
	dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
	#examples
	docinto examples
	rm ${S}/examples/{Make*,glpsol*}
	dodoc ${S}/examples/*
	#docs
	if use doc; then
		cd ${S}/doc
		for i in *.ps; do
			ps2pdf14 ${i}
		done
	fi
	dodoc ${S}/doc/*
	#java
	if use java; then
		cd ${S}/contrib/jni
		dolib c/libglpk_jni.so
		dojar java/glpk.jar
		docinto java
		mv contrib/java/sample/README contrib/java/sample/README.sample
		dodoc contrib/java/README contrib/java/sample/*
	fi
}