summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorbroderickpt <50112491+broderickpt@users.noreply.github.com>2020-03-10 14:07:53 -0400
committerGitHub <noreply@github.com>2020-03-10 13:07:53 -0500
commitc4c6accace0cbbf4907dca8d65038664bda27484 (patch)
treeb4fcef25841cdd641d5474d9961203a08065fea2 /var
parentbbbee6700bfea23ac36c0715db72e426c8995f26 (diff)
downloadspack-c4c6accace0cbbf4907dca8d65038664bda27484.tar.gz
spack-c4c6accace0cbbf4907dca8d65038664bda27484.tar.bz2
spack-c4c6accace0cbbf4907dca8d65038664bda27484.tar.xz
spack-c4c6accace0cbbf4907dca8d65038664bda27484.zip
contrib-spiral: submit SPIRAL package recipe and HCOL package recipe … (#15188)
* contrib-spiral: submit SPIRAL package recipe and HCOL package recipe (extension package for SPIRAL) to spack * contrib-spiral: fix flake8 complaints for spiral & hcol * contrib-spiral: Revisions to package recipes to address comments * contrib-spiral: remove unecessary 'test' function * contrib-spiral: update hcol package to install in <prefix>/namespaces/packages/hcol * contrib-spiral: don't import os to hcol * contrib-spiral: tweak hcol package recipe
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hcol/package.py25
-rw-r--r--var/spack/repos/builtin/packages/spiral/package.py65
2 files changed, 90 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hcol/package.py b/var/spack/repos/builtin/packages/hcol/package.py
new file mode 100644
index 0000000000..70278eba93
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hcol/package.py
@@ -0,0 +1,25 @@
+# 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 Hcol(Package):
+ """This is the SPIRAL package for the Hybrid Control Operator Language
+ (HCOL)."""
+
+ homepage = "https://https://spiral.net"
+ url = "https://github.com/spiral-software/spiral-package-hcol/archive/1.0.0.zip"
+
+ maintainers = ['spiralgen']
+ extends('spiral')
+
+ version('1.0.0', sha256='9a95574e2b061d03d264c32dbf733e893017d1644b6486c7a8a55a3b24783f58')
+
+ # HCOL package is an extension for Spiral. Install the files in their own
+ # prefix, in "namespaces/packages/hcol". This allows 'spack activate' to
+ # symlink hcol at the right location for spiral packages.
+ def install(self, spec, prefix):
+ install_tree('.', prefix.namespaces.packages.hcol)
diff --git a/var/spack/repos/builtin/packages/spiral/package.py b/var/spack/repos/builtin/packages/spiral/package.py
new file mode 100644
index 0000000000..5011875e13
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spiral/package.py
@@ -0,0 +1,65 @@
+# 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.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)