@@ -9,7 +9,7 @@
|
||||
#
|
||||
# Note that we also add *per-line* exemptions for certain patterns in the
|
||||
# `spack flake8` command. This is where F403 for `from spack import *`
|
||||
# is added (beause we *only* allow that wildcard).
|
||||
# is added (because we *only* allow that wildcard).
|
||||
#
|
||||
# See .flake8 for regular exceptions.
|
||||
#
|
||||
|
48
.github/ISSUE_TEMPLATE/bug_report.md
vendored
48
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,21 +1,11 @@
|
||||
---
|
||||
name: "\U0001F41E Bug report"
|
||||
about: Report a bug in the core of Spack (command not working as expected, etc.)
|
||||
name: "\U0001F41E Bug report"
|
||||
about: Report a bug in the core of Spack (command not working as expected, etc.)
|
||||
labels: "bug,triage"
|
||||
---
|
||||
|
||||
<!--
|
||||
*Explain, in a clear and concise way, the command you ran and the result you were trying to achieve.
|
||||
Example: "I ran Spack find to list all the installed packages and..."*
|
||||
-->
|
||||
|
||||
|
||||
### Spack version
|
||||
<!-- Add the output to the command below -->
|
||||
```console
|
||||
$ spack --version
|
||||
|
||||
```
|
||||
<!-- Explain, in a clear and concise way, the command you ran and the result you were trying to achieve.
|
||||
Example: "I ran `spack find` to list all the installed packages and ..." -->
|
||||
|
||||
### Steps to reproduce the issue
|
||||
|
||||
@@ -27,38 +17,26 @@ $ spack <command2> <spec>
|
||||
|
||||
### Error Message
|
||||
|
||||
<!--If Spack reported an error, provide the error message. If it did not report an error
|
||||
but the output appears incorrect, provide the incorrect output. If there was no error
|
||||
message and no output but the result is incorrect, describe how it does not match
|
||||
what you expect. To provide more information you might re-run the commands with
|
||||
the additional -d/--stacktrace flags:
|
||||
<!-- If Spack reported an error, provide the error message. If it did not report an error but the output appears incorrect, provide the incorrect output. If there was no error message and no output but the result is incorrect, describe how it does not match what you expect. -->
|
||||
```console
|
||||
$ spack -d --stacktrace <command1> <spec>
|
||||
$ spack -d --stacktrace <command2> <spec>
|
||||
...
|
||||
$ spack --debug --stacktrace <command>
|
||||
```
|
||||
that activate the full debug output.
|
||||
-->
|
||||
|
||||
### Information on your system
|
||||
<!--
|
||||
This includes:
|
||||
|
||||
1. which platform you are using
|
||||
2. any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.)
|
||||
<!-- Please include the output of `spack debug report` -->
|
||||
|
||||
-->
|
||||
<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->
|
||||
|
||||
### General information
|
||||
### Additional information
|
||||
|
||||
- [ ] I have run `spack --version` and reported the version of Spack
|
||||
<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
|
||||
- [ ] I have run `spack debug report` and reported the version of Spack/Python/Platform
|
||||
- [ ] I have searched the issues of this repo and believe this is not a duplicate
|
||||
- [ ] I have run the failing commands in debug mode and reported the output
|
||||
|
||||
<!--
|
||||
We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively!
|
||||
<!-- We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively!
|
||||
|
||||
If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.
|
||||
|
||||
Other than that, thanks for taking the time to contribute to Spack!
|
||||
-->
|
||||
Other than that, thanks for taking the time to contribute to Spack! -->
|
||||
|
@@ -25,7 +25,7 @@ This is a bugfix release on top of `v0.14.0`. Specific fixes include:
|
||||
|
||||
2. **Build pipelines.** You can also build in parallel through Gitlab
|
||||
CI. Simply create a Spack environment and push it to Gitlab to build
|
||||
on Gitlab runners. Pipeline support is now integreated into a single
|
||||
on Gitlab runners. Pipeline support is now integrated into a single
|
||||
`spack ci` command, so setting it up is easier than ever. See the
|
||||
[Pipelines section](https://spack.readthedocs.io/en/v0.14.0/pipelines.html)
|
||||
in the docs.
|
||||
@@ -125,8 +125,8 @@ RHEL8.
|
||||
* mirror bugfixes: symlinks, duplicate patches, and exception handling (#13789)
|
||||
* don't try to fetch `BundlePackages` (#13908)
|
||||
* avoid re-fetching patches already added to a mirror (#13908)
|
||||
* avoid re-fetching alread added patches (#13908)
|
||||
* avoid re-fetching alread added patches (#13908)
|
||||
* avoid re-fetching already added patches (#13908)
|
||||
* avoid re-fetching already added patches (#13908)
|
||||
* allow repeated invocations of `spack mirror create` on the same dir (#13908)
|
||||
* bugfix for RHEL8 when `python` is unavailable (#14252)
|
||||
* improve concretization performance in environments (#14190)
|
||||
|
@@ -22,4 +22,4 @@
|
||||
#
|
||||
# This is compatible across platforms.
|
||||
#
|
||||
/usr/bin/env spack python "$@"
|
||||
exec /usr/bin/env spack python "$@"
|
||||
|
@@ -27,6 +27,7 @@ packages:
|
||||
glx: [mesa+glx, opengl]
|
||||
glu: [mesa-glu, openglu]
|
||||
golang: [gcc]
|
||||
iconv: [libiconv]
|
||||
ipp: [intel-ipp]
|
||||
java: [openjdk, jdk, ibm-java]
|
||||
jpeg: [libjpeg-turbo, libjpeg]
|
||||
|
@@ -925,7 +925,7 @@ contains any spaces. Any of ``cppflags=-O3``, ``cppflags="-O3"``,
|
||||
``cppflags='-O3'``, and ``cppflags="-O3 -fPIC"`` are acceptable, but
|
||||
``cppflags=-O3 -fPIC`` is not. Additionally, if the value of the
|
||||
compiler flags is not the last thing on the line, it must be followed
|
||||
by a space. The commmand ``spack install libelf cppflags="-O3"%intel``
|
||||
by a space. The command ``spack install libelf cppflags="-O3"%intel``
|
||||
will be interpreted as an attempt to set ``cppflags="-O3%intel"``.
|
||||
|
||||
The six compiler flags are injected in the order of implicit make commands
|
||||
|
@@ -124,6 +124,39 @@ The ``buildable`` does not need to be paired with external packages.
|
||||
It could also be used alone to forbid packages that may be
|
||||
buggy or otherwise undesirable.
|
||||
|
||||
Virtual packages in Spack can also be specified as not buildable, and
|
||||
external implementations can be provided. In the example above,
|
||||
OpenMPI is configured as not buildable, but Spack will often prefer
|
||||
other MPI implementations over the externally available OpenMPI. Spack
|
||||
can be configured with every MPI provider not buildable individually,
|
||||
but more conveniently:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
packages:
|
||||
mpi:
|
||||
buildable: False
|
||||
openmpi:
|
||||
paths:
|
||||
openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64: /opt/openmpi-1.4.3
|
||||
openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug: /opt/openmpi-1.4.3-debug
|
||||
openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64: /opt/openmpi-1.6.5-intel
|
||||
|
||||
Implementations can also be listed immediately under the virtual they provide:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
packages:
|
||||
mpi:
|
||||
buildable: False
|
||||
openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64: /opt/openmpi-1.4.3
|
||||
openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug: /opt/openmpi-1.4.3-debug
|
||||
openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64: /opt/openmpi-1.6.5-intel
|
||||
mpich@3.3 %clang@9.0.0 arch=linux-debian7-x86_64: /opt/mpich-3.3-intel
|
||||
|
||||
Spack can then use any of the listed external implementations of MPI
|
||||
to satisfy a dependency, and will choose depending on the compiler and
|
||||
architecture.
|
||||
|
||||
.. _concretization-preferences:
|
||||
|
||||
|
@@ -553,7 +553,7 @@ follow `the next section <intel-install-libs_>`_ instead.
|
||||
f77: stub
|
||||
fc: stub
|
||||
|
||||
Replace ``18.0.3`` with the version that you determined in the preceeding
|
||||
Replace ``18.0.3`` with the version that you determined in the preceding
|
||||
step. The contents under ``paths:`` do not matter yet.
|
||||
|
||||
You are right to ask: "Why on earth is that necessary?" [fn8]_.
|
||||
@@ -696,7 +696,7 @@ follow `the next section <intel-install-libs_>`_ instead.
|
||||
- /home/$user/spack-stage
|
||||
|
||||
Do not duplicate the ``config:`` line if it already is present.
|
||||
Adapt the location, which here is the same as in the preceeding example.
|
||||
Adapt the location, which here is the same as in the preceding example.
|
||||
|
||||
3. Retry installing the large package.
|
||||
|
||||
@@ -965,7 +965,7 @@ a *virtual* ``mkl`` package is declared in Spack.
|
||||
|
||||
Likewise, in a
|
||||
:ref:`MakefilePackage <makefilepackage>`
|
||||
or similiar package that does not use AutoTools you may need to provide include
|
||||
or similar package that does not use AutoTools you may need to provide include
|
||||
and link options for use on command lines or in environment variables.
|
||||
For example, to generate an option string of the form ``-I<dir>``, use:
|
||||
|
||||
|
@@ -44,7 +44,7 @@ Environments:
|
||||
&& echo " install_tree: /opt/software" \
|
||||
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml
|
||||
|
||||
# Install the software, remove unecessary deps
|
||||
# Install the software, remove unnecessary deps
|
||||
RUN cd /opt/spack-environment && spack install && spack gc -y
|
||||
|
||||
# Strip all the binaries
|
||||
@@ -266,7 +266,7 @@ following ``Dockerfile``:
|
||||
&& echo " install_tree: /opt/software" \
|
||||
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml
|
||||
|
||||
# Install the software, remove unecessary deps
|
||||
# Install the software, remove unnecessary deps
|
||||
RUN cd /opt/spack-environment && spack install && spack gc -y
|
||||
|
||||
# Strip all the binaries
|
||||
@@ -304,4 +304,4 @@ following ``Dockerfile``:
|
||||
.. note::
|
||||
Spack can also produce Singularity definition files to build the image. The
|
||||
minimum version of Singularity required to build a SIF (Singularity Image Format)
|
||||
from them is ``3.5.3``.
|
||||
from them is ``3.5.3``.
|
||||
|
@@ -385,8 +385,8 @@ coverage. This helps us tell what percentage of lines of code in Spack are
|
||||
covered by unit tests. Although code covered by unit tests can still contain
|
||||
bugs, it is much less error prone than code that is not covered by unit tests.
|
||||
|
||||
Codecov provides `browser extensions <https://github.com/codecov/browser-extension>`_
|
||||
for Google Chrome, Firefox, and Opera. These extensions integrate with GitHub
|
||||
Codecov provides `browser extensions <https://github.com/codecov/sourcegraph-codecov>`_
|
||||
for Google Chrome and Firefox. These extensions integrate with GitHub
|
||||
and allow you to see coverage line-by-line when viewing the Spack repository.
|
||||
If you are new to Spack, a great way to get started is to write unit tests to
|
||||
increase coverage!
|
||||
|
@@ -851,7 +851,7 @@ from websites and from git.
|
||||
|
||||
.. warning::
|
||||
|
||||
This workaround should be used ONLY as a last resort! Wihout SSL
|
||||
This workaround should be used ONLY as a last resort! Without SSL
|
||||
certificate verification, spack and git will download from sites you
|
||||
wouldn't normally trust. The code you download and run may then be
|
||||
compromised! While this is not a major issue for archives that will
|
||||
|
@@ -3607,7 +3607,7 @@ the command line.
|
||||
For most compilers, ``$rpath_flag`` is ``-Wl,-rpath,``. However, NAG
|
||||
passes its flags to GCC instead of passing them directly to the linker.
|
||||
Therefore, its ``$rpath_flag`` is doubly wrapped: ``-Wl,-Wl,,-rpath,``.
|
||||
``$rpath_flag`` can be overriden on a compiler specific basis in
|
||||
``$rpath_flag`` can be overridden on a compiler specific basis in
|
||||
``lib/spack/spack/compilers/$compiler.py``.
|
||||
|
||||
The compiler wrappers also pass the compiler flags specified by the user from
|
||||
|
@@ -132,7 +132,7 @@ A pipeline-enabled spack environment
|
||||
------------------------------------
|
||||
|
||||
Here's an example of a spack environment file that has been enhanced with
|
||||
sections desribing a build pipeline:
|
||||
sections describing a build pipeline:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@@ -284,8 +284,10 @@ have some drawbacks:
|
||||
The ``spack load`` and ``spack module tcl loads`` commands, on the
|
||||
other hand, are not very smart: if the user-supplied spec matches
|
||||
more than one installed package, then ``spack module tcl loads`` will
|
||||
fail. This may change in the future. For now, the workaround is to
|
||||
be more specific on any ``spack load`` commands that fail.
|
||||
fail. This default behavior may change in the future. For now,
|
||||
the workaround is to either be more specific on any failing ``spack load``
|
||||
commands or to use ``spack load --first`` to allow spack to load the
|
||||
first matching spec.
|
||||
|
||||
|
||||
""""""""""""""""""""""
|
||||
@@ -444,7 +446,7 @@ environment.
|
||||
|
||||
A single-prefix filesystem view is a single directory tree that is the
|
||||
union of the directory hierarchies of a number of installed packages;
|
||||
it is similar to the directory hiearchy that might exist under
|
||||
it is similar to the directory hierarchy that might exist under
|
||||
``/usr/local``. The files of the view's installed packages are
|
||||
brought into the view by symbolic or hard links, referencing the
|
||||
original Spack installation.
|
||||
@@ -1237,7 +1239,7 @@ you can also manually set them in your ``.bashrc``.
|
||||
2. Other package managers like Homebrew will try to install things to the
|
||||
same directory. If you plan on using Homebrew in conjunction with Spack,
|
||||
don't symlink things to ``/usr/local``.
|
||||
3. If you are on a shared workstation, or don't have sudo priveleges, you
|
||||
3. If you are on a shared workstation, or don't have sudo privileges, you
|
||||
can't do this.
|
||||
|
||||
If you still want to do this anyway, there are several ways around SIP.
|
||||
@@ -1467,7 +1469,7 @@ In order to build and run the image, execute:
|
||||
SPACK_ROOT=/usr/local \
|
||||
FORCE_UNSAFE_CONFIGURE=1
|
||||
|
||||
# install minimal spack depedencies
|
||||
# install minimal spack dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
autoconf \
|
||||
|
@@ -903,7 +903,7 @@ def get_keys(install=False, trust=False, force=False):
|
||||
url_util.format(fetch_url_build_cache))
|
||||
# For s3 mirror need to request index.html directly
|
||||
p, links = web_util.spider(
|
||||
url_util.join(fetch_url_build_cache, 'index.html'), depth=1)
|
||||
url_util.join(fetch_url_build_cache, 'index.html'))
|
||||
|
||||
for link in links:
|
||||
if re.search(r'\.key', link) or re.search(r'\.pub', link):
|
||||
|
@@ -140,12 +140,12 @@ def cuda_flags(arch_list):
|
||||
conflicts('%intel@16.0:', when='+cuda ^cuda@:8.0.43')
|
||||
conflicts('%intel@17.0:', when='+cuda ^cuda@:8.0.60')
|
||||
conflicts('%intel@18.0:', when='+cuda ^cuda@:9.9')
|
||||
conflicts('%intel@19.0:', when='+cuda ^cuda@:10.2.89')
|
||||
conflicts('%intel@19.0:', when='+cuda ^cuda@:10.0')
|
||||
|
||||
# XL is mostly relevant for ppc64le Linux
|
||||
conflicts('%xl@:12,14:', when='+cuda ^cuda@:9.1')
|
||||
conflicts('%xl@:12,14:15,17:', when='+cuda ^cuda@9.2')
|
||||
conflicts('%xl@17:', when='+cuda ^cuda@10.0.130:10.2.89')
|
||||
conflicts('%xl@17:', when='+cuda ^cuda@:10.2.89')
|
||||
|
||||
# Mac OS X
|
||||
# platform = ' platform=darwin'
|
||||
|
@@ -177,7 +177,7 @@ def elide_list(line_list, max_num=10):
|
||||
return line_list
|
||||
|
||||
|
||||
def disambiguate_spec(spec, env, local=False, installed=True):
|
||||
def disambiguate_spec(spec, env, local=False, installed=True, first=False):
|
||||
"""Given a spec, figure out which installed package it refers to.
|
||||
|
||||
Arguments:
|
||||
@@ -190,10 +190,11 @@ def disambiguate_spec(spec, env, local=False, installed=True):
|
||||
database query. See ``spack.database.Database._query`` for details.
|
||||
"""
|
||||
hashes = env.all_hashes() if env else None
|
||||
return disambiguate_spec_from_hashes(spec, hashes, local, installed)
|
||||
return disambiguate_spec_from_hashes(spec, hashes, local, installed, first)
|
||||
|
||||
|
||||
def disambiguate_spec_from_hashes(spec, hashes, local=False, installed=True):
|
||||
def disambiguate_spec_from_hashes(spec, hashes, local=False,
|
||||
installed=True, first=False):
|
||||
"""Given a spec and a list of hashes, get concrete spec the spec refers to.
|
||||
|
||||
Arguments:
|
||||
@@ -213,6 +214,9 @@ def disambiguate_spec_from_hashes(spec, hashes, local=False, installed=True):
|
||||
if not matching_specs:
|
||||
tty.die("Spec '%s' matches no installed packages." % spec)
|
||||
|
||||
elif first:
|
||||
return matching_specs[0]
|
||||
|
||||
elif len(matching_specs) > 1:
|
||||
format_string = '{name}{@version}{%compiler}{arch=architecture}'
|
||||
args = ["%s matches multiple packages." % spec,
|
||||
|
@@ -3,7 +3,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
from datetime import datetime
|
||||
from glob import glob
|
||||
@@ -11,7 +14,9 @@
|
||||
import llnl.util.tty as tty
|
||||
from llnl.util.filesystem import working_dir
|
||||
|
||||
import spack.architecture as architecture
|
||||
import spack.paths
|
||||
from spack.main import get_version
|
||||
from spack.util.executable import which
|
||||
|
||||
description = "debugging commands for troubleshooting Spack"
|
||||
@@ -23,6 +28,7 @@ def setup_parser(subparser):
|
||||
sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='debug_command')
|
||||
sp.add_parser('create-db-tarball',
|
||||
help="create a tarball of Spack's installation metadata")
|
||||
sp.add_parser('report', help='print information useful for bug reports')
|
||||
|
||||
|
||||
def _debug_tarball_suffix():
|
||||
@@ -78,6 +84,16 @@ def create_db_tarball(args):
|
||||
tty.msg('Created %s' % tarball_name)
|
||||
|
||||
|
||||
def report(args):
|
||||
print('* **Spack:**', get_version())
|
||||
print('* **Python:**', platform.python_version())
|
||||
print('* **Platform:**', architecture.Arch(
|
||||
architecture.platform(), 'frontend', 'frontend'))
|
||||
|
||||
|
||||
def debug(parser, args):
|
||||
action = {'create-db-tarball': create_db_tarball}
|
||||
action = {
|
||||
'create-db-tarball': create_db_tarball,
|
||||
'report': report,
|
||||
}
|
||||
action[args.debug_command](args)
|
||||
|
@@ -33,6 +33,14 @@ def setup_parser(subparser):
|
||||
'--csh', action='store_const', dest='shell', const='csh',
|
||||
help="print csh commands to load the package")
|
||||
|
||||
subparser.add_argument(
|
||||
'--first',
|
||||
action='store_true',
|
||||
default=False,
|
||||
dest='load_first',
|
||||
help="load the first match if multiple packages match the spec"
|
||||
)
|
||||
|
||||
subparser.add_argument(
|
||||
'--only',
|
||||
default='package,dependencies',
|
||||
@@ -47,7 +55,7 @@ def setup_parser(subparser):
|
||||
|
||||
def load(parser, args):
|
||||
env = ev.get_env(args, 'load')
|
||||
specs = [spack.cmd.disambiguate_spec(spec, env)
|
||||
specs = [spack.cmd.disambiguate_spec(spec, env, first=args.load_first)
|
||||
for spec in spack.cmd.parse_specs(args.specs)]
|
||||
|
||||
if not args.shell:
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
import code
|
||||
@@ -20,6 +22,9 @@
|
||||
|
||||
|
||||
def setup_parser(subparser):
|
||||
subparser.add_argument(
|
||||
'-V', '--version', action='store_true',
|
||||
help='print the Python version number and exit')
|
||||
subparser.add_argument(
|
||||
'-c', dest='python_command', help='command to execute')
|
||||
subparser.add_argument(
|
||||
@@ -31,6 +36,10 @@ def setup_parser(subparser):
|
||||
|
||||
|
||||
def python(parser, args, unknown_args):
|
||||
if args.version:
|
||||
print('Python', platform.python_version())
|
||||
return
|
||||
|
||||
if args.module:
|
||||
sys.argv = ['spack-python'] + unknown_args + args.python_args
|
||||
runpy.run_module(args.module, run_name="__main__", alter_sys=True)
|
||||
|
@@ -1035,6 +1035,14 @@ def provides(self, vpkg_name):
|
||||
for s, constraints in self.provided.items() if s.name == vpkg_name
|
||||
)
|
||||
|
||||
@property
|
||||
def virtuals_provided(self):
|
||||
"""
|
||||
virtual packages provided by this package with its spec
|
||||
"""
|
||||
return [vspec for vspec, constraints in self.provided.items()
|
||||
if any(self.spec.satisfies(c) for c in constraints)]
|
||||
|
||||
@property
|
||||
def installed(self):
|
||||
"""Installation status of a package.
|
||||
|
@@ -6,7 +6,6 @@
|
||||
import stat
|
||||
|
||||
from six import string_types
|
||||
from six import iteritems
|
||||
|
||||
import spack.repo
|
||||
import spack.error
|
||||
@@ -23,27 +22,6 @@ def _spec_type(component):
|
||||
return _lesser_spec_types.get(component, spack.spec.Spec)
|
||||
|
||||
|
||||
def get_packages_config():
|
||||
"""Wrapper around get_packages_config() to validate semantics."""
|
||||
config = spack.config.get('packages')
|
||||
|
||||
# Get a list of virtuals from packages.yaml. Note that because we
|
||||
# check spack.repo, this collects virtuals that are actually provided
|
||||
# by sometihng, not just packages/names that don't exist.
|
||||
# So, this won't include, e.g., 'all'.
|
||||
virtuals = [(pkg_name, pkg_name._start_mark) for pkg_name in config
|
||||
if spack.repo.path.is_virtual(pkg_name)]
|
||||
|
||||
# die if there are virtuals in `packages.py`
|
||||
if virtuals:
|
||||
errors = ["%s: %s" % (line_info, name) for name, line_info in virtuals]
|
||||
raise VirtualInPackagesYAMLError(
|
||||
"packages.yaml entries cannot be virtual packages:",
|
||||
'\n'.join(errors))
|
||||
|
||||
return config
|
||||
|
||||
|
||||
class PackagePrefs(object):
|
||||
"""Defines the sort order for a set of specs.
|
||||
|
||||
@@ -116,7 +94,7 @@ def order_for_package(cls, pkgname, component, vpkg=None, all=True):
|
||||
pkglist.append('all')
|
||||
|
||||
for pkg in pkglist:
|
||||
pkg_entry = get_packages_config().get(pkg)
|
||||
pkg_entry = spack.config.get('packages').get(pkg)
|
||||
if not pkg_entry:
|
||||
continue
|
||||
|
||||
@@ -160,7 +138,8 @@ def has_preferred_targets(cls, pkg_name):
|
||||
def preferred_variants(cls, pkg_name):
|
||||
"""Return a VariantMap of preferred variants/values for a spec."""
|
||||
for pkg in (pkg_name, 'all'):
|
||||
variants = get_packages_config().get(pkg, {}).get('variants', '')
|
||||
variants = spack.config.get('packages').get(pkg, {}).get(
|
||||
'variants', '')
|
||||
if variants:
|
||||
break
|
||||
|
||||
@@ -181,33 +160,29 @@ def spec_externals(spec):
|
||||
# break circular import.
|
||||
from spack.util.module_cmd import get_path_from_module # NOQA: ignore=F401
|
||||
|
||||
allpkgs = get_packages_config()
|
||||
name = spec.name
|
||||
allpkgs = spack.config.get('packages')
|
||||
names = set([spec.name])
|
||||
names |= set(vspec.name for vspec in spec.package.virtuals_provided)
|
||||
|
||||
external_specs = []
|
||||
pkg_paths = allpkgs.get(name, {}).get('paths', None)
|
||||
pkg_modules = allpkgs.get(name, {}).get('modules', None)
|
||||
if (not pkg_paths) and (not pkg_modules):
|
||||
return []
|
||||
|
||||
for external_spec, path in iteritems(pkg_paths):
|
||||
if not path:
|
||||
# skip entries without paths (avoid creating extra Specs)
|
||||
for name in names:
|
||||
pkg_config = allpkgs.get(name, {})
|
||||
pkg_paths = pkg_config.get('paths', {})
|
||||
pkg_modules = pkg_config.get('modules', {})
|
||||
if (not pkg_paths) and (not pkg_modules):
|
||||
continue
|
||||
|
||||
external_spec = spack.spec.Spec(external_spec,
|
||||
external_path=canonicalize_path(path))
|
||||
if external_spec.satisfies(spec):
|
||||
external_specs.append(external_spec)
|
||||
for external_spec, path in pkg_paths.items():
|
||||
external_spec = spack.spec.Spec(
|
||||
external_spec, external_path=canonicalize_path(path))
|
||||
if external_spec.satisfies(spec):
|
||||
external_specs.append(external_spec)
|
||||
|
||||
for external_spec, module in iteritems(pkg_modules):
|
||||
if not module:
|
||||
continue
|
||||
|
||||
external_spec = spack.spec.Spec(
|
||||
external_spec, external_module=module)
|
||||
if external_spec.satisfies(spec):
|
||||
external_specs.append(external_spec)
|
||||
for external_spec, module in pkg_modules.items():
|
||||
external_spec = spack.spec.Spec(
|
||||
external_spec, external_module=module)
|
||||
if external_spec.satisfies(spec):
|
||||
external_specs.append(external_spec)
|
||||
|
||||
# defensively copy returned specs
|
||||
return [s.copy() for s in external_specs]
|
||||
@@ -215,12 +190,11 @@ def spec_externals(spec):
|
||||
|
||||
def is_spec_buildable(spec):
|
||||
"""Return true if the spec pkgspec is configured as buildable"""
|
||||
allpkgs = get_packages_config()
|
||||
if spec.name not in allpkgs:
|
||||
return True
|
||||
if 'buildable' not in allpkgs[spec.name]:
|
||||
return True
|
||||
return allpkgs[spec.name]['buildable']
|
||||
allpkgs = spack.config.get('packages')
|
||||
do_not_build = [name for name, entry in allpkgs.items()
|
||||
if not entry.get('buildable', True)]
|
||||
return not (spec.name in do_not_build or
|
||||
any(spec.package.provides(name) for name in do_not_build))
|
||||
|
||||
|
||||
def get_package_dir_permissions(spec):
|
||||
|
@@ -3,12 +3,15 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import platform
|
||||
|
||||
import pytest
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
||||
from spack.main import SpackCommand
|
||||
import spack.architecture as architecture
|
||||
from spack.main import SpackCommand, get_version
|
||||
from spack.util.executable import which
|
||||
|
||||
debug = SpackCommand('debug')
|
||||
@@ -41,3 +44,12 @@ def test_create_db_tarball(tmpdir, database):
|
||||
|
||||
spec_suffix = '%s/.spack/spec.yaml' % spec.dag_hash()
|
||||
assert spec_suffix in contents
|
||||
|
||||
|
||||
def test_report():
|
||||
out = debug('report')
|
||||
arch = architecture.Arch(architecture.platform(), 'frontend', 'frontend')
|
||||
|
||||
assert get_version() in out
|
||||
assert platform.python_version() in out
|
||||
assert str(arch) in out
|
||||
|
@@ -370,6 +370,54 @@ def test_init_from_yaml(tmpdir):
|
||||
assert not e2.specs_by_hash
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('config')
|
||||
def test_env_view_external_prefix(tmpdir_factory, mutable_database,
|
||||
mock_packages):
|
||||
fake_prefix = tmpdir_factory.mktemp('a-prefix')
|
||||
fake_bin = fake_prefix.join('bin')
|
||||
fake_bin.ensure(dir=True)
|
||||
|
||||
initial_yaml = StringIO("""\
|
||||
env:
|
||||
specs:
|
||||
- a
|
||||
view: true
|
||||
""")
|
||||
|
||||
external_config = StringIO("""\
|
||||
packages:
|
||||
a:
|
||||
paths:
|
||||
a: {a_prefix}
|
||||
buildable: false
|
||||
""".format(a_prefix=str(fake_prefix)))
|
||||
external_config_dict = spack.util.spack_yaml.load_config(external_config)
|
||||
|
||||
test_scope = spack.config.InternalConfigScope(
|
||||
'env-external-test', data=external_config_dict)
|
||||
with spack.config.override(test_scope):
|
||||
|
||||
e = ev.create('test', initial_yaml)
|
||||
e.concretize()
|
||||
# Note: normally installing specs in a test environment requires doing
|
||||
# a fake install, but not for external specs since no actions are
|
||||
# taken to install them. The installation commands also include
|
||||
# post-installation functions like DB-registration, so are important
|
||||
# to do (otherwise the package is not considered installed).
|
||||
e.install_all()
|
||||
e.write()
|
||||
|
||||
env_modifications = e.add_default_view_to_shell('sh')
|
||||
individual_modifications = env_modifications.split('\n')
|
||||
|
||||
def path_includes_fake_prefix(cmd):
|
||||
return 'export PATH' in cmd and str(fake_bin) in cmd
|
||||
|
||||
assert any(
|
||||
path_includes_fake_prefix(cmd) for cmd in individual_modifications
|
||||
)
|
||||
|
||||
|
||||
def test_init_with_file_and_remove(tmpdir):
|
||||
"""Ensure a user can remove from any position in the spack.yaml file."""
|
||||
path = tmpdir.join('spack.yaml')
|
||||
|
@@ -3,7 +3,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import os
|
||||
from spack.main import SpackCommand
|
||||
import pytest
|
||||
from spack.main import SpackCommand, SpackCommandError
|
||||
import spack.spec
|
||||
import spack.user_environment as uenv
|
||||
|
||||
@@ -83,6 +84,18 @@ def test_load_includes_run_env(install_mockery, mock_fetch, mock_archive,
|
||||
assert 'setenv FOOBAR mpileaks' in csh_out
|
||||
|
||||
|
||||
def test_load_first(install_mockery, mock_fetch, mock_archive, mock_packages):
|
||||
"""Test with and without the --first option"""
|
||||
install('libelf@0.8.12')
|
||||
install('libelf@0.8.13')
|
||||
# Now there are two versions of libelf
|
||||
with pytest.raises(SpackCommandError):
|
||||
# This should cause an error due to multiple versions
|
||||
load('--sh', 'libelf')
|
||||
# Using --first should avoid the error condition
|
||||
load('--sh', '--first', 'libelf')
|
||||
|
||||
|
||||
def test_load_fails_no_shell(install_mockery, mock_fetch, mock_archive,
|
||||
mock_packages):
|
||||
"""Test that spack load prints an error message without a shell."""
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import platform
|
||||
|
||||
import pytest
|
||||
|
||||
import spack
|
||||
@@ -16,6 +18,11 @@ def test_python():
|
||||
assert out.strip() == spack.spack_version
|
||||
|
||||
|
||||
def test_python_version():
|
||||
out = python('-V')
|
||||
assert platform.python_version() in out
|
||||
|
||||
|
||||
def test_python_with_module():
|
||||
# pytest rewrites a lot of modules, which interferes with runpy, so
|
||||
# it's hard to test this. Trying to import a module like sys, that
|
||||
|
@@ -185,34 +185,6 @@ def test_develop(self):
|
||||
spec.concretize()
|
||||
assert spec.version == Version('0.2.15.develop')
|
||||
|
||||
def test_no_virtuals_in_packages_yaml(self):
|
||||
"""Verify that virtuals are not allowed in packages.yaml."""
|
||||
|
||||
# set up a packages.yaml file with a vdep as a key. We use
|
||||
# syaml.load_config here to make sure source lines in the config are
|
||||
# attached to parsed strings, as the error message uses them.
|
||||
conf = syaml.load_config("""\
|
||||
mpi:
|
||||
paths:
|
||||
mpi-with-lapack@2.1: /path/to/lapack
|
||||
""")
|
||||
spack.config.set('packages', conf, scope='concretize')
|
||||
|
||||
# now when we get the packages.yaml config, there should be an error
|
||||
with pytest.raises(spack.package_prefs.VirtualInPackagesYAMLError):
|
||||
spack.package_prefs.get_packages_config()
|
||||
|
||||
def test_all_is_not_a_virtual(self):
|
||||
"""Verify that `all` is allowed in packages.yaml."""
|
||||
conf = syaml.load_config("""\
|
||||
all:
|
||||
variants: [+mpi]
|
||||
""")
|
||||
spack.config.set('packages', conf, scope='concretize')
|
||||
|
||||
# should be no error for 'all':
|
||||
spack.package_prefs.get_packages_config()
|
||||
|
||||
def test_external_mpi(self):
|
||||
# make sure this doesn't give us an external first.
|
||||
spec = Spec('mpi')
|
||||
@@ -236,6 +208,37 @@ def test_external_mpi(self):
|
||||
spec.concretize()
|
||||
assert spec['mpich'].external_path == '/dummy/path'
|
||||
|
||||
def test_external_module(self, monkeypatch):
|
||||
"""Test that packages can find externals specified by module
|
||||
|
||||
The specific code for parsing the module is tested elsewhere.
|
||||
This just tests that the preference is accounted for"""
|
||||
# make sure this doesn't give us an external first.
|
||||
def mock_module(cmd, module):
|
||||
return 'prepend-path PATH /dummy/path'
|
||||
monkeypatch.setattr(spack.util.module_cmd, 'module', mock_module)
|
||||
|
||||
spec = Spec('mpi')
|
||||
spec.concretize()
|
||||
assert not spec['mpi'].external
|
||||
|
||||
# load config
|
||||
conf = syaml.load_config("""\
|
||||
all:
|
||||
providers:
|
||||
mpi: [mpich]
|
||||
mpi:
|
||||
buildable: false
|
||||
modules:
|
||||
mpich@3.0.4: dummy
|
||||
""")
|
||||
spack.config.set('packages', conf, scope='concretize')
|
||||
|
||||
# ensure that once config is in place, external is used
|
||||
spec = Spec('mpi')
|
||||
spec.concretize()
|
||||
assert spec['mpich'].external_path == '/dummy/path'
|
||||
|
||||
def test_config_permissions_from_all(self, configure_permissions):
|
||||
# Although these aren't strictly about concretization, they are
|
||||
# configured in the same file and therefore convenient to test here.
|
||||
|
@@ -1040,6 +1040,13 @@ def __init__(self, name, dependencies, dependency_types, conditions=None,
|
||||
self.conflicts = {}
|
||||
self.patches = {}
|
||||
|
||||
def provides(self, vname):
|
||||
return vname in self.provided
|
||||
|
||||
@property
|
||||
def virtuals_provided(self):
|
||||
return [v.name for v, c in self.provided]
|
||||
|
||||
|
||||
class MockPackageMultiRepo(object):
|
||||
def __init__(self, packages):
|
||||
|
@@ -52,52 +52,52 @@ def check_mirror():
|
||||
mirror_root = os.path.join(stage.path, 'test-mirror')
|
||||
# register mirror with spack config
|
||||
mirrors = {'spack-mirror-test': 'file://' + mirror_root}
|
||||
spack.config.set('mirrors', mirrors)
|
||||
with spack.config.override('config:checksum', False):
|
||||
specs = [Spec(x).concretized() for x in repos]
|
||||
spack.mirror.create(mirror_root, specs)
|
||||
|
||||
# Stage directory exists
|
||||
assert os.path.isdir(mirror_root)
|
||||
|
||||
for spec in specs:
|
||||
fetcher = spec.package.fetcher[0]
|
||||
per_package_ref = os.path.join(
|
||||
spec.name, '-'.join([spec.name, str(spec.version)]))
|
||||
mirror_paths = spack.mirror.mirror_archive_paths(
|
||||
fetcher,
|
||||
per_package_ref)
|
||||
expected_path = os.path.join(
|
||||
mirror_root, mirror_paths.storage_path)
|
||||
assert os.path.exists(expected_path)
|
||||
|
||||
# Now try to fetch each package.
|
||||
for name, mock_repo in repos.items():
|
||||
spec = Spec(name).concretized()
|
||||
pkg = spec.package
|
||||
|
||||
with spack.config.override('mirrors', mirrors):
|
||||
with spack.config.override('config:checksum', False):
|
||||
with pkg.stage:
|
||||
pkg.do_stage(mirror_only=True)
|
||||
specs = [Spec(x).concretized() for x in repos]
|
||||
spack.mirror.create(mirror_root, specs)
|
||||
|
||||
# Compare the original repo with the expanded archive
|
||||
original_path = mock_repo.path
|
||||
if 'svn' in name:
|
||||
# have to check out the svn repo to compare.
|
||||
original_path = os.path.join(
|
||||
mock_repo.path, 'checked_out')
|
||||
# Stage directory exists
|
||||
assert os.path.isdir(mirror_root)
|
||||
|
||||
svn = which('svn', required=True)
|
||||
svn('checkout', mock_repo.url, original_path)
|
||||
for spec in specs:
|
||||
fetcher = spec.package.fetcher[0]
|
||||
per_package_ref = os.path.join(
|
||||
spec.name, '-'.join([spec.name, str(spec.version)]))
|
||||
mirror_paths = spack.mirror.mirror_archive_paths(
|
||||
fetcher,
|
||||
per_package_ref)
|
||||
expected_path = os.path.join(
|
||||
mirror_root, mirror_paths.storage_path)
|
||||
assert os.path.exists(expected_path)
|
||||
|
||||
dcmp = filecmp.dircmp(
|
||||
original_path, pkg.stage.source_path)
|
||||
# Now try to fetch each package.
|
||||
for name, mock_repo in repos.items():
|
||||
spec = Spec(name).concretized()
|
||||
pkg = spec.package
|
||||
|
||||
# make sure there are no new files in the expanded
|
||||
# tarball
|
||||
assert not dcmp.right_only
|
||||
# and that all original files are present.
|
||||
assert all(l in exclude for l in dcmp.left_only)
|
||||
with spack.config.override('config:checksum', False):
|
||||
with pkg.stage:
|
||||
pkg.do_stage(mirror_only=True)
|
||||
|
||||
# Compare the original repo with the expanded archive
|
||||
original_path = mock_repo.path
|
||||
if 'svn' in name:
|
||||
# have to check out the svn repo to compare.
|
||||
original_path = os.path.join(
|
||||
mock_repo.path, 'checked_out')
|
||||
|
||||
svn = which('svn', required=True)
|
||||
svn('checkout', mock_repo.url, original_path)
|
||||
|
||||
dcmp = filecmp.dircmp(
|
||||
original_path, pkg.stage.source_path)
|
||||
|
||||
# make sure there are no new files in the expanded
|
||||
# tarball
|
||||
assert not dcmp.right_only
|
||||
# and that all original files are present.
|
||||
assert all(l in exclude for l in dcmp.left_only)
|
||||
|
||||
|
||||
def test_url_mirror(mock_archive):
|
||||
|
@@ -20,28 +20,11 @@
|
||||
'setenv LDFLAGS -L/path/to/lib',
|
||||
'prepend-path PATH /path/to/bin']
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def module_function_test_mode():
|
||||
old_mode = spack.util.module_cmd._test_mode
|
||||
spack.util.module_cmd._test_mode = True
|
||||
|
||||
yield
|
||||
|
||||
spack.util.module_cmd._test_mode = old_mode
|
||||
_test_template = "'. %s 2>&1' % args[1]"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def save_module_func():
|
||||
old_func = spack.util.module_cmd.module
|
||||
|
||||
yield
|
||||
|
||||
spack.util.module_cmd.module = old_func
|
||||
|
||||
|
||||
def test_module_function_change_env(tmpdir, working_env,
|
||||
module_function_test_mode):
|
||||
def test_module_function_change_env(tmpdir, working_env, monkeypatch):
|
||||
monkeypatch.setattr(spack.util.module_cmd, '_cmd_template', _test_template)
|
||||
src_file = str(tmpdir.join('src_me'))
|
||||
with open(src_file, 'w') as f:
|
||||
f.write('export TEST_MODULE_ENV_VAR=TEST_SUCCESS\n')
|
||||
@@ -53,7 +36,8 @@ def test_module_function_change_env(tmpdir, working_env,
|
||||
assert os.environ['NOT_AFFECTED'] == "NOT_AFFECTED"
|
||||
|
||||
|
||||
def test_module_function_no_change(tmpdir, module_function_test_mode):
|
||||
def test_module_function_no_change(tmpdir, monkeypatch):
|
||||
monkeypatch.setattr(spack.util.module_cmd, '_cmd_template', _test_template)
|
||||
src_file = str(tmpdir.join('src_me'))
|
||||
with open(src_file, 'w') as f:
|
||||
f.write('echo TEST_MODULE_FUNCTION_PRINT')
|
||||
@@ -65,11 +49,11 @@ def test_module_function_no_change(tmpdir, module_function_test_mode):
|
||||
assert os.environ == old_env
|
||||
|
||||
|
||||
def test_get_path_from_module_faked(save_module_func):
|
||||
def test_get_path_from_module_faked(monkeypatch):
|
||||
for line in test_module_lines:
|
||||
def fake_module(*args):
|
||||
return line
|
||||
spack.util.module_cmd.module = fake_module
|
||||
monkeypatch.setattr(spack.util.module_cmd, 'module', fake_module)
|
||||
|
||||
path = get_path_from_module('mod')
|
||||
assert path == '/path/to'
|
||||
|
@@ -387,7 +387,6 @@ def test_unsatisfiable_architecture(self, set_dependency):
|
||||
with pytest.raises(spack.spec.UnsatisfiableArchitectureSpecError):
|
||||
spec.normalize()
|
||||
|
||||
@pytest.mark.usefixtures('config')
|
||||
def test_invalid_dep(self):
|
||||
spec = Spec('libelf ^mpich')
|
||||
with pytest.raises(spack.spec.InvalidDependencyError):
|
||||
@@ -602,7 +601,6 @@ def test_copy_normalized(self):
|
||||
copy_ids = set(id(s) for s in copy.traverse())
|
||||
assert not orig_ids.intersection(copy_ids)
|
||||
|
||||
@pytest.mark.usefixtures('config')
|
||||
def test_copy_concretized(self):
|
||||
orig = Spec('mpileaks')
|
||||
orig.concretize()
|
||||
|
@@ -65,7 +65,7 @@ def environment_modifications_for_spec(spec, view=None):
|
||||
This list is specific to the location of the spec or its projection in
|
||||
the view."""
|
||||
spec = spec.copy()
|
||||
if view:
|
||||
if view and not spec.external:
|
||||
spec.prefix = prefix.Prefix(view.view().get_projection_for_spec(spec))
|
||||
|
||||
# generic environment modifications determined by inspecting the spec
|
||||
|
@@ -19,16 +19,11 @@
|
||||
# If we need another option that changes the environment, add it here.
|
||||
module_change_commands = ['load', 'swap', 'unload', 'purge', 'use', 'unuse']
|
||||
py_cmd = "'import os;import json;print(json.dumps(dict(os.environ)))'"
|
||||
|
||||
# This is just to enable testing. I hate it but we can't find a better way
|
||||
_test_mode = False
|
||||
_cmd_template = "'module ' + ' '.join(args) + ' 2>&1'"
|
||||
|
||||
|
||||
def module(*args):
|
||||
module_cmd = 'module ' + ' '.join(args) + ' 2>&1'
|
||||
if _test_mode:
|
||||
tty.warn('module function operating in test mode')
|
||||
module_cmd = ". %s 2>&1" % args[1]
|
||||
module_cmd = eval(_cmd_template) # So we can monkeypatch for testing
|
||||
if args[0] in module_change_commands:
|
||||
# Do the module manipulation, then output the environment in JSON
|
||||
# and read the JSON back in the parent process to update os.environ
|
||||
|
@@ -66,7 +66,7 @@ case cd:
|
||||
[ $#_sp_args -gt 0 ] && set _sp_arg = ($_sp_args[1])
|
||||
shift _sp_args
|
||||
|
||||
if ( "$_sp_arg" == "-h" ) then
|
||||
if ( "$_sp_arg" == "-h" || "$_sp_args" == "--help" ) then
|
||||
\spack cd -h
|
||||
else
|
||||
cd `\spack location $_sp_arg $_sp_args`
|
||||
@@ -78,7 +78,7 @@ case env:
|
||||
set _sp_arg=""
|
||||
[ $#_sp_args -gt 0 ] && set _sp_arg = ($_sp_args[1])
|
||||
|
||||
if ( "$_sp_arg" == "-h" ) then
|
||||
if ( "$_sp_arg" == "-h" || "$_sp_arg" == "--help" ) then
|
||||
\spack env -h
|
||||
else
|
||||
switch ($_sp_arg)
|
||||
@@ -86,12 +86,18 @@ case env:
|
||||
set _sp_env_arg=""
|
||||
[ $#_sp_args -gt 1 ] && set _sp_env_arg = ($_sp_args[2])
|
||||
|
||||
if ( "$_sp_env_arg" == "" || "$_sp_args" =~ "*--sh*" || "$_sp_args" =~ "*--csh*" || "$_sp_args" =~ "*-h*" ) then
|
||||
# no args or args contain -h/--help, --sh, or --csh: just execute
|
||||
# Space needed here to differentiate between `-h`
|
||||
# argument and environments with "-h" in the name.
|
||||
if ( "$_sp_env_arg" == "" || \
|
||||
"$_sp_args" =~ "* --sh*" || \
|
||||
"$_sp_args" =~ "* --csh*" || \
|
||||
"$_sp_args" =~ "* -h*" || \
|
||||
"$_sp_args" =~ "* --help*" ) then
|
||||
# No args or args contain --sh, --csh, or -h/--help: just execute.
|
||||
\spack $_sp_flags env $_sp_args
|
||||
else
|
||||
shift _sp_args # consume 'activate' or 'deactivate'
|
||||
# actual call to activate: source the output
|
||||
# Actual call to activate: source the output.
|
||||
eval `\spack $_sp_flags env activate --csh $_sp_args`
|
||||
endif
|
||||
breaksw
|
||||
@@ -99,30 +105,40 @@ case env:
|
||||
set _sp_env_arg=""
|
||||
[ $#_sp_args -gt 1 ] && set _sp_env_arg = ($_sp_args[2])
|
||||
|
||||
if ( "$_sp_env_arg" != "" ) then
|
||||
# with args: execute the command
|
||||
# Space needed here to differentiate between `--sh`
|
||||
# argument and environments with "--sh" in the name.
|
||||
if ( "$_sp_args" =~ "* --sh*" || \
|
||||
"$_sp_args" =~ "* --csh*" ) then
|
||||
# Args contain --sh or --csh: just execute.
|
||||
\spack $_sp_flags env $_sp_args
|
||||
else if ( "$_sp_env_arg" != "" ) then
|
||||
# Any other arguments are an error or -h/--help: just run help.
|
||||
\spack $_sp_flags env deactivate -h
|
||||
else
|
||||
# no args: source the output
|
||||
# No args: source the output of the command.
|
||||
eval `\spack $_sp_flags env deactivate --csh`
|
||||
endif
|
||||
breaksw
|
||||
default:
|
||||
echo default
|
||||
\spack $_sp_flags env $_sp_args
|
||||
breaksw
|
||||
endsw
|
||||
endif
|
||||
breaksw
|
||||
|
||||
case load:
|
||||
case unload:
|
||||
# Space in `-h` portion is important for differentiating -h option
|
||||
# from variants that begin with "h" or packages with "-h" in name
|
||||
if ( "$_sp_spec" =~ "*--sh*" || "$_sp_spec" =~ "*--csh*" || \
|
||||
" $_sp_spec" =~ "* -h*" || "$_sp_spec" =~ "*--help*") then
|
||||
# IF a shell is given, print shell output
|
||||
# Get --sh, --csh, -h, or --help arguments.
|
||||
# Space needed here to differentiate between `-h`
|
||||
# argument and specs with "-h" in the name.
|
||||
if ( " $_sp_spec" =~ "* --sh*" || \
|
||||
" $_sp_spec" =~ "* --csh*" || \
|
||||
" $_sp_spec" =~ "* -h*" || \
|
||||
" $_sp_spec" =~ "* --help*") then
|
||||
# Args contain --sh, --csh, or -h/--help: just execute.
|
||||
\spack $_sp_flags $_sp_subcommand $_sp_spec
|
||||
else
|
||||
# otherwise eval with csh
|
||||
# Otherwise, eval with csh.
|
||||
eval `\spack $_sp_flags $_sp_subcommand --csh $_sp_spec || \
|
||||
echo "exit 1"`
|
||||
endif
|
||||
|
@@ -115,31 +115,44 @@ spack() {
|
||||
else
|
||||
case $_sp_arg in
|
||||
activate)
|
||||
_a="$@"
|
||||
# Get --sh, --csh, or -h/--help arguments.
|
||||
# Space needed here becauses regexes start with a space
|
||||
# and `-h` may be the only argument.
|
||||
_a=" $@"
|
||||
# Space needed here to differentiate between `-h`
|
||||
# argument and environments with "-h" in the name.
|
||||
# Also see: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion
|
||||
if [ -z ${1+x} ] || \
|
||||
[ "${_a#*--sh}" != "$_a" ] || \
|
||||
[ "${_a#*--csh}" != "$_a" ] || \
|
||||
[ "${_a#*-h}" != "$_a" ];
|
||||
[ "${_a#* --sh}" != "$_a" ] || \
|
||||
[ "${_a#* --csh}" != "$_a" ] || \
|
||||
[ "${_a#* -h}" != "$_a" ] || \
|
||||
[ "${_a#* --help}" != "$_a" ];
|
||||
then
|
||||
# no args or args contain -h/--help, --sh, or --csh: just execute
|
||||
# No args or args contain --sh, --csh, or -h/--help: just execute.
|
||||
command spack env activate "$@"
|
||||
else
|
||||
# actual call to activate: source the output
|
||||
# Actual call to activate: source the output.
|
||||
eval $(command spack $_sp_flags env activate --sh "$@")
|
||||
fi
|
||||
;;
|
||||
deactivate)
|
||||
_a="$@"
|
||||
if [ "${_a#*--sh}" != "$_a" ] || \
|
||||
[ "${_a#*--csh}" != "$_a" ];
|
||||
# Get --sh, --csh, or -h/--help arguments.
|
||||
# Space needed here becauses regexes start with a space
|
||||
# and `-h` may be the only argument.
|
||||
_a=" $@"
|
||||
# Space needed here to differentiate between `--sh`
|
||||
# argument and environments with "--sh" in the name.
|
||||
# Also see: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion
|
||||
if [ "${_a#* --sh}" != "$_a" ] || \
|
||||
[ "${_a#* --csh}" != "$_a" ];
|
||||
then
|
||||
# just execute the command if --sh or --csh are provided
|
||||
# Args contain --sh or --csh: just execute.
|
||||
command spack env deactivate "$@"
|
||||
elif [ -n "$*" ]; then
|
||||
# any other arguments are an error or help, so just run help
|
||||
# Any other arguments are an error or -h/--help: just run help.
|
||||
command spack env deactivate -h
|
||||
else
|
||||
# no args: source the output of the command
|
||||
# No args: source the output of the command.
|
||||
eval $(command spack $_sp_flags env deactivate --sh)
|
||||
fi
|
||||
;;
|
||||
@@ -151,17 +164,19 @@ spack() {
|
||||
return
|
||||
;;
|
||||
"load"|"unload")
|
||||
# get --sh, --csh, --help, or -h arguments
|
||||
# space is important for -h case to differentiate between `-h`
|
||||
# argument and specs with "-h" in package name or variant settings
|
||||
# Get --sh, --csh, -h, or --help arguments.
|
||||
# Space needed here becauses regexes start with a space
|
||||
# and `-h` may be the only argument.
|
||||
_a=" $@"
|
||||
# Space needed here to differentiate between `-h`
|
||||
# argument and specs with "-h" in the name.
|
||||
# Also see: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion
|
||||
if [ "${_a#* --sh}" != "$_a" ] || \
|
||||
[ "${_a#* --csh}" != "$_a" ] || \
|
||||
[ "${_a#* -h}" != "$_a" ] || \
|
||||
[ "${_a#* --help}" != "$_a" ];
|
||||
then
|
||||
# just execute the command if --sh or --csh are provided
|
||||
# or if the -h or --help arguments are provided
|
||||
# Args contain --sh, --csh, or -h/--help: just execute.
|
||||
command spack $_sp_flags $_sp_subcommand "$@"
|
||||
else
|
||||
eval $(command spack $_sp_flags $_sp_subcommand --sh "$@" || \
|
||||
|
@@ -655,7 +655,7 @@ _spack_debug() {
|
||||
then
|
||||
SPACK_COMPREPLY="-h --help"
|
||||
else
|
||||
SPACK_COMPREPLY="create-db-tarball"
|
||||
SPACK_COMPREPLY="create-db-tarball report"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -663,6 +663,10 @@ _spack_debug_create_db_tarball() {
|
||||
SPACK_COMPREPLY="-h --help"
|
||||
}
|
||||
|
||||
_spack_debug_report() {
|
||||
SPACK_COMPREPLY="-h --help"
|
||||
}
|
||||
|
||||
_spack_dependencies() {
|
||||
if $list_options
|
||||
then
|
||||
@@ -980,7 +984,7 @@ _spack_list() {
|
||||
_spack_load() {
|
||||
if $list_options
|
||||
then
|
||||
SPACK_COMPREPLY="-h --help -r --dependencies --sh --csh --only"
|
||||
SPACK_COMPREPLY="-h --help -r --dependencies --sh --csh --first --only"
|
||||
else
|
||||
_installed_packages
|
||||
fi
|
||||
@@ -1272,7 +1276,7 @@ _spack_pydoc() {
|
||||
_spack_python() {
|
||||
if $list_options
|
||||
then
|
||||
SPACK_COMPREPLY="-h --help -c -m"
|
||||
SPACK_COMPREPLY="-h --help -V --version -c -m"
|
||||
else
|
||||
SPACK_COMPREPLY=""
|
||||
fi
|
||||
|
@@ -30,10 +30,11 @@ class ActsCore(CMakePackage):
|
||||
"""
|
||||
|
||||
homepage = "http://acts.web.cern.ch/ACTS/"
|
||||
git = "https://gitlab.cern.ch/acts/acts-core.git"
|
||||
git = "https://github.com/acts-project/acts.git"
|
||||
maintainers = ['HadrienG2']
|
||||
|
||||
version('develop', branch='master')
|
||||
version('0.20.0', commit='1d37a849a9c318e8ca4fa541ef8433c1f004637b')
|
||||
version('0.19.0', commit='408335636486c421c6222a64372250ef12544df6')
|
||||
version('0.18.0', commit='d58a68cf75b52a5e0f563bc237f09250aa9da80c')
|
||||
version('0.17.0', commit='0789f654ff484b013fd27e5023cf342785ea8d97')
|
||||
|
@@ -11,7 +11,7 @@ class AdolC(AutotoolsPackage):
|
||||
derivatives of vector functions in C and C++ programs by operator
|
||||
overloading."""
|
||||
|
||||
homepage = "https://projects.coin-or.org/ADOL-C"
|
||||
homepage = "https://github.com/coin-or/ADOL-C"
|
||||
url = "https://github.com/coin-or/ADOL-C/archive/releases/2.7.2.tar.gz"
|
||||
git = "https://github.com/coin-or/ADOL-C.git"
|
||||
version('master', branch='master')
|
||||
|
@@ -18,6 +18,7 @@ class Amrex(CMakePackage):
|
||||
maintainers = ['mic84', 'asalmgren']
|
||||
|
||||
version('develop', branch='development')
|
||||
version('20.04', sha256='ce951105336d6fcc07abe3eadf9f71161f0ccbe3e45f4547be4d0ae99e15f3c6')
|
||||
version('20.03', sha256='a535dcc016f0d38b55d0ab8e9067c1c53e3686961f6a1fb471cb18a0ebc909e6')
|
||||
version('20.02', sha256='33529a23694283d12eb37d4682aa86c9cc1240bd50124efcf4464747a7554147')
|
||||
version('20.01', sha256='f7026d267ca5de79ec7e740264d54230f419776d40feae705e939be0b1d8e0d3')
|
||||
|
47
var/spack/repos/builtin/packages/anaconda2/package.py
Normal file
47
var/spack/repos/builtin/packages/anaconda2/package.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# 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 *
|
||||
from os.path import split
|
||||
|
||||
|
||||
class Anaconda2(Package):
|
||||
"""Anaconda is a free and open-source distribution of the Python and
|
||||
R programming languages for scientific computing, that aims to
|
||||
simplify package management and deployment. Package versions are
|
||||
managed by the package management system conda.
|
||||
"""
|
||||
|
||||
homepage = "https://www.anaconda.com"
|
||||
url = "https://repo.anaconda.com/archive/Anaconda2-2019.10-Linux-x86_64.sh"
|
||||
|
||||
maintainers = ['ajkotobi']
|
||||
|
||||
version('2019.10', sha256='8b2e7dea2da7d8cc18e822e8ec1804052102f4eefb94c1b3d0e586e126e8cd2f', expand=False)
|
||||
version('2019.07', sha256='189e16e7adf9ba4b7b7d06ecdc10ce4ad4153e5e3505b9331f3d142243e18e97', expand=False)
|
||||
version('2019.03', sha256='cedfee5b5a3f62fcdac0a1d2d12396d0f232d2213d24d6dc893df5d8e64b8773', expand=False)
|
||||
version('2018.12', sha256='1821d4b623ed449e0acb6df3ecbabd3944cffa98f96a5234b7a102a7c0853dc6', expand=False)
|
||||
version('5.3.1', sha256='f0650ad2f9ca4ae3f3162d7204a32950bc794f37f322eb47b5ad9412454f998c', expand=False)
|
||||
version('5.3.0', sha256='50eeaab24bfa2472bc6485fe8f0e612ed67e561eda1ff9fbf07b62c96443c1be', expand=False)
|
||||
version('5.2.0', sha256='cb0d7a08b0e2cec4372033d3269979b4e72e2353ffd1444f57cb38bc9621219f', expand=False)
|
||||
version('5.1.0', sha256='5f26ee92860d1dffdcd20910ff2cf75572c39d2892d365f4e867a611cca2af5b', expand=False)
|
||||
version('5.0.1', sha256='23c676510bc87c95184ecaeb327c0b2c88007278e0d698622e2dd8fb14d9faa4', expand=False)
|
||||
version('5.0.0.1', sha256='18730808d863a5c194ab3f59dd395c1a63cbd769c9bfb1df65efe61ee62fc6d6', expand=False)
|
||||
version('5.0.0', sha256='58a7117f89c40275114bf7e824a613a963da2b0fe63f2ec3c1175fea785b468e', expand=False)
|
||||
version('4.4.0', sha256='2d30b91ed4d215b6b4a15162a3389e9057b15445a0c02da71bd7bd272e7b824e', expand=False)
|
||||
version('4.3.1', sha256='e9b8f2645df6b1527ba56d61343162e0794acc3ee8dde2a6bba353719e2d878d', expand=False)
|
||||
version('4.3.0', sha256='7c52e6e99aabb24a49880130615a48e685da444c3c14eb48d6a65f3313bf745c', expand=False)
|
||||
version('4.2.0', sha256='beee286d24fb37dd6555281bba39b3deb5804baec509a9dc5c69185098cf661a', expand=False)
|
||||
version('4.1.1', sha256='9413b1d3ca9498ba6f53913df9c43d685dd973440ff10b7fe0c45b1cbdcb582e', expand=False)
|
||||
version('4.1.0', sha256='3b7e504ca0132fb555d1f10e174cae07007f1bc6898cad0f7d416a68aca01f45', expand=False)
|
||||
version('4.0.0', sha256='ae312143952ca00e061a656c2080e0e4fd3532721282ba8e2978177cad71a5f0', expand=False)
|
||||
version('2.5.0', sha256='e10abf459cde4a838bd6fc5ca03023c3401b81ad470627acde5a298d56715321', expand=False)
|
||||
version('2.4.1', sha256='2de682c96edf8cca2852071a84ff860025fbe8c502218e1995acd5ab47e8c9ac', expand=False)
|
||||
version('2.4.0', sha256='49d19834da06b1b82b6fa85bc647d2e78fa5957d0cbae3ccd6c695a541befa6b', expand=False)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
dir, anaconda_script = split(self.stage.archive_file)
|
||||
bash = which('bash')
|
||||
bash(anaconda_script, '-b', '-f', '-p', self.prefix)
|
@@ -24,7 +24,7 @@ class AprUtil(AutotoolsPackage):
|
||||
|
||||
depends_on('apr')
|
||||
depends_on('expat')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
|
||||
depends_on('openssl', when='+crypto')
|
||||
depends_on('gdbm', when='+gdbm')
|
||||
@@ -38,7 +38,7 @@ def configure_args(self):
|
||||
args = [
|
||||
'--with-apr={0}'.format(spec['apr'].prefix),
|
||||
'--with-expat={0}'.format(spec['expat'].prefix),
|
||||
'--with-iconv={0}'.format(spec['libiconv'].prefix),
|
||||
'--with-iconv={0}'.format(spec['iconv'].prefix),
|
||||
# TODO: Add support for the following database managers
|
||||
'--without-ndbm',
|
||||
'--without-berkeley-db',
|
||||
|
@@ -21,6 +21,7 @@ class Argobots(AutotoolsPackage):
|
||||
maintainers = ['shintaro-iwasaki']
|
||||
|
||||
version("master", branch="master")
|
||||
version("1.0", sha256="36a0815f7bf99900a9c9c1eef61ef9b3b76aa2cfc4594a304f6c8c3296da8def")
|
||||
version("1.0rc2", sha256="7496b8bd39930a548b01aa3b1fe8f8b582c272600ef6a05ddc4398cf21dc12a2")
|
||||
version("1.0rc1", sha256="2dc4487556dce602655a6535f501136f0edc3575708029c80b1af6dccd069ce7")
|
||||
version("1.0b1", sha256="480b85b0e8db288400088a57c2dc5639f556843b06b0492841920c38348a2a3e")
|
||||
|
14
var/spack/repos/builtin/packages/autoconf-archive/package.py
Normal file
14
var/spack/repos/builtin/packages/autoconf-archive/package.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright 2013-2020 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)
|
||||
|
||||
|
||||
class AutoconfArchive(AutotoolsPackage, GNUMirrorPackage):
|
||||
"""The GNU Autoconf Archive is a collection of more than 500 macros for
|
||||
GNU Autoconf."""
|
||||
|
||||
homepage = "https://www.gnu.org/software/autoconf-archive/"
|
||||
gnu_mirror_path = "autoconf-archive/autoconf-archive-2019.01.06.tar.xz"
|
||||
|
||||
version('2019.01.06', sha256='17195c833098da79de5778ee90948f4c5d90ed1a0cf8391b4ab348e2ec511e3f')
|
@@ -19,7 +19,7 @@ class Bash(AutotoolsPackage, GNUMirrorPackage):
|
||||
|
||||
depends_on('ncurses')
|
||||
depends_on('readline@5.0:')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
|
||||
patches = [
|
||||
('5.0', '001', 'f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289'),
|
||||
@@ -54,7 +54,7 @@ def configure_args(self):
|
||||
'--with-curses',
|
||||
'--enable-readline',
|
||||
'--with-installed-readline',
|
||||
'--with-libiconv-prefix={0}'.format(spec['libiconv'].prefix),
|
||||
'--with-libiconv-prefix={0}'.format(spec['iconv'].prefix),
|
||||
]
|
||||
|
||||
def check(self):
|
||||
|
@@ -35,6 +35,9 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
|
||||
variant('libiberty', default=False, description='Also install libiberty.')
|
||||
variant('nls', default=True, description='Enable Native Language Support')
|
||||
variant('headers', default=False, description='Install extra headers (e.g. ELF)')
|
||||
variant('lto', default=False, description='Enable lto.')
|
||||
variant('ld', default=False, description='Enable ld.')
|
||||
variant('interwork', default=False, description='Enable interwork.')
|
||||
|
||||
patch('cr16.patch', when='@:2.29.1')
|
||||
patch('update_symbol-2.26.patch', when='@2.26')
|
||||
@@ -68,6 +71,15 @@ def configure_args(self):
|
||||
'--with-sysroot=/',
|
||||
]
|
||||
|
||||
if '+lto' in spec:
|
||||
configure_args.append('--enable-lto')
|
||||
|
||||
if '+ld' in spec:
|
||||
configure_args.append('--enable-ld')
|
||||
|
||||
if '+interwork' in spec:
|
||||
configure_args.append('--enable-interwork')
|
||||
|
||||
if '+gold' in spec:
|
||||
configure_args.append('--enable-gold')
|
||||
|
||||
|
@@ -18,6 +18,7 @@ class Bison(AutotoolsPackage, GNUMirrorPackage):
|
||||
|
||||
version('3.4.2', sha256='ff3922af377d514eca302a6662d470e857bd1a591e96a2050500df5a9d59facf')
|
||||
version('3.4.1', sha256='7007fc89c216fbfaff5525359b02a7e5b612694df5168c74673f67055f015095')
|
||||
version('3.3.2', sha256='0fda1d034185397430eb7b0c9e140fb37e02fbfc53b90252fa5575e382b6dbd1')
|
||||
version('3.0.5', sha256='cd399d2bee33afa712bac4b1f4434e20379e9b4099bce47189e09a7675a2d566')
|
||||
version('3.0.4', sha256='b67fd2daae7a64b5ba862c66c07c1addb9e6b1b05c5f2049392cfd8a2172952e')
|
||||
version('2.7', sha256='19bbe7374fd602f7a6654c131c21a15aebdc06cc89493e8ff250cb7f9ed0a831')
|
||||
|
@@ -50,6 +50,13 @@ def cmake_args(self):
|
||||
args.append('-DPREFER_EXTERNAL_ZSTD=ON')
|
||||
args.append('-DPREFER_EXTERNAL_LZ4=ON')
|
||||
|
||||
if self.run_tests:
|
||||
args.append('-DBUILD_TESTS=ON')
|
||||
args.append('-DBUILD_BENCHMARKS=ON')
|
||||
else:
|
||||
args.append('-DBUILD_TESTS=OFF')
|
||||
args.append('-DBUILD_BENCHMARKS=OFF')
|
||||
|
||||
return args
|
||||
|
||||
@run_after('install')
|
||||
|
@@ -26,12 +26,18 @@ class Cgns(CMakePackage):
|
||||
version('3.3.1', sha256='81093693b2e21a99c5640b82b267a495625b663d7b8125d5f1e9e7aaa1f8d469')
|
||||
version('3.3.0', sha256='8422c67994f8dc6a2f201523a14f6c7d7e16313bdd404c460c16079dbeafc662')
|
||||
|
||||
variant('hdf5', default=True, description='Enable HDF5 interface')
|
||||
variant('fortran', default=False, description='Enable Fortran interface')
|
||||
variant('scoping', default=True, description='Enable scoping')
|
||||
variant('mpi', default=True, description='Enable parallel cgns')
|
||||
variant('int64', default=False, description='Build with 64-bit integers')
|
||||
variant('shared', default=True, description='Enable shared library')
|
||||
variant('hdf5', default=True, description='Enable HDF5 interface')
|
||||
variant('fortran', default=False, description='Enable Fortran interface')
|
||||
variant('base_scope', default=False, description='Enable base scope')
|
||||
variant('scoping', default=True, description='Enable scoping')
|
||||
variant('mpi', default=True, description='Enable parallel cgns')
|
||||
variant('int64', default=False, description='Build with 64-bit integers')
|
||||
variant('shared', default=True, description='Enable shared library')
|
||||
variant('static', default=False, description='Build static libraries')
|
||||
variant('testing', default=False, description='Build CGNS testing')
|
||||
variant('legacy', default=False, description='Enable legacy options')
|
||||
variant('parallel', default=False, description='Enable parallel features')
|
||||
variant('mem_debug', default=False, description='Enable memory debugging option')
|
||||
|
||||
depends_on('hdf5~mpi', when='+hdf5~mpi')
|
||||
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||
@@ -49,9 +55,21 @@ def cmake_args(self):
|
||||
'-DCGNS_ENABLE_PARALLEL:BOOL=%s' % (
|
||||
'ON' if '+mpi' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_TESTS:BOOL=OFF',
|
||||
'-DCGNS_BUILD_TESTING:BOOL=%s' % (
|
||||
'ON' if '+testing' in spec else 'OFF'),
|
||||
'-DCGNS_BUILD_CGNSTOOLS:BOOL=OFF',
|
||||
'-DCGNS_BUILD_SHARED:BOOL=%s' % (
|
||||
'ON' if '+shared' in spec else 'OFF')
|
||||
'ON' if '+shared' in spec else 'OFF'),
|
||||
'-DCGNS_BUILD_STATIC:BOOL=%s' % (
|
||||
'ON' if '+static' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_BASE_SCOPE:BOOL=%s' % (
|
||||
'ON' if '+base_scope' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_LEGACY:BOOL=%s' % (
|
||||
'ON' if '+legacy' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_PARALLEL:BOOL=%s' % (
|
||||
'ON' if '+parallel' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_MEM_DEBUG:BOOL=%s' % (
|
||||
'ON' if '+mem_debug' in spec else 'OFF')
|
||||
])
|
||||
|
||||
if '+mpi' in spec:
|
||||
|
@@ -12,7 +12,11 @@ class Citcoms(AutotoolsPackage):
|
||||
|
||||
homepage = "https://geodynamics.org/cig/software/citcoms/"
|
||||
url = "https://github.com/geodynamics/citcoms/releases/download/v3.3.1/CitcomS-3.3.1.tar.gz"
|
||||
git = "https://github.com/geodynamics/citcoms.git"
|
||||
|
||||
maintainers = ['adamjstewart']
|
||||
|
||||
version('master', branch='master', submodules=True)
|
||||
version('3.3.1', sha256='e3520e0a933e4699d31e86fe309b8c154ea6ecb0f42a1cf6f25e8d13d825a4b3')
|
||||
version('3.2.0', sha256='773a14d91ecbb4a4d1e04317635fab79819d83c57b47f19380ff30b9b19cb07a')
|
||||
|
||||
@@ -23,6 +27,11 @@ class Citcoms(AutotoolsPackage):
|
||||
# Required dependencies
|
||||
depends_on('mpi')
|
||||
depends_on('zlib')
|
||||
depends_on('python@:2', type='run') # needed for post-processing scripts
|
||||
depends_on('automake', when='@master', type='build')
|
||||
depends_on('autoconf', when='@master', type='build')
|
||||
depends_on('libtool', when='@master', type='build')
|
||||
depends_on('m4', when='@master', type='build')
|
||||
|
||||
# Optional dependencies
|
||||
depends_on('hc', when='+ggrd')
|
||||
|
@@ -13,6 +13,7 @@ class Cmake(Package):
|
||||
url = 'https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5.tar.gz'
|
||||
maintainers = ['chuckatkins']
|
||||
|
||||
version('3.17.0', sha256='b74c05b55115eacc4fa2b77a814981dbda05cdc95a53e279fe16b7b272f00847')
|
||||
version('3.16.5', sha256='5f760b50b8ecc9c0c37135fae5fbf00a2fef617059aa9d61c1bb91653e5a8bfc')
|
||||
version('3.16.2', sha256='8c09786ec60ca2be354c29829072c38113de9184f29928eb9da8446a5f2ce6a9')
|
||||
version('3.16.1', sha256='a275b3168fa8626eca4465da7bb159ff07c8c6cb0fb7179be59e12cbdfa725fd')
|
||||
|
@@ -0,0 +1,267 @@
|
||||
From 3b386a0ed507a9923f942098a4dcf2df2bcde7d7 Mon Sep 17 00:00:00 2001
|
||||
From: Michel Zou <xantares09@hotmail.com>
|
||||
Date: Thu, 6 Dec 2018 23:38:07 +0100
|
||||
Subject: [PATCH] cmake to link to cblas
|
||||
|
||||
---
|
||||
CMakeLists.txt | 30 ++++---
|
||||
cmake/CMakeLists.txt | 2 +-
|
||||
cmake/FindCBLAS.cmake | 180 ++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 201 insertions(+), 11 deletions(-)
|
||||
create mode 100644 cmake/FindCBLAS.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6c8d16b..f22039f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -5,6 +5,8 @@ cmake_minimum_required (VERSION 2.8.9)
|
||||
project (CMINPACK)
|
||||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
|
||||
|
||||
+set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||
+
|
||||
include(${PROJECT_SOURCE_DIR}/cmake/cminpack_utils.cmake)
|
||||
# Set version and OS-specific settings
|
||||
set(CMINPACK_VERSION 1.3.6 CACHE STRING "CMinpack version")
|
||||
@@ -34,7 +36,7 @@ else ()
|
||||
endif(WIN32)
|
||||
endif ()
|
||||
|
||||
-option(USE_BLAS "Compile cminpack using a blas library if possible" ON)
|
||||
+option(USE_BLAS "Compile cminpack using cblas library if possible" ON)
|
||||
|
||||
#set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/../build)
|
||||
|
||||
@@ -61,16 +63,24 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
TARGET_LINK_LIBRARIES(cminpack m)
|
||||
endif()
|
||||
|
||||
-# Link with a BLAS library if requested
|
||||
-if (USE_BLAS)
|
||||
- if (NOT BUILD_SHARED_LIBS)
|
||||
- set(BLA_STATIC True)
|
||||
+
|
||||
+include (CheckLibraryExists)
|
||||
+include (CheckFunctionExists)
|
||||
+check_function_exists (sqrt HAVE_SQRT_NO_LIBM)
|
||||
+if (NOT HAVE_SQRT_NO_LIBM)
|
||||
+ check_library_exists ("m" sqrt "" HAVE_LIBM)
|
||||
+ if (HAVE_LIBM)
|
||||
+ target_link_libraries(cminpack PUBLIC m)
|
||||
endif()
|
||||
- find_package(BLAS)
|
||||
- if (BLAS_FOUND)
|
||||
- target_link_libraries(cminpack PUBLIC ${BLAS_LIBRARIES})
|
||||
- set_target_properties(cminpack PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
|
||||
- target_compile_definitions(cminpack PUBLIC -DUSE_CBLAS)
|
||||
+endif ()
|
||||
+
|
||||
+# Link with CBLAS library if requested
|
||||
+if (USE_BLAS)
|
||||
+ find_package (CBLAS)
|
||||
+ if (CBLAS_FOUND)
|
||||
+ target_link_libraries(cminpack PUBLIC ${CBLAS_LIBRARIES})
|
||||
+ set_target_properties(cminpack PROPERTIES LINK_FLAGS "${CBLAS_LINKER_FLAGS}")
|
||||
+ target_compile_definitions(cminpack PUBLIC USE_CBLAS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
|
||||
index 058a89b..d8277bc 100644
|
||||
--- a/cmake/CMakeLists.txt
|
||||
+++ b/cmake/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
set(PKG_DESC "CMinPack")
|
||||
set(PKG_EXTERNAL_DEPS "")
|
||||
set(pkg_conf_file ${CMAKE_CURRENT_BINARY_DIR}/cminpack.pc)
|
||||
-if (USE_BLAS AND BLAS_FOUND)
|
||||
+if (USE_BLAS AND CBLAS_FOUND)
|
||||
set(PC_CMINPACK_CFLAGS "-DUSE_CBLAS")
|
||||
if (NOT "${BLAS_LIBRARIES}" STREQUAL "")
|
||||
string(REPLACE ";" " -l" PC_CMINPACK_LIBRARIES "${BLAS_LIBRARIES}")
|
||||
diff --git a/cmake/FindCBLAS.cmake b/cmake/FindCBLAS.cmake
|
||||
new file mode 100644
|
||||
index 0000000..e4fb422
|
||||
--- /dev/null
|
||||
+++ b/cmake/FindCBLAS.cmake
|
||||
@@ -0,0 +1,180 @@
|
||||
+# - Find CBLAS library
|
||||
+#
|
||||
+# This module finds an installed fortran library that implements the CBLAS
|
||||
+# linear-algebra interface (see http://www.netlib.org/blas/), with CBLAS
|
||||
+# interface.
|
||||
+#
|
||||
+# This module sets the following variables:
|
||||
+# CBLAS_FOUND - set to true if a library implementing the CBLAS interface is found
|
||||
+# CBLAS_LIBRARIES - list of libraries (using full path name) to link against to use CBLAS
|
||||
+# CBLAS_INCLUDE_DIR - path to includes
|
||||
+# CBLAS_INCLUDE_FILE - the file to be included to use CBLAS
|
||||
+#
|
||||
+
|
||||
+SET(CBLAS_LIBRARIES)
|
||||
+SET(CBLAS_INCLUDE_DIR)
|
||||
+SET(CBLAS_INCLUDE_FILE)
|
||||
+
|
||||
+# CBLAS in Intel mkl
|
||||
+FIND_PACKAGE(MKL)
|
||||
+IF (MKL_FOUND AND NOT CBLAS_LIBRARIES)
|
||||
+ SET(CBLAS_LIBRARIES ${MKL_LIBRARIES})
|
||||
+ SET(CBLAS_INCLUDE_DIR ${MKL_INCLUDE_DIR})
|
||||
+ SET(CBLAS_INCLUDE_FILE "mkl_cblas.h")
|
||||
+ENDIF (MKL_FOUND AND NOT CBLAS_LIBRARIES)
|
||||
+
|
||||
+# Old CBLAS search
|
||||
+SET(_verbose TRUE)
|
||||
+INCLUDE(CheckFunctionExists)
|
||||
+INCLUDE(CheckIncludeFile)
|
||||
+
|
||||
+MACRO(CHECK_ALL_LIBRARIES LIBRARIES _prefix _name _flags _list _include _search_include)
|
||||
+ # This macro checks for the existence of the combination of fortran libraries
|
||||
+ # given by _list. If the combination is found, this macro checks (using the
|
||||
+ # Check_Fortran_Function_Exists macro) whether can link against that library
|
||||
+ # combination using the name of a routine given by _name using the linker
|
||||
+ # flags given by _flags. If the combination of libraries is found and passes
|
||||
+ # the link test, LIBRARIES is set to the list of complete library paths that
|
||||
+ # have been found. Otherwise, LIBRARIES is set to FALSE.
|
||||
+ # N.B. _prefix is the prefix applied to the names of all cached variables that
|
||||
+ # are generated internally and marked advanced by this macro.
|
||||
+ SET(__list)
|
||||
+ FOREACH(_elem ${_list})
|
||||
+ IF(__list)
|
||||
+ SET(__list "${__list} - ${_elem}")
|
||||
+ ELSE(__list)
|
||||
+ SET(__list "${_elem}")
|
||||
+ ENDIF(__list)
|
||||
+ ENDFOREACH(_elem)
|
||||
+ IF(_verbose)
|
||||
+ MESSAGE(STATUS "Checking for [${__list}]")
|
||||
+ ENDIF(_verbose)
|
||||
+ SET(_libraries_work TRUE)
|
||||
+ SET(${LIBRARIES})
|
||||
+ SET(_combined_name)
|
||||
+ SET(_paths)
|
||||
+ FOREACH(_library ${_list})
|
||||
+ SET(_combined_name ${_combined_name}_${_library})
|
||||
+ # did we find all the libraries in the _list until now?
|
||||
+ # (we stop at the first unfound one)
|
||||
+ IF(_libraries_work)
|
||||
+ IF(APPLE)
|
||||
+ FIND_LIBRARY(${_prefix}_${_library}_LIBRARY
|
||||
+ NAMES ${_library}
|
||||
+ PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV
|
||||
+ DYLD_LIBRARY_PATH
|
||||
+ )
|
||||
+ ELSE(APPLE)
|
||||
+ FIND_LIBRARY(${_prefix}_${_library}_LIBRARY
|
||||
+ NAMES ${_library}
|
||||
+ PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV
|
||||
+ LD_LIBRARY_PATH
|
||||
+ )
|
||||
+ ENDIF(APPLE)
|
||||
+ MARK_AS_ADVANCED(${_prefix}_${_library}_LIBRARY)
|
||||
+ IF(${_prefix}_${_library}_LIBRARY)
|
||||
+ GET_FILENAME_COMPONENT(_path ${${_prefix}_${_library}_LIBRARY} PATH)
|
||||
+ LIST(APPEND _paths ${_path}/../include ${_path}/../../include)
|
||||
+ ENDIF(${_prefix}_${_library}_LIBRARY)
|
||||
+ SET(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
|
||||
+ SET(_libraries_work ${${_prefix}_${_library}_LIBRARY})
|
||||
+ ENDIF(_libraries_work)
|
||||
+ ENDFOREACH(_library ${_list})
|
||||
+ # Test include
|
||||
+ SET(_bug_search_include ${_search_include}) #CMAKE BUG!!! SHOULD NOT BE THAT
|
||||
+ IF(_bug_search_include)
|
||||
+ FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include} ${_paths})
|
||||
+ MARK_AS_ADVANCED(${_prefix}${_combined_name}_INCLUDE)
|
||||
+ IF(${_prefix}${_combined_name}_INCLUDE)
|
||||
+ IF (_verbose)
|
||||
+ MESSAGE(STATUS "Includes found")
|
||||
+ ENDIF (_verbose)
|
||||
+ SET(${_prefix}_INCLUDE_DIR ${${_prefix}${_combined_name}_INCLUDE})
|
||||
+ SET(${_prefix}_INCLUDE_FILE ${_include})
|
||||
+ ELSE(${_prefix}${_combined_name}_INCLUDE)
|
||||
+ SET(_libraries_work FALSE)
|
||||
+ ENDIF(${_prefix}${_combined_name}_INCLUDE)
|
||||
+ ELSE(_bug_search_include)
|
||||
+ SET(${_prefix}_INCLUDE_DIR)
|
||||
+ SET(${_prefix}_INCLUDE_FILE ${_include})
|
||||
+ ENDIF(_bug_search_include)
|
||||
+ # Test this combination of libraries.
|
||||
+ IF(_libraries_work)
|
||||
+ SET(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}})
|
||||
+ CHECK_FUNCTION_EXISTS(${_name} ${_prefix}${_combined_name}_WORKS)
|
||||
+ SET(CMAKE_REQUIRED_LIBRARIES)
|
||||
+ MARK_AS_ADVANCED(${_prefix}${_combined_name}_WORKS)
|
||||
+ SET(_libraries_work ${${_prefix}${_combined_name}_WORKS})
|
||||
+ IF(_verbose AND _libraries_work)
|
||||
+ MESSAGE(STATUS "Libraries found")
|
||||
+ ENDIF(_verbose AND _libraries_work)
|
||||
+ ENDIF(_libraries_work)
|
||||
+ # Fin
|
||||
+ IF(NOT _libraries_work)
|
||||
+ SET(${LIBRARIES} NOTFOUND)
|
||||
+ ENDIF(NOT _libraries_work)
|
||||
+ENDMACRO(CHECK_ALL_LIBRARIES)
|
||||
+
|
||||
+# Generic CBLAS library
|
||||
+IF(NOT CBLAS_LIBRARIES)
|
||||
+ CHECK_ALL_LIBRARIES(
|
||||
+ CBLAS_LIBRARIES
|
||||
+ CBLAS
|
||||
+ cblas_dgemm
|
||||
+ ""
|
||||
+ "cblas"
|
||||
+ "cblas.h"
|
||||
+ TRUE )
|
||||
+ENDIF()
|
||||
+
|
||||
+# CBLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
|
||||
+IF(NOT CBLAS_LIBRARIES)
|
||||
+ CHECK_ALL_LIBRARIES(
|
||||
+ CBLAS_LIBRARIES
|
||||
+ CBLAS
|
||||
+ cblas_dgemm
|
||||
+ ""
|
||||
+ "cblas;atlas"
|
||||
+ "cblas.h"
|
||||
+ TRUE )
|
||||
+ENDIF()
|
||||
+
|
||||
+# CBLAS in BLAS library
|
||||
+IF(NOT CBLAS_LIBRARIES)
|
||||
+ CHECK_ALL_LIBRARIES(
|
||||
+ CBLAS_LIBRARIES
|
||||
+ CBLAS
|
||||
+ cblas_dgemm
|
||||
+ ""
|
||||
+ "blas"
|
||||
+ "cblas.h"
|
||||
+ TRUE )
|
||||
+ENDIF()
|
||||
+
|
||||
+# Apple CBLAS library?
|
||||
+IF(NOT CBLAS_LIBRARIES)
|
||||
+ CHECK_ALL_LIBRARIES(
|
||||
+ CBLAS_LIBRARIES
|
||||
+ CBLAS
|
||||
+ cblas_dgemm
|
||||
+ ""
|
||||
+ "Accelerate"
|
||||
+ "Accelerate/Accelerate.h"
|
||||
+ FALSE )
|
||||
+ENDIF()
|
||||
+
|
||||
+IF( NOT CBLAS_LIBRARIES )
|
||||
+ CHECK_ALL_LIBRARIES(
|
||||
+ CBLAS_LIBRARIES
|
||||
+ CBLAS
|
||||
+ cblas_dgemm
|
||||
+ ""
|
||||
+ "vecLib"
|
||||
+ "vecLib/vecLib.h"
|
||||
+ FALSE )
|
||||
+ENDIF()
|
||||
+
|
||||
+include ( FindPackageHandleStandardArgs )
|
||||
+find_package_handle_standard_args ( CBLAS DEFAULT_MSG CBLAS_LIBRARIES
|
||||
+)
|
||||
+
|
39
var/spack/repos/builtin/packages/cminpack/package.py
Normal file
39
var/spack/repos/builtin/packages/cminpack/package.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Copyright 2013-2020 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 Cminpack(CMakePackage):
|
||||
"""This is a C version of the minpack minimization package.
|
||||
Minpack includes software for solving nonlinear equations
|
||||
and nonlinear least squares problems.
|
||||
"""
|
||||
|
||||
homepage = "http://devernay.free.fr/hacks/cminpack"
|
||||
url = "https://github.com/devernay/cminpack/archive/v1.3.6.tar.gz"
|
||||
git = 'https://github.com/devernay/cminpack.git'
|
||||
|
||||
version('master', branch='master')
|
||||
version('1.3.6', sha256='3c07fd21308c96477a2c900032e21d937739c233ee273b4347a0d4a84a32d09f')
|
||||
|
||||
variant('shared', default=False, description='Build shared libraries')
|
||||
variant('blas', default=True, description='Compile with BLAS')
|
||||
|
||||
depends_on('blas', when='+blas')
|
||||
|
||||
# Backport a pull request for correctly linking blas.
|
||||
# See https://github.com/devernay/cminpack/pull/21
|
||||
patch('link_with_blas_pr_21.patch', when='@:1.3.6')
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
'-DBUILD_SHARED_LIBS=%s' % (
|
||||
'ON' if '+shared' in self.spec else 'OFF'),
|
||||
'-DUSE_BLAS=%s' % (
|
||||
'ON' if 'blas' in self.spec else 'OFF')
|
||||
]
|
||||
|
||||
return args
|
@@ -13,7 +13,8 @@ class Cppgsl(CMakePackage):
|
||||
url = "https://github.com/Microsoft/GSL/archive/v2.0.0.tar.gz"
|
||||
git = "https://github.com/Microsoft/GSL.git"
|
||||
|
||||
version('develop', branch='master')
|
||||
version('master', branch='master')
|
||||
version('2.1.0', sha256='ef73814657b073e1be86c8f7353718771bf4149b482b6cb54f99e79b23ff899d')
|
||||
version('2.0.0', sha256='6cce6fb16b651e62711a4f58e484931013c33979b795d1b1f7646f640cfa9c8e')
|
||||
version('1.0.0', sha256='9694b04cd78e5b1a769868f19fdd9eea2002de3d4c3a81a1b769209364543c36')
|
||||
|
||||
|
@@ -16,6 +16,9 @@ class Cryptsetup(AutotoolsPackage):
|
||||
|
||||
# If you're adding newer versions, check whether the patch below
|
||||
# still needs to be applied.
|
||||
version('2.3.1', sha256='92aba4d559a2cf7043faed92e0f22c5addea36bd63f8c039ba5a8f3a159fe7d2')
|
||||
version('2.2.3', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')
|
||||
version('2.2.2', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')
|
||||
version('2.2.1', sha256='94e79a31ed38bdb0acd9af7ccca1605a2ac62ca850ed640202876b1ee11c1c61')
|
||||
|
||||
depends_on('libuuid', type=('build', 'link'))
|
||||
@@ -36,7 +39,7 @@ class Cryptsetup(AutotoolsPackage):
|
||||
# the LDFLAGS. See https://gitlab.com/cryptsetup/cryptsetup/issues/479
|
||||
# This *should* be unnecessary starting with release 2.2.2, see
|
||||
# https://gitlab.com/cryptsetup/cryptsetup/issues/479#note_227617031
|
||||
patch('autotools-libintl.patch')
|
||||
patch('autotools-libintl.patch', when='@:2.2.1')
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = "https://www.kernel.org/pub/linux/utils/cryptsetup/v{0}/cryptsetup-{1}.tar.xz"
|
||||
|
@@ -32,7 +32,7 @@ class Dcmtk(CMakePackage):
|
||||
depends_on('libxml2', type=('build', 'link'), when='+xml')
|
||||
|
||||
variant('iconv', default=True, description="Charset conversion support (iconv)")
|
||||
depends_on('libiconv', type=('build', 'link'))
|
||||
depends_on('iconv', type=('build', 'link'))
|
||||
|
||||
variant('cxx11', default=False, description="Enable c++11 features")
|
||||
variant('stl', default=True, description="Use native STL implementation")
|
||||
|
75
var/spack/repos/builtin/packages/ddd/package.py
Normal file
75
var/spack/repos/builtin/packages/ddd/package.py
Normal file
@@ -0,0 +1,75 @@
|
||||
# Copyright 2013-2020 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 *
|
||||
import os
|
||||
|
||||
|
||||
class Ddd(AutotoolsPackage, GNUMirrorPackage):
|
||||
"""A graphical front-end for command-line debuggers such as GDB, DBX,
|
||||
WDB, Ladebug, JDB, XDB, the Perl debugger, the bash debugger bashdb,
|
||||
the GNU Make debugger remake, or the Python debugger pydb."""
|
||||
|
||||
homepage = "https://www.gnu.org/software/ddd"
|
||||
gnu_mirror_path = "ddd/ddd-3.3.12.tar.gz"
|
||||
|
||||
version('3.3.12', sha256='3ad6cd67d7f4b1d6b2d38537261564a0d26aaed077bf25c51efc1474d0e8b65c')
|
||||
|
||||
variant('shared', default=True, description='Build shared libraries')
|
||||
variant('static', default=False, description='Build static libraries')
|
||||
|
||||
depends_on('gdb@4.16:')
|
||||
depends_on('lesstif@0.89:')
|
||||
|
||||
# Needed for OSX 10.9 DP6 build failure:
|
||||
# https://savannah.gnu.org/patch/?8178
|
||||
patch('https://savannah.gnu.org/patch/download.php?file_id=29114',
|
||||
sha256='aaacae79ce27446ead3483123abef0f8222ebc13fd61627bfadad96016248af6',
|
||||
working_dir='ddd')
|
||||
|
||||
# https://savannah.gnu.org/bugs/?41997
|
||||
patch('https://savannah.gnu.org/patch/download.php?file_id=31132',
|
||||
sha256='f3683f23c4b4ff89ba701660031d4b5ef27594076f6ef68814903ff3141f6714')
|
||||
|
||||
# Patch to fix compilation with Xcode 9
|
||||
# https://savannah.gnu.org/bugs/?52175
|
||||
patch('https://raw.githubusercontent.com/macports/macports-ports/a71fa9f4/devel/ddd/files/patch-unknown-type-name-a_class.diff',
|
||||
sha256='c187a024825144f186f0cf9cd175f3e972bb84590e62079793d0182cb15ca183',
|
||||
working_dir='ddd')
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
|
||||
args = [
|
||||
'--disable-debug',
|
||||
'--disable-dependency-tracking',
|
||||
'--enable-builtin-app-defaults',
|
||||
'--enable-builtin-manual',
|
||||
'--enable-shared' if '+shared' in spec else '--disable-shared',
|
||||
'--enable-static' if '+static' in spec else '--disable-static',
|
||||
]
|
||||
|
||||
return args
|
||||
|
||||
# From MacPorts: make will build the executable "ddd" and the X
|
||||
# resource file "Ddd" in the same directory. As HFS+ is case-
|
||||
# insensitive by default this will loosely FAIL. Mitigate this by
|
||||
# building/installing 'dddexe' on Darwin and fixing up post install.
|
||||
def build(self, spec, prefix):
|
||||
make('EXEEXT={0}'.
|
||||
format('exe' if spec.satisfies('platform=darwin') else ''))
|
||||
|
||||
# DDD won't install in parallel
|
||||
def install(self, spec, prefix):
|
||||
make('install',
|
||||
'EXEEXT={0}'.
|
||||
format('exe' if spec.satisfies('platform=darwin') else ''),
|
||||
parallel=False)
|
||||
|
||||
@run_after('install')
|
||||
def _rename_exe_on_darwin(self):
|
||||
if self.spec.satisfies('platform=darwin'):
|
||||
with working_dir(self.prefix.bin):
|
||||
os.rename('dddexe', 'ddd')
|
@@ -5,6 +5,8 @@
|
||||
|
||||
from spack import *
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class Dealii(CMakePackage, CudaPackage):
|
||||
"""C++ software library providing well-documented tools to build finite
|
||||
@@ -459,6 +461,13 @@ def cmake_args(self):
|
||||
' '.join(cxx_flags))
|
||||
])
|
||||
|
||||
# Add flags for machine vectorization, used when tutorials
|
||||
# and user code is built.
|
||||
# See https://github.com/dealii/dealii/issues/9164
|
||||
options.extend([
|
||||
'-DDEAL_II_CXX_FLAGS=%s' % os.environ['SPACK_TARGET_ARGS']
|
||||
])
|
||||
|
||||
return options
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
@@ -0,0 +1,11 @@
|
||||
--- spack-src/src/contrib/newmat/newmat6.cpp.org 2020-03-19 14:06:13.679032667 +0900
|
||||
+++ spack-src/src/contrib/newmat/newmat6.cpp 2020-03-19 14:07:34.267492838 +0900
|
||||
@@ -428,7 +428,7 @@
|
||||
{
|
||||
if (&gm == this) { REPORT tag_val = -1; return; }
|
||||
REPORT
|
||||
- if (indx > 0) { delete [] indx; indx = 0; }
|
||||
+ if (indx != NULL) { delete [] indx; indx = 0; }
|
||||
((CroutMatrix&)gm).get_aux(*this);
|
||||
Eq(gm);
|
||||
}
|
@@ -25,3 +25,5 @@ class Denovogear(CMakePackage):
|
||||
depends_on('zlib', type=('link'))
|
||||
|
||||
patch('stream-open.patch', when='@:1.1.1')
|
||||
# fix: ordered comparison between pointer and zero.
|
||||
patch('newmat6.cpp.patch')
|
||||
|
51
var/spack/repos/builtin/packages/dhpmm-f/package.py
Normal file
51
var/spack/repos/builtin/packages/dhpmm-f/package.py
Normal file
@@ -0,0 +1,51 @@
|
||||
# Copyright 2013-2020 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 DhpmmF(MakefilePackage):
|
||||
"""DHPMM_P:High-precision Matrix Multiplication with Faithful Rounding"""
|
||||
|
||||
homepage = "http://www.math.twcu.ac.jp/ogita/post-k/"
|
||||
url = "http://www.math.twcu.ac.jp/ogita/post-k/software/DHPMM_F/DHPMM_F_alpha.tar.gz"
|
||||
|
||||
version('alpha', sha256='35321ecbc749f2682775ffcd27833afc8c8eb4fa7753ce769727c9d1fe097848')
|
||||
|
||||
depends_on('blas', type='link')
|
||||
depends_on('lapack', type='link')
|
||||
|
||||
def patch(self):
|
||||
math_libs = self.spec['lapack'].libs + self.spec['blas'].libs
|
||||
makefile = FileFilter('Makefile')
|
||||
if self.spec.satisfies('%gcc'):
|
||||
makefile.filter(r'^MKL\s+=\s1', 'MKL=0')
|
||||
makefile.filter(r'^CC\s+=\sgcc',
|
||||
'CC={0}'.format(spack_cc))
|
||||
makefile.filter(r'^CXX\s+=\sg\+\+',
|
||||
'CXX={0}'.format(spack_cxx))
|
||||
makefile.filter(r'^BLASLIBS\s+=\s-llapack\s-lblas',
|
||||
'BLASLIBS={0}'.format(math_libs.ld_flags))
|
||||
elif self.spec.satisfies('%fj'):
|
||||
makefile.filter(r'^#ENV\s+=\sFX100', 'ENV=FX100')
|
||||
makefile.filter(r'^ENV\s+=\sGCC', '#ENV=GCC')
|
||||
makefile.filter(r'^MKL\s+=\s1', 'MKL=0')
|
||||
makefile.filter(r'^CC\s+=\sfccpx',
|
||||
'CC={0}'.format(spack_cc))
|
||||
makefile.filter(r'^CXX\s+=\sFCCpx',
|
||||
'CXX={0}'.format(spack_cxx))
|
||||
makefile.filter(r'^BLASLIBS\s+=\s-llapack\s-lblas',
|
||||
'BLASLIBS={0}'.format(math_libs.ld_flags))
|
||||
elif self.spec.satisfies('%intel'):
|
||||
makefile.filter(r'^ENV\s+=\sGCC', '#ENV=GCC')
|
||||
makefile.filter(r'^ENV\s+=\sICC', 'ENV=ICC')
|
||||
makefile.filter(r'^CC\s+=\sicc',
|
||||
'CC={0}'.format(spack_cc))
|
||||
makefile.filter(r'^CXX\s+=\sicc',
|
||||
'CXX={0}'.format(spack_cxx))
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(prefix.bin)
|
||||
install('test/source4_SpMV', prefix.bin)
|
@@ -18,7 +18,7 @@ class Diffutils(AutotoolsPackage, GNUMirrorPackage):
|
||||
|
||||
build_directory = 'spack-build'
|
||||
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
if self.spec.satisfies('%fj'):
|
||||
|
@@ -3,18 +3,20 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
import sys
|
||||
|
||||
|
||||
class IntelMklDnn(CMakePackage):
|
||||
"""Intel(R) Math Kernel Library for Deep Neural Networks
|
||||
(Intel(R) MKL-DNN)."""
|
||||
class Dnnl(CMakePackage):
|
||||
"""Deep Neural Network Library (DNNL).
|
||||
|
||||
homepage = "https://intel.github.io/mkl-dnn/"
|
||||
url = "https://github.com/intel/mkl-dnn/archive/v1.2.2.tar.gz"
|
||||
Formerly known as Intel MKL-DNN."""
|
||||
|
||||
homepage = "https://01.org/dnnl"
|
||||
url = "https://github.com/intel/mkl-dnn/archive/v1.3.tar.gz"
|
||||
|
||||
maintainers = ['adamjstewart']
|
||||
|
||||
version('1.3', sha256='7396c20bd0c2dcf71cec84422bd6f9b91778938c10a7578424a7681fb822b077')
|
||||
version('1.2.2', sha256='a71ec1f27c30b8a176605e8a78444f1f12301a3c313b70ff93290926c140509c')
|
||||
version('1.2.1', sha256='c69544783c453ab3fbf14c7a5b9a512561267690c9fc3e7fc3470f04756e0ab3')
|
||||
version('1.2', sha256='30979a09753e8e35d942446c3778c9f0eba543acf2fb0282af8b9c89355d0ddf')
|
||||
@@ -45,15 +47,38 @@ class IntelMklDnn(CMakePackage):
|
||||
version('0.10', sha256='59828764ae43f1151f77b8997012c52e0e757bc50af1196b86fce8934178c570')
|
||||
version('0.9', sha256='8606a80851c45b0076f7d4047fbf774ce13d6b6d857cb2edf95c7e1fd4bca1c7')
|
||||
|
||||
default_cpu_runtime = 'omp'
|
||||
if sys.platform == 'darwin':
|
||||
default_cpu_runtime = 'tbb'
|
||||
|
||||
variant('cpu_runtime', default=default_cpu_runtime,
|
||||
description='CPU threading runtime to use',
|
||||
values=('omp', 'tbb', 'seq'), multi=False)
|
||||
variant('gpu_runtime', default='none',
|
||||
description='Runtime to use for GPU engines',
|
||||
values=('ocl', 'none'), multi=False)
|
||||
|
||||
# https://github.com/intel/mkl-dnn#requirements-for-building-from-source
|
||||
depends_on('cmake@2.8.11:', type='build')
|
||||
depends_on('intel-mkl')
|
||||
depends_on('llvm-openmp', when='%clang platform=darwin')
|
||||
depends_on('tbb@2017:', when='cpu_runtime=tbb')
|
||||
depends_on('llvm-openmp', when='%clang platform=darwin cpu_runtime=omp')
|
||||
depends_on('opencl@1.2:', when='gpu_runtime=ocl')
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
args = [
|
||||
'-DDNNL_CPU_RUNTIME={0}'.format(
|
||||
self.spec.variants['cpu_runtime'].value.upper()),
|
||||
'-DDNNL_GPU_RUNTIME={0}'.format(
|
||||
self.spec.variants['gpu_runtime'].value.upper()),
|
||||
]
|
||||
|
||||
if self.run_tests:
|
||||
args.append('-DDNNL_BUILD_TESTS=ON')
|
||||
else:
|
||||
args.append('-DDNNL_BUILD_TESTS=OFF')
|
||||
|
||||
# https://github.com/intel/mkl-dnn/issues/591
|
||||
if self.spec.satisfies('%clang platform=darwin'):
|
||||
if self.spec.satisfies('%clang platform=darwin cpu_runtime=omp'):
|
||||
args.extend([
|
||||
'-DOpenMP_CXX_FLAGS={0}'.format(self.compiler.openmp_flag),
|
||||
'-DOpenMP_C_FLAGS={0}'.format(self.compiler.openmp_flag),
|
||||
@@ -66,5 +91,10 @@ def cmake_args(self):
|
||||
self.spec['llvm-openmp'].libs.ld_flags
|
||||
),
|
||||
])
|
||||
elif self.spec.satisfies('cpu_runtime=tbb'):
|
||||
args.append('-DTBBROOT=' + self.spec['tbb'].prefix)
|
||||
|
||||
if self.spec.satisfies('gpu_runtime=ocl'):
|
||||
args.append('-DOPENCLROOT=' + self.spec['opencl'].prefix)
|
||||
|
||||
return args
|
@@ -29,7 +29,7 @@ class Doxygen(CMakePackage):
|
||||
|
||||
depends_on("cmake@2.8.12:", type='build')
|
||||
depends_on("python", type='build') # 2 or 3 OK; used in CMake build
|
||||
depends_on("libiconv")
|
||||
depends_on("iconv")
|
||||
depends_on("flex", type='build')
|
||||
# code.l just checks subminor version <=2.5.4 or >=2.5.33
|
||||
# but does not recognize 2.6.x as newer...could be patched if needed
|
||||
@@ -45,6 +45,8 @@ class Doxygen(CMakePackage):
|
||||
patch('shared_ptr.patch', when='@1.8.14')
|
||||
|
||||
def patch(self):
|
||||
if self.spec['iconv'].name == 'libc':
|
||||
return
|
||||
# On Linux systems, iconv is provided by libc. Since CMake finds the
|
||||
# symbol in libc, it does not look for libiconv, which leads to linker
|
||||
# errors. This makes sure that CMake always looks for the external
|
||||
|
29
var/spack/repos/builtin/packages/dpdk/package.py
Normal file
29
var/spack/repos/builtin/packages/dpdk/package.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Copyright 2013-2020 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 Dpdk(MakefilePackage):
|
||||
"""DPDK is a set of libraries and drivers for fast packet processing.
|
||||
It supports many processor architectures and both FreeBSD and Linux."""
|
||||
|
||||
homepage = "https://github.com/DPDK/dpdk"
|
||||
url = "https://github.com/DPDK/dpdk/archive/v19.11.tar.gz"
|
||||
|
||||
version('20.02', sha256='29e56ea8e47e30110ecb881fa5a37125a865dd2d45b61f68e93e334caaab16b7')
|
||||
version('19.11', sha256='ce1befb20a5e5c5399b326a39cfa23314a5229c0ced2553f53b09b1ae630706b')
|
||||
version('19.08', sha256='1ceff1a6f4f8d5f6f62c1682097249227ac5225ccd9638e0af09f5411c681038')
|
||||
version('19.05', sha256='5fea95cb726e6adaa506dab330e79563ccd4dacf03f126c826aabdced605d32b')
|
||||
version('19.02', sha256='04885d32c86fff5aefcfffdb8257fed405233602dbcd22f8298be13c2e285a50')
|
||||
|
||||
depends_on('numactl')
|
||||
|
||||
def build(self, spec, prefix):
|
||||
make('defconfig')
|
||||
make()
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree('.', prefix)
|
@@ -35,7 +35,7 @@ class Extrae(AutotoolsPackage):
|
||||
OpenMP, CUDA, OpenCL, pthread, OmpSs"""
|
||||
homepage = "https://tools.bsc.es/extrae"
|
||||
url = "https://ftp.tools.bsc.es/extrae/extrae-3.4.1-src.tar.bz2"
|
||||
version('3.7.1', sha256='95810b057f95e91bfc89813eb8bd320dfe40614fc8e98c63d95c5101c56dd213')
|
||||
version('3.7.1', sha256='c83ddd18a380c9414d64ee5de263efc6f7bac5fe362d5b8374170c7f18360378')
|
||||
version('3.4.1', sha256='77bfec16d6b5eee061fbaa879949dcef4cad28395d6a546b1ae1b9246f142725')
|
||||
|
||||
depends_on("autoconf", type='build')
|
||||
@@ -51,7 +51,7 @@ class Extrae(AutotoolsPackage):
|
||||
depends_on("elf", type="link")
|
||||
depends_on("libxml2")
|
||||
depends_on("numactl")
|
||||
depends_on("binutils+libiberty")
|
||||
depends_on("binutils+libiberty@:2.33")
|
||||
depends_on("gettext")
|
||||
# gettext dependency added to find -lintl
|
||||
# https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined
|
||||
|
@@ -11,9 +11,10 @@ class Eztrace(AutotoolsPackage):
|
||||
of HPC applications."""
|
||||
|
||||
homepage = "http://eztrace.gforge.inria.fr"
|
||||
url = "https://gforge.inria.fr/frs/download.php/file/37703/eztrace-1.1-8.tar.gz"
|
||||
url = "https://gitlab.com/eztrace/eztrace/-/archive/eztrace-1.1-10/eztrace-eztrace-1.1-10.tar.gz"
|
||||
maintainers = ['trahay']
|
||||
|
||||
version('1.1-8', sha256='d80d78a25f1eb0e6e60a3e535e3972cd178c6a8663a3d6109105dfa6a880b8ec')
|
||||
version('1.1-10', sha256='97aba8f3b3b71e8e2f7ef47e00c262234e27b9cb4a870c85c525317a83a3f0d4')
|
||||
|
||||
depends_on('mpi')
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class Fl(Package):
|
||||
|
||||
def install(self, spec, prefix):
|
||||
if (self.spec.satisfies('platform=linux') and
|
||||
self.spec.satisfies('target=x86_64')):
|
||||
self.spec.target.family == 'x86_64'):
|
||||
with working_dir('fl_{0}'.format(spec.version)):
|
||||
install_tree('.', prefix)
|
||||
else:
|
||||
|
@@ -14,16 +14,18 @@ class Flit(MakefilePackage):
|
||||
|
||||
homepage = "https://pruners.github.io/flit"
|
||||
url = "https://github.com/PRUNERS/FLiT"
|
||||
url = "https://github.com/PRUNERS/FLiT/archive/v2.0-alpha.1.tar.gz"
|
||||
url = "https://github.com/PRUNERS/FLiT/archive/v2.1.0.tar.gz"
|
||||
|
||||
version('2.0-alpha.1', sha256='8de2bd400acf0f513d69f3dbf588e8984dfb18b8ccaaf684391811a0582f694b')
|
||||
version('2.1.0', sha256='b31ffa02fda1ab0f5555acdc6edc353d93d53ae8ef85e099f83bcf1c83e70885')
|
||||
|
||||
maintainers = ['mikebentley15']
|
||||
|
||||
# Add dependencies
|
||||
depends_on('python@3:', type='run')
|
||||
depends_on('py-numpy', type='run')
|
||||
depends_on('py-matplotlib tk=False', type='run')
|
||||
depends_on('py-toml', type='run')
|
||||
depends_on('python@3:', type='run')
|
||||
depends_on('py-toml', type='run')
|
||||
depends_on('py-pyelftools', type='run')
|
||||
depends_on('gmake', type=('run', 'build'))
|
||||
depends_on('sqlite@3:', type='run')
|
||||
|
||||
@property
|
||||
def install_targets(self):
|
||||
return ['install', 'PREFIX=%s' % self.prefix]
|
||||
def edit(self, spec, prefix):
|
||||
env['PREFIX'] = prefix
|
||||
|
@@ -14,6 +14,7 @@ class Fmt(CMakePackage):
|
||||
homepage = "http://fmtlib.net/latest/index.html"
|
||||
url = "https://github.com/fmtlib/fmt/releases/download/5.2.1/fmt-5.2.1.zip"
|
||||
|
||||
version('6.1.2', sha256='63650f3c39a96371f5810c4e41d6f9b0bb10305064e6faf201cbafe297ea30e8')
|
||||
version('5.3.0', sha256='4c0741e10183f75d7d6f730b8708a99b329b2f942dad5a9da3385ab92bb4a15c')
|
||||
version('5.2.1', sha256='43894ab8fe561fc9e523a8024efc23018431fa86b95d45b06dbe6ddb29ffb6cd')
|
||||
version('5.2.0', sha256='c016db7f825bce487a7929e1edb747b9902a2935057af6512cad3df3a080a027')
|
||||
|
@@ -11,12 +11,12 @@ class G4abla(Package):
|
||||
"""Geant4 data for nuclear shell effects in INCL/ABLA hadronic mode"""
|
||||
homepage = "http://geant4.web.cern.ch"
|
||||
url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4ABLA.3.0.tar.gz"
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version(
|
||||
'3.0', sha256='99fd4dcc9b4949778f14ed8364088e45fa4ff3148b3ea36f9f3103241d277014')
|
||||
version(
|
||||
'3.1', sha256='7698b052b58bf1b9886beacdbd6af607adc1e099fc730ab6b21cf7f090c027ed')
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('3.1', sha256='7698b052b58bf1b9886beacdbd6af607adc1e099fc730ab6b21cf7f090c027ed')
|
||||
version('3.0', sha256='99fd4dcc9b4949778f14ed8364088e45fa4ff3148b3ea36f9f3103241d277014')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
@@ -24,6 +24,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4ABLA{0}'
|
||||
.format(self.version))
|
||||
env.set('G4ABLADATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4ABLA.%s.tar.gz" % version)
|
||||
|
@@ -11,12 +11,14 @@ class G4emlow(Package):
|
||||
"""Geant4 data files for low energy electromagnetic processes."""
|
||||
homepage = "http://geant4.web.cern.ch"
|
||||
url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4EMLOW.6.50.tar.gz"
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version(
|
||||
'6.50', sha256='c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236')
|
||||
version(
|
||||
'7.3', sha256='583aa7f34f67b09db7d566f904c54b21e95a9ac05b60e2bfb794efb569dba14e')
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('7.9', sha256='4abf9aa6cda91e4612676ce4d2d8a73b91184533aa66f9aad19a53a8c4dc3aff')
|
||||
version('7.7', sha256='16dec6adda6477a97424d749688d73e9bd7d0b84d0137a67cf341f1960984663')
|
||||
version('7.3', sha256='583aa7f34f67b09db7d566f904c54b21e95a9ac05b60e2bfb794efb569dba14e')
|
||||
version('6.50', sha256='c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
@@ -24,6 +26,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4EMLOW{0}'
|
||||
.format(self.version))
|
||||
env.set('G4LEDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4.web.cern.ch/support/source/G4EMLOW.%s.tar.gz" % version)
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4EMLOW.%s.tar.gz" % version)
|
||||
|
@@ -14,8 +14,9 @@ class G4ensdfstate(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('2.1', sha256='933e7f99b1c70f24694d12d517dfca36d82f4e95b084c15d86756ace2a2790d9')
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('2.2', sha256='dd7e27ef62070734a4a709601f5b3bada6641b111eb7069344e4f99a01d6e0a6')
|
||||
version('2.1', sha256='933e7f99b1c70f24694d12d517dfca36d82f4e95b084c15d86756ace2a2790d9')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
@@ -24,7 +25,9 @@ def install(self, spec, prefix):
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
env.set('G4ENSDFSTATEDATA', self.prefix.share.data)
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4ENSDFSTATE{0}'
|
||||
.format(self.version))
|
||||
env.set('G4ENSDFSTATEDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
|
34
var/spack/repos/builtin/packages/g4incl/package.py
Normal file
34
var/spack/repos/builtin/packages/g4incl/package.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# Copyright 2013-2020 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 G4incl(Package):
|
||||
"""Geant4 data for evaluated particle cross-sections on natural
|
||||
composition of elements"""
|
||||
homepage = "http://geant4.web.cern.ch"
|
||||
url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4INCL.1.0.tar.gz"
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('1.0', sha256='716161821ae9f3d0565fbf3c2cf34f4e02e3e519eb419a82236eef22c2c4367d')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
install_path = join_path(prefix.share, 'data', "G4INCL{0}"
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4INCL{0}'
|
||||
.format(self.version))
|
||||
env.set('G4INCLDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4INCL.%s.tar.gz" % version)
|
@@ -14,6 +14,7 @@ class G4ndl(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('4.6', sha256='9d287cf2ae0fb887a2adce801ee74fb9be21b0d166dab49bcbee9408a5145408')
|
||||
version('4.5', sha256='cba928a520a788f2bc8229c7ef57f83d0934bb0c6a18c31ef05ef4865edcdf8e')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
@@ -22,6 +23,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4NDL{0}'
|
||||
.format(self.version))
|
||||
env.set('G4NEUTRONHPDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4NDL.%s.tar.gz" % version)
|
||||
|
@@ -15,6 +15,8 @@ class G4neutronxs(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
# Dataset not used after Geant4 10.4.x
|
||||
version('1.4', sha256='57b38868d7eb060ddd65b26283402d4f161db76ed2169437c266105cca73a8fd')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
@@ -23,6 +25,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4NEUTRONXS{0}'
|
||||
.format(self.version))
|
||||
env.set('G4NEUTRONXSDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4NEUTRONXS.%s.tar.gz" % version
|
||||
|
35
var/spack/repos/builtin/packages/g4particlexs/package.py
Normal file
35
var/spack/repos/builtin/packages/g4particlexs/package.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# Copyright 2013-2020 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 G4particlexs(Package):
|
||||
"""Geant4 data for evaluated particle cross-sections on
|
||||
natural composition of elements"""
|
||||
homepage = "http://geant4.web.cern.ch"
|
||||
url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4PARTICLEXS.2.1.tar.gz"
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('2.1', sha256='094d103372bbf8780d63a11632397e72d1191dc5027f9adabaf6a43025520b41')
|
||||
version('1.1', sha256='100a11c9ed961152acfadcc9b583a9f649dda4e48ab314fcd4f333412ade9d62')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
install_path = join_path(prefix.share, 'data', "G4PARTICLEXS{0}"
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4PARTICLEXS{0}'
|
||||
.format(self.version))
|
||||
env.set('G4PARTICLEXSDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4PARTICLEXS.%s.tar.gz" % version)
|
@@ -14,8 +14,11 @@ class G4photonevaporation(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('4.3.2', sha256='d4641a6fe1c645ab2a7ecee09c34e5ea584fb10d63d2838248bfc487d34207c7')
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('5.5', sha256='5995dda126c18bd7f68861efde87b4af438c329ecbe849572031ceed8f5e76d7')
|
||||
version('5.3', sha256='d47ababc8cbe548065ef644e9bd88266869e75e2f9e577ebc36bc55bf7a92ec8')
|
||||
version('5.2', sha256='83607f8d36827b2a7fca19c9c336caffbebf61a359d0ef7cee44a8bcf3fc2d1f')
|
||||
version('4.3.2', sha256='d4641a6fe1c645ab2a7ecee09c34e5ea584fb10d63d2838248bfc487d34207c7')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
@@ -24,6 +27,12 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data',
|
||||
'PhotonEvaporation{0}'
|
||||
.format(self.version))
|
||||
env.set('G4LEVELGAMMADATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4PhotonEvaporation.%s.tar.gz" % version)
|
||||
|
@@ -14,6 +14,7 @@ class G4pii(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('1.3', sha256='6225ad902675f4381c98c6ba25fc5a06ce87549aa979634d3d03491d6616e926')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
@@ -22,6 +23,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4PII{0}'
|
||||
.format(self.version))
|
||||
env.set('G4PIIDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4PII.1.3.tar.gz" % version)
|
||||
|
@@ -14,15 +14,25 @@ class G4radioactivedecay(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('5.1.1', sha256='f7a9a0cc998f0d946359f2cb18d30dff1eabb7f3c578891111fc3641833870ae')
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('5.4', sha256='240779da7d13f5bf0db250f472298c3804513e8aca6cae301db97f5ccdcc4a61')
|
||||
version('5.3', sha256='5c8992ac57ae56e66b064d3f5cdfe7c2fee76567520ad34a625bfb187119f8c1')
|
||||
version('5.2', sha256='99c038d89d70281316be15c3c98a66c5d0ca01ef575127b6a094063003e2af5d')
|
||||
version('5.1.1', sha256='f7a9a0cc998f0d946359f2cb18d30dff1eabb7f3c578891111fc3641833870ae')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
install_path = join_path(prefix.share, 'data', 'RadioactiveDecay{0}'
|
||||
install_path = join_path(prefix.share, 'data',
|
||||
'RadioactiveDecay{0}'
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data',
|
||||
'RadioactiveDecay{0}'
|
||||
.format(self.version))
|
||||
env.set('G4RADIOACTIVEDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4RadioactiveDecay.%s.tar.gz" % version)
|
||||
|
@@ -14,9 +14,10 @@ class G4realsurface(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('1.0', sha256='3e2d2506600d2780ed903f1f2681962e208039329347c58ba1916740679020b1')
|
||||
version('2.1', sha256='2a287adbda1c0292571edeae2082a65b7f7bd6cf2bf088432d1d6f889426dcf3')
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('2.1.1', sha256='90481ff97a7c3fa792b7a2a21c9ed80a40e6be386e581a39950c844b2dd06f50')
|
||||
version('2.1', sha256='2a287adbda1c0292571edeae2082a65b7f7bd6cf2bf088432d1d6f889426dcf3')
|
||||
version('1.0', sha256='3e2d2506600d2780ed903f1f2681962e208039329347c58ba1916740679020b1')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
@@ -24,6 +25,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'RealSurface{0}'
|
||||
.format(self.version))
|
||||
env.set('G4REALSURFACEDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return "http://geant4-data.web.cern.ch/geant4-data/datasets/{0}RealSurface.{1}.tar.gz".format(
|
||||
|
@@ -14,6 +14,8 @@ class G4saiddata(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('2.0', sha256='1d26a8e79baa71e44d5759b9f55a67e8b7ede31751316a9e9037d80090c72e91')
|
||||
version('1.1', sha256='a38cd9a83db62311922850fe609ecd250d36adf264a88e88c82ba82b7da0ed7f')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
@@ -22,6 +24,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4SAIDDATA{0}'
|
||||
.format(self.version))
|
||||
env.set('G4SAIDXSDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4SAIDDATA.%s.tar.gz" % version
|
||||
|
@@ -14,8 +14,9 @@ class G4tendl(Package):
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('1.3', sha256='52ad77515033a5d6f995c699809b464725a0e62099b5e55bf07c8bdd02cd3bce')
|
||||
# Only versions relevant to Geant4 releases built by spack are added
|
||||
version('1.3.2', sha256='3b2987c6e3bee74197e3bd39e25e1cc756bb866c26d21a70f647959fc7afb849')
|
||||
version('1.3', sha256='52ad77515033a5d6f995c699809b464725a0e62099b5e55bf07c8bdd02cd3bce')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(join_path(prefix.share, 'data'))
|
||||
@@ -23,6 +24,11 @@ def install(self, spec, prefix):
|
||||
.format(self.version))
|
||||
install_tree(self.stage.source_path, install_path)
|
||||
|
||||
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||
install_path = join_path(self.prefix.share, 'data', 'G4TENDL{0}'
|
||||
.format(self.version))
|
||||
env.set('G4PARTICLEHPDATA', install_path)
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4TENDL.%s.tar.gz" % version)
|
||||
|
@@ -103,7 +103,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
||||
depends_on('isl@0.15:0.18', when='@6:8.9')
|
||||
depends_on('isl@0.15:0.20', when='@9:')
|
||||
depends_on('zlib', when='@6:')
|
||||
depends_on('libiconv', when='platform=darwin')
|
||||
depends_on('iconv', when='platform=darwin')
|
||||
depends_on('gnat', when='languages=ada')
|
||||
depends_on('binutils~libiberty', when='+binutils')
|
||||
depends_on('zip', type='build', when='languages=java')
|
||||
@@ -237,8 +237,8 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
||||
|
||||
# Backport libsanitizer patch for glibc >= 2.31 and 8.1.0 <= gcc <= 9.2.0
|
||||
# https://bugs.gentoo.org/708346
|
||||
patch('glibc-2.31-libsanitizer-1.patch', when='@8.1.0:9.2.0')
|
||||
patch('glibc-2.31-libsanitizer-2.patch', when='@8.1.0:9.2.0')
|
||||
patch('glibc-2.31-libsanitizer-1.patch', when='@8.1.0:8.3.99,9.0.0:9.2.0')
|
||||
patch('glibc-2.31-libsanitizer-2.patch', when='@8.1.0:8.3.99,9.0.0:9.2.0')
|
||||
# Older versions do not compile with newer versions of glibc
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712
|
||||
patch('ucontext_t.patch', when='@4.9,5.1:5.4,6.1:6.4,7.1')
|
||||
@@ -356,7 +356,7 @@ def configure_args(self):
|
||||
options.extend([
|
||||
'--with-native-system-header-dir=/usr/include',
|
||||
'--with-sysroot={0}'.format(macos_sdk_path()),
|
||||
'--with-libiconv-prefix={0}'.format(spec['libiconv'].prefix)
|
||||
'--with-libiconv-prefix={0}'.format(spec['iconv'].prefix)
|
||||
])
|
||||
|
||||
return options
|
||||
|
@@ -107,7 +107,7 @@ class Gdal(AutotoolsPackage):
|
||||
# Optional dependencies
|
||||
depends_on('libtool', type='build', when='+libtool')
|
||||
depends_on('zlib', when='+libz')
|
||||
depends_on('libiconv', when='+libiconv')
|
||||
depends_on('iconv', when='+libiconv')
|
||||
depends_on('xz', when='+liblzma')
|
||||
depends_on('zstd', when='+zstd @2.3:')
|
||||
depends_on('postgresql', when='+pg')
|
||||
@@ -250,7 +250,7 @@ def configure_args(self):
|
||||
|
||||
if '+libiconv' in spec:
|
||||
args.append('--with-libiconv-prefix={0}'.format(
|
||||
spec['libiconv'].prefix))
|
||||
spec['iconv'].prefix))
|
||||
else:
|
||||
args.append('--with-libiconv-prefix=no')
|
||||
|
||||
|
@@ -33,6 +33,11 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
|
||||
|
||||
variant('python', default=True, description='Compile with Python support')
|
||||
variant('xz', default=True, description='Compile with lzma support')
|
||||
variant('source-highlight', default=False, description='Compile with source-highlight support')
|
||||
variant('lto', default=False, description='Enable lto')
|
||||
variant('quad', default=False, description='Enable quad')
|
||||
variant('gold', default=False, description='Enable gold linker')
|
||||
variant('ld', default=False, description='Enable ld')
|
||||
|
||||
# Required dependency
|
||||
depends_on('texinfo', type='build')
|
||||
@@ -40,6 +45,7 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
|
||||
# Optional dependencies
|
||||
depends_on('python', when='+python')
|
||||
depends_on('xz', when='+xz')
|
||||
depends_on('source-highlight', when='+source-highlight')
|
||||
|
||||
build_directory = 'spack-build'
|
||||
|
||||
@@ -49,4 +55,17 @@ def configure_args(self):
|
||||
args.append('--with-python')
|
||||
args.append('LDFLAGS={0}'.format(
|
||||
self.spec['python'].libs.ld_flags))
|
||||
|
||||
if '+lto' in self.spec:
|
||||
args.append('--enable-lto')
|
||||
|
||||
if '+quad' in self.spec:
|
||||
args.append('--with-quad')
|
||||
|
||||
if '+gold' in self.spec:
|
||||
args.append('--enable-gold')
|
||||
|
||||
if '+ld' in self.spec:
|
||||
args.append('--enable-ld')
|
||||
|
||||
return args
|
||||
|
27
var/spack/repos/builtin/packages/gdrcopy/package.py
Normal file
27
var/spack/repos/builtin/packages/gdrcopy/package.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright 2013-2020 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 Gdrcopy(MakefilePackage):
|
||||
"""A fast GPU memory copy library based on NVIDIA GPUDirect
|
||||
RDMA technology."""
|
||||
|
||||
homepage = "https://github.com/NVIDIA/gdrcopy"
|
||||
url = "https://github.com/NVIDIA/gdrcopy/archive/v2.0-beta.3.tar.gz"
|
||||
git = "https://github.com/NVIDIA/gdrcopy"
|
||||
|
||||
version('master', branch='master')
|
||||
version('2.0', sha256='98320e6e980a7134ebc4eedd6cf23647104f2b3c557f2eaf0d31a02609f5f2b0')
|
||||
version('1.3', sha256='f11cdfe389b685f6636b80b4a3312dc014a385ad7220179c1318c60e2e28af3a')
|
||||
|
||||
def build(self, spec, prefix):
|
||||
make('lib')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdir(prefix.include)
|
||||
mkdir(prefix.lib64)
|
||||
make('lib_install', 'PREFIX={0}'.format(self.prefix))
|
@@ -8,90 +8,89 @@
|
||||
import glob
|
||||
|
||||
|
||||
class Geant4Data(Package):
|
||||
"""An umbrella package to hold Geant4 data packages"""
|
||||
class Geant4Data(BundlePackage):
|
||||
"""A bundle package to hold Geant4 data packages"""
|
||||
|
||||
homepage = "http://geant4.cern.ch"
|
||||
url = "http://geant4-data.web.cern.ch/geant4-data/ReleaseNotes/ReleaseNotes4.10.3.html"
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('10.03.p03', sha256='3e0d4d4e6854c8667d930fd5beaec09b7e6ec41f4847935e5d6a2720d0094b30', expand=False)
|
||||
version('10.04', sha256='f67fb899b99348a1a7e471a05f249f972e7e303c78238fc5f693b99968642255', expand=False)
|
||||
version('10.6.0')
|
||||
version('10.5.1')
|
||||
version('10.4.3')
|
||||
version('10.4.0')
|
||||
version('10.3.3')
|
||||
|
||||
# geant4@10.03.p03
|
||||
depends_on("g4abla@3.0", when='@10.03.p03 ')
|
||||
depends_on("g4emlow@6.50", when='@10.03.p03 ')
|
||||
depends_on("g4ndl@4.5", when='@10.03.p03 ')
|
||||
depends_on("g4neutronxs@1.4", when='@10.03.p03 ')
|
||||
depends_on("g4saiddata@1.1", when='@10.03.p03 ')
|
||||
depends_on("g4ensdfstate@2.1", when='@10.03.p03 ')
|
||||
depends_on("g4photonevaporation@4.3.2", when='@10.03.p03 ')
|
||||
depends_on("g4pii@1.3", when='@10.03.p03 ')
|
||||
depends_on("g4radioactivedecay@5.1.1", when='@10.03.p03 ')
|
||||
depends_on("g4realsurface@1.0", when='@10.03.p03 ')
|
||||
depends_on("g4tendl@1.3", when='@10.03.p03 ')
|
||||
# geant4@10.04
|
||||
depends_on("g4abla@3.1", when='@10.04 ')
|
||||
depends_on("g4emlow@7.3", when='@10.04 ')
|
||||
depends_on("g4ndl@4.5", when='@10.04 ')
|
||||
depends_on("g4neutronxs@1.4", when='@10.04 ')
|
||||
depends_on("g4saiddata@1.1", when='@10.04 ')
|
||||
depends_on("g4ensdfstate@2.2", when='@10.04 ')
|
||||
depends_on("g4photonevaporation@5.2", when='@10.04 ')
|
||||
depends_on("g4pii@1.3", when='@10.04 ')
|
||||
depends_on("g4radioactivedecay@5.2", when='@10.04 ')
|
||||
depends_on("g4realsurface@2.1", when='@10.04 ')
|
||||
depends_on("g4tendl@1.3.2", when='@10.04 ')
|
||||
# Add install phase so we can create the data "view"
|
||||
phases = ['install']
|
||||
|
||||
# For clarity, declare deps on a Major-Minor version basis as
|
||||
# they generally don't change on the patch level
|
||||
# Can move to declaring on a dataset basis if needed
|
||||
# geant4@10.6.X
|
||||
depends_on("g4ndl@4.6", when='@10.6.0')
|
||||
depends_on("g4emlow@7.9", when='@10.6.0')
|
||||
depends_on("g4photonevaporation@5.5", when='@10.6.0')
|
||||
depends_on("g4radioactivedecay@5.4", when='@10.6.0')
|
||||
depends_on("g4particlexs@2.1", when='@10.6.0')
|
||||
depends_on("g4pii@1.3", when='@10.6.0')
|
||||
depends_on("g4realsurface@2.1.1", when='@10.6.0')
|
||||
depends_on("g4saiddata@2.0", when='@10.6.0')
|
||||
depends_on("g4abla@3.1", when='@10.6.0')
|
||||
depends_on("g4incl@1.0", when='@10.6.0')
|
||||
depends_on("g4ensdfstate@2.2", when='@10.6.0')
|
||||
|
||||
# geant4@10.5.X
|
||||
depends_on("g4ndl@4.5", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4emlow@7.7", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4photonevaporation@5.3", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4radioactivedecay@5.3", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4particlexs@1.1", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4pii@1.3", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4realsurface@2.1.1", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4saiddata@2.0", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4abla@3.1", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4incl@1.0", when='@10.5.0:10.5.9999')
|
||||
depends_on("g4ensdfstate@2.2", when='@10.5.0:10.5.9999')
|
||||
|
||||
# geant4@10.4.X
|
||||
depends_on("g4ndl@4.5", when='@10.4.0:10.4.9999')
|
||||
depends_on("g4emlow@7.3", when='@10.4.0:10.4.9999')
|
||||
depends_on("g4photonevaporation@5.2", when='@10.4.0:10.4.9999')
|
||||
depends_on("g4radioactivedecay@5.2", when='@10.4.0:10.4.9999')
|
||||
depends_on("g4neutronxs@1.4", when='@10.4.0:10.4.9999')
|
||||
depends_on("g4pii@1.3", when='@10.4.0:10.4.9999')
|
||||
|
||||
depends_on("g4realsurface@2.1.1", when='@10.4.2:10.4.9999')
|
||||
depends_on("g4realsurface@2.1", when='@10.4.0:10.4.1')
|
||||
|
||||
depends_on("g4saiddata@1.1", when='@10.4.0:10.4.9999')
|
||||
depends_on("g4abla@3.1", when='@10.4.0:10.4.9999')
|
||||
depends_on("g4ensdfstate@2.2", when='@10.4.0:10.4.9999')
|
||||
|
||||
# geant4@10.3.X
|
||||
depends_on("g4ndl@4.5", when='@10.3.0:10.3.9999')
|
||||
depends_on("g4emlow@6.50", when='@10.3.0:10.3.9999')
|
||||
|
||||
depends_on("g4photonevaporation@4.3.2", when='@10.3.1:10.3.9999')
|
||||
depends_on("g4photonevaporation@4.3", when='@10.3.0')
|
||||
|
||||
depends_on("g4radioactivedecay@5.1.1", when='@10.3.1:10.3.9999')
|
||||
depends_on("g4radioactivedecay@5.1", when='@10.3.0')
|
||||
|
||||
depends_on("g4neutronxs@1.4", when='@10.3.0:10.3.9999')
|
||||
depends_on("g4pii@1.3", when='@10.3.0:10.3.9999')
|
||||
depends_on("g4realsurface@1.0", when='@10.3.0:10.3.9999')
|
||||
depends_on("g4saiddata@1.1", when='@10.3.0:10.3.9999')
|
||||
depends_on("g4abla@3.0", when='@10.3.0:10.3.9999')
|
||||
depends_on("g4ensdfstate@2.1", when='@10.3.0:10.3.9999')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
spec = self.spec
|
||||
version = self.version
|
||||
major = version[0]
|
||||
minor = version[1]
|
||||
if len(version) > 2:
|
||||
patch = version[-1]
|
||||
else:
|
||||
patch = 0
|
||||
data = 'Geant4-%s.%s.%s/data' % (major, minor, patch)
|
||||
data = '{0}-{1}'.format(self.name, self.version.dotted)
|
||||
datadir = join_path(spec.prefix.share, data)
|
||||
with working_dir(datadir, create=True):
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4abla'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4emlow'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4ndl'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4saiddata'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4neutronxs'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4ensdfstate'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4photonevaporation'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4pii'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4radioactivedecay'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4realsurface'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
for d in glob.glob('%s/share/data/*' %
|
||||
spec['g4tendl'].prefix):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle version string."""
|
||||
url = 'http://geant4-data.web.cern.ch/geant4-data/ReleaseNotes/'
|
||||
url = url + 'ReleaseNotes4.{0}.{1}.html'.format(version[0], version[1])
|
||||
return url
|
||||
with working_dir(datadir, create=True):
|
||||
for s in spec.dependencies():
|
||||
for d in glob.glob('{0}/data/*'.format(s.prefix.share)):
|
||||
os.symlink(d, os.path.basename(d))
|
||||
|
@@ -0,0 +1,18 @@
|
||||
diff --git a/cmake/Modules/G4BuildSettings.cmake b/cmake/Modules/G4BuildSettings.cmake
|
||||
index f68cb0a44..6bf4b6948 100644
|
||||
--- a/cmake/Modules/G4BuildSettings.cmake
|
||||
+++ b/cmake/Modules/G4BuildSettings.cmake
|
||||
@@ -205,6 +205,13 @@ endif()
|
||||
# Add Definition to flags for temporary back compatibility
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11")
|
||||
|
||||
+# Spack patch to support use of C++ features deprecated/removed in C++17
|
||||
+# Only checked on AppleClang for now
|
||||
+if(GEANT4_BUILD_CXXSTD GREATER 14)
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1")
|
||||
+endif()
|
||||
+#----
|
||||
+
|
||||
# Hold any appropriate compile flag(s) in variable for later export to
|
||||
# config files. Needed to support clients using late CMake 2.8 where compile features
|
||||
# are not available.
|
@@ -4,8 +4,6 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
import os
|
||||
import glob
|
||||
|
||||
|
||||
class Geant4(CMakePackage):
|
||||
@@ -15,84 +13,113 @@ class Geant4(CMakePackage):
|
||||
science."""
|
||||
|
||||
homepage = "http://geant4.cern.ch/"
|
||||
url = "http://geant4.cern.ch/support/source/geant4.10.01.p03.tar.gz"
|
||||
url = "https://gitlab.cern.ch/geant4/geant4/-/archive/v10.6.0/geant4-v10.6.0.tar.gz"
|
||||
|
||||
maintainers = ['drbenmorgan']
|
||||
|
||||
version('10.05.p01', sha256='f4a292220500fad17e0167ce3153e96e3410ecbe96284e572dc707f63523bdff')
|
||||
version('10.04', sha256='f6d883132f110eb036c69da2b21df51f13c585dc7b99d4211ddd32f4ccee1670')
|
||||
version('10.03.p03', sha256='a164f49c038859ab675eec474d08c9d02be8c4be9c0c2d3aa8e69adf89e1e138')
|
||||
version('10.6.0', sha256='eebe6a170546064ff81ab3b00f513ccd1d4122a026514982368d503ac55a4ee4')
|
||||
version('10.5.1', sha256='2397eb859dc4de095ff66059d8bda9f060fdc42e10469dd7890946293eeb0e39')
|
||||
version('10.4.3', sha256='67f3bb6405a2c77e573936c2b933f5a4a33915aa379626a2eb3012009b91e1da')
|
||||
version('10.4.0', sha256='e919b9b0a88476e00c0b18ab65d40e6a714b55ee4778f66bac32a5396c22aa74')
|
||||
version('10.3.3', sha256='bcd36a453da44de9368d1d61b0144031a58e4b43a6d2d875e19085f2700a89d8')
|
||||
|
||||
variant('qt', default=False, description='Enable Qt support')
|
||||
_cxxstd_values = ('11', '14', '17')
|
||||
variant('cxxstd',
|
||||
default=_cxxstd_values[0],
|
||||
values=_cxxstd_values,
|
||||
multi=False,
|
||||
description='Use the specified C++ standard when building.')
|
||||
|
||||
variant('threads', default=True, description='Build with multithreading')
|
||||
variant('vecgeom', default=False, description='Enable vecgeom support')
|
||||
variant('opengl', default=False, description='Optional OpenGL support')
|
||||
variant('x11', default=False, description='Optional X11 support')
|
||||
variant('motif', default=False, description='Optional motif support')
|
||||
variant('threads', default=True, description='Build with multithreading')
|
||||
variant('data', default=True, description='Install geant4 data')
|
||||
|
||||
variant('cxxstd',
|
||||
default='11',
|
||||
values=('11', '14', '17'),
|
||||
multi=False,
|
||||
description='Use the specified C++ standard when building.')
|
||||
variant('qt', default=False, description='Enable Qt support')
|
||||
|
||||
depends_on('cmake@3.5:', type='build')
|
||||
depends_on('cmake@3.8:', type='build', when='@10.6.0:')
|
||||
|
||||
# C++11 support
|
||||
depends_on("xerces-c cxxstd=11", when="cxxstd=11")
|
||||
depends_on("clhep@2.3.3.0: cxxstd=11", when="@10.03.p03: cxxstd=11")
|
||||
depends_on("vecgeom cxxstd=11", when="+vecgeom cxxstd=11")
|
||||
|
||||
# C++14 support
|
||||
depends_on("xerces-c cxxstd=14", when="cxxstd=14")
|
||||
depends_on("clhep@2.3.3.0: cxxstd=14", when="@10.03.p03: cxxstd=14")
|
||||
depends_on("vecgeom cxxstd=14", when="+vecgeom cxxstd=14")
|
||||
|
||||
# C++17 support
|
||||
depends_on("xerces-c cxxstd=17", when="cxxstd=17")
|
||||
depends_on("clhep@2.3.3.0: cxxstd=17", when="@10.03.p03: cxxstd=17")
|
||||
patch('cxx17.patch', when='@:10.03.p99 cxxstd=17')
|
||||
patch('cxx17_geant4_10_0.patch', level=1, when='@10.04.00: cxxstd=17')
|
||||
depends_on("vecgeom cxxstd=17", when="+vecgeom cxxstd=17")
|
||||
depends_on('geant4-data@10.6.0', when='@10.6.0')
|
||||
depends_on('geant4-data@10.5.1', when='@10.5.1')
|
||||
depends_on('geant4-data@10.4.3', when='@10.4.3')
|
||||
depends_on('geant4-data@10.4.0', when='@10.4.0')
|
||||
depends_on('geant4-data@10.3.3', when='@10.3.3')
|
||||
|
||||
depends_on("expat")
|
||||
depends_on("zlib")
|
||||
|
||||
for std in _cxxstd_values:
|
||||
# CLHEP version requirements to be reviewed
|
||||
depends_on('clhep@2.3.3.0: cxxstd=' + std,
|
||||
when='@10.3.3: cxxstd=' + std)
|
||||
|
||||
# Spack only supports Xerces-c 3 and above, so no version req
|
||||
depends_on('xerces-c cxxstd=' + std, when='cxxstd=' + std)
|
||||
|
||||
# Vecgeom specific versions for each Geant4 version
|
||||
depends_on('vecgeom@1.1.5 cxxstd=' + std,
|
||||
when='@10.6.0:10.6.99 +vecgeom cxxstd=' + std)
|
||||
depends_on('vecgeom@1.1.0 cxxstd=' + std,
|
||||
when='@10.5.0:10.5.99 +vecgeom cxxstd=' + std)
|
||||
depends_on('vecgeom@0.5.2 cxxstd=' + std,
|
||||
when='@10.4.0:10.4.99 +vecgeom cxxstd=' + std)
|
||||
depends_on('vecgeom@0.3rc cxxstd=' + std,
|
||||
when='@10.3.0:10.3.99 +vecgeom cxxstd=' + std)
|
||||
|
||||
# Visualization driver ependencies
|
||||
depends_on("gl", when='+opengl')
|
||||
depends_on("glx", when='+opengl+x11')
|
||||
depends_on("libx11", when='+x11')
|
||||
depends_on("libxmu", when='+x11')
|
||||
depends_on("motif", when='+motif')
|
||||
depends_on("qt@4.8:", when="+qt")
|
||||
|
||||
# if G4 data not installed with geant4
|
||||
# depend on G4 data packages
|
||||
# this allows external data installations
|
||||
# to avoid duplication
|
||||
|
||||
depends_on('geant4-data@10.03.p03', when='@10.03.p03 ~data')
|
||||
depends_on('geant4-data@10.04', when='@10.04 ~data')
|
||||
depends_on('geant4-data@10.05.p01', when='@10.05.p01 ~data')
|
||||
depends_on("qt@5:", when="+qt")
|
||||
|
||||
# As released, 10.03.03 has issues with respect to using external
|
||||
# CLHEP.
|
||||
patch('CLHEP-10.03.03.patch', level=1, when='@10.03.p03')
|
||||
patch('CLHEP-10.03.03.patch', level=1, when='@10.3.3')
|
||||
# These patches can be applied independent of the cxxstd value?
|
||||
patch('cxx17.patch', when='@:10.3.99 cxxstd=17')
|
||||
patch('cxx17_geant4_10_0.patch', level=1, when='@10.4.0 cxxstd=17')
|
||||
patch('geant4-10.4.3-cxx17-removed-features.patch',
|
||||
level=1, when='@10.4.3 cxxstd=17')
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
# Core options
|
||||
options = [
|
||||
'-DGEANT4_USE_GDML=ON',
|
||||
'-DGEANT4_BUILD_CXXSTD=c++{0}'.format(
|
||||
self.spec.variants['cxxstd'].value),
|
||||
'-DGEANT4_USE_SYSTEM_CLHEP=ON',
|
||||
'-DGEANT4_USE_SYSTEM_CLHEP_GRANULAR=ON',
|
||||
'-DGEANT4_USE_G3TOG4=ON',
|
||||
'-DGEANT4_INSTALL_DATA=ON',
|
||||
'-DGEANT4_BUILD_TLS_MODEL=global-dynamic',
|
||||
'-DGEANT4_USE_SYSTEM_EXPAT=ON',
|
||||
'-DGEANT4_USE_SYSTEM_ZLIB=ON',
|
||||
'-DXERCESC_ROOT_DIR:STRING=%s' %
|
||||
spec['xerces-c'].prefix, ]
|
||||
'-DGEANT4_USE_G3TOG4=ON',
|
||||
'-DGEANT4_USE_GDML=ON',
|
||||
'-DXERCESC_ROOT_DIR={0}'.format(spec['xerces-c'].prefix)
|
||||
]
|
||||
|
||||
# Multithreading
|
||||
options.append(self.define_from_variant('GEANT4_BUILD_MULTITHREADED',
|
||||
'threads'))
|
||||
if '+threads' in spec:
|
||||
# This should be a variant
|
||||
options.append('-DGEANT4_BUILD_TLS_MODEL=global-dynamic')
|
||||
|
||||
# install the data with geant4
|
||||
datadir = spec['geant4-data'].prefix.share
|
||||
dataver = '{0}-{1}'.format(spec['geant4-data'].name,
|
||||
spec['geant4-data'].version.dotted)
|
||||
datapath = join_path(datadir, dataver)
|
||||
options.append('-DGEANT4_INSTALL_DATADIR={0}'.format(datapath))
|
||||
|
||||
# Vecgeom
|
||||
if '+vecgeom' in spec:
|
||||
options.append('-DGEANT4_USE_USOLIDS=ON')
|
||||
options.append('-DUSolids_DIR=%s' % spec[
|
||||
'vecgeom'].prefix.lib.CMake.USolids)
|
||||
|
||||
# Visualization options
|
||||
if 'platform=darwin' not in spec:
|
||||
if "+x11" in spec and "+opengl" in spec:
|
||||
options.append('-DGEANT4_USE_OPENGL_X11=ON')
|
||||
@@ -101,61 +128,10 @@ def cmake_args(self):
|
||||
if "+x11" in spec:
|
||||
options.append('-DGEANT4_USE_RAYTRACER_X11=ON')
|
||||
|
||||
options.append('-DGEANT4_BUILD_CXXSTD=c++{0}'.format(
|
||||
self.spec.variants['cxxstd'].value))
|
||||
|
||||
if '+qt' in spec:
|
||||
options.append('-DGEANT4_USE_QT=ON')
|
||||
options.append(
|
||||
'-DQT_QMAKE_EXECUTABLE=%s' %
|
||||
spec['qt'].prefix.bin.qmake)
|
||||
|
||||
if '+vecgeom' in spec:
|
||||
options.append('-DGEANT4_USE_USOLIDS=ON')
|
||||
options.append('-DUSolids_DIR=%s' % spec[
|
||||
'vecgeom'].prefix.lib.CMake.USolids)
|
||||
|
||||
on_or_off = lambda opt: 'ON' if '+' + opt in spec else 'OFF'
|
||||
options.append('-DGEANT4_BUILD_MULTITHREADED=' + on_or_off('threads'))
|
||||
|
||||
# install the data with geant4
|
||||
options.append('-DGEANT4_INSTALL_DATA=' + on_or_off('data'))
|
||||
|
||||
return options
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle Geant4's unusual version string."""
|
||||
return ("http://geant4.cern.ch/support/source/geant4.%s.tar.gz" % version)
|
||||
|
||||
@run_before('cmake')
|
||||
def make_data_links(self):
|
||||
if '+data' in self.spec:
|
||||
return
|
||||
spec = self.spec
|
||||
version = self.version
|
||||
major = version[0]
|
||||
minor = version[1]
|
||||
if len(version) > 2:
|
||||
patch = version[-1]
|
||||
else:
|
||||
patch = 0
|
||||
datadir = 'Geant4-%s.%s.%s/data' % (major, minor, patch)
|
||||
with working_dir(join_path(spec.prefix.share, datadir),
|
||||
create=True):
|
||||
dirs = glob.glob('%s/%s/*' %
|
||||
(spec['geant4-data'].prefix.share, datadir))
|
||||
for d in dirs:
|
||||
target = os.readlink(d)
|
||||
os.symlink(target, os.path.basename(target))
|
||||
|
||||
def setup_dependent_build_environment(self, env, dependent_spec):
|
||||
version = self.version
|
||||
major = version[0]
|
||||
minor = version[1]
|
||||
if len(version) > 2:
|
||||
patch = version[-1]
|
||||
else:
|
||||
patch = 0
|
||||
datadir = 'Geant4-%s.%s.%s' % (major, minor, patch)
|
||||
env.append_path('CMAKE_MODULE_PATH', join_path(
|
||||
self.prefix.lib64, datadir, 'Modules'))
|
||||
|
@@ -24,6 +24,11 @@ class Git(AutotoolsPackage):
|
||||
# You can find the source here: https://mirrors.edge.kernel.org/pub/software/scm/git/sha256sums.asc
|
||||
|
||||
releases = [
|
||||
{
|
||||
'version': '2.26.0',
|
||||
'sha256': 'aa168c2318e7187cd295a645f7370cc6d71a324aafc932f80f00c780b6a26bed',
|
||||
'sha256_manpages': 'c1ffaf0b4cd1e80a0eb0d4039e208c9d411ef94d5da44e38363804e1a7961218'
|
||||
},
|
||||
{
|
||||
'version': '2.25.0',
|
||||
'sha256': 'a98c9b96d91544b130f13bf846ff080dda2867e77fe08700b793ab14ba5346f6',
|
||||
@@ -177,7 +182,7 @@ class Git(AutotoolsPackage):
|
||||
depends_on('curl')
|
||||
depends_on('expat')
|
||||
depends_on('gettext')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
depends_on('libidn2')
|
||||
depends_on('openssl')
|
||||
depends_on('pcre', when='@:2.13')
|
||||
@@ -221,7 +226,7 @@ def configure_args(self):
|
||||
configure_args = [
|
||||
'--with-curl={0}'.format(spec['curl'].prefix),
|
||||
'--with-expat={0}'.format(spec['expat'].prefix),
|
||||
'--with-iconv={0}'.format(spec['libiconv'].prefix),
|
||||
'--with-iconv={0}'.format(spec['iconv'].prefix),
|
||||
'--with-openssl={0}'.format(spec['openssl'].prefix),
|
||||
'--with-perl={0}'.format(spec['perl'].command.path),
|
||||
'--with-zlib={0}'.format(spec['zlib'].prefix),
|
||||
|
@@ -46,7 +46,7 @@ class Glib(AutotoolsPackage):
|
||||
depends_on('python', type=('build', 'run'), when='@2.53.4:')
|
||||
depends_on('pcre+utf', when='@2.48:')
|
||||
depends_on('util-linux', when='+libmount')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
|
||||
# The following patch is needed for gcc-6.1
|
||||
patch('g_date_strftime.patch', when='@2.42.1')
|
||||
@@ -70,7 +70,10 @@ def configure_args(self):
|
||||
args.append('--with-python={0}'.format(
|
||||
os.path.basename(self.spec['python'].command.path))
|
||||
)
|
||||
args.append('--with-libiconv=gnu')
|
||||
if 'libc' in self.spec:
|
||||
args.append('--with-libiconv=maybe')
|
||||
else:
|
||||
args.append('--with-libiconv=gnu')
|
||||
args.extend(self.enable_or_disable('tracing'))
|
||||
# SELinux is not available in Spack, so glib should not use it.
|
||||
args.append('--disable-selinux')
|
||||
|
@@ -14,34 +14,49 @@ class Gmt(Package):
|
||||
contour maps to artificially illuminated surfaces and 3D perspective views.
|
||||
"""
|
||||
|
||||
homepage = "http://gmt.soest.hawaii.edu/"
|
||||
url = "https://github.com/GenericMappingTools/gmt/archive/5.4.4.tar.gz"
|
||||
homepage = "https://www.generic-mapping-tools.org/"
|
||||
url = "https://github.com/GenericMappingTools/gmt/archive/6.0.0.tar.gz"
|
||||
git = "https://github.com/GenericMappingTools/gmt.git"
|
||||
|
||||
maintainers = ['adamjstewart']
|
||||
|
||||
version('master', branch='master')
|
||||
version('6.0.0', sha256='7a733e670f01d99f8fc0da51a4337320d764c06a68746621f83ccf2e3453bcb7')
|
||||
version('5.4.4', sha256='b593dfb101e6507c467619f3d2190a9f78b09d49fe2c27799750b8c4c0cd2da0')
|
||||
version('4.5.9', sha256='9b13be96ccf4bbd38c14359c05dfa7eeeb4b5f06d6f4be9c33d6c3ea276afc86',
|
||||
url='ftp://ftp.soest.hawaii.edu/gmt/legacy/gmt-4.5.9.tar.bz2')
|
||||
|
||||
variant('pcre', default=False, description='Enable the PCRE interface')
|
||||
variant('gdal', default=False, description='Enable the GDAL interface')
|
||||
variant('fftw', default=True, description='Fast FFTs')
|
||||
variant('lapack', default=True, description='Fast matrix inversion')
|
||||
variant('blas', default=True, description='Fast matrix multiplications')
|
||||
variant('ghostscript', default=False, description='Ability to convert PostScript plots to PDF and rasters')
|
||||
variant('gdal', default=False, description='Ability to read and write numerous grid and image formats')
|
||||
variant('pcre', default=False, description='Regular expression support')
|
||||
variant('fftw', default=False, description='Fast FFTs')
|
||||
variant('glib', default=False, description='GTHREAD support')
|
||||
variant('lapack', default=False, description='Fast matrix inversion')
|
||||
variant('blas', default=False, description='Fast matrix multiplications')
|
||||
variant('graphicsmagick', default=False, description='Convert images to animated GIFs')
|
||||
variant('ffmpeg', default=False, description='Convert images to videos')
|
||||
variant('docs', default=False, description='Build manpage and HTML documentation')
|
||||
|
||||
# http://gmt.soest.hawaii.edu/projects/gmt/wiki/BuildingGMT
|
||||
# https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md
|
||||
# https://github.com/GenericMappingTools/gmt/blob/master/MAINTENANCE.md
|
||||
|
||||
# Required dependencies
|
||||
depends_on('ghostscript')
|
||||
depends_on('subversion')
|
||||
depends_on('cmake@2.8.5:', type='build', when='@5:')
|
||||
depends_on('cmake@2.8.7:', type='build', when='@5:')
|
||||
depends_on('netcdf-c@4:')
|
||||
depends_on('curl', when='@5.4:')
|
||||
|
||||
# Optional dependencies
|
||||
depends_on('pcre', when='+pcre')
|
||||
depends_on('ghostscript', when='+ghostscript')
|
||||
depends_on('gdal', when='+gdal')
|
||||
depends_on('pcre', when='+pcre')
|
||||
depends_on('fftw', when='+fftw')
|
||||
depends_on('glib', when='+glib')
|
||||
depends_on('lapack', when='+lapack')
|
||||
depends_on('blas', when='+blas')
|
||||
depends_on('graphicsmagick', when='+graphicsmagick')
|
||||
depends_on('ffmpeg', when='+ffmpeg')
|
||||
depends_on('py-sphinx@1.4:', when='+docs', type='build')
|
||||
|
||||
depends_on('graphicsmagick', type='test')
|
||||
|
||||
patch('type.patch', when='@4.5.9')
|
||||
@@ -49,9 +64,56 @@ class Gmt(Package):
|
||||
@when('@5:')
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('spack-build', create=True):
|
||||
cmake('..', *std_cmake_args)
|
||||
args = std_cmake_args
|
||||
|
||||
args.extend([
|
||||
'-DNETCDF_CONFIG={0}'.format(
|
||||
spec['netcdf-c'].prefix.bin.join('nc-config')),
|
||||
'-DNETCDF_INCLUDE_DIR={0}'.format(
|
||||
spec['netcdf-c'].headers.directories[0]),
|
||||
'-DNETCDF_LIBRARY={0}'.format(
|
||||
spec['netcdf-c'].libs[0])
|
||||
])
|
||||
|
||||
# If these options aren't explicitly disabled,
|
||||
# CMake will search OS for dependencies
|
||||
if '+ghostscript' in spec:
|
||||
args.append('-DGS={0}'.format(
|
||||
spec['ghostscript'].prefix.bin.gs))
|
||||
else:
|
||||
args.append('-DGS=')
|
||||
|
||||
if '+gdal' in spec:
|
||||
args.extend([
|
||||
'-DGDAL_TRANSLATE={0}'.format(
|
||||
spec['gdal'].prefix.bin.gdal_translate),
|
||||
'-DOGR2OGR={0}'.format(
|
||||
spec['gdal'].prefix.bin.ogr2ogr),
|
||||
])
|
||||
else:
|
||||
args.extend(['-DGDAL_TRANSLATE=', '-DOGR2OGR='])
|
||||
|
||||
if 'graphicsmagick' in spec:
|
||||
args.extend([
|
||||
'-DGM={0}'.format(
|
||||
spec['graphicsmagick'].prefix.bin.gm),
|
||||
'-DGRAPHICSMAGICK={0}'.format(
|
||||
spec['graphicsmagick'].prefix.bin.gm),
|
||||
])
|
||||
else:
|
||||
args.extend(['-DGM=', '-DGRAPHICSMAGICK='])
|
||||
|
||||
if '+ffmpeg' in spec:
|
||||
args.append('-DFFMPEG={0}'.format(
|
||||
spec['ffmpeg'].prefix.bin.ffmpeg))
|
||||
else:
|
||||
args.append('-DFFMPEG=')
|
||||
|
||||
cmake('..', *args)
|
||||
|
||||
make()
|
||||
if self.run_tests:
|
||||
make('check')
|
||||
make('install')
|
||||
|
||||
@when('@:4')
|
||||
|
@@ -25,7 +25,7 @@ class Gnupg(AutotoolsPackage):
|
||||
depends_on('libassuan@2.4:', when='@:2.2.3')
|
||||
depends_on('libassuan@2.5:', when='@2.2.15:')
|
||||
depends_on('pinentry', type='run')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
depends_on('zlib')
|
||||
|
||||
def configure_args(self):
|
||||
@@ -42,7 +42,7 @@ def configure_args(self):
|
||||
'--with-libassuan-prefix=' + self.spec['libassuan'].prefix,
|
||||
'--with-ksba-prefix=' + self.spec['libksba'].prefix,
|
||||
'--with-npth-prefix=' + self.spec['npth'].prefix,
|
||||
'--with-libiconv-prefix=' + self.spec['libiconv'].prefix,
|
||||
'--with-libiconv-prefix=' + self.spec['iconv'].prefix,
|
||||
'--with-zlib=' + self.spec['zlib'].prefix,
|
||||
'--without-tar',
|
||||
'--without-libiconv-prefix',
|
||||
|
@@ -55,7 +55,7 @@ class Gnuplot(AutotoolsPackage):
|
||||
depends_on('readline')
|
||||
depends_on('pkgconfig', type='build')
|
||||
depends_on('libxpm')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
|
||||
# optional dependencies:
|
||||
depends_on('libcerf', when='+libcerf')
|
||||
|
@@ -35,16 +35,18 @@ class Go(Package):
|
||||
|
||||
extendable = True
|
||||
|
||||
version('1.14', sha256='6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389')
|
||||
version('1.14.1', sha256='2ad2572115b0d1b4cb4c138e6b3a31cee6294cb48af75ee86bec3dca04507676')
|
||||
version('1.14', sha256='6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389')
|
||||
version('1.13.9', sha256='34bb19d806e0bc4ad8f508ae24bade5e9fedfa53d09be63b488a9314d2d4f31d')
|
||||
version('1.13.8', sha256='b13bf04633d4d8cf53226ebeaace8d4d2fd07ae6fa676d0844a688339debec34')
|
||||
version('1.13.7', sha256='e4ad42cc5f5c19521fbbbde3680995f2546110b5c6aa2b48c3754ff7af9b41f4')
|
||||
version('1.13.6', sha256='aae5be954bdc40bcf8006eb77e8d8a5dde412722bc8effcdaf9772620d06420c')
|
||||
version('1.13.5', sha256='27d356e2a0b30d9983b60a788cf225da5f914066b37a6b4f69d457ba55a626ff')
|
||||
version('1.13.4', sha256='95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624')
|
||||
version('1.13.4', sha256='95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624')
|
||||
version('1.13.3', sha256='4f7123044375d5c404280737fbd2d0b17064b66182a65919ffe20ffe8620e3df')
|
||||
version('1.13.2', sha256='1ea68e01472e4276526902b8817abd65cf84ed921977266f0c11968d5e915f44')
|
||||
version('1.13.1', sha256='81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358')
|
||||
version('1.13', sha256='3fc0b8b6101d42efd7da1da3029c0a13f22079c0c37ef9730209d8ec665bf122')
|
||||
version('1.13', sha256='3fc0b8b6101d42efd7da1da3029c0a13f22079c0c37ef9730209d8ec665bf122')
|
||||
version('1.12.17', sha256='de878218c43aa3c3bad54c1c52d95e3b0e5d336e1285c647383e775541a28b25')
|
||||
version('1.12.15', sha256='8aba74417e527524ad5724e6e6c21016795d1017692db76d1b0851c6bdec84c3')
|
||||
version('1.12.14', sha256='39dbf05f7e2ffcb19b08f07d53dcc96feadeb1987fef9e279e7ff0c598213064')
|
||||
|
@@ -58,7 +58,7 @@ class Grass(AutotoolsPackage):
|
||||
# http://htmlpreview.github.io/?https://github.com/OSGeo/grass/blob/master/REQUIREMENTS.html
|
||||
# General requirements
|
||||
depends_on('gmake@3.81:', type='build')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
depends_on('zlib')
|
||||
depends_on('flex', type='build')
|
||||
depends_on('bison', type='build')
|
||||
@@ -254,5 +254,8 @@ def configure_args(self):
|
||||
# hence invoke the following function afterwards
|
||||
@run_after('configure')
|
||||
def fix_iconv_linking(self):
|
||||
if self.spec['iconv'].name != 'libiconv':
|
||||
return
|
||||
|
||||
makefile = FileFilter('include/Make/Platform.make')
|
||||
makefile.filter(r'^ICONVLIB\s*=.*', 'ICONVLIB = -liconv')
|
||||
|
@@ -0,0 +1,148 @@
|
||||
diff -ur spack-src.org/CMakeLists.txt spack-src/CMakeLists.txt
|
||||
--- spack-src.org/CMakeLists.txt 2020-03-26 16:38:53.358339744 +0900
|
||||
+++ spack-src/CMakeLists.txt 2020-03-26 16:44:04.581014766 +0900
|
||||
@@ -184,6 +184,9 @@
|
||||
CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H)
|
||||
CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
+include(CheckSymbolExists)
|
||||
+check_symbol_exists(__clear_cache "" CLEAR_CACHE_DEFINED)
|
||||
+message(STATUS "Clear cache defined is ${CLEAR_CACHE_DEFINED}")
|
||||
|
||||
set (NO_DISASSEMBLER TRUE)
|
||||
if (ENABLE_DISASSEMBLY)
|
||||
diff -ur spack-src.org/arm6.c spack-src/arm6.c
|
||||
--- spack-src.org/arm6.c 2020-03-26 16:38:53.358339744 +0900
|
||||
+++ spack-src/arm6.c 2020-03-26 16:45:20.428978615 +0900
|
||||
@@ -1524,22 +1524,9 @@
|
||||
}
|
||||
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm6_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/arm6_rt.c spack-src/arm6_rt.c
|
||||
--- spack-src.org/arm6_rt.c 2020-03-26 16:38:53.358339744 +0900
|
||||
+++ spack-src/arm6_rt.c 2020-03-26 16:48:18.927720543 +0900
|
||||
@@ -109,22 +109,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm6_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/arm8.c spack-src/arm8.c
|
||||
--- spack-src.org/arm8.c 2020-03-26 16:38:53.358339744 +0900
|
||||
+++ spack-src/arm8.c 2020-03-26 16:49:38.386063473 +0900
|
||||
@@ -1524,22 +1524,9 @@
|
||||
}
|
||||
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm8_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/arm8_rt.c spack-src/arm8_rt.c
|
||||
--- spack-src.org/arm8_rt.c 2020-03-26 16:38:53.358339744 +0900
|
||||
+++ spack-src/arm8_rt.c 2020-03-26 16:50:37.902312532 +0900
|
||||
@@ -109,22 +109,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm8_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/config.h.cmake spack-src/config.h.cmake
|
||||
--- spack-src.org/config.h.cmake 2020-03-26 16:38:53.358339744 +0900
|
||||
+++ spack-src/config.h.cmake 2020-03-26 16:52:52.256419382 +0900
|
||||
@@ -13,10 +13,13 @@
|
||||
#cmakedefine HAVE_DIS_ASM_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
-#undef HAVE_DLFCN_H
|
||||
+#cmakedefine HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
-#undef HAVE_INTTYPES_H
|
||||
+#cmakedefine HAVE_INTTYPES_H
|
||||
+
|
||||
+/* Define to 1 if you have __clear_cache is defined */
|
||||
+#cmakedefine CLEAR_CACHE_DEFINED
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#cmakedefine HAVE_MALLOC_H
|
@@ -0,0 +1,148 @@
|
||||
diff -ur spack-src.org/CMakeLists.txt spack-src/CMakeLists.txt
|
||||
--- spack-src.org/CMakeLists.txt 2020-03-26 09:35:43.403836842 +0900
|
||||
+++ spack-src/CMakeLists.txt 2020-03-26 09:37:57.397837929 +0900
|
||||
@@ -267,6 +267,9 @@
|
||||
CHECK_INCLUDE_FILES(stdarg.h STDC_HEADERS)
|
||||
CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H)
|
||||
CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)
|
||||
+include(CheckSymbolExists)
|
||||
+check_symbol_exists(__clear_cache "" CLEAR_CACHE_DEFINED)
|
||||
+message(STATUS "Clear cache defined is ${CLEAR_CACHE_DEFINED}")
|
||||
|
||||
set (NO_DISASSEMBLER TRUE)
|
||||
if (DILL_ENABLE_DISASSEMBLY)
|
||||
diff -ur spack-src.org/arm6.c spack-src/arm6.c
|
||||
--- spack-src.org/arm6.c 2020-03-26 09:35:43.403836842 +0900
|
||||
+++ spack-src/arm6.c 2020-03-26 09:40:06.021306329 +0900
|
||||
@@ -1526,22 +1526,9 @@
|
||||
}
|
||||
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm6_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/arm6_rt.c spack-src/arm6_rt.c
|
||||
--- spack-src.org/arm6_rt.c 2020-03-26 09:35:43.403836842 +0900
|
||||
+++ spack-src/arm6_rt.c 2020-03-26 09:41:59.823222738 +0900
|
||||
@@ -109,22 +109,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm6_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/arm8.c spack-src/arm8.c
|
||||
--- spack-src.org/arm8.c 2020-03-26 09:35:43.403836842 +0900
|
||||
+++ spack-src/arm8.c 2020-03-26 09:43:04.630008776 +0900
|
||||
@@ -1524,22 +1524,9 @@
|
||||
}
|
||||
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm8_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/arm8_rt.c spack-src/arm8_rt.c
|
||||
--- spack-src.org/arm8_rt.c 2020-03-26 09:35:43.403836842 +0900
|
||||
+++ spack-src/arm8_rt.c 2020-03-26 09:44:19.027799105 +0900
|
||||
@@ -109,22 +109,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Clear the instruction cache from `beg' to `end'. This makes an
|
||||
- inline system call to SYS_cacheflush. */
|
||||
-#define CLEAR_INSN_CACHE(BEG, END) \
|
||||
-{ \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (END); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
-}
|
||||
-/*
|
||||
- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker
|
||||
- * mailing list
|
||||
- */
|
||||
-extern void __clear_cache(char*, char *);
|
||||
+#ifndef CLEAR_CACHE_DEFINED
|
||||
+extern void __clear_cache(void *, void *);
|
||||
+#endif
|
||||
|
||||
static void
|
||||
arm8_flush(void *base, void *limit)
|
||||
diff -ur spack-src.org/config.h.cmake spack-src/config.h.cmake
|
||||
--- spack-src.org/config.h.cmake 2020-03-26 09:35:43.403836842 +0900
|
||||
+++ spack-src/config.h.cmake 2020-03-26 09:46:56.124248964 +0900
|
||||
@@ -16,10 +16,13 @@
|
||||
#cmakedefine HAVE_DIS_ASM_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
-#undef HAVE_DLFCN_H
|
||||
+#cmakedefine HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
-#undef HAVE_INTTYPES_H
|
||||
+#cmakedefine HAVE_INTTYPES_H
|
||||
+
|
||||
+/* Define to 1 if you have __clear_cache is defined */
|
||||
+#cmakedefine CLEAR_CACHE_DEFINED
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#cmakedefine HAVE_MALLOC_H
|
@@ -20,6 +20,10 @@ class GtkorvoDill(CMakePackage):
|
||||
version('2.4', sha256='ed7745d13e8c6a556f324dcc0e48a807fc993bdd5bb1daa94c1df116cb7e81fa')
|
||||
version('2.1', sha256='7671e1f3c25ac6a4ec2320cec2c342a2f668efb170e3dba186718ed17d2cf084')
|
||||
|
||||
# Ref: https://github.com/GTkorvo/dill/commit/dac6dfcc7fdaceeb4c157f9ecdf5ecc28f20477f
|
||||
patch('2.4-fix-clear_cache.patch', when='@2.4')
|
||||
patch('2.1-fix-clear_cache.patch', when='@2.1')
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
if self.spec.satisfies('@2.4:'):
|
||||
|
@@ -35,7 +35,7 @@ class Gtksourceview(AutotoolsPackage):
|
||||
depends_on('pango')
|
||||
depends_on('gdk-pixbuf')
|
||||
depends_on('atk')
|
||||
depends_on('libiconv')
|
||||
depends_on('iconv')
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = 'https://download.gnome.org/sources/gtksourceview/'
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user