aboutsummaryrefslogtreecommitdiff
blob: 296ceafe0eef598470c306c67b68dd1640533ee0 (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
60
61
62
63
64
65
66
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="4"

inherit eutils

MY_PN="guava"

DESCRIPTION="GUAVA is a package that implements coding theory algorithms in GAP"
HOMEPAGE="http://sage.math.washington.edu/home/wdj/guava/"
SRC_URI="http://sage.math.washington.edu/home/wdj/${MY_PN}/${MY_PN}${PV}.tar.bz2"

LICENSE="GPL-2 GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="doc"

DEPEND="sci-mathematics/gap"
RDEPEND="${DEPEND}"

RESTRICT="mirror"

S="${WORKDIR}/${MY_PN}${PV}"

src_prepare() {
	# adds stdlib.h which is needed because of "exit" - fixes QA warning
	epatch "${FILESDIR}"/${P}-fix-missing-header.patch

	cd lib || die "failed to change into lib directory"
	rm *~ || die "failed to remove backup files"
}

src_configure() {
	# this is not configuration script from autoconf
	./configure "${EPREFIX}"/usr/share/gap || die "configuration failed"
}

src_compile() {
	emake CFLAGS="${CFLAGS}" COMPOPT="-c ${CFLAGS}"
}

src_install() {
	source "${EPREFIX}"/usr/share/gap/sysinfo.gap \
		|| die "failed to read architecture"
	rm bin/${GAParch}/*.o || die "failed to remove object files"

	exeinto /usr/share/gap/pkg/${MY_PN}/bin
	doexe bin/desauto bin/wtdist

	exeinto /usr/share/gap/pkg/${MY_PN}/bin/leon
	doexe bin/leon/*

	exeinto /usr/share/gap/pkg/${MY_PN}/bin/${GAParch}
	doexe bin/${GAParch}/*

	insinto /usr/share/gap/pkg/${MY_PN}
	doins -r lib tbl guava_gapdoc.gap init.g PackageInfo.g read.g
	dodoc README.guava COPYING.guava

	if use doc ; then
		dohtml htm/*
		dodoc doc/manual.pdf src/leon/doc/leon_guava_manual.pdf
	fi
}