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 2013-2019 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 Spiral(CMakePackage):
"""SPIRAL is a program generation system for linear transforms and other
mathematical functions that produces very high performance code for a wide
spectrum of hardware platforms."""
homepage = "https://spiral.net"
url = "https://github.com/spiral-software/spiral-software/archive/8.1.2.tar.gz"
maintainers = ['spiralgen']
version('8.2.0', sha256='983f38d270ae2cb753c88cbce3f412e307c773807ad381acedeb9275afc0be32')
version('8.1.2', sha256='506f1dbf923aa1c9f19f05444fa947085715eef37c9d2494d133fcaaa1dd50bc')
extendable = True
# No dependencies.
def build(self, spec, prefix):
with working_dir(self.build_directory):
make('all')
make('install/local')
# For some reason the make install/local doesn't seem to install
# the gap exe...though it does work if run manually
gapfil = join_path(self.build_directory, 'gap/src/gap')
dest = join_path(self.stage.source_path, 'gap/bin')
install(gapfil, dest)
def install(self, spec, prefix):
mkdirp(prefix.gap.bin)
gapfil = join_path(self.build_directory, 'gap/src/gap')
install(gapfil, prefix.gap.bin)
with working_dir(join_path(self.build_directory, 'gap')):
files = ('spiral', 'spirald', '_spiral.g')
for fil in files:
install(fil, prefix)
set_executable(join_path(prefix, fil))
with working_dir(self.stage.source_path):
files = ('LICENSE', 'README.md', 'ReleaseNotes.md')
for fil in files:
install(fil, prefix)
mkdirp(prefix.gap.lib)
mkdirp(prefix.gap.grp)
mkdirp(prefix.namespaces)
mkdirp(prefix.profiler)
mkdirp(prefix.tests)
print("self.stage.source_path = " + self.stage.source_path)
with working_dir(self.stage.source_path):
install_tree('namespaces', prefix.namespaces)
install_tree('profiler', prefix.profiler)
install_tree('tests', prefix.tests)
with working_dir(join_path(self.stage.source_path, 'gap')):
install_tree('lib', prefix.gap.lib)
install_tree('grp', prefix.gap.grp)
|