blob: d6383b4a8399436b324e17f7e85c566020c01278 (
plain) (
blame)
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
|
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Flint(Package):
"""FLINT (Fast Library for Number Theory)."""
homepage = "http://www.flintlib.org"
url = "http://mirrors.mit.edu/sage/spkg/upstream/flint/flint-2.5.2.tar.gz"
git = "https://github.com/wbhart/flint2.git"
version('develop', branch='trunk')
version('2.5.2', sha256='cbf1fe0034533c53c5c41761017065f85207a1b770483e98b2392315f6575e87')
version('2.4.5', sha256='e489354df00f0d84976ccdd0477028693977c87ccd14f3924a89f848bb0e01e3')
# Overlap in functionality between gmp and mpir
# All other dependencies must also be built with
# one or the other
# variant('mpir', default=False,
# description='Compile with the MPIR library')
# Build dependencies
depends_on('autoconf', type='build')
# Other dependencies
depends_on('gmp') # mpir is a drop-in replacement for this
depends_on('mpfr') # Could also be built against mpir
def install(self, spec, prefix):
options = []
options = ["--prefix=%s" % prefix,
"--with-gmp=%s" % spec['gmp'].prefix,
"--with-mpfr=%s" % spec['mpfr'].prefix]
# if '+mpir' in spec:
# options.extend([
# "--with-mpir=%s" % spec['mpir'].prefix
# ])
configure(*options)
make()
if self.run_tests:
make("check")
make("install")
|