summaryrefslogtreecommitdiff
blob: aa74f1f927d537e75f1c8e3bd90bcc54c5f9ee47 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit toolchain-funcs versionator

MYP="Normaliz-${PV}"

DESCRIPTION="Tool for computations in affine monoids and more"
HOMEPAGE="www.mathematik.uni-osnabrueck.de/normaliz/"
SRC_URI="https://github.com/Normaliz/Normaliz/archive/v${PV}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="doc extras openmp"

RDEPEND="
	dev-libs/gmp[cxx]
"
DEPEND="${RDEPEND}
	doc? ( app-text/texlive )
	dev-libs/boost"
# Only a boost header is needed -> not RDEPEND

S=${WORKDIR}/${MYP}

src_prepare () {
	./bootstrap.sh || die
	default
}

src_configure () {
	if use openmp && ! tc-has-openmp ; then
		die "You requested openmp, but your toolchain does not support it."
	fi
	econf $(use_enable openmp)
}

src_install() {
	default
	if use doc ; then
		pushd doc
		pdflatex Normaliz || die
		pdflatex Normaliz || die
		dodoc "Normaliz.pdf"
		pdflatex NmzIntegrate || die
		pdflatex NmzIntegrate || die
		dodoc "NmzIntegrate.pdf"
		popd
	fi
	if use extras; then
		elog "You have selected to install extras which consist of Macaulay2"
		elog "and Singular packages. These have been installed into "
		elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
		elog "to the homepages of the respective projects for additional information."
		elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
		elog "copies of these interface packages. Usually you don't need normaliz's versions."
		insinto "/usr/share/${PN}"
		doins Singular/normaliz.lib
		doins Macaulay2/Normaliz.m2
	fi
}