summaryrefslogtreecommitdiff
blob: 185387dcffe937a7309508dbcd92205f3e475893 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/sgb/sgb-20030623.ebuild,v 1.3 2004/07/15 00:07:29 agriffis Exp $

DESCRIPTION="Stanford GraphBase"
HOMEPAGE="ftp://labrea.stanford.edu/pub/sgb/"
SRC_URI="ftp://labrea.stanford.edu/pub/sgb/sgb-${PV:0:4}-${PV:4:2}-${PV:6:2}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=">=dev-util/cweb-3.00"

src_unpack() {
	mkdir ${S}
	cd ${S}
	unpack ${A}
	echo >>Makefile
	echo 'demos: $(DEMOS)' >>Makefile
}

src_compile() {
	emake SGBDIR=/usr/share/${PN} \
	INCLUDEDIR=/usr/include/sgb \
	LIBDIR=/usr/lib \
	BINDIR=/usr/bin \
	CWEBINPUTS=/usr/share/${PN}/cweb \
	CFLAGS="${CFLAGS}" tests lib demos
}

src_install() {
	dodir /usr/share/${PN} /usr/include/sgb /usr/lib /usr/bin /usr/share/${PN}/cweb
	emake SGBDIR=${D}/usr/share/${PN} \
	INCLUDEDIR=${D}/usr/include/sgb \
	LIBDIR=${D}/usr/lib \
	BINDIR=${D}/usr/bin \
	CWEBINPUTS=${D}/usr/share/${PN}/cweb \
	CFLAGS="${CFLAGS}" install installdata installdemos
	# we don't need no makefile
	rm ${D}/usr/include/sgb/Makefile

	dodoc ERRATA README

}