diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000000000000000000000000000000000000..62fc306ec3b788bf6858307ef15be3759cbc69fe --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,12 @@ +coverage: + precision: 2 + round: nearest + range: 60...100 + +ignore: + - lib/spack/spack/test/.* + - lib/spack/env/.* + - lib/spack/docs/.* + - lib/spack/external/.* + +comment: off diff --git a/.travis.yml b/.travis.yml index 0a9a118b73ca3d98357b41b6476501bb3e38e491..2e7b1c64fcb3e1b38aa731ea33ee3ebe4aed0e3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ #============================================================================= # Project settings #============================================================================= -language: python - # Only build master and develop on push; do not build every branch. branches: only: @@ -13,29 +11,27 @@ branches: #============================================================================= # Build matrix #============================================================================= -python: - - 2.6 - - 2.7 - -env: - - TEST_SUITE=unit - - TEST_SUITE=flake8 - - TEST_SUITE=doc - matrix: - # Flake8 and Sphinx no longer support Python 2.6, and one run is enough. - exclude: - - python: 2.6 - env: TEST_SUITE=flake8 - - python: 2.6 - env: TEST_SUITE=doc - # Explicitly include an OS X build with homebrew's python. - # Works around Python issues on Travis for OSX, described here: - # http://blog.fizyk.net.pl/blog/running-python-tests-on-traviss-osx-workers.html include: - - os: osx - language: generic - env: TEST_SUITE=unit + - python: '2.6' + os: linux + language: python + env: TEST_SUITE=unit + - python: '2.7' + os: linux + language: python + env: TEST_SUITE=unit + - python: '2.7' + os: linux + language: python + env: TEST_SUITE=flake8 + - python: '2.7' + os: linux + language: python + env: TEST_SUITE=doc + - os: osx + language: generic + env: [ TEST_SUITE=unit, PYTHON_VERSION=2.7 ] #============================================================================= # Environment @@ -61,7 +57,7 @@ before_install: # Install various dependencies install: - - pip install --upgrade coveralls + - pip install --upgrade codecov - pip install --upgrade flake8 - pip install --upgrade sphinx - pip install --upgrade mercurial @@ -80,7 +76,7 @@ before_script: script: share/spack/qa/run-$TEST_SUITE-tests after_success: - - if [[ $TEST_SUITE == unit && $TRAVIS_PYTHON_VERSION == 2.7 && $TRAVIS_OS_NAME == "linux" ]]; then coveralls; fi + - if [[ $TEST_SUITE == unit && $TRAVIS_PYTHON_VERSION == 2.7 && $TRAVIS_OS_NAME == "linux" ]]; then codecov --env PY_VERSION; fi #============================================================================= # Notifications diff --git a/README.md b/README.md index 9d005605ebc8e379b4ac6812e7afd05dcaba94f4..375aad4dd7a32429fcc91b535eeabfe2ea27139d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ============ [](https://travis-ci.org/LLNL/spack) -[](https://coveralls.io/github/LLNL/spack?branch=develop) +[](https://codecov.io/gh/LLNL/spack) Spack is a package management tool designed to support multiple versions and configurations of software on a wide variety of platforms diff --git a/bin/spack b/bin/spack index 66bebe57e72e95884c8f2eab24122a4f88e5060b..9f17443d0093755eba2330f1d6e5d5d29b907aad 100755 --- a/bin/spack +++ b/bin/spack @@ -102,19 +102,19 @@ spec expressions: [^DEPENDENCY [CONSTRAINTS] ...]""")) parser.add_argument('-d', '--debug', action='store_true', - help="Write out debug logs during compile") + help="write out debug logs during compile") parser.add_argument('-D', '--pdb', action='store_true', - help="Run spack under the pdb debugger") + help="run spack under the pdb debugger") parser.add_argument('-k', '--insecure', action='store_true', - help="Do not check ssl certificates when downloading.") + help="do not check ssl certificates when downloading") parser.add_argument('-m', '--mock', action='store_true', - help="Use mock packages instead of real ones.") + help="use mock packages instead of real ones") parser.add_argument('-p', '--profile', action='store_true', - help="Profile execution using cProfile.") + help="profile execution using cProfile") parser.add_argument('-v', '--verbose', action='store_true', - help="Print additional output during builds") + help="print additional output during builds") parser.add_argument('-s', '--stacktrace', action='store_true', - help="Add stacktrace information to all printed statements") + help="add stacktrace information to all printed statements") parser.add_argument('-V', '--version', action='version', version="%s" % spack.spack_version) diff --git a/lib/spack/docs/contribution_guide.rst b/lib/spack/docs/contribution_guide.rst index 4abf97ef924169349642f500f20521a0742754dc..e9cfe1fa54071f47eb30ed26c4051c26bf0fdb4c 100644 --- a/lib/spack/docs/contribution_guide.rst +++ b/lib/spack/docs/contribution_guide.rst @@ -75,7 +75,10 @@ This allows you to develop iteratively: make a change, test that change, make another change, test that change, etc. To get a list of all available unit tests, run: -.. command-output:: spack test --collect-only +.. command-output:: spack test --list + +A more detailed list of available unit tests can be found by running +``spack test --long-list``. Unit tests are crucial to making sure bugs aren't introduced into Spack. If you are modifying core Spack libraries or adding new functionality, please consider diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst index 5ddbaf24782d202cb8c5bf5be2c19f7115eb2d4c..dbb9a670b460932d6019442a3b429fcd6c9d7446 100644 --- a/lib/spack/docs/developer_guide.rst +++ b/lib/spack/docs/developer_guide.rst @@ -300,6 +300,42 @@ Stage objects Writing commands ---------------- +Adding a new command to Spack is easy. Simply add a ``<name>.py`` file to +``lib/spack/spack/cmd/``, where ``<name>`` is the name of the subcommand. +At the bare minimum, two functions are required in this file: + +^^^^^^^^^^^^^^^^^^ +``setup_parser()`` +^^^^^^^^^^^^^^^^^^ + +Unless your command doesn't accept any arguments, a ``setup_parser()`` +function is required to define what arguments and flags your command takes. +See the `Argparse documentation <https://docs.python.org/2.7/library/argparse.html>`_ +for more details on how to add arguments. + +Some commands have a set of subcommands, like ``spack compiler find`` or +``spack module refresh``. You can add subparsers to your parser to handle +this. Check out ``spack edit --command compiler`` for an example of this. + +A lot of commands take the same arguments and flags. These arguments should +be defined in ``lib/spack/spack/cmd/common/arguments.py`` so that they don't +need to be redefined in multiple commands. + +^^^^^^^^^^^^ +``<name>()`` +^^^^^^^^^^^^ + +In order to run your command, Spack searches for a function with the same +name as your command in ``<name>.py``. This is the main method for your +command, and can call other helper methods to handle common tasks. + +Remember, before adding a new command, think to yourself whether or not this +new command is actually necessary. Sometimes, the functionality you desire +can be added to an existing command. Also remember to add unit tests for +your command. If it isn't used very frequently, changes to the rest of +Spack can cause your command to break without sufficient unit tests to +prevent this from happening. + ---------- Unit tests ---------- @@ -312,14 +348,80 @@ Unit testing Developer commands ------------------ +.. _cmd-spack-doc: + ^^^^^^^^^^^^^ ``spack doc`` ^^^^^^^^^^^^^ +.. _cmd-spack-test: + ^^^^^^^^^^^^^^ ``spack test`` ^^^^^^^^^^^^^^ +.. _cmd-spack-url: + +^^^^^^^^^^^^^ +``spack url`` +^^^^^^^^^^^^^ + +A package containing a single URL can be used to download several different +versions of the package. If you've ever wondered how this works, all of the +magic is in :mod:`spack.url`. This module contains methods for extracting +the name and version of a package from its URL. The name is used by +``spack create`` to guess the name of the package. By determining the version +from the URL, Spack can replace it with other versions to determine where to +download them from. + +The regular expressions in ``parse_name_offset`` and ``parse_version_offset`` +are used to extract the name and version, but they aren't perfect. In order +to debug Spack's URL parsing support, the ``spack url`` command can be used. + +""""""""""""""""""" +``spack url parse`` +""""""""""""""""""" + +If you need to debug a single URL, you can use the following command: + +.. command-output:: spack url parse http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz + +You'll notice that the name and version of this URL are correctly detected, +and you can even see which regular expressions it was matched to. However, +you'll notice that when it substitutes the version number in, it doesn't +replace the ``2.2`` with ``9.9`` where we would expect ``9.9.9b`` to live. +This particular package may require a ``list_url`` or ``url_for_version`` +function. + +This command also accepts a ``--spider`` flag. If provided, Spack searches +for other versions of the package and prints the matching URLs. + +"""""""""""""""""" +``spack url list`` +"""""""""""""""""" + +This command lists every URL in every package in Spack. If given the +``--color`` and ``--extrapolation`` flags, it also colors the part of +the string that it detected to be the name and version. The +``--incorrect-name`` and ``--incorrect-version`` flags can be used to +print URLs that were not being parsed correctly. + +"""""""""""""""""" +``spack url test`` +"""""""""""""""""" + +This command attempts to parse every URL for every package in Spack +and prints a summary of how many of them are being correctly parsed. +It also prints a histogram showing which regular expressions are being +matched and how frequently: + +.. command-output:: spack url test + +This command is essential for anyone adding or changing the regular +expressions that parse names and versions. By running this command +before and after the change, you can make sure that your regular +expression fixes more packages than it breaks. + --------- Profiling --------- diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 8a39ee28e2c765fa9c17ba15321ebdcab83f5361..211e72158c46f69c5d4a10d29997591a5ba94195 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -405,70 +405,22 @@ For tarball downloads, Spack can currently support checksums using the MD5, SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 algorithms. It determines the algorithm to use based on the hash length. ------------------------ -Package Version Numbers ------------------------ - -Most Spack versions are numeric, a tuple of integers; for example, -``apex@0.1``, ``ferret@6.96`` or ``py-netcdf@1.2.3.1``. Spack knows -how to compare and sort numeric versions. - -Some Spack versions involve slight extensions of numeric syntax; for -example, ``py-sphinx-rtd-theme@0.1.10a0``. In this case, numbers are -always considered to be "newer" than letters. This is for consistency -with `RPM <https://bugzilla.redhat.com/show_bug.cgi?id=50977>`_. - -Spack versions may also be arbitrary non-numeric strings; any string -here will suffice; for example, ``@develop``, ``@master``, ``@local``. -The following rules determine the sort order of numeric -vs. non-numeric versions: - -#. The non-numeric versions ``@develop`` is considered greatest (newest). - -#. Numeric versions are all less than ``@develop`` version, and are - sorted numerically. - -#. All other non-numeric versions are less than numeric versions, and - are sorted alphabetically. - -The logic behind this sort order is two-fold: - -#. Non-numeric versions are usually used for special cases while - developing or debugging a piece of software. Keeping most of them - less than numeric versions ensures that Spack choose numeric - versions by default whenever possible. - -#. The most-recent development version of a package will usually be - newer than any released numeric versions. This allows the - ``develop`` version to satisfy dependencies like ``depends_on(abc, - when="@x.y.z:")`` - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Concretization Version Selection -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When concretizing, many versions might match a user-supplied spec. -For example, the spec ``python`` matches all available versions of the -package ``python``. Similarly, ``python@3:`` matches all versions of -Python3. Given a set of versions that match a spec, Spack -concretization uses the following priorities to decide which one to -use: +--------------------- +Versions and fetching +--------------------- -#. If the user provided a list of versions in ``packages.yaml``, the - first matching version in that list will be used. +The most straightforward way to add new versions to your package is to +add a line like this in the package class: -#. If one or more versions is specified as ``preferred=True``, in - either ``packages.yaml`` or ``package.py``, the largest matching - version will be used. ("Latest" is defined by the sort order - above). +.. code-block:: python + :linenos: -#. If no preferences in particular are specified in the package or in - ``packages.yaml``, then the largest matching non-develop version - will be used. By avoiding ``@develop``, this prevents users from - accidentally installing a ``@develop`` version. + class Foo(Package): + url = 'http://example.com/foo-1.0.tar.gz' + version('8.2.1', '4136d7b4c04df68b686570afa26988ac') + ... -#. If all else fails and ``@develop`` is the only matching version, it - will be used. +Versions should be listed with the newest version first. ^^^^^^^^^^^^^ Date Versions @@ -484,24 +436,6 @@ Alternately, you might use a hybrid release-version / date scheme. For example, ``@1.3.2016.08.31`` would mean the version from the ``1.3`` branch, as of August 31, 2016. - -------------------- -Adding new versions -------------------- - -The most straightforward way to add new versions to your package is to -add a line like this in the package class: - -.. code-block:: python - :linenos: - - class Foo(Package): - url = 'http://example.com/foo-1.0.tar.gz' - version('8.2.1', '4136d7b4c04df68b686570afa26988ac') - ... - -Versions should be listed with the newest version first. - ^^^^^^^^^^^^ Version URLs ^^^^^^^^^^^^ @@ -566,13 +500,44 @@ way to guess the URL systematically. When you supply a custom URL for a version, Spack uses that URL *verbatim* and does not perform extrapolation. +^^^^^^^^^^^^^^^^^^^^^ +PyPI and version URLs +^^^^^^^^^^^^^^^^^^^^^ + +In addition to their developer websites, many python packages are hosted at the +`Python Package Index (PyPi) <https://pypi.python.org/pypi>`_. Although links to +these individual files are typically `generated using a hash +<https://bitbucket.org/pypa/pypi/issues/438>`_ it is often possible to find a +reliable link of the format + +.. code-block:: sh + + https://pypi.python.org/packages/source/<first letter of package>/<package>/<package>-<version>.<extension> + +Packages hosted on GitHub and the like are often developer versions that do not +contain all of the files (e.g. configuration scripts) necessary to support +compilation. For this reason it is ideal to link to a repository such as PyPi +if possible. + +More recently, sources are being indexed at `pypi.io <https://pypi.io>`_ as +well. Links obtained from this site follow a similar pattern, namely + +.. code-block:: sh + + https://pypi.io/packages/source/<first letter of package>/<package>/<package>-<version>.<extension> + +These links currently redirect back to `pypi.python.org +<https://pypi.python.org>`_, but this `may change in the future +<https://bitbucket.org/pypa/pypi/issues/438#comment-27243225>`_. + + ^^^^^^^^^^^^^^^^^^^^^^^^ Skipping the expand step ^^^^^^^^^^^^^^^^^^^^^^^^ -Spack normally expands archives automatically after downloading -them. If you want to skip this step (e.g., for self-extracting -executables and other custom archive types), you can add +Spack normally expands archives (e.g. `*.tar.gz` and `*.zip`) automatically +after downloading them. If you want to skip this step (e.g., for +self-extracting executables and other custom archive types), you can add ``expand=False`` to a ``version`` directive. .. code-block:: python @@ -596,6 +561,79 @@ it executable, then runs it with some arguments. installer = Executable(self.stage.archive_file) installer('--prefix=%s' % prefix, 'arg1', 'arg2', 'etc.') +^^^^^^^^^^^^^^^^ +Download caching +^^^^^^^^^^^^^^^^ + +Spack maintains a cache (described :ref:`here <caching>`) which saves files +retrieved during package installations to avoid re-downloading in the case that +a package is installed with a different specification (but the same version) or +reinstalled on account of a change in the hashing scheme. + +^^^^^^^^^^^^^^^^^^ +Version comparison +^^^^^^^^^^^^^^^^^^ + +Most Spack versions are numeric, a tuple of integers; for example, +``apex@0.1``, ``ferret@6.96`` or ``py-netcdf@1.2.3.1``. Spack knows +how to compare and sort numeric versions. + +Some Spack versions involve slight extensions of numeric syntax; for +example, ``py-sphinx-rtd-theme@0.1.10a0``. In this case, numbers are +always considered to be "newer" than letters. This is for consistency +with `RPM <https://bugzilla.redhat.com/show_bug.cgi?id=50977>`_. + +Spack versions may also be arbitrary non-numeric strings; any string +here will suffice; for example, ``@develop``, ``@master``, ``@local``. +The following rules determine the sort order of numeric +vs. non-numeric versions: + +#. The non-numeric versions ``@develop`` is considered greatest (newest). + +#. Numeric versions are all less than ``@develop`` version, and are + sorted numerically. + +#. All other non-numeric versions are less than numeric versions, and + are sorted alphabetically. + +The logic behind this sort order is two-fold: + +#. Non-numeric versions are usually used for special cases while + developing or debugging a piece of software. Keeping most of them + less than numeric versions ensures that Spack choose numeric + versions by default whenever possible. + +#. The most-recent development version of a package will usually be + newer than any released numeric versions. This allows the + ``develop`` version to satisfy dependencies like ``depends_on(abc, + when="@x.y.z:")`` + +^^^^^^^^^^^^^^^^^ +Version selection +^^^^^^^^^^^^^^^^^ + +When concretizing, many versions might match a user-supplied spec. +For example, the spec ``python`` matches all available versions of the +package ``python``. Similarly, ``python@3:`` matches all versions of +Python3. Given a set of versions that match a spec, Spack +concretization uses the following priorities to decide which one to +use: + +#. If the user provided a list of versions in ``packages.yaml``, the + first matching version in that list will be used. + +#. If one or more versions is specified as ``preferred=True``, in + either ``packages.yaml`` or ``package.py``, the largest matching + version will be used. ("Latest" is defined by the sort order + above). + +#. If no preferences in particular are specified in the package or in + ``packages.yaml``, then the largest matching non-develop version + will be used. By avoiding ``@develop``, this prevents users from + accidentally installing a ``@develop`` version. + +#. If all else fails and ``@develop`` is the only matching version, it + will be used. ^^^^^^^^^^^^^ ``spack md5`` @@ -674,8 +712,8 @@ is at ``http://example.com/downloads/foo-1.0.tar.gz``, Spack will look in ``http://example.com/downloads/`` for links to additional versions. If you need to search another path for download links, you can supply some extra attributes that control how your package finds new -versions. See the documentation on `attribute_list_url`_ and -`attribute_list_depth`_. +versions. See the documentation on :ref:`attribute_list_url` and +:ref:`attribute_list_depth`. .. note:: @@ -690,12 +728,108 @@ versions. See the documentation on `attribute_list_url`_ and syntax errors, or the ``import`` will fail. Use this once you've got your package in working order. +-------------------- +Finding new versions +-------------------- + +You've already seen the ``homepage`` and ``url`` package attributes: + +.. code-block:: python + :linenos: + + from spack import * + + + class Mpich(Package): + """MPICH is a high performance and widely portable implementation of + the Message Passing Interface (MPI) standard.""" + homepage = "http://www.mpich.org" + url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" + +These are class-level attributes used by Spack to show users +information about the package, and to determine where to download its +source code. + +Spack uses the tarball URL to extrapolate where to find other tarballs +of the same package (e.g. in :ref:`cmd-spack-checksum`, but +this does not always work. This section covers ways you can tell +Spack to find tarballs elsewhere. + +.. _attribute_list_url: + +^^^^^^^^^^^^ +``list_url`` +^^^^^^^^^^^^ + +When spack tries to find available versions of packages (e.g. with +:ref:`cmd-spack-checksum`), it spiders the parent directory +of the tarball in the ``url`` attribute. For example, for libelf, the +url is: + +.. code-block:: python + + url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" + +Here, Spack spiders ``http://www.mr511.de/software/`` to find similar +tarball links and ultimately to make a list of available versions of +``libelf``. + +For many packages, the tarball's parent directory may be unlistable, +or it may not contain any links to source code archives. In fact, +many times additional package downloads aren't even available in the +same directory as the download URL. + +For these, you can specify a separate ``list_url`` indicating the page +to search for tarballs. For example, ``libdwarf`` has the homepage as +the ``list_url``, because that is where links to old versions are: + +.. code-block:: python + :linenos: + + class Libdwarf(Package): + homepage = "http://www.prevanders.net/dwarf.html" + url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" + list_url = homepage + +.. _attribute_list_depth: + +^^^^^^^^^^^^^^ +``list_depth`` +^^^^^^^^^^^^^^ + +``libdwarf`` and many other packages have a listing of available +versions on a single webpage, but not all do. For example, ``mpich`` +has a tarball URL that looks like this: + +.. code-block:: python + + url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" + +But its downloads are in many different subdirectories of +``http://www.mpich.org/static/downloads/``. So, we need to add a +``list_url`` *and* a ``list_depth`` attribute: + +.. code-block:: python + :linenos: + + class Mpich(Package): + homepage = "http://www.mpich.org" + url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" + list_url = "http://www.mpich.org/static/downloads/" + list_depth = 2 + +By default, Spack only looks at the top-level page available at +``list_url``. ``list_depth`` tells it to follow up to 2 levels of +links from the top-level page. Note that here, this implies two +levels of subdirectories, as the ``mpich`` website is structured much +like a filesystem. But ``list_depth`` really refers to link depth +when spidering the page. .. _vcs-fetch: ------------------------------- -Fetching from VCS repositories ------------------------------- +------------------------------- +Fetching from code repositories +------------------------------- For some packages, source code is provided in a Version Control System (VCS) repository rather than in a tarball. Spack can fetch packages @@ -793,9 +927,9 @@ Submodules .. _github-fetch: -"""""" +^^^^^^ GitHub -"""""" +^^^^^^ If a project is hosted on GitHub, *any* valid Git branch, tag or hash may be downloaded as a tarball. This is accomplished simply by @@ -875,38 +1009,8 @@ Fetching a revision Subversion branches are handled as part of the directory structure, so you can check out a branch or tag by changing the ``url``. ------------------------------------------ -Standard repositories for python packages ------------------------------------------ - -In addition to their developer websites, many python packages are hosted at the -`Python Package Index (PyPi) <https://pypi.python.org/pypi>`_. Although links to -these individual files are typically `generated using a hash -<https://bitbucket.org/pypa/pypi/issues/438>`_ it is often possible to find a -reliable link of the format - -.. code-block:: sh - - https://pypi.python.org/packages/source/<first letter of package>/<package>/<package>-<version>.<extension> - -Packages hosted on GitHub and the like are often developer versions that do not -contain all of the files (e.g. configuration scripts) necessary to support -compilation. For this reason it is ideal to link to a repository such as PyPi -if possible. - -More recently, sources are being indexed at `pypi.io <https://pypi.io>`_ as -well. Links obtained from this site follow a similar pattern, namely - -.. code-block:: sh - - https://pypi.io/packages/source/<first letter of package>/<package>/<package>-<version>.<extension> - -These links currently redirect back to `pypi.python.org -<https://pypi.python.org>`_, but this `may change in the future -<https://bitbucket.org/pypa/pypi/issues/438#comment-27243225>`_. - ------------------------------------------------- -Expanding additional resources in the source tree +Resources (expanding extra tarballs) ------------------------------------------------- Some packages (most notably compilers) provide optional features if additional @@ -926,15 +1030,6 @@ Based on the keywords present among the arguments the appropriate ``FetchStrateg will be used for the resource. The keyword ``destination`` is relative to the source root of the package and should point to where the resource is to be expanded. ------------------------------------------------------- -Automatic caching of files fetched during installation ------------------------------------------------------- - -Spack maintains a cache (described :ref:`here <caching>`) which saves files -retrieved during package installations to avoid re-downloading in the case that -a package is installed with a different specification (but the same version) or -reinstalled on account of a change in the hashing scheme. - .. _license: ----------------- @@ -1099,20 +1194,28 @@ structure like this: package.py ad_lustre_rwcontig_open_source.patch -If you supply a URL instead of a filename, the patch will be fetched -from the URL and then applied to your source code. +If you supply a URL instead of a filename, you need to supply a checksum, +like this: -.. warning:: +.. code-block:: python - It is generally better to use a filename rather than a URL for your - patch. Patches fetched from URLs are not currently checksummed, - and adding checksums for them is tedious for the package builder. - File patches go into the spack repository, which gives you git's - integrity guarantees. URL patches may be removed in a future spack - version. + patch('http://www.nwchem-sw.org/images/Tddft_mxvec20.patch.gz', + md5='f91c6a04df56e228fe946291d2f38c9a') + +This directive provides an ``md5`` checksum. You can use other hashing +algorihtms like ``sha256`` as well. The patch will be fetched from the +URL, checked, and applied to your source code. You can use the ``spack +md5`` command to generate a checksum for a patch file. ``patch`` can take two options keyword arguments. They are: +"""""""""""""""""""""""""""""""""""""" +``md5``, ``sha256``, ``sha512``, etc. +"""""""""""""""""""""""""""""""""""""" + +Use one of these when you supply a patch to be downloaded from a remote +site. The downloaded file will be validated using the given checksum. + """""""" ``when`` """""""" @@ -1234,103 +1337,6 @@ RPATHs in Spack are handled in one of three ways: links. You can see this how this is used in the :ref:`PySide example <pyside-patch>` above. --------------------- -Finding new versions --------------------- - -You've already seen the ``homepage`` and ``url`` package attributes: - -.. code-block:: python - :linenos: - - from spack import * - - - class Mpich(Package): - """MPICH is a high performance and widely portable implementation of - the Message Passing Interface (MPI) standard.""" - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - -These are class-level attributes used by Spack to show users -information about the package, and to determine where to download its -source code. - -Spack uses the tarball URL to extrapolate where to find other tarballs -of the same package (e.g. in :ref:`cmd-spack-checksum`, but -this does not always work. This section covers ways you can tell -Spack to find tarballs elsewhere. - -.. _attribute_list_url: - -^^^^^^^^^^^^ -``list_url`` -^^^^^^^^^^^^ - -When spack tries to find available versions of packages (e.g. with -:ref:`cmd-spack-checksum`), it spiders the parent directory -of the tarball in the ``url`` attribute. For example, for libelf, the -url is: - -.. code-block:: python - - url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" - -Here, Spack spiders ``http://www.mr511.de/software/`` to find similar -tarball links and ultimately to make a list of available versions of -``libelf``. - -For many packages, the tarball's parent directory may be unlistable, -or it may not contain any links to source code archives. In fact, -many times additional package downloads aren't even available in the -same directory as the download URL. - -For these, you can specify a separate ``list_url`` indicating the page -to search for tarballs. For example, ``libdwarf`` has the homepage as -the ``list_url``, because that is where links to old versions are: - -.. code-block:: python - :linenos: - - class Libdwarf(Package): - homepage = "http://www.prevanders.net/dwarf.html" - url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" - list_url = homepage - -.. _attribute_list_depth: - -^^^^^^^^^^^^^^ -``list_depth`` -^^^^^^^^^^^^^^ - -``libdwarf`` and many other packages have a listing of available -versions on a single webpage, but not all do. For example, ``mpich`` -has a tarball URL that looks like this: - -.. code-block:: python - - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - -But its downloads are in many different subdirectories of -``http://www.mpich.org/static/downloads/``. So, we need to add a -``list_url`` *and* a ``list_depth`` attribute: - -.. code-block:: python - :linenos: - - class Mpich(Package): - homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" - list_depth = 2 - -By default, Spack only looks at the top-level page available at -``list_url``. ``list_depth`` tells it to follow up to 2 levels of -links from the top-level page. Note that here, this implies two -levels of subdirectories, as the ``mpich`` website is structured much -like a filesystem. But ``list_depth`` really refers to link depth -when spidering the page. - .. _attribute_parallel: --------------- @@ -1490,7 +1496,7 @@ Additional hybrid dependency types are (note the lack of quotes): * **<not specified>**: ``type`` assumed to be ``("build", "link")``. This is the common case for compiled language usage. - + """"""""""""""""""" Dependency Formulas """"""""""""""""""" @@ -1960,7 +1966,7 @@ See the :ref:`concretization-preferences` section for more details. .. _install-method: ------------------ -Inconsistent Specs +Conflicting Specs ------------------ Suppose a user needs to install package C, which depends on packages A @@ -1999,36 +2005,122 @@ the Python extensions provided by them: once for ``+python`` and once for ``~python``. Other than using a little extra disk space, that solution has no serious problems. ------------------------------------ -Implementing the ``install`` method ------------------------------------ +.. _installation_procedure: -The last element of a package is its ``install()`` method. This is +--------------------------------------- +Implementing the installation procedure +--------------------------------------- + +The last element of a package is its **installation procedure**. This is where the real work of installation happens, and it's the main part of the package you'll need to customize for each piece of software. -.. literalinclude:: ../../../var/spack/repos/builtin/packages/mpfr/package.py - :pyobject: Mpfr.install - :linenos: +Defining an installation procedure means overriding a set of methods or attributes +that will be called at some point during the installation of the package. +The package base class, usually specialized for a given build system, determines the +actual set of entities available for overriding. +The classes that are currently provided by Spack are: + + +------------------------------------+----------------------------------+ + | | **Base class purpose** | + +====================================+==================================+ + | :py:class:`.Package` | General base class not | + | | specialized for any build system | + +------------------------------------+----------------------------------+ + | :py:class:`.MakefilePackage` | Specialized class for packages | + | | built invoking | + | | hand-written Makefiles | + +------------------------------------+----------------------------------+ + | :py:class:`.AutotoolsPackage` | Specialized class for packages | + | | built using GNU Autotools | + +------------------------------------+----------------------------------+ + | :py:class:`.CMakePackage` | Specialized class for packages | + | | built using CMake | + +------------------------------------+----------------------------------+ + | :py:class:`.RPackage` | Specialized class for | + | | :py:class:`.R` extensions | + +------------------------------------+----------------------------------+ + | :py:class:`.PythonPackage` | Specialized class for | + | | :py:class:`.Python` extensions | + +------------------------------------+----------------------------------+ + + + +.. note:: + Choice of the appropriate base class for a package + In most cases packagers don't have to worry about the selection of the right base class + for a package, as ``spack create`` will make the appropriate choice on their behalf. In those + rare cases where manual intervention is needed we need to stress that a + package base class depends on the *build system* being used, not the language of the package. + For example, a Python extension installed with CMake would ``extends('python')`` and + subclass from :py:class:`.CMakePackage`. + +^^^^^^^^^^^^^^^^^^^^^ +Installation pipeline +^^^^^^^^^^^^^^^^^^^^^ + +When a user runs ``spack install``, Spack: + +1. Fetches an archive for the correct version of the software. +2. Expands the archive. +3. Sets the current working directory to the root directory of the expanded archive. + +Then, depending on the base class of the package under consideration, it will execute +a certain number of **phases** that reflect the way a package of that type is usually built. +The name and order in which the phases will be executed can be obtained either reading the API +docs at :py:mod:`~.spack.build_systems`, or using the ``spack info`` command: + +.. code-block:: console + :emphasize-lines: 13,14 + + $ spack info m4 + AutotoolsPackage: m4 + Homepage: https://www.gnu.org/software/m4/m4.html + + Safe versions: + 1.4.17 ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz + + Variants: + Name Default Description + + sigsegv on Build the libsigsegv dependency + + Installation Phases: + autoreconf configure build install + + Build Dependencies: + libsigsegv + + ... + + +Typically, phases have default implementations that fit most of the common cases: + +.. literalinclude:: ../../../lib/spack/spack/build_systems/autotools.py + :pyobject: AutotoolsPackage.configure + :linenos: + +It is thus just sufficient for a packager to override a few +build system specific helper methods or attributes to provide, for instance, +configure arguments: -``install`` takes a ``spec``: a description of how the package should -be built, and a ``prefix``: the path to the directory where the -software should be installed. +.. literalinclude:: ../../../var/spack/repos/builtin/packages/m4/package.py + :pyobject: M4.configure_args + :linenos: -Spack provides wrapper functions for ``configure`` and ``make`` so -that you can call them in a similar way to how you'd call a shell -command. In reality, these are Python functions. Spack provides -these functions to make writing packages more natural. See the section -on :ref:`shell wrappers <shell-wrappers>`. +.. note:: + Each specific build system has a list of attributes that can be overridden to + fine-tune the installation of a package without overriding an entire phase. To + have more information on them the place to go is the API docs of the :py:mod:`~.spack.build_systems` + module. -Now that the metadata is out of the way, we can move on to the -``install()`` method. When a user runs ``spack install``, Spack -fetches an archive for the correct version of the software, expands -the archive, and sets the current working directory to the root -directory of the expanded archive. It then instantiates a package -object and calls the ``install()`` method. +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Overriding an entire phase +^^^^^^^^^^^^^^^^^^^^^^^^^^ -The ``install()`` signature looks like this: +In extreme cases it may be necessary to override an entire phase. Regardless +of the build system, the signature is the same. For example, the signature +for the install phase is: .. code-block:: python @@ -2036,8 +2128,6 @@ The ``install()`` signature looks like this: def install(self, spec, prefix): ... -The parameters are as follows: - ``self`` For those not used to Python instance methods, this is the package itself. In this case it's an instance of ``Foo``, which @@ -2054,24 +2144,20 @@ The parameters are as follows: targets into. It acts like a string, but it's actually its own special type, :py:class:`Prefix <spack.util.prefix.Prefix>`. -``spec`` and ``prefix`` are passed to ``install`` for convenience. -``spec`` is also available as an attribute on the package -(``self.spec``), and ``prefix`` is actually an attribute of ``spec`` -(``spec.prefix``). +The arguments ``spec`` and ``prefix`` are passed only for convenience, as they always +correspond to ``self.spec`` and ``self.spec.prefix`` respectively. -As mentioned in :ref:`install-environment`, you will usually not need -to refer to dependencies explicitly in your package file, as the -compiler wrappers take care of most of the heavy lifting here. There -will be times, though, when you need to refer to the install locations -of dependencies, or when you need to do something different depending -on the version, compiler, dependencies, etc. that your package is -built with. These parameters give you access to this type of -information. +As mentioned in :ref:`install-environment`, you will usually not need to refer +to dependencies explicitly in your package file, as the compiler wrappers take care of most of +the heavy lifting here. There will be times, though, when you need to refer to +the install locations of dependencies, or when you need to do something different +depending on the version, compiler, dependencies, etc. that your package is +built with. These parameters give you access to this type of information. .. _install-environment: ----------------------- -The install environment +The build environment ----------------------- In general, you should not have to do much differently in your install @@ -2089,6 +2175,17 @@ custom Makefiles, you may need to add logic to modify the makefiles. The remainder of the section covers the way Spack's build environment works. +^^^^^^^^^^^^^^^^^^^^^ +Forking ``install()`` +^^^^^^^^^^^^^^^^^^^^^ + +To give packagers free reign over their install environment, Spack forks +a new process each time it invokes a package's ``install()`` method. +This allows packages to have a sandboxed build environment, without +impacting the environments ofother jobs that the main Spack process runs. +Packages are free to change the environment or to modify Spack internals, +because each ``install()`` call has its own dedicated process. + ^^^^^^^^^^^^^^^^^^^^^ Environment variables ^^^^^^^^^^^^^^^^^^^^^ @@ -2110,6 +2207,10 @@ The Compiler environment variables that Spack sets are: ``FC`` Fortran 90 and above compiler ============ =============================== +Spack sets these variables so that they point to *compiler +wrappers*. These are covered in :ref:`their own section +<compiler-wrappers>` below. + All of these are standard variables respected by most build systems. If your project uses ``Autotools`` or ``CMake``, then it should pick them up automatically when you run ``configure`` or ``cmake`` in the @@ -2157,158 +2258,102 @@ if you want to run commands in that environment to test them out, you can use the :ref:`cmd-spack-env` command, documented below. -.. _compiler-wrappers: - ^^^^^^^^^^^^^^^^^^^^^ -Compiler interceptors +Failing the build ^^^^^^^^^^^^^^^^^^^^^ -As mentioned, ``CC``, ``CXX``, ``F77``, and ``FC`` are set to point to -Spack's compiler wrappers. These are simply called ``cc``, ``c++``, -``f77``, and ``f90``, and they live in ``$SPACK_ROOT/lib/spack/env``. - -``$SPACK_ROOT/lib/spack/env`` is added first in the ``PATH`` -environment variable when ``install()`` runs so that system compilers -are not picked up instead. +Sometimes you don't want a package to successfully install unless some +condition is true. You can explicitly cause the build to fail from +``install()`` by raising an ``InstallError``, for example: -All of these compiler wrappers point to a single compiler wrapper -script that figures out which *real* compiler it should be building -with. This comes either from spec `concretization -<abstract-and-concrete>`_ or from a user explicitly asking for a -particular compiler using, e.g., ``%intel`` on the command line. +.. code-block:: python -In addition to invoking the right compiler, the compiler wrappers add -flags to the compile line so that dependencies can be easily found. -These flags are added for each dependency, if they exist: + if spec.architecture.startswith('darwin'): + raise InstallError('This package does not build on Mac OS X!') -Compile-time library search paths -* ``-L$dep_prefix/lib`` -* ``-L$dep_prefix/lib64`` +.. _shell-wrappers: -Runtime library search paths (RPATHs) -* ``$rpath_flag$dep_prefix/lib`` -* ``$rpath_flag$dep_prefix/lib64`` +^^^^^^^^^^^^^^^^^^^^^^^ +Shell command functions +^^^^^^^^^^^^^^^^^^^^^^^ -Include search paths -* ``-I$dep_prefix/include`` +Recall the install method from ``libelf``: -An example of this would be the ``libdwarf`` build, which has one -dependency: ``libelf``. Every call to ``cc`` in the ``libdwarf`` -build will have ``-I$LIBELF_PREFIX/include``, -``-L$LIBELF_PREFIX/lib``, and ``$rpath_flag$LIBELF_PREFIX/lib`` -inserted on the command line. This is done transparently to the -project's build system, which will just think it's using a system -where ``libelf`` is readily available. Because of this, you **do -not** have to insert extra ``-I``, ``-L``, etc. on the command line. +.. literalinclude:: ../../../var/spack/repos/builtin/packages/libelf/package.py + :pyobject: Libelf.install + :linenos: -Another useful consequence of this is that you often do *not* have to -add extra parameters on the ``configure`` line to get autotools to -find dependencies. The ``libdwarf`` install method just calls -configure like this: +Normally in Python, you'd have to write something like this in order +to execute shell commands: .. code-block:: python - configure("--prefix=" + prefix) + import subprocess + subprocess.check_call('configure', '--prefix={0}'.format(prefix)) -Because of the ``-L`` and ``-I`` arguments, configure will -successfully find ``libdwarf.h`` and ``libdwarf.so``, without the -packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on -the command line. +We've tried to make this a bit easier by providing callable wrapper +objects for some shell commands. By default, ``configure``, +``cmake``, and ``make`` wrappers are are provided, so you can call +them more naturally in your package files. -.. note:: +If you need other commands, you can use ``which`` to get them: - 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 - ``lib/spack/spack/compilers/$compiler.py``. +.. code-block:: python -The compiler wrappers also pass the compiler flags specified by the user from -the command line (``cflags``, ``cxxflags``, ``fflags``, ``cppflags``, ``ldflags``, -and/or ``ldlibs``). They do not override the canonical autotools flags with the -same names (but in ALL-CAPS) that may be passed into the build by particularly -challenging package scripts. + sed = which('sed') + sed('s/foo/bar/', filename) + +The ``which`` function will search the ``PATH`` for the application. + +Callable wrappers also allow spack to provide some special features. +For example, in Spack, ``make`` is parallel by default, and Spack +figures out the number of cores on your machine and passes an +appropriate value for ``-j<numjobs>`` when it calls ``make`` (see the +``parallel`` `package attribute <attribute_parallel>`). In +a package file, you can supply a keyword argument, ``parallel=False``, +to the ``make`` wrapper to disable parallel make. In the ``libelf`` +package, this allows us to avoid race conditions in the library's +build system. ^^^^^^^^^^^^^^ Compiler flags ^^^^^^^^^^^^^^ -In rare circumstances such as compiling and running small unit tests, a package -developer may need to know what are the appropriate compiler flags to enable -features like ``OpenMP``, ``c++11``, ``c++14`` and alike. To that end the -compiler classes in ``spack`` implement the following **properties**: -``openmp_flag``, ``cxx11_flag``, ``cxx14_flag``, which can be accessed in a -package by ``self.compiler.cxx11_flag`` and alike. Note that the implementation -is such that if a given compiler version does not support this feature, an -error will be produced. Therefore package developers can also use these properties -to assert that a compiler supports the requested feature. This is handy when a -package supports additional variants like +In rare circumstances such as compiling and running small unit tests, a +package developer may need to know what are the appropriate compiler +flags to enable features like ``OpenMP``, ``c++11``, ``c++14`` and +alike. To that end the compiler classes in ``spack`` implement the +following **properties**: ``openmp_flag``, ``cxx11_flag``, +``cxx14_flag``, which can be accessed in a package by +``self.compiler.cxx11_flag`` and alike. Note that the implementation is +such that if a given compiler version does not support this feature, an +error will be produced. Therefore package developers can also use these +properties to assert that a compiler supports the requested feature. This +is handy when a package supports additional variants like .. code-block:: python variant('openmp', default=True, description="Enable OpenMP support.") -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Message Parsing Interface (MPI) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -It is common for high performance computing software/packages to use ``MPI``. -As a result of conretization, a given package can be built using different -implementations of MPI such as ``Openmpi``, ``MPICH`` or ``IntelMPI``. -In some scenarios, to configure a package, one has to provide it with appropriate MPI -compiler wrappers such as ``mpicc``, ``mpic++``. -However different implementations of ``MPI`` may have different names for those -wrappers. In order to make package's ``install()`` method indifferent to the -choice ``MPI`` implementation, each package which implements ``MPI`` sets up -``self.spec.mpicc``, ``self.spec.mpicxx``, ``self.spec.mpifc`` and ``self.spec.mpif77`` -to point to ``C``, ``C++``, ``Fortran 90`` and ``Fortran 77`` ``MPI`` wrappers. -Package developers are advised to use these variables, for example ``self.spec['mpi'].mpicc`` -instead of hard-coding ``join_path(self.spec['mpi'].prefix.bin, 'mpicc')`` for -the reasons outlined above. - ^^^^^^^^^^^^^^^^^^^^^^^^^ Blas and Lapack libraries ^^^^^^^^^^^^^^^^^^^^^^^^^ -Different packages provide implementation of ``Blas`` and ``Lapack`` routines. -The names of the resulting static and/or shared libraries differ from package -to package. In order to make the ``install()`` method independent of the -choice of ``Blas`` implementation, each package which provides it -sets up ``self.spec.blas_libs`` to point to the correct ``Blas`` libraries. -The same applies to packages which provide ``Lapack``. Package developers are advised to -use these variables, for example ``spec['blas'].blas_libs.joined()`` instead of -hard-coding ``join_path(spec['blas'].prefix.lib, 'libopenblas.so')``. - -^^^^^^^^^^^^^^^^^^^^^ -Forking ``install()`` -^^^^^^^^^^^^^^^^^^^^^ - -To give packagers free reign over their install environment, Spack -forks a new process each time it invokes a package's ``install()`` -method. This allows packages to have their own completely sandboxed -build environment, without impacting other jobs that the main Spack -process runs. Packages are free to change the environment or to -modify Spack internals, because each ``install()`` call has its own -dedicated process. +Different packages provide implementation of ``Blas`` and ``Lapack`` +routines. The names of the resulting static and/or shared libraries +differ from package to package. In order to make the ``install()`` method +independent of the choice of ``Blas`` implementation, each package which +provides it sets up ``self.spec.blas_libs`` to point to the correct +``Blas`` libraries. The same applies to packages which provide +``Lapack``. Package developers are advised to use these variables, for +example ``spec['blas'].blas_libs.joined()`` instead of hard-coding +``join_path(spec['blas'].prefix.lib, 'libopenblas.so')``. .. _prefix-objects: ------------------ -Failing the build ------------------ - -Sometimes you don't want a package to successfully install unless some -condition is true. You can explicitly cause the build to fail from -``install()`` by raising an ``InstallError``, for example: - -.. code-block:: python - - if spec.architecture.startswith('darwin'): - raise InstallError('This package does not build on Mac OS X!') - --------------- +^^^^^^^^^^^^^^^^^^^^^ Prefix objects --------------- +^^^^^^^^^^^^^^^^^^^^^ Spack passes the ``prefix`` parameter to the install method so that you can pass it to ``configure``, ``cmake``, or some other installer, @@ -2577,56 +2622,254 @@ method (the one without the ``@when`` decorator) will be called. versions. There's not much we can do to get around this because of the way decorators work. +.. _compiler-wrappers: -.. _shell-wrappers: +--------------------- +Compiler wrappers +--------------------- ------------------------ -Shell command functions ------------------------ +As mentioned, ``CC``, ``CXX``, ``F77``, and ``FC`` are set to point to +Spack's compiler wrappers. These are simply called ``cc``, ``c++``, +``f77``, and ``f90``, and they live in ``$SPACK_ROOT/lib/spack/env``. -Recall the install method from ``libelf``: +``$SPACK_ROOT/lib/spack/env`` is added first in the ``PATH`` +environment variable when ``install()`` runs so that system compilers +are not picked up instead. -.. literalinclude:: ../../../var/spack/repos/builtin/packages/libelf/package.py - :pyobject: Libelf.install - :linenos: +All of these compiler wrappers point to a single compiler wrapper +script that figures out which *real* compiler it should be building +with. This comes either from spec `concretization +<abstract-and-concrete>`_ or from a user explicitly asking for a +particular compiler using, e.g., ``%intel`` on the command line. -Normally in Python, you'd have to write something like this in order -to execute shell commands: +In addition to invoking the right compiler, the compiler wrappers add +flags to the compile line so that dependencies can be easily found. +These flags are added for each dependency, if they exist: + +Compile-time library search paths +* ``-L$dep_prefix/lib`` +* ``-L$dep_prefix/lib64`` + +Runtime library search paths (RPATHs) +* ``$rpath_flag$dep_prefix/lib`` +* ``$rpath_flag$dep_prefix/lib64`` + +Include search paths +* ``-I$dep_prefix/include`` + +An example of this would be the ``libdwarf`` build, which has one +dependency: ``libelf``. Every call to ``cc`` in the ``libdwarf`` +build will have ``-I$LIBELF_PREFIX/include``, +``-L$LIBELF_PREFIX/lib``, and ``$rpath_flag$LIBELF_PREFIX/lib`` +inserted on the command line. This is done transparently to the +project's build system, which will just think it's using a system +where ``libelf`` is readily available. Because of this, you **do +not** have to insert extra ``-I``, ``-L``, etc. on the command line. + +Another useful consequence of this is that you often do *not* have to +add extra parameters on the ``configure`` line to get autotools to +find dependencies. The ``libdwarf`` install method just calls +configure like this: .. code-block:: python - import subprocess - subprocess.check_call('configure', '--prefix={0}'.format(prefix)) + configure("--prefix=" + prefix) -We've tried to make this a bit easier by providing callable wrapper -objects for some shell commands. By default, ``configure``, -``cmake``, and ``make`` wrappers are are provided, so you can call -them more naturally in your package files. +Because of the ``-L`` and ``-I`` arguments, configure will +successfully find ``libdwarf.h`` and ``libdwarf.so``, without the +packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on +the command line. -If you need other commands, you can use ``which`` to get them: +.. note:: + + 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 + ``lib/spack/spack/compilers/$compiler.py``. + +The compiler wrappers also pass the compiler flags specified by the user from +the command line (``cflags``, ``cxxflags``, ``fflags``, ``cppflags``, ``ldflags``, +and/or ``ldlibs``). They do not override the canonical autotools flags with the +same names (but in ALL-CAPS) that may be passed into the build by particularly +challenging package scripts. + +--------------------- +MPI support in Spack +--------------------- + +It is common for high performance computing software/packages to use the +Message Passing Interface ( ``MPI``). As a result of conretization, a +given package can be built using different implementations of MPI such as +``Openmpi``, ``MPICH`` or ``IntelMPI``. That is, when your package +declares that it ``depends_on('mpi')``, it can be built with any of these +``mpi`` implementations. In some scenarios, to configure a package, one +has to provide it with appropriate MPI compiler wrappers such as +``mpicc``, ``mpic++``. However different implementations of ``MPI`` may +have different names for those wrappers. + +Spack provides an idiomatic way to use MPI compilers in your package. To +use MPI wrappers to compile your whole build, do this in your +``install()`` method: .. code-block:: python - sed = which('sed') - sed('s/foo/bar/', filename) + env['CC'] = spec['mpi'].mpicc + env['CXX'] = spec['mpi'].mpicxx + env['F77'] = spec['mpi'].mpif77 + env['FC'] = spec['mpi'].mpifc -The ``which`` function will search the ``PATH`` for the application. +That's all. A longer explanation of why this works is below. -Callable wrappers also allow spack to provide some special features. -For example, in Spack, ``make`` is parallel by default, and Spack -figures out the number of cores on your machine and passes an -appropriate value for ``-j<numjobs>`` when it calls ``make`` (see the -``parallel`` `package attribute <attribute_parallel>`). In -a package file, you can supply a keyword argument, ``parallel=False``, -to the ``make`` wrapper to disable parallel make. In the ``libelf`` -package, this allows us to avoid race conditions in the library's -build system. +We don't try to force any particular build method on packagers. The +decision to use MPI wrappers depends on the way the package is written, +on common practice, and on "what works". Loosely, There are three types +of MPI builds: + + 1. Some build systems work well without the wrappers and can treat MPI + as an external library, where the person doing the build has to + supply includes/libs/etc. This is fairly uncommon. + + 2. Others really want the wrappers and assume you're using an MPI + "compiler" – i.e., they have no mechanism to add MPI + includes/libraries/etc. + + 3. CMake's ``FindMPI`` needs the compiler wrappers, but it uses them to + extract ``–I`` / ``-L`` / ``-D`` arguments, then treats MPI like a + regular library. + +Note that some CMake builds fall into case 2 because they either don't +know about or don't like CMake's ``FindMPI`` support – they just assume +an MPI compiler. Also, some autotools builds fall into case 3 (e.g. `here +is an autotools version of CMake's FindMPI +<https://github.com/tgamblin/libra/blob/master/m4/lx_find_mpi.m4>`_). + +Given all of this, we leave the use of the wrappers up to the packager. +Spack will support all three ways of building MPI packages. + +^^^^^^^^^^^^^^^^^^^^^ +Packaging Conventions +^^^^^^^^^^^^^^^^^^^^^ + +As mentioned above, in the ``install()`` method, ``CC``, ``CXX``, +``F77``, and ``FC`` point to Spack's wrappers around the chosen compiler. +Spack's wrappers are not the MPI compiler wrappers, though they do +automatically add ``–I``, ``–L``, and ``–Wl,-rpath`` args for +dependencies in a similar way. The MPI wrappers are a bit different in +that they also add ``-l`` arguments for the MPI libraries, and some add +special ``-D`` arguments to trigger build options in MPI programs. + +For case 1 above, you generally don't need to do more than patch your +Makefile or add configure args as you normally would. + +For case 3, you don't need to do much of anything, as Spack puts the MPI +compiler wrappers in the PATH, and the build will find them and +interrogate them. + +For case 2, things are a bit more complicated, as you'll need to tell the +build to use the MPI compiler wrappers instead of Spack's compiler +wrappers. All it takes some lines like this: + +.. code-block:: python + + env['CC'] = spec['mpi'].mpicc + env['CXX'] = spec['mpi'].mpicxx + env['F77'] = spec['mpi'].mpif77 + env['FC'] = spec['mpi'].mpifc + +Or, if you pass CC, CXX, etc. directly to your build with, e.g., +`--with-cc=<path>`, you'll want to substitute `spec['mpi'].mpicc` in +there instead, e.g.: + +.. code-block:: python + + configure('—prefix=%s' % prefix, + '—with-cc=%s' % spec['mpi'].mpicc) + +Now, you may think that doing this will lose the includes, library paths, +and RPATHs that Spack's compiler wrapper get you, but we've actually set +things up so that the MPI compiler wrappers use Spack's compiler wrappers +when run from within Spack. So using the MPI wrappers should really be as +simple as the code above. + +^^^^^^^^^^^^^^^^^^^^^ +``spec['mpi']`` +^^^^^^^^^^^^^^^^^^^^^ + +Ok, so how does all this work? + +If your package has a virtual dependency like ``mpi``, then referring to +``spec['mpi']`` within ``install()`` will get you the concrete ``mpi`` +implementation in your dependency DAG. That is a spec object just like +the one passed to install, only the MPI implementations all set some +additional properties on it to help you out. E.g., in mvapich2, you'll +find this: + +.. code-block:: python + + def setup_dependent_package(self, module, dep_spec): + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + # … etc … + +That code allows the mvapich2 package to associate an ``mpicc`` property +with the ``mvapich2`` node in the DAG, so that dependents can access it. +``openmpi`` and ``mpich`` do similar things. So, no matter what MPI +you're using, spec['mpi'].mpicc gets you the location of the MPI +compilers. This allows us to have a fairly simple polymorphic interface +for information about virtual dependencies like MPI. + +^^^^^^^^^^^^^^^^^^^^^ +Wrapping wrappers +^^^^^^^^^^^^^^^^^^^^^ + +Spack likes to use its own compiler wrappers to make it easy to add +``RPATHs`` to builds, and to try hard to ensure that your builds use the +right dependencies. This doesn't play nicely by default with MPI, so we +have to do a couple tricks. + + 1. If we build MPI with Spack's wrappers, mpicc and friends will be + installed with hard-coded paths to Spack's wrappers, and using them + from outside of Spack will fail because they only work within Spack. + To fix this, we patch mpicc and friends to use the regular + compilers. Look at the filter_compilers method in mpich, openmpi, + or mvapich2 for details. + + 2. We still want to use the Spack compiler wrappers when Spack is + calling mpicc. Luckily, wrappers in all mainstream MPI + implementations provide environment variables that allow us to + dynamically set the compiler to be used by mpicc, mpicxx, etc. + Denis pasted some code from this below – Spack's build environment + sets ``MPICC``, ``MPICXX``, etc. for mpich derivatives and + ``OMPI_CC``, ``OMPI_CXX``, etc. for OpenMPI. This makes the MPI + compiler wrappers use the Spack compiler wrappers so that your + dependencies still get proper RPATHs even if you use the MPI + wrappers. + +^^^^^^^^^^^^^^^^^^^^^ +MPI on Cray machines +^^^^^^^^^^^^^^^^^^^^^ + +The Cray programming environment notably uses ITS OWN compiler wrappers, +which function like MPI wrappers. On Cray systems, the ``CC``, ``cc``, +and ``ftn`` wrappers ARE the MPI compiler wrappers, and it's assumed that +you'll use them for all of your builds. So on Cray we don't bother with +``mpicc``, ``mpicxx``, etc, Spack MPI implementations set +``spec['mpi'].mpicc`` to point to Spack's wrappers, which wrap the Cray +wrappers, which wrap the regular compilers and include MPI flags. That +may seem complicated, but for packagers, that means the same code for +using MPI wrappers will work, even on even on a Cray: + +.. code-block:: python + + env['CC'] = spec['mpi'].mpicc + +This is because on Cray, ``spec['mpi'].mpicc`` is just ``spack_cc``. .. _sanity-checks: -------------------------------- -Sanity checking an installation -------------------------------- +------------------------ +Checking an installation +------------------------ By default, Spack assumes that a build has failed if nothing is written to the install prefix, and that it has succeeded if anything @@ -2645,16 +2888,18 @@ Consider a simple autotools build like this: If you are using using standard autotools or CMake, ``configure`` and ``make`` will not write anything to the install prefix. Only ``make install`` writes the files, and only once the build is already -complete. Not all builds are like this. Many builds of scientific -software modify the install prefix *before* ``make install``. Builds -like this can falsely report that they were successfully installed if -an error occurs before the install is complete but after files have -been written to the ``prefix``. +complete. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``sanity_check_is_file`` and ``sanity_check_is_dir`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Unfortunately, many builds of scientific +software modify the install prefix *before* ``make install``. Builds +like this can falsely report that they were successfully installed if +an error occurs before the install is complete but after files have +been written to the ``prefix``. + You can optionally specify *sanity checks* to deal with this problem. Add properties like this to your package: @@ -2678,6 +2923,48 @@ the build will fail and the install prefix will be removed. If they succeed, Spack considers the build successful and keeps the prefix in place. +^^^^^^^^^^^^^^^^ +Build-time tests +^^^^^^^^^^^^^^^^ + +Sometimes packages finish to build "correctly" and issues with their run-time +behavior are discovered only at a later stage, maybe after a full software stack +relying on them has already been built. To avoid situations of that kind it's possible +to write build-time tests that will be executed only if the option ``--run-tests`` +of ``spack install`` has been activated. + +The proper way to write these tests is relying on two decorators that come with +any base class listed in :ref:`installation_procedure`. + +.. code-block:: python + + @run_after('build') + @on_package_attributes(run_tests=True) + def check_build(self): + # Custom implementation goes here + pass + +The first decorator ``run_after('build')`` schedules this +function to be invoked after the ``build`` phase has been executed, while the +second one makes the invocation conditional on the fact that ``self.run_tests == True``. +It is also possible to schedule a function to be invoked *before* a given phase +using the ``run_before`` decorator. + +.. note:: + + Default implementations for build-time tests + + Packages that are built using specific build systems may already have a + default implementation for build-time tests. For instance :py:class:`~.AutotoolsPackage` + based packages will try to invoke ``make test`` and ``make check`` if + Spack is asked to run tests. + More information on each class is available in the the :py:mod:`~.spack.build_systems` + documentation. + +.. warning:: + + The API for adding tests is not yet considered stable and may change drastically in future releases. + .. _file-manipulation: --------------------------- @@ -2839,9 +3126,9 @@ File functions .. _package-lifecycle: ------------------------ -Coding Style Guidelines ------------------------ +----------------------------- +Style guidelines for packages +----------------------------- The following guidelines are provided, in the interests of making Spack packages work in a consistent manner: diff --git a/lib/spack/docs/tutorial_sc16_modules.rst b/lib/spack/docs/tutorial_sc16_modules.rst index 407f679ae68b6b4842bcd728ea6fab6889c96bdd..0a79d943f961f9ac6aa5c41564d7ad4720a4bde3 100644 --- a/lib/spack/docs/tutorial_sc16_modules.rst +++ b/lib/spack/docs/tutorial_sc16_modules.rst @@ -45,7 +45,7 @@ Add a new compiler ^^^^^^^^^^^^^^^^^^ Spack automatically scans the environment to search for available -compilers on first use. On a Ubuntu 14.04 a fresh clone will show +compilers on first use. On Ubuntu 14.04, a fresh clone will show something like this: .. code-block:: console @@ -58,9 +58,10 @@ something like this: -- gcc ---------------------------------------------------------- gcc@4.8 -For the purpose of building a limited set of packages with some features -that will help showcasing the capabilities of -module customization the first thing we need is to build a new compiler: +In order to showcase the capabilities of module customization, we will want to +build a limited set of packages with multiple compilers. If you do not already +have multiple compilers listed by ``spack compilers``, you should build one +with Spack: .. code-block:: console @@ -85,7 +86,7 @@ Then we can use shell support for modules to add it to the list of known compile -- gcc ---------------------------------------------------------- gcc@6.2.0 gcc@4.8 -Note that the final 7 digits hash at the end of the generated module may vary depending +Note that the 7-digit hash at the end of the generated module may vary depending on architecture or package version. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -96,16 +97,11 @@ Next you should install a few modules that will be used in the tutorial: .. code-block:: console - $ spack install netlib-scalapack ^openmpi ^openblas - # ... - -The packages you need to install are: - -- ``netlib-scalapack ^openmpi ^openblas`` -- ``netlib-scalapack ^mpich ^openblas`` -- ``netlib-scalapack ^openmpi ^netlib-lapack`` -- ``netlib-scalapack ^mpich ^netlib-lapack`` -- ``py-scipy ^openblas`` + $ spack install netlib-scalapack ^openmpi ^openblas + $ spack install netlib-scalapack ^mpich ^openblas + $ spack install netlib-scalapack ^openmpi ^netlib-lapack + $ spack install netlib-scalapack ^mpich ^netlib-lapack + $ spack install py-scipy ^openblas In the end your environment should look something like: @@ -500,7 +496,7 @@ Regenerating the module files should result in something like: Fortran, and Java. ]]) -As you see the ``gcc`` module has the environment variable ``GCC_ROOT`` set. +As you can see, the ``gcc`` module has the environment variable ``GCC_ROOT`` set. Sometimes it's also useful to apply environment modifications selectively and target only certain packages. You can, for instance set the common variables ``CC``, ``CXX``, @@ -727,7 +723,7 @@ Core/Compiler/MPI The most common hierarchy is the so called ``Core/Compiler/MPI``. To have an idea how a hierarchy is organized you may refer to the -`Lmod guide <https://www.tacc.utexas.edu/research-development/tacc-projects/lmod/user-guide/module-hierarchy>`_. +`Lmod guide <http://lmod.readthedocs.io/en/latest/080_hierarchy.html>`_. Since ``lmod`` is not enabled by default, you need to add it to the list of enabled module file generators. The other things you need to do are: @@ -782,9 +778,10 @@ After modifications the configuration file will be: purpose of overriding the default list of enabled generators so that only ``lmod`` will be active (see :ref:`the reference manual <config-overrides>` for a more detailed explanation of - config scopes). + config scopes). If a single colon is used, it will append instead + of override. -The directive ``core_compilers`` accepts a list of compilers : everything built +The directive ``core_compilers`` accepts a list of compilers; everything built using these compilers will create a module in the ``Core`` part of the hierarchy. It is common practice to put the OS provided compilers in the list and only build common utilities and other compilers in ``Core``. diff --git a/lib/spack/env/cc b/lib/spack/env/cc index c4e51834a5f2d360929d74a7f2b27d44471c1838..c0e97f3416f9b45127effc9068c8e0fd9c5ffcae 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -98,25 +98,25 @@ case "$command" in cpp) mode=cpp ;; - cc|c89|c99|gcc|clang|icc|pgcc|xlc) + cc|c89|c99|gcc|clang|icc|pgcc|xlc|xlc_r) command="$SPACK_CC" language="C" comp="CC" lang_flags=C ;; - c++|CC|g++|clang++|icpc|pgc++|xlc++) + c++|CC|g++|clang++|icpc|pgc++|xlc++|xlc++_r) command="$SPACK_CXX" language="C++" comp="CXX" lang_flags=CXX ;; - ftn|f90|fc|f95|gfortran|ifort|pgfortran|xlf90|nagfor) + ftn|f90|fc|f95|gfortran|ifort|pgfortran|xlf90|xlf90_r|nagfor) command="$SPACK_FC" language="Fortran 90" comp="FC" lang_flags=F ;; - f77|gfortran|ifort|pgfortran|xlf|nagfor|ftn) + f77|gfortran|ifort|pgfortran|xlf|xlf_r|nagfor|ftn) command="$SPACK_F77" language="Fortran 77" comp="F77" diff --git a/lib/spack/env/xl_r/xlc++_r b/lib/spack/env/xl_r/xlc++_r new file mode 120000 index 0000000000000000000000000000000000000000..82c2b8e90a381ef733daa21645dc316ee5efe94d --- /dev/null +++ b/lib/spack/env/xl_r/xlc++_r @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/xl_r/xlc_r b/lib/spack/env/xl_r/xlc_r new file mode 120000 index 0000000000000000000000000000000000000000..82c2b8e90a381ef733daa21645dc316ee5efe94d --- /dev/null +++ b/lib/spack/env/xl_r/xlc_r @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/xl_r/xlf90_r b/lib/spack/env/xl_r/xlf90_r new file mode 120000 index 0000000000000000000000000000000000000000..82c2b8e90a381ef733daa21645dc316ee5efe94d --- /dev/null +++ b/lib/spack/env/xl_r/xlf90_r @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/env/xl_r/xlf_r b/lib/spack/env/xl_r/xlf_r new file mode 120000 index 0000000000000000000000000000000000000000..82c2b8e90a381ef733daa21645dc316ee5efe94d --- /dev/null +++ b/lib/spack/env/xl_r/xlf_r @@ -0,0 +1 @@ +../cc \ No newline at end of file diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 31e09f2fe61814f7cccb79d20fab7bf9555f42a5..79f15f9a21416911ff15e3f978d6169248a0f291 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -455,7 +455,12 @@ def fix_darwin_install_name(path): # fix all dependencies: for dep in deps: for loc in libs: - if dep == os.path.basename(loc): + # We really want to check for either + # dep == os.path.basename(loc) or + # dep == join_path(builddir, os.path.basename(loc)), + # but we don't know builddir (nor how symbolic links look + # in builddir). We thus only compare the basenames. + if os.path.basename(dep) == os.path.basename(loc): subprocess.Popen( ["install_name_tool", "-change", dep, loc, lib], stdout=subprocess.PIPE).communicate()[0] diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 34a7b01616a8d6083cc5f1b22066900d9db1c8cb..6a28fbb2b030fa8f01733aebee67f0d1e482fc9a 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -46,6 +46,7 @@ module_path = join_path(lib_path, "spack") platform_path = join_path(module_path, 'platforms') compilers_path = join_path(module_path, "compilers") +build_systems_path = join_path(module_path, 'build_systems') operating_system_path = join_path(module_path, 'operating_systems') test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") @@ -155,14 +156,24 @@ #----------------------------------------------------------------------------- __all__ = [] -from spack.package import Package +from spack.package import Package, run_before, run_after, on_package_attributes from spack.build_systems.makefile import MakefilePackage from spack.build_systems.autotools import AutotoolsPackage from spack.build_systems.cmake import CMakePackage from spack.build_systems.python import PythonPackage from spack.build_systems.r import RPackage -__all__ += ['Package', 'CMakePackage', 'AutotoolsPackage', 'MakefilePackage', - 'PythonPackage', 'RPackage'] + +__all__ += [ + 'run_before', + 'run_after', + 'on_package_attributes', + 'Package', + 'CMakePackage', + 'AutotoolsPackage', + 'MakefilePackage', + 'PythonPackage', + 'RPackage' +] from spack.version import Version, ver __all__ += ['Version', 'ver'] diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index 78a4df5e11708db50555412aa8c3e385f7c719c3..f0f57b123229d5c3821aa350284f1c300ab4a6cf 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -31,36 +31,68 @@ from subprocess import check_call import llnl.util.tty as tty -from llnl.util.filesystem import working_dir -from spack.package import PackageBase +from llnl.util.filesystem import working_dir, join_path, force_remove +from spack.package import PackageBase, run_after, run_before +from spack.util.executable import Executable class AutotoolsPackage(PackageBase): - """Specialized class for packages that are built using GNU Autotools + """Specialized class for packages built using GNU Autotools. This class provides four phases that can be overridden: - * autoreconf - * configure - * build - * install + 1. :py:meth:`~.AutotoolsPackage.autoreconf` + 2. :py:meth:`~.AutotoolsPackage.configure` + 3. :py:meth:`~.AutotoolsPackage.build` + 4. :py:meth:`~.AutotoolsPackage.install` They all have sensible defaults and for many packages the only thing - necessary will be to override ``configure_args`` + necessary will be to override the helper method :py:meth:`.configure_args`. + For a finer tuning you may also override: + + +-----------------------------------------------+--------------------+ + | **Method** | **Purpose** | + +===============================================+====================+ + | :py:attr:`~.AutotoolsPackage.build_targets` | Specify ``make`` | + | | targets for the | + | | build phase | + +-----------------------------------------------+--------------------+ + | :py:attr:`~.AutotoolsPackage.install_targets` | Specify ``make`` | + | | targets for the | + | | install phase | + +-----------------------------------------------+--------------------+ + | :py:meth:`~.AutotoolsPackage.check` | Run build time | + | | tests if required | + +-----------------------------------------------+--------------------+ - Additionally, you may specify make targets for build and install - phases by overriding ``build_targets`` and ``install_targets`` """ + #: Phases of a GNU Autotools package phases = ['autoreconf', 'configure', 'build', 'install'] - # To be used in UI queries that require to know which - # build-system class we are using + #: This attribute is used in UI queries that need to know the build + #: system base class build_system_class = 'AutotoolsPackage' + #: Whether or not to update ``config.guess`` on old architectures patch_config_guess = True + #: Targets for ``make`` during the :py:meth:`~.AutotoolsPackage.build` + #: phase build_targets = [] + #: Targets for ``make`` during the :py:meth:`~.AutotoolsPackage.install` + #: phase install_targets = ['install'] - def do_patch_config_guess(self): + #: Callback names for build-time test + build_time_test_callbacks = ['check'] + + #: Callback names for install-time test + install_time_test_callbacks = ['installcheck'] + + #: Set to true to force the autoreconf step even if configure is present + force_autoreconf = False + #: Options to be passed to autoreconf when using the default implementation + autoreconf_extra_args = [] + + def _do_patch_config_guess(self): """Some packages ship with an older config.guess and need to have this updated when installed on a newer architecture.""" @@ -86,7 +118,7 @@ def do_patch_config_guess(self): check_call([my_config_guess], stdout=PIPE, stderr=PIPE) # The package's config.guess already runs OK, so just use it return True - except: + except Exception: pass else: return True @@ -104,7 +136,7 @@ def do_patch_config_guess(self): check_call([config_guess], stdout=PIPE, stderr=PIPE) shutil.copyfile(config_guess, my_config_guess) return True - except: + except Exception: pass # Look for the system's config.guess @@ -121,83 +153,152 @@ def do_patch_config_guess(self): check_call([config_guess], stdout=PIPE, stderr=PIPE) shutil.copyfile(config_guess, my_config_guess) return True - except: + except Exception: pass return False + @property + def configure_directory(self): + """Returns the directory where 'configure' resides. + + :return: directory where to find configure + """ + return self.stage.source_path + + @property + def configure_abs_path(self): + # Absolute path to configure + configure_abs_path = join_path( + os.path.abspath(self.configure_directory), 'configure' + ) + return configure_abs_path + + @property def build_directory(self): """Override to provide another place to build the package""" - return self.stage.source_path + return self.configure_directory def patch(self): - """Perform any required patches.""" + """Patches config.guess if + :py:attr:``~.AutotoolsPackage.patch_config_guess`` is True + + :raise RuntimeError: if something goes wrong when patching + ``config.guess`` + """ if self.patch_config_guess and self.spec.satisfies( - 'arch=linux-rhel7-ppc64le'): - if not self.do_patch_config_guess(): + 'arch=linux-rhel7-ppc64le' + ): + if not self._do_patch_config_guess(): raise RuntimeError('Failed to find suitable config.guess') + @run_before('autoreconf') + def delete_configure_to_force_update(self): + if self.force_autoreconf: + force_remove(self.configure_abs_path) + def autoreconf(self, spec, prefix): """Not needed usually, configure should be already there""" - pass + # If configure exists nothing needs to be done + if os.path.exists(self.configure_abs_path): + return + # Else try to regenerate it + autotools = ['m4', 'autoconf', 'automake', 'libtool'] + missing = [x for x in autotools if x not in spec] + if missing: + msg = 'Cannot generate configure: missing dependencies {0}' + raise RuntimeError(msg.format(missing)) + tty.msg('Configure script not found: trying to generate it') + tty.warn('*********************************************************') + tty.warn('* If the default procedure fails, consider implementing *') + tty.warn('* a custom AUTORECONF phase in the package *') + tty.warn('*********************************************************') + with working_dir(self.configure_directory): + m = inspect.getmodule(self) + # This part should be redundant in principle, but + # won't hurt + m.libtoolize() + m.aclocal() + # This line is what is needed most of the time + # --install, --verbose, --force + autoreconf_args = ['-ivf'] + if 'pkg-config' in spec: + autoreconf_args += [ + '-I', + join_path(spec['pkg-config'].prefix, 'share', 'aclocal'), + ] + autoreconf_args += self.autoreconf_extra_args + m.autoreconf(*autoreconf_args) - @PackageBase.sanity_check('autoreconf') - def is_configure_or_die(self): + @run_after('autoreconf') + def set_configure_or_die(self): """Checks the presence of a ``configure`` file after the - autoreconf phase""" - with working_dir(self.build_directory()): - if not os.path.exists('configure'): - raise RuntimeError( - 'configure script not found in {0}'.format(os.getcwd())) + autoreconf phase. If it is found sets a module attribute + appropriately, otherwise raises an error. + + :raises RuntimeError: if a configure script is not found in + :py:meth:`~.configure_directory` + """ + # Check if a configure script is there. If not raise a RuntimeError. + if not os.path.exists(self.configure_abs_path): + msg = 'configure script not found in {0}' + raise RuntimeError(msg.format(self.configure_directory)) + + # Monkey-patch the configure script in the corresponding module + inspect.getmodule(self).configure = Executable( + self.configure_abs_path + ) def configure_args(self): - """Method to be overridden. Should return an iterable containing - all the arguments that must be passed to configure, except ``--prefix`` + """Produces a list containing all the arguments that must be passed to + configure, except ``--prefix`` which will be pre-pended to the list. + + :return: list of arguments for configure """ return [] def configure(self, spec, prefix): - """Runs configure with the arguments specified in ``configure_args`` - and an appropriately set prefix + """Runs configure with the arguments specified in :py:meth:`.configure_args` + and an appropriately set prefix. """ options = ['--prefix={0}'.format(prefix)] + self.configure_args() - with working_dir(self.build_directory()): + with working_dir(self.build_directory, create=True): inspect.getmodule(self).configure(*options) def build(self, spec, prefix): - """Make the build targets""" - with working_dir(self.build_directory()): + """Makes the build targets specified by + :py:attr:``~.AutotoolsPackage.build_targets`` + """ + with working_dir(self.build_directory): inspect.getmodule(self).make(*self.build_targets) def install(self, spec, prefix): - """Make the install targets""" - with working_dir(self.build_directory()): + """Makes the install targets specified by + :py:attr:``~.AutotoolsPackage.install_targets`` + """ + with working_dir(self.build_directory): inspect.getmodule(self).make(*self.install_targets) - @PackageBase.sanity_check('build') - @PackageBase.on_package_attributes(run_tests=True) - def _run_default_function(self): - """This function is run after build if ``self.run_tests == True`` - - It will search for a method named ``check`` and run it. A sensible - default is provided in the base class. - """ - try: - fn = getattr(self, 'check') - tty.msg('Trying default sanity checks [check]') - fn() - except AttributeError: - tty.msg('Skipping default sanity checks [method `check` not implemented]') # NOQA: ignore=E501 + run_after('build')(PackageBase._run_default_build_time_test_callbacks) def check(self): - """Default test: search the Makefile for targets ``test`` and ``check`` - and run them if found. + """Searches the Makefile for targets ``test`` and ``check`` + and runs them if found. """ - with working_dir(self.build_directory()): + with working_dir(self.build_directory): self._if_make_target_execute('test') self._if_make_target_execute('check') + run_after('install')(PackageBase._run_default_install_time_test_callbacks) + + def installcheck(self): + """Searches the Makefile for an ``installcheck`` target + and runs it if found. + """ + with working_dir(self.build_directory): + self._if_make_target_execute('installcheck') + # Check that self.prefix is there after installation - PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix) + run_after('install')(PackageBase.sanity_check_prefix) diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index 61d45784e8fcae02be57729b3676fe08991d577a..43d177d3cb67a1fcac4657a6db4c4f4048ee7468 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -26,52 +26,76 @@ import inspect import platform -import llnl.util.tty as tty import spack.build_environment from llnl.util.filesystem import working_dir, join_path from spack.directives import depends_on -from spack.package import PackageBase +from spack.package import PackageBase, run_after class CMakePackage(PackageBase): - """Specialized class for packages that are built using CMake + """Specialized class for packages built using CMake This class provides three phases that can be overridden: - * cmake - * build - * install + 1. :py:meth:`~.CMakePackage.cmake` + 2. :py:meth:`~.CMakePackage.build` + 3. :py:meth:`~.CMakePackage.install` They all have sensible defaults and for many packages the only thing - necessary will be to override ``cmake_args`` + necessary will be to override :py:meth:`~.CMakePackage.cmake_args`. + For a finer tuning you may also override: + + +-----------------------------------------------+--------------------+ + | **Method** | **Purpose** | + +===============================================+====================+ + | :py:meth:`~.CMakePackage.build_type` | Specify the value | + | | for the | + | | CMAKE_BUILD_TYPE | + | | variable | + +-----------------------------------------------+--------------------+ + | :py:meth:`~.CMakePackage.root_cmakelists_dir` | Location of the | + | | root CMakeLists.txt| + +-----------------------------------------------+--------------------+ + | :py:meth:`~.CMakePackage.build_directory` | Directory where to | + | | build the package | + +-----------------------------------------------+--------------------+ + - Additionally, you may specify make targets for build and install - phases by overriding ``build_targets`` and ``install_targets`` """ + #: Phases of a CMake package phases = ['cmake', 'build', 'install'] - # To be used in UI queries that require to know which - # build-system class we are using + #: This attribute is used in UI queries that need to know the build + #: system base class build_system_class = 'CMakePackage' build_targets = [] install_targets = ['install'] + build_time_test_callbacks = ['check'] + depends_on('cmake', type='build') def build_type(self): - """Override to provide the correct build_type in case a complex - logic is needed + """Returns the correct value for the ``CMAKE_BUILD_TYPE`` variable + + :return: value for ``CMAKE_BUILD_TYPE`` """ return 'RelWithDebInfo' + @property def root_cmakelists_dir(self): - """Directory where to find the root CMakeLists.txt""" + """Returns the location of the root CMakeLists.txt + + :return: directory containing the root CMakeLists.txt + """ return self.stage.source_path @property def std_cmake_args(self): """Standard cmake arguments provided as a property for convenience of package writers + + :return: standard cmake arguments """ # standard CMake arguments return CMakePackage._std_args(self) @@ -96,57 +120,52 @@ def _std_args(pkg): args.append('-DCMAKE_INSTALL_RPATH:STRING={0}'.format(rpaths)) return args + @property def build_directory(self): - """Override to provide another place to build the package""" + """Returns the directory to use when building the package + + :return: directory where to build the package + """ return join_path(self.stage.source_path, 'spack-build') def cmake_args(self): - """Method to be overridden. Should return an iterable containing - all the arguments that must be passed to configure, except: + """Produces a list containing all the arguments that must be passed to + cmake, except: + + * CMAKE_INSTALL_PREFIX + * CMAKE_BUILD_TYPE + + which will be set automatically. - * CMAKE_INSTALL_PREFIX - * CMAKE_BUILD_TYPE + :return: list of arguments for cmake """ return [] def cmake(self, spec, prefix): - """Run cmake in the build directory""" - options = [self.root_cmakelists_dir()] + self.std_cmake_args + \ + """Runs ``cmake`` in the build directory""" + options = [self.root_cmakelists_dir] + self.std_cmake_args + \ self.cmake_args() - with working_dir(self.build_directory(), create=True): + with working_dir(self.build_directory, create=True): inspect.getmodule(self).cmake(*options) def build(self, spec, prefix): """Make the build targets""" - with working_dir(self.build_directory()): + with working_dir(self.build_directory): inspect.getmodule(self).make(*self.build_targets) def install(self, spec, prefix): """Make the install targets""" - with working_dir(self.build_directory()): + with working_dir(self.build_directory): inspect.getmodule(self).make(*self.install_targets) - @PackageBase.sanity_check('build') - @PackageBase.on_package_attributes(run_tests=True) - def _run_default_function(self): - """This function is run after build if ``self.run_tests == True`` - - It will search for a method named ``check`` and run it. A sensible - default is provided in the base class. - """ - try: - fn = getattr(self, 'check') - tty.msg('Trying default build sanity checks [check]') - fn() - except AttributeError: - tty.msg('Skipping default build sanity checks [method `check` not implemented]') # NOQA: ignore=E501 + run_after('build')(PackageBase._run_default_build_time_test_callbacks) def check(self): - """Default test: search the Makefile for the target ``test`` - and run them if found. + """Searches the CMake-generated Makefile for the target ``test`` + and runs it if found. """ - with working_dir(self.build_directory()): + with working_dir(self.build_directory): self._if_make_target_execute('test') # Check that self.prefix is there after installation - PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix) + run_after('install')(PackageBase.sanity_check_prefix) diff --git a/lib/spack/spack/build_systems/makefile.py b/lib/spack/spack/build_systems/makefile.py index a56f316109ad4cf78184d6735c90681557daf754..727438447827fb6edea16985408df7f21130e04e 100644 --- a/lib/spack/spack/build_systems/makefile.py +++ b/lib/spack/spack/build_systems/makefile.py @@ -27,7 +27,7 @@ import llnl.util.tty as tty from llnl.util.filesystem import working_dir -from spack.package import PackageBase +from spack.package import PackageBase, run_after class MakefilePackage(PackageBase): @@ -35,38 +35,70 @@ class MakefilePackage(PackageBase): This class provides three phases that can be overridden: - * edit - * build - * install + 1. :py:meth:`~.MakefilePackage.edit` + 2. :py:meth:`~.MakefilePackage.build` + 3. :py:meth:`~.MakefilePackage.install` - It is necessary to override the 'edit' phase, while 'build' and 'install' - have sensible defaults. + It is usually necessary to override the :py:meth:`~.MakefilePackage.edit` + phase, while :py:meth:`~.MakefilePackage.build` and + :py:meth:`~.MakefilePackage.install` have sensible defaults. + For a finer tuning you may override: + + +-----------------------------------------------+--------------------+ + | **Method** | **Purpose** | + +===============================================+====================+ + | :py:attr:`~.MakefilePackage.build_targets` | Specify ``make`` | + | | targets for the | + | | build phase | + +-----------------------------------------------+--------------------+ + | :py:attr:`~.MakefilePackage.install_targets` | Specify ``make`` | + | | targets for the | + | | install phase | + +-----------------------------------------------+--------------------+ + | :py:meth:`~.MakefilePackage.build_directory` | Directory where the| + | | Makefile is located| + +-----------------------------------------------+--------------------+ """ + #: Phases of a package that is built with an hand-written Makefile phases = ['edit', 'build', 'install'] - # To be used in UI queries that require to know which - # build-system class we are using + #: This attribute is used in UI queries that need to know the build + #: system base class build_system_class = 'MakefilePackage' + #: Targets for ``make`` during the :py:meth:`~.MakefilePackage.build` + #: phase build_targets = [] + #: Targets for ``make`` during the :py:meth:`~.MakefilePackage.install` + #: phase install_targets = ['install'] + @property def build_directory(self): - """Directory where the main Makefile is located""" + """Returns the directory containing the main Makefile + + :return: build directory + """ return self.stage.source_path def edit(self, spec, prefix): - """This phase cannot be defaulted for obvious reasons...""" + """Edits the Makefile before calling make. This phase cannot + be defaulted. + """ tty.msg('Using default implementation: skipping edit phase.') def build(self, spec, prefix): - """Make the build targets""" - with working_dir(self.build_directory()): + """Calls make, passing :py:attr:`~.MakefilePackage.build_targets` + as targets. + """ + with working_dir(self.build_directory): inspect.getmodule(self).make(*self.build_targets) def install(self, spec, prefix): - """Make the install targets""" - with working_dir(self.build_directory()): + """Calls make, passing :py:attr:`~.MakefilePackage.install_targets` + as targets. + """ + with working_dir(self.build_directory): inspect.getmodule(self).make(*self.install_targets) # Check that self.prefix is there after installation - PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix) + run_after('install')(PackageBase.sanity_check_prefix) diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index d21c291ae6c5456cfa64690a2574bf64602e3e51..d2ee72925daec580cc98b22ae4eefb13ecfd16b3 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -26,7 +26,7 @@ import inspect from spack.directives import extends -from spack.package import PackageBase +from spack.package import PackageBase, run_after from llnl.util.filesystem import working_dir @@ -97,10 +97,11 @@ def configure(self, spec, prefix): extends('python') - def setup_file(self, spec, prefix): + def setup_file(self): """Returns the name of the setup file to use.""" return 'setup.py' + @property def build_directory(self): """The directory containing the ``setup.py`` file.""" return self.stage.source_path @@ -109,9 +110,9 @@ def python(self, *args): inspect.getmodule(self).python(*args) def setup_py(self, *args): - setup = self.setup_file(self.spec, self.prefix) + setup = self.setup_file() - with working_dir(self.build_directory()): + with working_dir(self.build_directory): self.python(setup, '--no-user-cfg', *args) # The following phases and their descriptions come from: @@ -306,4 +307,4 @@ def check_args(self, spec, prefix): return [] # Check that self.prefix is there after installation - PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix) + run_after('install')(PackageBase.sanity_check_prefix) diff --git a/lib/spack/spack/build_systems/r.py b/lib/spack/spack/build_systems/r.py index f642f2dfd8241a8824b3ac8d6be5892170e1fccb..cde3dc9fdd6028a46445e7037994ad5aca1415b6 100644 --- a/lib/spack/spack/build_systems/r.py +++ b/lib/spack/spack/build_systems/r.py @@ -26,7 +26,7 @@ import inspect from spack.directives import extends -from spack.package import PackageBase +from spack.package import PackageBase, run_after class RPackage(PackageBase): @@ -34,25 +34,25 @@ class RPackage(PackageBase): This class provides a single phase that can be overridden: - * install + 1. :py:meth:`~.RPackage.install` - It has sensible defaults and for many packages the only thing + It has sensible defaults, and for many packages the only thing necessary will be to add dependencies """ phases = ['install'] - # To be used in UI queries that require to know which - # build-system class we are using + #: This attribute is used in UI queries that need to know the build + #: system base class build_system_class = 'RPackage' extends('r') def install(self, spec, prefix): - """Install the R package""" + """Installs an R package.""" inspect.getmodule(self).R( 'CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) # Check that self.prefix is there after installation - PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix) + run_after('install')(PackageBase.sanity_check_prefix) diff --git a/lib/spack/spack/cmd/activate.py b/lib/spack/spack/cmd/activate.py index 797cdcb1367b2d1b9d4def2f0a5aa0d550646f0d..f21799753b55360ea0978ee26ecce4456a8a4d5d 100644 --- a/lib/spack/spack/cmd/activate.py +++ b/lib/spack/spack/cmd/activate.py @@ -27,16 +27,16 @@ import spack import spack.cmd -description = "Activate a package extension." +description = "activate a package extension" def setup_parser(subparser): subparser.add_argument( '-f', '--force', action='store_true', - help="Activate without first activating dependencies.") + help="activate without first activating dependencies") subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="spec of package extension to activate.") + help="spec of package extension to activate") def activate(parser, args): diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py index 4e29230c2889b284368600e903dbca4ad536038c..5b9daf9dea071987546aaad0f7a7f4e40a26f049 100644 --- a/lib/spack/spack/cmd/arch.py +++ b/lib/spack/spack/cmd/arch.py @@ -24,14 +24,14 @@ ############################################################################## import spack.architecture as architecture -description = "Print architecture information about this machine." +description = "print architecture information about this machine" def setup_parser(subparser): parts = subparser.add_mutually_exclusive_group() parts.add_argument( '-p', '--platform', action='store_true', default=False, - help="Print only the platform.") + help="print only the platform") def arch(parser, args): diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py index a79ef4aa68039b9080242cbcaa2a09d1b396a1c7..a804086a38961966a5edd8fbabe1409ac14754a7 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -32,7 +32,7 @@ _SPACK_UPSTREAM = 'https://github.com/llnl/spack' -description = "Create a new installation of spack in another prefix" +description = "create a new installation of spack in another prefix" def setup_parser(subparser): diff --git a/lib/spack/spack/cmd/build.py b/lib/spack/spack/cmd/build.py index 6c0029794f97c117550f290ec7ee00ab5ff4c657..6a90af907d85343bab52c2f0e7f2e0d0c5bd95c3 100644 --- a/lib/spack/spack/cmd/build.py +++ b/lib/spack/spack/cmd/build.py @@ -26,7 +26,7 @@ from spack import * -description = 'Stops at build stage when installing a package, if possible' +description = 'stops at build stage when installing a package, if possible' build_system_to_phase = { CMakePackage: 'build', diff --git a/lib/spack/spack/cmd/cd.py b/lib/spack/spack/cmd/cd.py index cf7232258c0cb61836ac6bf7445a84ac733de4da..784ad4ac83cefc1cd10fdce56b9bf7b51b626586 100644 --- a/lib/spack/spack/cmd/cd.py +++ b/lib/spack/spack/cmd/cd.py @@ -25,7 +25,7 @@ import spack.cmd.location import spack.modules -description = "cd to spack directories in the shell." +description = "cd to spack directories in the shell" def setup_parser(subparser): diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index 8e4de0efc31b61f31544c453be9990c46c4bbe5b..4ea31efe08b8895fd4f3cdcd556c8171adc4a38b 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -35,19 +35,19 @@ from spack.util.naming import * from spack.version import * -description = "Checksum available versions of a package." +description = "checksum available versions of a package" def setup_parser(subparser): subparser.add_argument( 'package', - help='Package to checksum versions for') + help='package to checksum versions for') subparser.add_argument( '--keep-stage', action='store_true', - help="Don't clean up staging area when command completes.") + help="don't clean up staging area when command completes") subparser.add_argument( 'versions', nargs=argparse.REMAINDER, - help='Versions to generate checksums for') + help='versions to generate checksums for') def get_checksums(url_dict, name, **kwargs): diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py index dc62fbcaf660dc252cf9e4437b44f8369386404c..6c70b5bd38f8e4fcb6d58213429016fae3a1e82f 100644 --- a/lib/spack/spack/cmd/clean.py +++ b/lib/spack/spack/cmd/clean.py @@ -29,7 +29,7 @@ import spack import spack.cmd -description = "Remove build stage and source tarball for packages." +description = "remove build stage and source tarball for packages" def setup_parser(subparser): diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py index f091b9cf759ec0e40bdbb366b4643dd912ac62fe..b527c7f1387dc1abde0a1da66e14753c323a1c74 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -76,32 +76,32 @@ def _specs(self, **kwargs): _arguments['constraint'] = Args( 'constraint', nargs=argparse.REMAINDER, action=ConstraintAction, - help='Constraint to select a subset of installed packages') + help='constraint to select a subset of installed packages') _arguments['module_type'] = Args( - '-m', '--module-type', help='Type of module files', + '-m', '--module-type', help='type of module files', default='tcl', choices=spack.modules.module_types) _arguments['yes_to_all'] = Args( '-y', '--yes-to-all', action='store_true', dest='yes_to_all', - help='Assume "yes" is the answer to every confirmation request.') + help='assume "yes" is the answer to every confirmation request') _arguments['recurse_dependencies'] = Args( '-r', '--dependencies', action='store_true', dest='recurse_dependencies', - help='Recursively traverse spec dependencies') + help='recursively traverse spec dependencies') _arguments['clean'] = Args( '--clean', action='store_false', dest='dirty', - help='Clean environment before installing package.') + help='clean environment before installing package') _arguments['dirty'] = Args( '--dirty', action='store_true', dest='dirty', - help='Do NOT clean environment before installing.') + help='do NOT clean environment before installing') _arguments['long'] = Args( '-l', '--long', action='store_true', - help='Show dependency hashes as well as versions.') + help='show dependency hashes as well as versions') _arguments['very_long'] = Args( '-L', '--very-long', action='store_true', - help='Show full dependency hashes as well as versions.') + help='show full dependency hashes as well as versions') diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 609210f77e34a22acd124d5ae6829a87d334339e..c60979418507a314cb36a7b63a7fb63be87240d4 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -35,7 +35,7 @@ from spack.spec import CompilerSpec, ArchSpec from spack.util.environment import get_path -description = "Manage compilers" +description = "manage compilers" def setup_parser(subparser): @@ -47,35 +47,35 @@ def setup_parser(subparser): # Find find_parser = sp.add_parser( 'find', aliases=['add'], - help='Search the system for compilers to add to Spack configuration.') + help='search the system for compilers to add to Spack configuration') find_parser.add_argument('add_paths', nargs=argparse.REMAINDER) find_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_modify_scope, - help="Configuration scope to modify.") + help="configuration scope to modify") # Remove remove_parser = sp.add_parser( - 'remove', aliases=['rm'], help='Remove compiler by spec.') + 'remove', aliases=['rm'], help='remove compiler by spec') remove_parser.add_argument( '-a', '--all', action='store_true', - help='Remove ALL compilers that match spec.') + help='remove ALL compilers that match spec') remove_parser.add_argument('compiler_spec') remove_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_modify_scope, - help="Configuration scope to modify.") + help="configuration scope to modify") # List list_parser = sp.add_parser('list', help='list available compilers') list_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_list_scope, - help="Configuration scope to read from.") + help="configuration scope to read from") # Info - info_parser = sp.add_parser('info', help='Show compiler paths.') + info_parser = sp.add_parser('info', help='show compiler paths') info_parser.add_argument('compiler_spec') info_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_list_scope, - help="Configuration scope to read from.") + help="configuration scope to read from") def compiler_find(args): diff --git a/lib/spack/spack/cmd/compilers.py b/lib/spack/spack/cmd/compilers.py index b87f977e5a30da7421442520addde91efe6672b3..934fc6cf061cdef093ff968ecea7a65bfa2689fb 100644 --- a/lib/spack/spack/cmd/compilers.py +++ b/lib/spack/spack/cmd/compilers.py @@ -25,12 +25,12 @@ import spack from spack.cmd.compiler import compiler_list -description = "List available compilers. Same as 'spack compiler list'." +description = "list available compilers, same as 'spack compiler list'" def setup_parser(subparser): subparser.add_argument('--scope', choices=spack.config.config_scopes, - help="Configuration scope to read/modify.") + help="configuration scope to read/modify") def compilers(parser, args): diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index 3288c4cb8bc0d7882d28eac14f1316f84536cfd8..1a9e44a8b96e51fd863405de4d4b61d51a9b852e 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -24,27 +24,27 @@ ############################################################################## import spack.config -description = "Get and set configuration options." +description = "get and set configuration options" def setup_parser(subparser): # User can only choose one subparser.add_argument('--scope', choices=spack.config.config_scopes, - help="Configuration scope to read/modify.") + help="configuration scope to read/modify") sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='config_command') - get_parser = sp.add_parser('get', help='Print configuration values.') + get_parser = sp.add_parser('get', help='print configuration values') get_parser.add_argument('section', - help="Configuration section to print. " - "Options: %(choices)s.", + help="configuration section to print. " + "options: %(choices)s", metavar='SECTION', choices=spack.config.section_schemas) - edit_parser = sp.add_parser('edit', help='Edit configuration file.') + edit_parser = sp.add_parser('edit', help='edit configuration file') edit_parser.add_argument('section', - help="Configuration section to edit. " - "Options: %(choices)s.", + help="configuration section to edit. " + "options: %(choices)s", metavar='SECTION', choices=spack.config.section_schemas) diff --git a/lib/spack/spack/cmd/configure.py b/lib/spack/spack/cmd/configure.py index 3eebe2584bb92ae3370c3dc3119b86f796ff8c9d..7b1ef04522ab719adf2ad8413c4de768445d1174 100644 --- a/lib/spack/spack/cmd/configure.py +++ b/lib/spack/spack/cmd/configure.py @@ -31,7 +31,7 @@ from spack import * -description = 'Stops at configuration stage when installing a package, if possible' # NOQA: ignore=E501 +description = 'stops at configuration stage when installing a package, if possible' # NOQA: ignore=E501 build_system_to_phase = { @@ -49,7 +49,7 @@ def setup_parser(subparser): subparser.add_argument( '-v', '--verbose', action='store_true', - help="Print additional output during builds" + help="print additional output during builds" ) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 257522958181f46d36b82546c9840a024de0933d..2901dcfa63de2d57d7bdae24708742dbd1c02f81 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -39,7 +39,7 @@ from spack.util.executable import which from spack.util.naming import * -description = "Create a new package file" +description = "create a new package file" package_template = '''\ ############################################################################## @@ -136,7 +136,8 @@ def write(self, pkg_path): class AutotoolsPackageTemplate(PackageTemplate): - """Provides appropriate overrides for Autotools-based packages""" + """Provides appropriate overrides for Autotools-based packages + that *do* come with a ``configure`` script""" base_class_name = 'AutotoolsPackage' @@ -152,6 +153,33 @@ def configure_args(self): return args""" +class AutoreconfPackageTemplate(PackageTemplate): + """Provides appropriate overrides for Autotools-based packages + that *do not* come with a ``configure`` script""" + + base_class_name = 'AutotoolsPackage' + + dependencies = """\ + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') + + # FIXME: Add additional dependencies if required. + # depends_on('foo')""" + + body = """\ + def autoreconf(self, spec, prefix): + # FIXME: Modify the autoreconf method as necessary + autoreconf('--install', '--verbose', '--force') + + def configure_args(self): + # FIXME: Add arguments other than --prefix + # FIXME: If not needed delete this function + args = [] + return args""" + + class CMakePackageTemplate(PackageTemplate): """Provides appropriate overrides for CMake-based packages""" @@ -221,6 +249,7 @@ def __init__(self, name, *args): class RPackageTemplate(PackageTemplate): """Provides appropriate overrides for R extensions""" + base_class_name = 'RPackage' dependencies = """\ # FIXME: Add dependencies if required. @@ -269,14 +298,15 @@ def __init__(self, name, *args): templates = { - 'autotools': AutotoolsPackageTemplate, - 'cmake': CMakePackageTemplate, - 'scons': SconsPackageTemplate, - 'bazel': BazelPackageTemplate, - 'python': PythonPackageTemplate, - 'r': RPackageTemplate, - 'octave': OctavePackageTemplate, - 'generic': PackageTemplate + 'autotools': AutotoolsPackageTemplate, + 'autoreconf': AutoreconfPackageTemplate, + 'cmake': CMakePackageTemplate, + 'scons': SconsPackageTemplate, + 'bazel': BazelPackageTemplate, + 'python': PythonPackageTemplate, + 'r': RPackageTemplate, + 'octave': OctavePackageTemplate, + 'generic': PackageTemplate } @@ -286,7 +316,7 @@ def setup_parser(subparser): help="url of package archive") subparser.add_argument( '--keep-stage', action='store_true', - help="Don't clean up staging area when command completes.") + help="don't clean up staging area when command completes") subparser.add_argument( '-n', '--name', help="name of the package to create") @@ -295,14 +325,14 @@ def setup_parser(subparser): help="build system template to use. options: %(choices)s") subparser.add_argument( '-r', '--repo', - help="Path to a repository where the package should be created.") + help="path to a repository where the package should be created") subparser.add_argument( '-N', '--namespace', - help="Specify a namespace for the package. Must be the namespace of " - "a repository registered with Spack.") + help="specify a namespace for the package. must be the namespace of " + "a repository registered with Spack") subparser.add_argument( '-f', '--force', action='store_true', - help="Overwrite any existing package file with the same name.") + help="overwrite any existing package file with the same name") class BuildSystemGuesser: @@ -326,12 +356,14 @@ def __call__(self, stage, url): # uses. If the regular expression matches a file contained in the # archive, the corresponding build system is assumed. clues = [ - (r'/configure$', 'autotools'), - (r'/CMakeLists.txt$', 'cmake'), - (r'/SConstruct$', 'scons'), - (r'/setup.py$', 'python'), - (r'/NAMESPACE$', 'r'), - (r'/WORKSPACE$', 'bazel') + (r'/configure$', 'autotools'), + (r'/configure.(in|ac)$', 'autoreconf'), + (r'/Makefile.am$', 'autoreconf'), + (r'/CMakeLists.txt$', 'cmake'), + (r'/SConstruct$', 'scons'), + (r'/setup.py$', 'python'), + (r'/NAMESPACE$', 'r'), + (r'/WORKSPACE$', 'bazel') ] # Peek inside the compressed file. @@ -356,6 +388,7 @@ def __call__(self, stage, url): for pattern, bs in clues: if any(re.search(pattern, l) for l in lines): build_system = bs + break self.build_system = build_system diff --git a/lib/spack/spack/cmd/deactivate.py b/lib/spack/spack/cmd/deactivate.py index fedd078972dbca5a837a16bda539ce497c43e51c..7ea20392362059d397e8b6b81238a32eb31f3671 100644 --- a/lib/spack/spack/cmd/deactivate.py +++ b/lib/spack/spack/cmd/deactivate.py @@ -30,20 +30,20 @@ import spack.store from spack.graph import topological_sort -description = "Deactivate a package extension." +description = "deactivate a package extension" def setup_parser(subparser): subparser.add_argument( '-f', '--force', action='store_true', - help="Run deactivation even if spec is NOT currently activated.") + help="run deactivation even if spec is NOT currently activated") subparser.add_argument( '-a', '--all', action='store_true', - help="Deactivate all extensions of an extendable package, or " - "deactivate an extension AND its dependencies.") + help="deactivate all extensions of an extendable package, or " + "deactivate an extension AND its dependencies") subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="spec of package extension to deactivate.") + help="spec of package extension to deactivate") def deactivate(parser, args): diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py index c7e90cb2108dbe8302dcf0fd858ff8e94bac4def..06dea9ea70887145b34e5e9077258c35475a70db 100644 --- a/lib/spack/spack/cmd/debug.py +++ b/lib/spack/spack/cmd/debug.py @@ -33,13 +33,13 @@ import spack from spack.util.executable import which -description = "Debugging commands for troubleshooting Spack." +description = "debugging commands for troubleshooting Spack" 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.") + help="create a tarball of Spack's installation metadata") def _debug_tarball_suffix(): diff --git a/lib/spack/spack/cmd/dependents.py b/lib/spack/spack/cmd/dependents.py index dc2ee658ac2739fc65f8b13115e4d25f01d9c301..42181b55024dc07aa146c3e95c9c2eaa04f82c42 100644 --- a/lib/spack/spack/cmd/dependents.py +++ b/lib/spack/spack/cmd/dependents.py @@ -30,13 +30,13 @@ import spack.store import spack.cmd -description = "Show installed packages that depend on another." +description = "show installed packages that depend on another" def setup_parser(subparser): subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="specs to list dependencies of.") + help="specs to list dependencies of") def dependents(parser, args): @@ -45,7 +45,7 @@ def dependents(parser, args): tty.die("spack dependents takes only one spec.") spec = spack.cmd.disambiguate_spec(specs[0]) - tty.msg("Dependents of %s" % spec.format('$_$@$%@$#', color=True)) + tty.msg("Dependents of %s" % spec.format('$_$@$%@$/', color=True)) deps = spack.store.db.installed_dependents(spec) if deps: spack.cmd.display_specs(deps) diff --git a/lib/spack/spack/cmd/diy.py b/lib/spack/spack/cmd/diy.py index dbb5a253ec34ff86129c3869b6b8020b1a4fce93..c67e189f7330cecd94b3a248c060a93583f81257 100644 --- a/lib/spack/spack/cmd/diy.py +++ b/lib/spack/spack/cmd/diy.py @@ -33,25 +33,25 @@ import spack.cmd.common.arguments as arguments from spack.stage import DIYStage -description = "Do-It-Yourself: build from an existing source directory." +description = "do-it-yourself: build from an existing source directory" def setup_parser(subparser): subparser.add_argument( '-i', '--ignore-dependencies', action='store_true', dest='ignore_deps', - help="Do not try to install dependencies of requested packages.") + help="don't try to install dependencies of requested packages") subparser.add_argument( '--keep-prefix', action='store_true', - help="Don't remove the install prefix if installation fails.") + help="do not remove the install prefix if installation fails") subparser.add_argument( '--skip-patch', action='store_true', - help="Skip patching for the DIY build.") + help="skip patching for the DIY build") subparser.add_argument( '-q', '--quiet', action='store_true', dest='quiet', - help="Do not display verbose build output while installing.") + help="do not display verbose build output while installing") subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="specs to use for install. Must contain package AND version.") + help="specs to use for install. must contain package AND version") cd_group = subparser.add_mutually_exclusive_group() arguments.add_common_arguments(cd_group, ['clean', 'dirty']) diff --git a/lib/spack/spack/cmd/doc.py b/lib/spack/spack/cmd/doc.py index 291b17216fe289a970d4e9d62f48114526bd2a95..12ae6b497383c3b8d914c391bee1e9c2af0d29c1 100644 --- a/lib/spack/spack/cmd/doc.py +++ b/lib/spack/spack/cmd/doc.py @@ -23,11 +23,11 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -description = "Run pydoc from within spack." +description = "run pydoc from within spack" def setup_parser(subparser): - subparser.add_argument('entity', help="Run pydoc help on entity") + subparser.add_argument('entity', help="run pydoc help on entity") def doc(parser, args): diff --git a/lib/spack/spack/cmd/edit.py b/lib/spack/spack/cmd/edit.py index 77f23333b62e23d1b335364c02236eb8281c3fe3..f439736192101f36ec9cba61646ed1fddf16fecc 100644 --- a/lib/spack/spack/cmd/edit.py +++ b/lib/spack/spack/cmd/edit.py @@ -32,7 +32,7 @@ from spack.spec import Spec from spack.repository import Repo -description = "Open package files in $EDITOR" +description = "open package files in $EDITOR" def edit_package(name, repo_path, namespace): @@ -69,26 +69,30 @@ def setup_parser(subparser): # Various types of Spack files that can be edited # Edits package files by default + excl_args.add_argument( + '-b', '--build-system', dest='path', action='store_const', + const=spack.build_systems_path, + help="Edit the build system with the supplied name.") excl_args.add_argument( '-c', '--command', dest='path', action='store_const', const=spack.cmd.command_path, - help="Edit the command with the supplied name.") + help="edit the command with the supplied name") excl_args.add_argument( '-t', '--test', dest='path', action='store_const', const=spack.test_path, - help="Edit the test with the supplied name.") + help="edit the test with the supplied name") excl_args.add_argument( '-m', '--module', dest='path', action='store_const', const=spack.module_path, - help="Edit the main spack module with the supplied name.") + help="edit the main spack module with the supplied name") # Options for editing packages excl_args.add_argument( '-r', '--repo', default=None, - help="Path to repo to edit package in.") + help="path to repo to edit package in") excl_args.add_argument( '-N', '--namespace', default=None, - help="Namespace of package to edit.") + help="namespace of package to edit") subparser.add_argument( 'name', nargs='?', default=None, diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index f3bad039d4ca6ecd3d6a8f63444e29c43de14c59..49fc48700c826e0fefbb807593873a8617be9b12 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -28,13 +28,13 @@ import spack.cmd import spack.build_environment as build_env -description = "Run a command with the install environment for a spec." +description = "run a command with the install environment for a spec" def setup_parser(subparser): subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="specs of package environment to emulate.") + help="specs of package environment to emulate") def env(parser, args): diff --git a/lib/spack/spack/cmd/extensions.py b/lib/spack/spack/cmd/extensions.py index bd149044ca3bca25fec6e6398f964276284804d9..94a3e8288f5a3bb710fe4b1d246e14794769e84f 100644 --- a/lib/spack/spack/cmd/extensions.py +++ b/lib/spack/spack/cmd/extensions.py @@ -32,24 +32,24 @@ import spack.cmd.find import spack.store -description = "List extensions for package." +description = "list extensions for package" def setup_parser(subparser): format_group = subparser.add_mutually_exclusive_group() format_group.add_argument( '-l', '--long', action='store_true', dest='long', - help='Show dependency hashes as well as versions.') + help='show dependency hashes as well as versions') format_group.add_argument( '-p', '--paths', action='store_const', dest='mode', const='paths', - help='Show paths to extension install directories') + help='show paths to extension install directories') format_group.add_argument( '-d', '--deps', action='store_const', dest='mode', const='deps', - help='Show full dependency DAG of extensions') + help='show full dependency DAG of extensions') subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help='Spec of package to list extensions for') + help='spec of package to list extensions for') def extensions(parser, args): diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index c1ac2ed48d1933cacd2f1bfa6637e1afaae2f84a..35cc23a9631b93f9a69facec6ab8b32036d61381 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -27,19 +27,19 @@ import spack import spack.cmd -description = "Fetch archives for packages" +description = "fetch archives for packages" def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', - help="Do not check packages against checksum") + help="do not check packages against checksum") subparser.add_argument( '-m', '--missing', action='store_true', - help="Also fetch all missing dependencies") + help="also fetch all missing dependencies") subparser.add_argument( '-D', '--dependencies', action='store_true', - help="Also fetch all dependencies") + help="also fetch all dependencies") subparser.add_argument( 'packages', nargs=argparse.REMAINDER, help="specs of packages to fetch") diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index ecd6ae28221cc4fbfbdbb4e0cc4b8d14763b655f..3a6d8270fb87d0d0459c229dac92c0d6ed2286db 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -29,7 +29,7 @@ from spack.cmd import display_specs -description = "Find installed spack packages" +description = "find installed spack packages" def setup_parser(subparser): @@ -39,56 +39,56 @@ def setup_parser(subparser): dest='mode', const='short', default='short', - help='Show only specs (default)') + help='show only specs (default)') format_group.add_argument('-p', '--paths', action='store_const', dest='mode', const='paths', - help='Show paths to package install directories') + help='show paths to package install directories') format_group.add_argument( '-d', '--deps', action='store_const', dest='mode', const='deps', - help='Show full dependency DAG of installed packages') + help='show full dependency DAG of installed packages') arguments.add_common_arguments(subparser, ['long', 'very_long']) subparser.add_argument('-f', '--show-flags', action='store_true', dest='show_flags', - help='Show spec compiler flags.') + help='show spec compiler flags') implicit_explicit = subparser.add_mutually_exclusive_group() implicit_explicit.add_argument( '-e', '--explicit', action='store_true', - help='Show only specs that were installed explicitly') + help='show only specs that were installed explicitly') implicit_explicit.add_argument( '-E', '--implicit', action='store_true', - help='Show only specs that were installed as dependencies') + help='show only specs that were installed as dependencies') subparser.add_argument( '-u', '--unknown', action='store_true', dest='unknown', - help='Show only specs Spack does not have a package for.') + help='show only specs Spack does not have a package for') subparser.add_argument( '-m', '--missing', action='store_true', dest='missing', - help='Show missing dependencies as well as installed specs.') + help='show missing dependencies as well as installed specs') subparser.add_argument( '-v', '--variants', action='store_true', dest='variants', - help='Show variants in output (can be long)') + help='show variants in output (can be long)') subparser.add_argument('-M', '--only-missing', action='store_true', dest='only_missing', - help='Show only missing dependencies.') + help='show only missing dependencies') subparser.add_argument('-N', '--namespace', action='store_true', - help='Show fully qualified package names.') + help='show fully qualified package names') arguments.add_common_arguments(subparser, ['constraint']) diff --git a/lib/spack/spack/cmd/flake8.py b/lib/spack/spack/cmd/flake8.py index b8e28b086022f4869347ed8f5cf4bfc7c9e1a7c5..5ee68a80df6989c6ddec98810f216279fdc500db 100644 --- a/lib/spack/spack/cmd/flake8.py +++ b/lib/spack/spack/cmd/flake8.py @@ -34,7 +34,7 @@ import spack from spack.util.executable import * -description = "Runs source code style checks on Spack. Requires flake8." +description = "runs source code style checks on Spack. requires flake8" flake8 = None include_untracked = True @@ -138,17 +138,17 @@ def filter_file(source, dest, output=False): def setup_parser(subparser): subparser.add_argument( '-k', '--keep-temp', action='store_true', - help="Do not delete temporary directory where flake8 runs. " - "Use for debugging, to see filtered files.") + help="do not delete temporary directory where flake8 runs. " + "use for debugging, to see filtered files") subparser.add_argument( '-o', '--output', action='store_true', - help="Send filtered files to stdout as well as temp files.") + help="send filtered files to stdout as well as temp files") subparser.add_argument( '-r', '--root-relative', action='store_true', default=False, help="print root-relative paths (default is cwd-relative)") subparser.add_argument( '-U', '--no-untracked', dest='untracked', action='store_false', - default=True, help="Exclude untracked files from checks.") + default=True, help="exclude untracked files from checks") subparser.add_argument( 'files', nargs=argparse.REMAINDER, help="specific files to check") diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py index 6a268e6961a970e4f42aab8db740c4d5898ad406..414b6d78ec4308140cf911c414d26a793306246a 100644 --- a/lib/spack/spack/cmd/graph.py +++ b/lib/spack/spack/cmd/graph.py @@ -32,7 +32,7 @@ from spack.spec import * from spack.graph import * -description = "Generate graphs of package dependency relationships." +description = "generate graphs of package dependency relationships" def setup_parser(subparser): @@ -41,31 +41,31 @@ def setup_parser(subparser): method = subparser.add_mutually_exclusive_group() method.add_argument( '-a', '--ascii', action='store_true', - help="Draw graph as ascii to stdout (default).") + help="draw graph as ascii to stdout (default)") method.add_argument( '-d', '--dot', action='store_true', - help="Generate graph in dot format and print to stdout.") + help="generate graph in dot format and print to stdout") subparser.add_argument( '-n', '--normalize', action='store_true', - help="Skip concretization; only print normalized spec.") + help="skip concretization; only print normalized spec") subparser.add_argument( '-s', '--static', action='store_true', - help="Use static information from packages, not dynamic spec info.") + help="use static information from packages, not dynamic spec info") subparser.add_argument( '-i', '--installed', action='store_true', - help="Graph all installed specs in dot format (implies --dot).") + help="graph all installed specs in dot format (implies --dot)") subparser.add_argument( '-t', '--deptype', action='store', - help="Comma-separated list of deptypes to traverse. default=%s." + help="comma-separated list of deptypes to traverse. default=%s" % ','.join(alldeps)) subparser.add_argument( 'specs', nargs=argparse.REMAINDER, - help="specs of packages to graph.") + help="specs of packages to graph") def graph(parser, args): diff --git a/lib/spack/spack/cmd/help.py b/lib/spack/spack/cmd/help.py index 5bc8fc3e7434cef06bdfc7f94e11f2c48340fe9f..e867ca12958322b101cd927fc6c2c9fd76eff9a8 100644 --- a/lib/spack/spack/cmd/help.py +++ b/lib/spack/spack/cmd/help.py @@ -22,7 +22,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -description = "Get help on spack and its commands" +description = "get help on spack and its commands" def setup_parser(subparser): diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 8e7df87a023c8c5336fb1ebc1e9ada4a9db06acc..1dd0ee4e78908dd9bc3e1bc5151e17095119d00c 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -27,7 +27,7 @@ import spack import spack.fetch_strategy as fs -description = "Get detailed information on a particular package" +description = "get detailed information on a particular package" def padder(str_list, extra=0): @@ -43,7 +43,7 @@ def pad(string): def setup_parser(subparser): subparser.add_argument( - 'name', metavar="PACKAGE", help="Name of package to get info for.") + 'name', metavar="PACKAGE", help="name of package to get info for") def print_text_info(pkg): diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index 3731fe3c81a94c7c8f16dcf3148c8ea35322f617..fb01fc2d5e1acfcf50d5e8c06d78daa525c0c589 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -40,7 +40,7 @@ from spack.fetch_strategy import FetchError from spack.package import PackageBase -description = "Build and install packages" +description = "build and install packages" def setup_parser(subparser): @@ -49,29 +49,29 @@ def setup_parser(subparser): default='package,dependencies', dest='things_to_install', choices=['package', 'dependencies'], - help="""Select the mode of installation. -The default is to install the package along with all its dependencies. -Alternatively one can decide to install only the package or only -the dependencies.""" + help="""select the mode of installation. +the default is to install the package along with all its dependencies. +alternatively one can decide to install only the package or only +the dependencies""" ) subparser.add_argument( '-j', '--jobs', action='store', type=int, - help="Explicitly set number of make jobs. Default is #cpus.") + help="explicitly set number of make jobs. default is #cpus") subparser.add_argument( '--keep-prefix', action='store_true', dest='keep_prefix', - help="Don't remove the install prefix if installation fails.") + help="don't remove the install prefix if installation fails") subparser.add_argument( '--keep-stage', action='store_true', dest='keep_stage', - help="Don't remove the build stage if installation succeeds.") + help="don't remove the build stage if installation succeeds") subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', - help="Do not check packages against checksum") + help="do not check packages against checksum") subparser.add_argument( '-v', '--verbose', action='store_true', dest='verbose', - help="Display verbose build output while installing.") + help="display verbose build output while installing") subparser.add_argument( '--fake', action='store_true', dest='fake', - help="Fake install. Just remove prefix and create a fake file.") + help="fake install. just remove prefix and create a fake file") cd_group = subparser.add_mutually_exclusive_group() arguments.add_common_arguments(cd_group, ['clean', 'dirty']) @@ -83,18 +83,18 @@ def setup_parser(subparser): ) subparser.add_argument( '--run-tests', action='store_true', dest='run_tests', - help="Run package level tests during installation." + help="run package level tests during installation" ) subparser.add_argument( '--log-format', default=None, choices=['junit'], - help="Format to be used for log files." + help="format to be used for log files" ) subparser.add_argument( '--log-file', default=None, - help="Filename for the log file. If not passed a default will be used." + help="filename for the log file. if not passed a default will be used" ) diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index e1389df69f1ff4ca1d11d73be03e3406c80034e6..b5b699dccdb700f467c579530f2e9b2c2a29b895 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -33,7 +33,7 @@ import spack from llnl.util.tty.colify import colify -description = "Print available spack packages to stdout in different formats" +description = "print available spack packages to stdout in different formats" formatters = {} @@ -47,13 +47,13 @@ def formatter(func): def setup_parser(subparser): subparser.add_argument( 'filter', nargs=argparse.REMAINDER, - help='Optional case-insensitive glob patterns to filter results.') + help='optional case-insensitive glob patterns to filter results') subparser.add_argument( '-d', '--search-description', action='store_true', default=False, - help='Filtering will also search the description for a match.') + help='filtering will also search the description for a match') subparser.add_argument( '--format', default='name_only', choices=formatters, - help='Format to be used to print the output [default: name_only]') + help='format to be used to print the output [default: name_only]') def filter_by_name(pkgs, args): diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index 85190a5d0b520d1616ec2669ff181391b013fedf..cdc3a741ae00634cdc133086c0b29acdd5dd65df 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -25,7 +25,7 @@ import argparse import spack.modules -description = "Add package to environment using modules." +description = "add package to environment using modules" def setup_parser(subparser): @@ -33,8 +33,8 @@ def setup_parser(subparser): message with -h. """ subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="Spec of package to load with modules. " - "(If -, read specs from STDIN)") + help="spec of package to load with modules " + "(if -, read specs from STDIN)") def load(parser, args): diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index 54f718570722b67b43826aafe96b16b4e5b9525b..c82b7072f989b18f8d739c87b0a571bd3809833a 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -29,7 +29,7 @@ import spack import spack.cmd -description = "Print out locations of various directories used by Spack" +description = "print out locations of various directories used by Spack" def setup_parser(subparser): @@ -38,34 +38,34 @@ def setup_parser(subparser): directories.add_argument( '-m', '--module-dir', action='store_true', - help="Spack python module directory.") + help="spack python module directory") directories.add_argument( '-r', '--spack-root', action='store_true', - help="Spack installation root.") + help="spack installation root") directories.add_argument( '-i', '--install-dir', action='store_true', - help="Install prefix for spec (spec need not be installed).") + help="install prefix for spec (spec need not be installed)") directories.add_argument( '-p', '--package-dir', action='store_true', - help="Directory enclosing a spec's package.py file.") + help="directory enclosing a spec's package.py file") directories.add_argument( '-P', '--packages', action='store_true', - help="Top-level packages directory for Spack.") + help="top-level packages directory for Spack") directories.add_argument( '-s', '--stage-dir', action='store_true', - help="Stage directory for a spec.") + help="stage directory for a spec") directories.add_argument( '-S', '--stages', action='store_true', - help="Top level Stage directory.") + help="top level stage directory") directories.add_argument( '-b', '--build-dir', action='store_true', - help="Checked out or expanded source directory for a spec " - "(requires it to be staged first).") + help="checked out or expanded source directory for a spec " + "(requires it to be staged first)") subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="spec of package to fetch directory for.") + help="spec of package to fetch directory for") def location(parser, args): diff --git a/lib/spack/spack/cmd/md5.py b/lib/spack/spack/cmd/md5.py index 2ae279a41e7ce7fda99e7b717bc89ee13b262a68..7940d1327bb3e94a3fb02eaada553491b6190c32 100644 --- a/lib/spack/spack/cmd/md5.py +++ b/lib/spack/spack/cmd/md5.py @@ -31,13 +31,13 @@ import spack.util.crypto from spack.stage import Stage, FailedDownloadError -description = "Calculate md5 checksums for files/urls." +description = "calculate md5 checksums for files/urls" def setup_parser(subparser): setup_parser.parser = subparser subparser.add_argument('files', nargs=argparse.REMAINDER, - help="Files/urls to checksum.") + help="files/urls to checksum") def compute_md5_checksum(url): diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 585faaf5249516292bb261681ce2b76feed019ba..2db75a0b1f13d5d92ee5e233b777c5a1a8b9686c 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -37,13 +37,13 @@ from spack.error import SpackError from spack.util.spack_yaml import syaml_dict -description = "Manage mirrors." +description = "manage mirrors" def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', - help="Do not check fetched packages against checksum") + help="do not check fetched packages against checksum") sp = subparser.add_subparsers( metavar='SUBCOMMAND', dest='mirror_command') @@ -51,30 +51,30 @@ def setup_parser(subparser): # Create create_parser = sp.add_parser('create', help=mirror_create.__doc__) create_parser.add_argument('-d', '--directory', default=None, - help="Directory in which to create mirror.") + help="directory in which to create mirror") create_parser.add_argument( 'specs', nargs=argparse.REMAINDER, - help="Specs of packages to put in mirror") + help="specs of packages to put in mirror") create_parser.add_argument( - '-f', '--file', help="File with specs of packages to put in mirror.") + '-f', '--file', help="file with specs of packages to put in mirror") create_parser.add_argument( '-D', '--dependencies', action='store_true', - help="Also fetch all dependencies") + help="also fetch all dependencies") create_parser.add_argument( '-o', '--one-version-per-spec', action='store_const', const=1, default=0, - help="Only fetch one 'preferred' version per spec, not all known.") + help="only fetch one 'preferred' version per spec, not all known") scopes = spack.config.config_scopes # Add add_parser = sp.add_parser('add', help=mirror_add.__doc__) - add_parser.add_argument('name', help="Mnemonic name for mirror.") + add_parser.add_argument('name', help="mnemonic name for mirror") add_parser.add_argument( - 'url', help="URL of mirror directory from 'spack mirror create'.") + 'url', help="url of mirror directory from 'spack mirror create'") add_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_modify_scope, - help="Configuration scope to modify.") + help="configuration scope to modify") # Remove remove_parser = sp.add_parser('remove', aliases=['rm'], @@ -82,13 +82,13 @@ def setup_parser(subparser): remove_parser.add_argument('name') remove_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_modify_scope, - help="Configuration scope to modify.") + help="configuration scope to modify") # List list_parser = sp.add_parser('list', help=mirror_list.__doc__) list_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_list_scope, - help="Configuration scope to read from.") + help="configuration scope to read from") def mirror_add(args): diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index b4ee56133973039080a7703b6e5e8cd53f51f43f..a924c5f912c99439bf135f47c5088f4ea4d3058a 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -35,7 +35,7 @@ import spack.cmd.common.arguments as arguments from spack.modules import module_types -description = "Manipulate module files" +description = "manipulate module files" # Dictionary that will be populated with the list of sub-commands # Each sub-command must be callable and accept 3 arguments : @@ -57,10 +57,10 @@ def setup_parser(subparser): sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='subparser_name') # spack module refresh - refresh_parser = sp.add_parser('refresh', help='Regenerate module files') + refresh_parser = sp.add_parser('refresh', help='regenerate module files') refresh_parser.add_argument( '--delete-tree', - help='Delete the module file tree before refresh', + help='delete the module file tree before refresh', action='store_true' ) arguments.add_common_arguments( @@ -68,11 +68,11 @@ def setup_parser(subparser): ) # spack module find - find_parser = sp.add_parser('find', help='Find module files for packages') + find_parser = sp.add_parser('find', help='find module files for packages') arguments.add_common_arguments(find_parser, ['constraint', 'module_type']) # spack module rm - rm_parser = sp.add_parser('rm', help='Remove module files') + rm_parser = sp.add_parser('rm', help='remove module files') arguments.add_common_arguments( rm_parser, ['constraint', 'module_type', 'yes_to_all'] ) @@ -80,19 +80,19 @@ def setup_parser(subparser): # spack module loads loads_parser = sp.add_parser( 'loads', - help='Prompt the list of modules associated with a constraint' + help='prompt the list of modules associated with a constraint' ) loads_parser.add_argument( '--input-only', action='store_false', dest='shell', - help='Generate input for module command (instead of a shell script)' + help='generate input for module command (instead of a shell script)' ) loads_parser.add_argument( '-p', '--prefix', dest='prefix', default='', - help='Prepend to module names when issuing module load commands' + help='prepend to module names when issuing module load commands' ) loads_parser.add_argument( '-x', '--exclude', dest='exclude', action='append', default=[], - help="Exclude package from output; may be specified multiple times" + help="exclude package from output; may be specified multiple times" ) arguments.add_common_arguments( loads_parser, ['constraint', 'module_type', 'recurse_dependencies'] diff --git a/lib/spack/spack/cmd/patch.py b/lib/spack/spack/cmd/patch.py index 9c72da40b5d699c048119bb31bf78a9177c0d676..2e332554ad8a1db19596aed390686690a8a5cec0 100644 --- a/lib/spack/spack/cmd/patch.py +++ b/lib/spack/spack/cmd/patch.py @@ -29,13 +29,13 @@ import spack -description = "Patch expanded archive sources in preparation for install" +description = "patch expanded archive sources in preparation for install" def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', - help="Do not check downloaded packages against checksum") + help="do not check downloaded packages against checksum") subparser.add_argument( 'packages', nargs=argparse.REMAINDER, help="specs of packages to stage") diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index 7791b93cf58e2421d26947888a632fa1d400f566..45104a9ff2ab05818c14a423d5b68f2a32d3035e 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -31,7 +31,7 @@ import spack from spack.util.executable import * -description = "Query packages associated with particular git revisions." +description = "query packages associated with particular git revisions" def setup_parser(subparser): @@ -40,35 +40,35 @@ def setup_parser(subparser): add_parser = sp.add_parser('add', help=pkg_add.__doc__) add_parser.add_argument('packages', nargs=argparse.REMAINDER, - help="Names of packages to add to git repo.") + help="names of packages to add to git repo") list_parser = sp.add_parser('list', help=pkg_list.__doc__) list_parser.add_argument('rev', default='HEAD', nargs='?', - help="Revision to list packages for.") + help="revision to list packages for") diff_parser = sp.add_parser('diff', help=pkg_diff.__doc__) diff_parser.add_argument( 'rev1', nargs='?', default='HEAD^', - help="Revision to compare against.") + help="revision to compare against") diff_parser.add_argument( 'rev2', nargs='?', default='HEAD', - help="Revision to compare to rev1 (default is HEAD).") + help="revision to compare to rev1 (default is HEAD)") add_parser = sp.add_parser('added', help=pkg_added.__doc__) add_parser.add_argument( 'rev1', nargs='?', default='HEAD^', - help="Revision to compare against.") + help="revision to compare against") add_parser.add_argument( 'rev2', nargs='?', default='HEAD', - help="Revision to compare to rev1 (default is HEAD).") + help="revision to compare to rev1 (default is HEAD)") rm_parser = sp.add_parser('removed', help=pkg_removed.__doc__) rm_parser.add_argument( 'rev1', nargs='?', default='HEAD^', - help="Revision to compare against.") + help="revision to compare against") rm_parser.add_argument( 'rev2', nargs='?', default='HEAD', - help="Revision to compare to rev1 (default is HEAD).") + help="revision to compare to rev1 (default is HEAD)") def get_git(): diff --git a/lib/spack/spack/cmd/providers.py b/lib/spack/spack/cmd/providers.py index 0f4a97cc4a7a37957240a405c4329f9938499bbb..470e3e5ed2f451667d3267e652691736c56b5713 100644 --- a/lib/spack/spack/cmd/providers.py +++ b/lib/spack/spack/cmd/providers.py @@ -29,13 +29,13 @@ import spack import spack.cmd -description = "List packages that provide a particular virtual package" +description = "list packages that provide a particular virtual package" def setup_parser(subparser): subparser.add_argument( 'vpkg_spec', metavar='VPACKAGE_SPEC', nargs=argparse.REMAINDER, - help='Find packages that provide this virtual package') + help='find packages that provide this virtual package') def providers(parser, args): diff --git a/lib/spack/spack/cmd/purge.py b/lib/spack/spack/cmd/purge.py index 66cfc2af29d8ebd04551d3b0b1ad8f1b1d857339..56165d5d97af1a21f056dbc578f9b5147eb0aac4 100644 --- a/lib/spack/spack/cmd/purge.py +++ b/lib/spack/spack/cmd/purge.py @@ -25,22 +25,22 @@ import spack import spack.stage as stage -description = "Remove temporary build files and/or downloaded archives" +description = "remove temporary build files and/or downloaded archives" def setup_parser(subparser): subparser.add_argument( '-s', '--stage', action='store_true', default=True, - help="Remove all temporary build stages (default).") + help="remove all temporary build stages (default)") subparser.add_argument( '-d', '--downloads', action='store_true', - help="Remove cached downloads.") + help="remove cached downloads") subparser.add_argument( '-m', '--misc-cache', action='store_true', - help="Remove long-lived caches, like the virtual package index.") + help="remove long-lived caches, like the virtual package index") subparser.add_argument( '-a', '--all', action='store_true', - help="Remove all of the above.") + help="remove all of the above") def purge(parser, args): diff --git a/lib/spack/spack/cmd/python.py b/lib/spack/spack/cmd/python.py index 12727cb5998aed47eaac64e4d76ecf777bada599..05af7bc77641e06773cf69ea8cee7b73cec50fb1 100644 --- a/lib/spack/spack/cmd/python.py +++ b/lib/spack/spack/cmd/python.py @@ -31,15 +31,15 @@ import spack +description = "launch an interpreter as spack would launch a command" + + def setup_parser(subparser): subparser.add_argument( - '-c', dest='python_command', help='Command to execute.') + '-c', dest='python_command', help='command to execute') subparser.add_argument( 'python_args', nargs=argparse.REMAINDER, - help="File to run plus arguments.") - - -description = "Launch an interpreter as spack would launch a command" + help="file to run plus arguments") def python(parser, args): diff --git a/lib/spack/spack/cmd/reindex.py b/lib/spack/spack/cmd/reindex.py index 7dddda2ffb897da2bdc206a772cf728ed4210a25..0bbd85069fc9267fd6ab7ad9f571fdfd1b549d13 100644 --- a/lib/spack/spack/cmd/reindex.py +++ b/lib/spack/spack/cmd/reindex.py @@ -24,7 +24,7 @@ ############################################################################## import spack import spack.store -description = "Rebuild Spack's package database." +description = "rebuild Spack's package database" def reindex(parser, args): diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 79df63ce8d6e1d0dd3d0a29de6c3a2209e18a2d4..1881654cac4ad054a323d41e55b2b56b93d74cc0 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -30,7 +30,7 @@ import spack.config from spack.repository import * -description = "Manage package source repositories." +description = "manage package source repositories" def setup_parser(subparser): @@ -40,34 +40,34 @@ def setup_parser(subparser): # Create create_parser = sp.add_parser('create', help=repo_create.__doc__) create_parser.add_argument( - 'directory', help="Directory to create the repo in.") + 'directory', help="directory to create the repo in") create_parser.add_argument( - 'namespace', help="Namespace to identify packages in the repository. " - "Defaults to the directory name.", nargs='?') + 'namespace', help="namespace to identify packages in the repository. " + "defaults to the directory name", nargs='?') # List list_parser = sp.add_parser('list', help=repo_list.__doc__) list_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_list_scope, - help="Configuration scope to read from.") + help="configuration scope to read from") # Add add_parser = sp.add_parser('add', help=repo_add.__doc__) add_parser.add_argument( - 'path', help="Path to a Spack package repository directory.") + 'path', help="path to a Spack package repository directory") add_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_modify_scope, - help="Configuration scope to modify.") + help="configuration scope to modify") # Remove remove_parser = sp.add_parser( 'remove', help=repo_remove.__doc__, aliases=['rm']) remove_parser.add_argument( 'path_or_namespace', - help="Path or namespace of a Spack package repository.") + help="path or namespace of a Spack package repository") remove_parser.add_argument( '--scope', choices=scopes, default=spack.cmd.default_modify_scope, - help="Configuration scope to modify.") + help="configuration scope to modify") def repo_create(args): diff --git a/lib/spack/spack/cmd/restage.py b/lib/spack/spack/cmd/restage.py index 969afe09bdaaa3f494e9c2578b2551799d7eb628..36fee9237b5f9ff36c1962b537f2eba3008b3a95 100644 --- a/lib/spack/spack/cmd/restage.py +++ b/lib/spack/spack/cmd/restage.py @@ -29,7 +29,7 @@ import spack import spack.cmd -description = "Revert checked out package source code." +description = "revert checked out package source code" def setup_parser(subparser): diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py index 5d8aaefa72aaff00c356ebfdc4ec52a49231df8f..82d00f4e11f4d4f9b54d11ed30d1998037898f27 100644 --- a/lib/spack/spack/cmd/setup.py +++ b/lib/spack/spack/cmd/setup.py @@ -38,19 +38,19 @@ from spack import which from spack.stage import DIYStage -description = "Create a configuration script and module, but don't build." +description = "create a configuration script and module, but don't build" def setup_parser(subparser): subparser.add_argument( '-i', '--ignore-dependencies', action='store_true', dest='ignore_deps', - help="Do not try to install dependencies of requested packages.") + help="do not try to install dependencies of requested packages") subparser.add_argument( '-v', '--verbose', action='store_true', dest='verbose', - help="Display verbose build output while installing.") + help="display verbose build output while installing") subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help="specs to use for install. Must contain package AND version.") + help="specs to use for install. must contain package AND version") cd_group = subparser.add_mutually_exclusive_group() arguments.add_common_arguments(cd_group, ['clean', 'dirty']) diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py index 4ecd4d6e549d31f785123c4de703ba5e8c33099e..9eea404bc7a52929d8c51538079a5073a102b491 100644 --- a/lib/spack/spack/cmd/spec.py +++ b/lib/spack/spack/cmd/spec.py @@ -28,29 +28,29 @@ import spack.cmd import spack.cmd.common.arguments as arguments -description = "print out abstract and concrete versions of a spec." +description = "print out abstract and concrete versions of a spec" def setup_parser(subparser): arguments.add_common_arguments(subparser, ['long', 'very_long']) subparser.add_argument( '-y', '--yaml', action='store_true', default=False, - help='Print concrete spec as YAML.') + help='print concrete spec as YAML') subparser.add_argument( '-c', '--cover', action='store', default='nodes', choices=['nodes', 'edges', 'paths'], - help='How extensively to traverse the DAG. (default: nodes).') + help='how extensively to traverse the DAG (default: nodes)') subparser.add_argument( '-N', '--namespaces', action='store_true', default=False, - help='Show fully qualified package names.') + help='show fully qualified package names') subparser.add_argument( '-I', '--install-status', action='store_true', default=False, - help='Show install status of packages. Packages can be: ' + help='show install status of packages. packages can be: ' 'installed [+], missing and needed by an installed package [-], ' - 'or not installed (no annotation).') + 'or not installed (no annotation)') subparser.add_argument( '-t', '--types', action='store_true', default=False, - help='Show dependency types.') + help='show dependency types') subparser.add_argument( 'specs', nargs=argparse.REMAINDER, help="specs of packages") diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index bfc2e5f45613bd83df7d88355a4ed9207a7b1724..e0023b7254dc775555387ba2734574039676b44f 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -28,16 +28,16 @@ import spack import spack.cmd -description = "Expand downloaded archive in preparation for install" +description = "expand downloaded archive in preparation for install" def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', - help="Do not check downloaded packages against checksum") + help="do not check downloaded packages against checksum") subparser.add_argument( '-p', '--path', dest='path', - help="Path to stage package, does not add to spack tree") + help="path to stage package, does not add to spack tree") subparser.add_argument( 'specs', nargs=argparse.REMAINDER, help="specs of packages to stage") diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 9d92037bb645b1dccf5cde71a79093d281d1753a..c569a1bc8801c0c6e53d56800aca5feabdc26068 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -34,24 +34,24 @@ import spack -description = "A thin wrapper around the pytest command." +description = "a thin wrapper around the pytest command" def setup_parser(subparser): subparser.add_argument( '-H', '--pytest-help', action='store_true', default=False, - help="print full pytest help message, showing advanced options.") + help="print full pytest help message, showing advanced options") list_group = subparser.add_mutually_exclusive_group() list_group.add_argument( '-l', '--list', action='store_true', default=False, - help="list basic test names.") + help="list basic test names") list_group.add_argument( '-L', '--long-list', action='store_true', default=False, - help="list the entire hierarchy of tests.") + help="list the entire hierarchy of tests") subparser.add_argument( 'tests', nargs=argparse.REMAINDER, - help="list of tests to run (will be passed to pytest -k).") + help="list of tests to run (will be passed to pytest -k)") def do_list(args, unknown_args): diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 0fc22ce538a3f9567f960cd02db4f035fb5499a0..fb9094f1b4f2ac9d617668becba286955c3d7ffe 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -32,7 +32,7 @@ import spack.store import spack.repository -description = "Remove an installed package" +description = "remove an installed package" error_message = """You can either: a) Use a more specific spec, or @@ -50,24 +50,24 @@ def setup_parser(subparser): subparser.add_argument( '-f', '--force', action='store_true', dest='force', - help="Remove regardless of whether other packages depend on this one.") + help="remove regardless of whether other packages depend on this one") subparser.add_argument( '-a', '--all', action='store_true', dest='all', - help="USE CAREFULLY. Remove ALL installed packages that match each " + help="USE CAREFULLY. remove ALL installed packages that match each " "supplied spec. i.e., if you say uninstall `libelf`," - " ALL versions of `libelf` are uninstalled. If no spec is " - "supplied all installed software will be uninstalled. This " - "is both useful and dangerous, like rm -r.") + " ALL versions of `libelf` are uninstalled. if no spec is " + "supplied all installed software will be uninstalled. this " + "is both useful and dangerous, like rm -r") subparser.add_argument( '-d', '--dependents', action='store_true', dest='dependents', - help='Also uninstall any packages that depend on the ones given ' - 'via command line.') + help='also uninstall any packages that depend on the ones given ' + 'via command line') subparser.add_argument( '-y', '--yes-to-all', action='store_true', dest='yes_to_all', - help='Assume "yes" is the answer to every confirmation requested') + help='assume "yes" is the answer to every confirmation requested') subparser.add_argument( 'packages', @@ -177,7 +177,7 @@ def get_uninstall_list(args): if dependent_list and not args.dependents and not args.force: for spec, lst in dependent_list.items(): tty.error("Will not uninstall %s" % - spec.format("$_$@$%@$#", color=True)) + spec.format("$_$@$%@$/", color=True)) print('') print("The following packages depend on it:") spack.cmd.display_specs(lst, **display_args) diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py index b52bedb7b48306725cb3803f98c7ddf692b641f3..5da6f5daa58bbf83698147867c0d2b3a5f999835 100644 --- a/lib/spack/spack/cmd/unload.py +++ b/lib/spack/spack/cmd/unload.py @@ -25,7 +25,7 @@ import argparse import spack.modules -description = "Remove package from environment using module." +description = "remove package from environment using module" def setup_parser(subparser): @@ -33,7 +33,7 @@ def setup_parser(subparser): message with -h. """ subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help='Spec of package to unload with modules.') + help='spec of package to unload with modules') def unload(parser, args): diff --git a/lib/spack/spack/cmd/unuse.py b/lib/spack/spack/cmd/unuse.py index 6403cf616288d1c5372faaea11c235ccf29a6bdd..e47974945781b5cd9ee5549054c45cce309a5e64 100644 --- a/lib/spack/spack/cmd/unuse.py +++ b/lib/spack/spack/cmd/unuse.py @@ -25,7 +25,7 @@ import argparse import spack.modules -description = "Remove package from environment using dotkit." +description = "remove package from environment using dotkit" def setup_parser(subparser): @@ -33,7 +33,7 @@ def setup_parser(subparser): message with -h. """ subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help='Spec of package to unuse with dotkit.') + help='spec of package to unuse with dotkit') def unuse(parser, args): diff --git a/lib/spack/spack/cmd/url.py b/lib/spack/spack/cmd/url.py new file mode 100644 index 0000000000000000000000000000000000000000..6823f0febd115058080b64177433942db08d1c4a --- /dev/null +++ b/lib/spack/spack/cmd/url.py @@ -0,0 +1,319 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from __future__ import division, print_function + +from collections import defaultdict + +import spack + +from llnl.util import tty +from spack.url import * +from spack.util.web import find_versions_of_archive + +description = "debugging tool for url parsing" + + +def setup_parser(subparser): + sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='subcommand') + + # Parse + parse_parser = sp.add_parser('parse', help='attempt to parse a url') + + parse_parser.add_argument( + 'url', + help='url to parse') + parse_parser.add_argument( + '-s', '--spider', action='store_true', + help='spider the source page for versions') + + # List + list_parser = sp.add_parser('list', help='list urls in all packages') + + list_parser.add_argument( + '-c', '--color', action='store_true', + help='color the parsed version and name in the urls shown ' + '(versions will be cyan, name red)') + list_parser.add_argument( + '-e', '--extrapolation', action='store_true', + help='color the versions used for extrapolation as well ' + '(additional versions will be green, names magenta)') + + excl_args = list_parser.add_mutually_exclusive_group() + + excl_args.add_argument( + '-n', '--incorrect-name', action='store_true', + help='only list urls for which the name was incorrectly parsed') + excl_args.add_argument( + '-v', '--incorrect-version', action='store_true', + help='only list urls for which the version was incorrectly parsed') + + # Test + sp.add_parser( + 'test', help='print a summary of how well we are parsing package urls') + + +def url(parser, args): + action = { + 'parse': url_parse, + 'list': url_list, + 'test': url_test + } + + action[args.subcommand](args) + + +def url_parse(args): + url = args.url + + tty.msg('Parsing URL: {0}'.format(url)) + print() + + ver, vs, vl, vi, vregex = parse_version_offset(url) + tty.msg('Matched version regex {0:>2}: r{1!r}'.format(vi, vregex)) + + name, ns, nl, ni, nregex = parse_name_offset(url, ver) + tty.msg('Matched name regex {0:>2}: r{1!r}'.format(ni, nregex)) + + print() + tty.msg('Detected:') + try: + print_name_and_version(url) + except UrlParseError as e: + tty.error(str(e)) + + print(' name: {0}'.format(name)) + print(' version: {0}'.format(ver)) + print() + + tty.msg('Substituting version 9.9.9b:') + newurl = substitute_version(url, '9.9.9b') + print_name_and_version(newurl) + + if args.spider: + print() + tty.msg('Spidering for versions:') + versions = find_versions_of_archive(url) + + max_len = max(len(str(v)) for v in versions) + + for v in sorted(versions): + print('{0:{1}} {2}'.format(v, max_len, versions[v])) + + +def url_list(args): + urls = set() + + # Gather set of URLs from all packages + for pkg in spack.repo.all_packages(): + url = getattr(pkg.__class__, 'url', None) + urls = url_list_parsing(args, urls, url, pkg) + + for params in pkg.versions.values(): + url = params.get('url', None) + urls = url_list_parsing(args, urls, url, pkg) + + # Print URLs + for url in sorted(urls): + if args.color or args.extrapolation: + print(color_url(url, subs=args.extrapolation, errors=True)) + else: + print(url) + + # Return the number of URLs that were printed, only for testing purposes + return len(urls) + + +def url_test(args): + # Collect statistics on how many URLs were correctly parsed + total_urls = 0 + correct_names = 0 + correct_versions = 0 + + # Collect statistics on which regexes were matched and how often + name_regex_dict = dict() + name_count_dict = defaultdict(int) + version_regex_dict = dict() + version_count_dict = defaultdict(int) + + tty.msg('Generating a summary of URL parsing in Spack...') + + # Loop through all packages + for pkg in spack.repo.all_packages(): + urls = set() + + url = getattr(pkg.__class__, 'url', None) + if url: + urls.add(url) + + for params in pkg.versions.values(): + url = params.get('url', None) + if url: + urls.add(url) + + # Calculate statistics + for url in urls: + total_urls += 1 + + # Parse versions + version = None + try: + version, vs, vl, vi, vregex = parse_version_offset(url) + version_regex_dict[vi] = vregex + version_count_dict[vi] += 1 + if version_parsed_correctly(pkg, version): + correct_versions += 1 + except UndetectableVersionError: + pass + + # Parse names + try: + name, ns, nl, ni, nregex = parse_name_offset(url, version) + name_regex_dict[ni] = nregex + name_count_dict[ni] += 1 + if name_parsed_correctly(pkg, name): + correct_names += 1 + except UndetectableNameError: + pass + + print() + print(' Total URLs found: {0}'.format(total_urls)) + print(' Names correctly parsed: {0:>4}/{1:>4} ({2:>6.2%})'.format( + correct_names, total_urls, correct_names / total_urls)) + print(' Versions correctly parsed: {0:>4}/{1:>4} ({2:>6.2%})'.format( + correct_versions, total_urls, correct_versions / total_urls)) + print() + + tty.msg('Statistics on name regular expresions:') + + print() + print(' Index Count Regular Expresion') + for ni in name_regex_dict: + print(' {0:>3}: {1:>6} r{2!r}'.format( + ni, name_count_dict[ni], name_regex_dict[ni])) + print() + + tty.msg('Statistics on version regular expresions:') + + print() + print(' Index Count Regular Expresion') + for vi in version_regex_dict: + print(' {0:>3}: {1:>6} r{2!r}'.format( + vi, version_count_dict[vi], version_regex_dict[vi])) + print() + + # Return statistics, only for testing purposes + return (total_urls, correct_names, correct_versions, + name_count_dict, version_count_dict) + + +def print_name_and_version(url): + """Prints a URL. Underlines the detected name with dashes and + the detected version with tildes. + + :param str url: The url to parse + """ + name, ns, nl, ntup, ver, vs, vl, vtup = substitution_offsets(url) + underlines = [' '] * max(ns + nl, vs + vl) + for i in range(ns, ns + nl): + underlines[i] = '-' + for i in range(vs, vs + vl): + underlines[i] = '~' + + print(' {0}'.format(url)) + print(' {0}'.format(''.join(underlines))) + + +def url_list_parsing(args, urls, url, pkg): + """Helper function for :func:`url_list`. + + :param argparse.Namespace args: The arguments given to ``spack url list`` + :param set urls: List of URLs that have already been added + :param url: A URL to potentially add to ``urls`` depending on ``args`` + :type url: str or None + :param spack.package.PackageBase pkg: The Spack package + :returns: The updated ``urls`` list + :rtype: set + """ + if url: + if args.incorrect_name: + # Only add URLs whose name was incorrectly parsed + try: + name = parse_name(url) + if not name_parsed_correctly(pkg, name): + urls.add(url) + except UndetectableNameError: + urls.add(url) + elif args.incorrect_version: + # Only add URLs whose version was incorrectly parsed + try: + version = parse_version(url) + if not version_parsed_correctly(pkg, version): + urls.add(url) + except UndetectableVersionError: + urls.add(url) + else: + urls.add(url) + + return urls + + +def name_parsed_correctly(pkg, name): + """Determine if the name of a package was correctly parsed. + + :param spack.package.PackageBase pkg: The Spack package + :param str name: The name that was extracted from the URL + :returns: True if the name was correctly parsed, else False + :rtype: bool + """ + pkg_name = pkg.name + + # After determining a name, `spack create` determines a build system. + # Some build systems prepend a special string to the front of the name. + # Since this can't be guessed from the URL, it would be unfair to say + # that these names are incorrectly parsed, so we remove them. + if pkg_name.startswith('r-'): + pkg_name = pkg_name[2:] + elif pkg_name.startswith('py-'): + pkg_name = pkg_name[3:] + elif pkg_name.startswith('octave-'): + pkg_name = pkg_name[7:] + + return name == pkg_name + + +def version_parsed_correctly(pkg, version): + """Determine if the version of a package was correctly parsed. + + :param spack.package.PackageBase pkg: The Spack package + :param str version: The version that was extracted from the URL + :returns: True if the name was correctly parsed, else False + :rtype: bool + """ + # If the version parsed from the URL is listed in a version() + # directive, we assume it was correctly parsed + for pkg_version in pkg.versions: + if str(pkg_version) == str(version): + return True + return False diff --git a/lib/spack/spack/cmd/url_parse.py b/lib/spack/spack/cmd/url_parse.py deleted file mode 100644 index 2af9671459d9a79ccd32cc85c2a80946871a12ba..0000000000000000000000000000000000000000 --- a/lib/spack/spack/cmd/url_parse.py +++ /dev/null @@ -1,79 +0,0 @@ -############################################################################## -# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License (as -# published by the Free Software Foundation) version 2.1, February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -import llnl.util.tty as tty - -import spack -import spack.url -from spack.util.web import find_versions_of_archive - -description = "Show parsing of a URL, optionally spider web for versions." - - -def setup_parser(subparser): - subparser.add_argument('url', help="url of a package archive") - subparser.add_argument( - '-s', '--spider', action='store_true', - help="Spider the source page for versions.") - - -def print_name_and_version(url): - name, ns, nl, ntup, ver, vs, vl, vtup = spack.url.substitution_offsets(url) - underlines = [" "] * max(ns + nl, vs + vl) - for i in range(ns, ns + nl): - underlines[i] = '-' - for i in range(vs, vs + vl): - underlines[i] = '~' - - print " %s" % url - print " %s" % ''.join(underlines) - - -def url_parse(parser, args): - url = args.url - - ver, vs, vl = spack.url.parse_version_offset(url, debug=True) - name, ns, nl = spack.url.parse_name_offset(url, ver, debug=True) - print - - tty.msg("Detected:") - try: - print_name_and_version(url) - except spack.url.UrlParseError as e: - tty.error(str(e)) - - print ' name: %s' % name - print ' version: %s' % ver - - print - tty.msg("Substituting version 9.9.9b:") - newurl = spack.url.substitute_version(url, '9.9.9b') - print_name_and_version(newurl) - - if args.spider: - print - tty.msg("Spidering for versions:") - versions = find_versions_of_archive(url) - for v in sorted(versions): - print "%-20s%s" % (v, versions[v]) diff --git a/lib/spack/spack/cmd/use.py b/lib/spack/spack/cmd/use.py index e3612ace48324733f481da3dcc84c6042d7baec5..c9714d9de07de9fa15ac9076de10438631f5d7c5 100644 --- a/lib/spack/spack/cmd/use.py +++ b/lib/spack/spack/cmd/use.py @@ -25,7 +25,7 @@ import argparse import spack.modules -description = "Add package to environment using dotkit." +description = "add package to environment using dotkit" def setup_parser(subparser): @@ -33,7 +33,7 @@ def setup_parser(subparser): message with -h. """ subparser.add_argument( 'spec', nargs=argparse.REMAINDER, - help='Spec of package to use with dotkit.') + help='spec of package to use with dotkit') def use(parser, args): diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py index 1e95225ab8cd87793bd6595795d9ece96c1d5dc9..dacca2489b59c71a3219e0d02c839a618bc15fae 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -26,12 +26,12 @@ import llnl.util.tty as tty import spack -description = "List available versions of a package" +description = "list available versions of a package" def setup_parser(subparser): subparser.add_argument('package', metavar='PACKAGE', - help='Package to list versions for') + help='package to list versions for') def versions(parser, args): diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index 869a58f15cb5cf08a11da23c8893d8fba3151d57..72e139d123cf5fb3ea188041e4c61086f5a22011 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -69,7 +69,7 @@ import spack.cmd import llnl.util.tty as tty -description = "Produce a single-rooted directory view of a spec." +description = "produce a single-rooted directory view of a spec" def setup_parser(sp): @@ -77,40 +77,40 @@ def setup_parser(sp): sp.add_argument( '-v', '--verbose', action='store_true', default=False, - help="Display verbose output.") + help="display verbose output") sp.add_argument( '-e', '--exclude', action='append', default=[], - help="Exclude packages with names matching the given regex pattern.") + help="exclude packages with names matching the given regex pattern") sp.add_argument( '-d', '--dependencies', choices=['true', 'false', 'yes', 'no'], default='true', - help="Follow dependencies.") + help="follow dependencies") ssp = sp.add_subparsers(metavar='ACTION', dest='action') specs_opts = dict(metavar='spec', nargs='+', - help="Seed specs of the packages to view.") + help="seed specs of the packages to view") # The action parameterizes the command but in keeping with Spack # patterns we make it a subcommand. file_system_view_actions = [ ssp.add_parser( 'symlink', aliases=['add', 'soft'], - help='Add package files to a filesystem view via symbolic links.'), + help='add package files to a filesystem view via symbolic links'), ssp.add_parser( 'hardlink', aliases=['hard'], - help='Add packages files to a filesystem via via hard links.'), + help='add packages files to a filesystem via via hard links'), ssp.add_parser( 'remove', aliases=['rm'], - help='Remove packages from a filesystem view.'), + help='remove packages from a filesystem view'), ssp.add_parser( 'statlink', aliases=['status', 'check'], - help='Check status of packages in a filesystem view.') + help='check status of packages in a filesystem view') ] # All these options and arguments are common to every action. for act in file_system_view_actions: act.add_argument('path', nargs=1, - help="Path to file system view directory.") + help="path to file system view directory") act.add_argument('specs', **specs_opts) return diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 6e65f5026974f31ae03d17452291f7a14d1c4700..731acaf9c29d496d3e99156308a5a55516d8b1ff 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -40,6 +40,7 @@ _imported_compilers_module = 'spack.compilers' _path_instance_vars = ['cc', 'cxx', 'f77', 'fc'] +_flags_instance_vars = ['cflags', 'cppflags', 'cxxflags', 'fflags'] _other_instance_vars = ['modules', 'operating_system', 'environment', 'extra_rpaths'] _cache_config_file = [] @@ -60,6 +61,9 @@ def _to_dict(compiler): d['paths'] = dict((attr, getattr(compiler, attr, None)) for attr in _path_instance_vars) d['flags'] = dict((fname, fvals) for fname, fvals in compiler.flags) + d['flags'].update(dict((attr, getattr(compiler, attr, None)) + for attr in _flags_instance_vars + if hasattr(compiler, attr))) d['operating_system'] = str(compiler.operating_system) d['target'] = str(compiler.target) d['modules'] = compiler.modules if compiler.modules else [] diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index f4b7c4237dbfaa310d4d3de34324aa14ee53eb85..686807ae335d6c2ba2a9ab7398e3079e119eb70f 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -29,17 +29,16 @@ class Xl(Compiler): # Subclasses use possible names of C compiler - cc_names = ['xlc', 'xlc_r'] + cc_names = ['xlc'] # Subclasses use possible names of C++ compiler - cxx_names = ['xlC', 'xlC_r', 'xlc++', 'xlc++_r'] + cxx_names = ['xlC', 'xlc++'] # Subclasses use possible names of Fortran 77 compiler - f77_names = ['xlf', 'xlf_r'] + f77_names = ['xlf'] # Subclasses use possible names of Fortran 90 compiler - fc_names = ['xlf90', 'xlf90_r', 'xlf95', 'xlf95_r', - 'xlf2003', 'xlf2003_r', 'xlf2008', 'xlf2008_r'] + fc_names = ['xlf90', 'xlf95', 'xlf2003', 'xlf2008'] # Named wrapper links within spack.build_env_path link_paths = {'cc': 'xl/xlc', @@ -62,6 +61,14 @@ def cxx11_flag(self): def pic_flag(self): return "-qpic" + @property + def fflags(self): + # The -qzerosize flag is effective only for the Fortran 77 + # compilers and allows the use of zero size objects. + # For Fortran 90 and beyond, it is set by default and has not impact. + # Its use has no negative side effects. + return "-qzerosize" + @classmethod def default_version(cls, comp): """The '-qversion' is the standard option fo XL compilers. diff --git a/lib/spack/spack/compilers/xl_r.py b/lib/spack/spack/compilers/xl_r.py new file mode 100644 index 0000000000000000000000000000000000000000..d08e700f420b49b6496905f9b95edbe9dd75d21b --- /dev/null +++ b/lib/spack/spack/compilers/xl_r.py @@ -0,0 +1,122 @@ +############################################################################## +# Copyright (c) 2016, International Business Machines Corporation +# +# This file is part of Spack. +# Created by Serban Maerean, serban@us.ibm.com based on a similar file, +# spack/lib/spack/spack/compilers/xl.py, produced by Todd Gamblin, +# tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack.compiler import * +import llnl.util.tty as tty +from spack.version import ver + + +class XlR(Compiler): + # Subclasses use possible names of C compiler + cc_names = ['xlc_r'] + + # Subclasses use possible names of C++ compiler + cxx_names = ['xlC_r', 'xlc++_r'] + + # Subclasses use possible names of Fortran 77 compiler + f77_names = ['xlf_r'] + + # Subclasses use possible names of Fortran 90 compiler + fc_names = ['xlf90_r', 'xlf95_r', 'xlf2003_r', 'xlf2008_r'] + + # Named wrapper links within spack.build_env_path + link_paths = {'cc': 'xl_r/xlc_r', + 'cxx': 'xl_r/xlc++_r', + 'f77': 'xl_r/xlf_r', + 'fc': 'xl_r/xlf90_r'} + + @property + def openmp_flag(self): + return "-qsmp=omp" + + @property + def cxx11_flag(self): + if self.version < ver('13.1'): + tty.die("Only xlC 13.1 and above have some c++11 support.") + else: + return "-qlanglvl=extended0x" + + @property + def pic_flag(self): + return("-qpic") + + @property + def fflags(self): + # The -qzerosize flag is effective only for the Fortran 77 + # compilers and allows the use of zero size objects. + # For Fortran 90 and beyond, it is set by default and has not impact. + # Its use has no negative side effects. + return "-qzerosize" + + @classmethod + def default_version(self, comp): + """The '-qversion' is the standard option fo XL compilers. + Output looks like this:: + + IBM XL C/C++ for Linux, V11.1 (5724-X14) + Version: 11.01.0000.0000 + + or:: + + IBM XL Fortran for Linux, V13.1 (5724-X16) + Version: 13.01.0000.0000 + + or:: + + IBM XL C/C++ for AIX, V11.1 (5724-X13) + Version: 11.01.0000.0009 + + or:: + + IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0 + Version: 09.00.0000.0017 + """ + + return get_compiler_version( + comp, '-qversion', r'([0-9]?[0-9]\.[0-9])') + + @classmethod + def fc_version(cls, fc): + """The fortran and C/C++ versions of the XL compiler are always + two units apart. By this we mean that the fortran release that + goes with XL C/C++ 11.1 is 13.1. Having such a difference in + version number is confusing spack quite a lot. Most notably + if you keep the versions as is the default xl compiler will + only have fortran and no C/C++. So we associate the Fortran + compiler with the version associated to the C/C++ compiler. + One last stumble. Version numbers over 10 have at least a .1 + those under 10 a .0. There is no xlf 9.x or under currently + available. BG/P and BG/L can such a compiler mix and possibly + older version of AIX and linux on power. + """ + fver = get_compiler_version(fc, '-qversion', r'([0-9]?[0-9]\.[0-9])') + cver = float(fver) - 2 + if cver < 10: + cver = cver - 0.1 + return str(cver) + + @classmethod + def f77_version(cls, f77): + return cls.fc_version(f77) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index ff552233515552d5f652059c1baeccd4b1961dab..d3fc03fb40f2de9bfc12fc5df7c0556e7c90f95b 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -239,7 +239,7 @@ def _assign_dependencies(self, hash_key, installs, data): if dhash not in data: tty.warn("Missing dependency not in database: ", "%s needs %s-%s" % ( - spec.format('$_$#'), dname, dhash[:7])) + spec.format('$_$/'), dname, dhash[:7])) continue child = data[dhash].spec diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py index 1f0390dae909478cc2781265b36f3d8ceb97308a..91230263f15d9998bec0f6e1eb5908477d0785b9 100644 --- a/lib/spack/spack/graph.py +++ b/lib/spack/spack/graph.py @@ -138,7 +138,7 @@ class AsciiGraph(object): def __init__(self): # These can be set after initialization or after a call to # graph() to change behavior. - self.node_character = '*' + self.node_character = 'o' self.debug = False self.indent = 0 self.deptype = alldeps @@ -364,7 +364,7 @@ def _expand_right_line(self, index): self._set_state(EXPAND_RIGHT, index) self._out.write("\n") - def write(self, spec, **kwargs): + def write(self, spec, color=None, out=None): """Write out an ascii graph of the provided spec. Arguments: @@ -378,14 +378,13 @@ def write(self, spec, **kwargs): based on output file. """ - out = kwargs.get('out', None) - if not out: + if out is None: out = sys.stdout - color = kwargs.get('color', None) - if not color: + if color is None: color = out.isatty() - self._out = ColorStream(sys.stdout, color=color) + + self._out = ColorStream(out, color=color) # We'll traverse the spec in topo order as we graph it. topo_order = topological_sort(spec, reverse=True, deptype=self.deptype) @@ -572,7 +571,7 @@ def label(key, label): else: def key_label(s): - return s.dag_hash(), "%s-%s" % (s.name, s.dag_hash(7)) + return s.dag_hash(), "%s/%s" % (s.name, s.dag_hash(7)) for s in spec.traverse(deptype=deptype): skey, slabel = key_label(s) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 5e2a840e14c8e31cd973e3ead96dd2c5971aa45a..885f2197eff6995f74a85c5d0063164e6ea2b4e7 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -327,6 +327,10 @@ def blacklisted(self): blacklist_matches = [x for x in configuration.get('blacklist', []) if self.spec.satisfies(x)] + blacklist_implicits = configuration.get('blacklist_implicits') + installed_implicitly = not self.spec._installed_explicitly() + blacklisted_as_implicit = blacklist_implicits and installed_implicitly + if whitelist_matches: message = '\tWHITELIST : %s [matches : ' % self.spec.cshort_spec for rule in whitelist_matches: @@ -341,7 +345,13 @@ def blacklisted(self): message += ' ]' tty.debug(message) - if not whitelist_matches and blacklist_matches: + if blacklisted_as_implicit: + message = '\tBLACKLISTED_AS_IMPLICIT : %s' % \ + self.spec.cshort_spec + tty.debug(message) + + is_blacklisted = blacklist_matches or blacklisted_as_implicit + if not whitelist_matches and is_blacklisted: return True return False @@ -428,13 +438,20 @@ def header(self): def module_specific_content(self, configuration): return tuple() + # Subclasses can return a fragment of module code that prints out + # a warning that modules are being autoloaded. + def autoload_warner(self): + return '' + def autoload(self, spec): if not isinstance(spec, str): m = type(self)(spec) module_file = m.use_name else: module_file = spec - return self.autoload_format.format(module_file=module_file) + return self.autoload_format.format( + module_file=module_file, + warner=self.autoload_warner().format(module_file=module_file)) def prerequisite(self, spec): m = type(self)(spec) @@ -476,6 +493,10 @@ def remove(self): # removedirs throws OSError on first non-empty directory found pass + def verbose_autoload(self): + configuration = _module_config.get(self.name, {}) + return configuration.get('verbose_autoload', True) + class Dotkit(EnvModule): name = 'dotkit' @@ -527,8 +548,13 @@ class TclModule(EnvModule): path = canonicalize_path( _roots.get(name, join_path(spack.share_path, 'modules'))) + def autoload_warner(self): + if self.verbose_autoload(): + return 'puts stderr "Autoloading {module_file}"\n' + return '' + autoload_format = ('if ![ is-loaded {module_file} ] {{\n' - ' puts stderr "Autoloading {module_file}"\n' + ' {warner}' ' module load {module_file}\n' '}}\n\n') @@ -655,8 +681,13 @@ class LmodModule(EnvModule): UnsetEnv: 'unsetenv("{name}")\n' } + def autoload_warner(self): + if self.verbose_autoload(): + return 'LmodMessage("Autoloading {module_file}")\n' + return '' + autoload_format = ('if not isloaded("{module_file}") then\n' - ' LmodMessage("Autoloading {module_file}")\n' + ' {warner}' ' load("{module_file}")\n' 'end\n\n') diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index f9bc1fafbc065f0a86b7a93d0bb59705b43fa86e..e5ea8c56adda081024f1f008e7c30a798ddc60c7 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -78,13 +78,14 @@ class InstallPhase(object): search for execution. The method is retrieved at __get__ time, so that it can be overridden by subclasses of whatever class declared the phases. - It also provides hooks to execute prerequisite and sanity checks. + It also provides hooks to execute arbitrary callbacks before and after + the phase. """ def __init__(self, name): self.name = name - self.preconditions = [] - self.sanity_checks = [] + self.run_before = [] + self.run_after = [] def __get__(self, instance, owner): # The caller is a class that is trying to customize @@ -101,14 +102,13 @@ def phase_wrapper(spec, prefix): self._on_phase_start(instance) # Execute phase pre-conditions, # and give them the chance to fail - for check in self.preconditions: - # Do something sensible at some point - check(instance) + for callback in self.run_before: + callback(instance) phase(spec, prefix) # Execute phase sanity_checks, # and give them the chance to fail - for check in self.sanity_checks: - check(instance) + for callback in self.run_after: + callback(instance) # Check instance attributes at the end of a phase self._on_phase_exit(instance) return phase_wrapper @@ -129,8 +129,8 @@ def copy(self): # This bug-fix was not back-ported in Python 2.6 # http://bugs.python.org/issue1515 other = InstallPhase(self.name) - other.preconditions.extend(self.preconditions) - other.sanity_checks.extend(self.sanity_checks) + other.run_before.extend(self.run_before) + other.run_after.extend(self.run_after) return other @@ -142,22 +142,23 @@ class PackageMeta(spack.directives.DirectiveMetaMixin): """ phase_fmt = '_InstallPhase_{0}' - _InstallPhase_sanity_checks = {} - _InstallPhase_preconditions = {} + _InstallPhase_run_before = {} + _InstallPhase_run_after = {} + + def __new__(mcs, name, bases, attr_dict): - def __new__(meta, name, bases, attr_dict): - # Check if phases is in attr dict, then set - # install phases wrappers if 'phases' in attr_dict: + # Turn the strings in 'phases' into InstallPhase instances + # and add them as private attributes _InstallPhase_phases = [PackageMeta.phase_fmt.format(x) for x in attr_dict['phases']] # NOQA: ignore=E501 for phase_name, callback_name in zip(_InstallPhase_phases, attr_dict['phases']): # NOQA: ignore=E501 attr_dict[phase_name] = InstallPhase(callback_name) attr_dict['_InstallPhase_phases'] = _InstallPhase_phases - def _append_checks(check_name): + def _flush_callbacks(check_name): # Name of the attribute I am going to check it exists attr_name = PackageMeta.phase_fmt.format(check_name) - checks = getattr(meta, attr_name) + checks = getattr(mcs, attr_name) if checks: for phase_name, funcs in checks.items(): try: @@ -180,57 +181,61 @@ def _append_checks(check_name): PackageMeta.phase_fmt.format(phase_name)] getattr(phase, check_name).extend(funcs) # Clear the attribute for the next class - setattr(meta, attr_name, {}) - - @classmethod - def _register_checks(cls, check_type, *args): - def _register_sanity_checks(func): - attr_name = PackageMeta.phase_fmt.format(check_type) - check_list = getattr(meta, attr_name) - for item in args: - checks = check_list.setdefault(item, []) - checks.append(func) - setattr(meta, attr_name, check_list) - return func - return _register_sanity_checks - - @staticmethod - def on_package_attributes(**attrs): - def _execute_under_condition(func): - @functools.wraps(func) - def _wrapper(instance): - # If all the attributes have the value we require, then - # execute - if all([getattr(instance, key, None) == value for key, value in attrs.items()]): # NOQA: ignore=E501 - func(instance) - return _wrapper - return _execute_under_condition - - @classmethod - def precondition(cls, *args): - return cls._register_checks('preconditions', *args) - - @classmethod - def sanity_check(cls, *args): - return cls._register_checks('sanity_checks', *args) - - if all([not hasattr(x, '_register_checks') for x in bases]): - attr_dict['_register_checks'] = _register_checks - - if all([not hasattr(x, 'sanity_check') for x in bases]): - attr_dict['sanity_check'] = sanity_check - - if all([not hasattr(x, 'precondition') for x in bases]): - attr_dict['precondition'] = precondition - - if all([not hasattr(x, 'on_package_attributes') for x in bases]): - attr_dict['on_package_attributes'] = on_package_attributes + setattr(mcs, attr_name, {}) # Preconditions - _append_checks('preconditions') + _flush_callbacks('run_before') # Sanity checks - _append_checks('sanity_checks') - return super(PackageMeta, meta).__new__(meta, name, bases, attr_dict) + _flush_callbacks('run_after') + return super(PackageMeta, mcs).__new__(mcs, name, bases, attr_dict) + + @staticmethod + def register_callback(check_type, *phases): + def _decorator(func): + attr_name = PackageMeta.phase_fmt.format(check_type) + check_list = getattr(PackageMeta, attr_name) + for item in phases: + checks = check_list.setdefault(item, []) + checks.append(func) + setattr(PackageMeta, attr_name, check_list) + return func + return _decorator + + +def run_before(*phases): + """Registers a method of a package to be run before a given phase""" + return PackageMeta.register_callback('run_before', *phases) + + +def run_after(*phases): + """Registers a method of a package to be run after a given phase""" + return PackageMeta.register_callback('run_after', *phases) + + +def on_package_attributes(**attr_dict): + """Executes the decorated method only if at the moment of calling + the instance has attributes that are equal to certain values. + + :param dict attr_dict: dictionary mapping attribute names to their + required values + """ + def _execute_under_condition(func): + + @functools.wraps(func) + def _wrapper(instance, *args, **kwargs): + # If all the attributes have the value we require, then execute + has_all_attributes = all( + [hasattr(instance, key) for key in attr_dict] + ) + if has_all_attributes: + has_the_right_values = all( + [getattr(instance, key) == value for key, value in attr_dict.items()] # NOQA: ignore=E501 + ) + if has_the_right_values: + func(instance, *args, **kwargs) + return _wrapper + + return _execute_under_condition class PackageBase(object): @@ -1555,10 +1560,9 @@ def do_activate(self, force=False): # Activate any package dependencies that are also extensions. if not force: - for spec in self.spec.traverse(root=False, deptype='run'): - if spec.package.extends(self.extendee_spec): - if not spec.package.activated: - spec.package.do_activate(force=force) + for spec in self.dependency_activations(): + if not spec.package.activated: + spec.package.do_activate(force=force) self.extendee_spec.package.activate(self, **self.extendee_args) @@ -1566,6 +1570,10 @@ def do_activate(self, force=False): tty.msg("Activated extension %s for %s" % (self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@"))) + def dependency_activations(self): + return (spec for spec in self.spec.traverse(root=False, deptype='run') + if spec.package.extends(self.extendee_spec)) + def activate(self, extension, **kwargs): """Symlinks all files from the extension into extendee's install dir. @@ -1704,15 +1712,61 @@ def rpath_args(self): """ return " ".join("-Wl,-rpath,%s" % p for p in self.rpath) + build_time_test_callbacks = None + + @on_package_attributes(run_tests=True) + def _run_default_build_time_test_callbacks(self): + """Tries to call all the methods that are listed in the attribute + ``build_time_test_callbacks`` if ``self.run_tests is True``. + + If ``build_time_test_callbacks is None`` returns immediately. + """ + if self.build_time_test_callbacks is None: + return + + for name in self.build_time_test_callbacks: + try: + fn = getattr(self, name) + tty.msg('RUN-TESTS: build-time tests [{0}]'.format(name)) + fn() + except AttributeError: + msg = 'RUN-TESTS: method not implemented [{0}]' + tty.warn(msg.format(name)) + + install_time_test_callbacks = None + + @on_package_attributes(run_tests=True) + def _run_default_install_time_test_callbacks(self): + """Tries to call all the methods that are listed in the attribute + ``install_time_test_callbacks`` if ``self.run_tests is True``. + + If ``install_time_test_callbacks is None`` returns immediately. + """ + if self.install_time_test_callbacks is None: + return + + for name in self.install_time_test_callbacks: + try: + fn = getattr(self, name) + tty.msg('RUN-TESTS: install-time tests [{0}]'.format(name)) + fn() + except AttributeError: + msg = 'RUN-TESTS: method not implemented [{0}]' + tty.warn(msg.format(name)) + class Package(PackageBase): + """General purpose class with a single ``install`` + phase that needs to be coded by packagers. + """ + #: The one and only phase phases = ['install'] - # To be used in UI queries that require to know which - # build-system class we are using + #: This attribute is used in UI queries that require to know which + #: build-system class we are using build_system_class = 'Package' # This will be used as a registration decorator in user # packages, if need be - PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix) + run_after('install')(PackageBase.sanity_check_prefix) def install_dependency_symlinks(pkg, spec, prefix): diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index e34f2b799d35b66746fc8c05261a3db8fed3060a..0df0ff71ea5429e8f0a0222dba0b3e7e2d1c5a98 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -152,7 +152,9 @@ 'UnsatisfiableArchitectureSpecError', 'UnsatisfiableProviderSpecError', 'UnsatisfiableDependencySpecError', - 'AmbiguousHashError'] + 'AmbiguousHashError', + 'InvalidHashError', + 'RedundantSpecError'] # Valid pattern for an identifier in Spack identifier_re = r'\w[\w-]*' @@ -1143,13 +1145,13 @@ def return_val(dspec): def short_spec(self): """Returns a version of the spec with the dependencies hashed instead of completely enumerated.""" - return self.format('$_$@$%@$+$=$#') + return self.format('$_$@$%@$+$=$/') @property def cshort_spec(self): """Returns a version of the spec with the dependencies hashed instead of completely enumerated.""" - return self.format('$_$@$%@$+$=$#', color=True) + return self.format('$_$@$%@$+$=$/', color=True) @property def prefix(self): @@ -1388,8 +1390,9 @@ def _replace_with(self, concrete): dependent = dep_spec.parent deptypes = dep_spec.deptypes - # remove self from all dependents. - del dependent._dependencies[self.name] + # remove self from all dependents, unless it is already removed + if self.name in dependent._dependencies: + del dependent._dependencies[self.name] # add the replacement, unless it is already a dep of dependent. if concrete.name not in dependent._dependencies: @@ -1992,7 +1995,7 @@ def _autospec(self, spec_like): except SpecError: return parse_anonymous_spec(spec_like, self.name) - def satisfies(self, other, deps=True, strict=False): + def satisfies(self, other, deps=True, strict=False, strict_deps=False): """Determine if this spec satisfies all constraints of another. There are two senses for satisfies: @@ -2008,8 +2011,8 @@ def satisfies(self, other, deps=True, strict=False): other = self._autospec(other) # The only way to satisfy a concrete spec is to match its hash exactly. - if other._concrete: - return self._concrete and self.dag_hash() == other.dag_hash() + if other.concrete: + return self.concrete and self.dag_hash() == other.dag_hash() # A concrete provider can satisfy a virtual dependency. if not self.virtual and other.virtual: @@ -2066,7 +2069,8 @@ def satisfies(self, other, deps=True, strict=False): # If we need to descend into dependencies, do it, otherwise we're done. if deps: deps_strict = strict - if not (self.name and other.name): + if self.concrete and not other.name: + # We're dealing with existing specs deps_strict = True return self.satisfies_dependencies(other, strict=deps_strict) else: @@ -2082,9 +2086,10 @@ def satisfies_dependencies(self, other, strict=False): if other._dependencies and not self._dependencies: return False - alldeps = set(d.name for d in self.traverse(root=False)) - if not all(dep.name in alldeps - for dep in other.traverse(root=False)): + selfdeps = self.traverse(root=False) + otherdeps = other.traverse(root=False) + if not all(any(d.satisfies(dep) for d in selfdeps) + for dep in otherdeps): return False elif not self._dependencies or not other._dependencies: @@ -2369,7 +2374,7 @@ def format(self, format_string='$_$@$%@+$+$=', **kwargs): prefixes as above $+ Options $= Architecture prefixed by 'arch=' - $# 7-char prefix of DAG hash with '-' prefix + $/ 7-char prefix of DAG hash with '-' prefix $$ $ You can also use full-string versions, which elide the prefixes:: @@ -2403,7 +2408,7 @@ def format(self, format_string='$_$@$%@+$+$=', **kwargs): of the package, but no dependencies, arch, or compiler. TODO: allow, e.g., ``$6#`` to customize short hash length - TODO: allow, e.g., ``$##`` for full hash. + TODO: allow, e.g., ``$//`` for full hash. """ color = kwargs.get('color', False) length = len(format_string) @@ -2450,8 +2455,8 @@ def write(s, c): if self.architecture and str(self.architecture): a_str = ' arch' + c + str(self.architecture) + ' ' write(fmt % (a_str), c) - elif c == '#': - out.write('-' + fmt % (self.dag_hash(7))) + elif c == '/': + out.write('/' + fmt % (self.dag_hash(7))) elif c == '$': if fmt != '%s': raise ValueError("Can't use format width with $$.") @@ -2524,7 +2529,7 @@ def write(s, c): hashlen = int(hashlen) else: hashlen = None - out.write(fmt % (self.dag_hash(hashlen))) + out.write('/' + fmt % (self.dag_hash(hashlen))) named = False @@ -2591,6 +2596,16 @@ def _install_status(self): except KeyError: return None + def _installed_explicitly(self): + """Helper for tree to print DB install status.""" + if not self.concrete: + return None + try: + record = spack.store.db.get_record(self) + return record.explicit + except KeyError: + return None + def tree(self, **kwargs): """Prints out this spec and its dependencies, tree-formatted with indentation.""" @@ -2696,30 +2711,28 @@ def do_parse(self): specs = [] try: - while self.next or self.previous: + while self.next: # TODO: clean this parsing up a bit - if self.previous: - # We picked up the name of this spec while finishing the - # previous spec - specs.append(self.spec(self.previous.value)) - self.previous = None - elif self.accept(ID): + if self.accept(ID): self.previous = self.token if self.accept(EQ): - # We're either parsing an anonymous spec beginning - # with a key-value pair or adding a key-value pair - # to the last spec + # We're parsing an anonymous spec beginning with a + # key-value pair. if not specs: specs.append(self.spec(None)) self.expect(VAL) + # Raise an error if the previous spec is already + # concrete (assigned by hash) + if specs[-1]._hash: + raise RedundantSpecError(specs[-1], + 'key-value pair') specs[-1]._add_flag( self.previous.value, self.token.value) self.previous = None else: # We're parsing a new spec by name - value = self.previous.value self.previous = None - specs.append(self.spec(value)) + specs.append(self.spec(self.token.value)) elif self.accept(HASH): # We're finding a spec by hash specs.append(self.spec_by_hash()) @@ -2727,27 +2740,38 @@ def do_parse(self): elif self.accept(DEP): if not specs: # We're parsing an anonymous spec beginning with a - # dependency - self.previous = self.token + # dependency. Push the token to recover after creating + # anonymous spec + self.push_tokens([self.token]) specs.append(self.spec(None)) - self.previous = None - if self.accept(HASH): - # We're finding a dependency by hash for an anonymous - # spec - dep = self.spec_by_hash() else: - # We're adding a dependency to the last spec - self.expect(ID) - dep = self.spec(self.token.value) - - # command line deps get empty deptypes now. - # Real deptypes are assigned later per packages. - specs[-1]._add_dependency(dep, ()) + if self.accept(HASH): + # We're finding a dependency by hash for an + # anonymous spec + dep = self.spec_by_hash() + else: + # We're adding a dependency to the last spec + self.expect(ID) + dep = self.spec(self.token.value) + + # Raise an error if the previous spec is already + # concrete (assigned by hash) + if specs[-1]._hash: + raise RedundantSpecError(specs[-1], 'dependency') + # command line deps get empty deptypes now. + # Real deptypes are assigned later per packages. + specs[-1]._add_dependency(dep, ()) else: # If the next token can be part of a valid anonymous spec, # create the anonymous spec if self.next.type in (AT, ON, OFF, PCT): + # Raise an error if the previous spec is already + # concrete (assigned by hash) + if specs and specs[-1]._hash: + raise RedundantSpecError(specs[-1], + 'compiler, version, ' + 'or variant') specs.append(self.spec(None)) else: self.unexpected_token() @@ -2782,13 +2806,13 @@ def spec_by_hash(self): if len(matches) != 1: raise AmbiguousHashError( - "Multiple packages specify hash %s." % self.token.value, - *matches) + "Multiple packages specify hash beginning '%s'." + % self.token.value, *matches) return matches[0] def spec(self, name): - """Parse a spec out of the input. If a spec is supplied, then initialize + """Parse a spec out of the input. If a spec is supplied, initialize and return it instead of creating a new one.""" if name: spec_namespace, dot, spec_name = name.rpartition('.') @@ -2822,16 +2846,6 @@ def spec(self, name): # unspecified or not. added_version = False - if self.previous and self.previous.value == DEP: - if self.accept(HASH): - spec.add_dependency(self.spec_by_hash()) - else: - self.expect(ID) - if self.accept(EQ): - raise SpecParseError(spack.parse.ParseError( - "", "", "Expected dependency received anonymous spec")) - spec.add_dependency(self.spec(self.token.value)) - while self.next: if self.accept(AT): vlist = self.version_list() @@ -2857,13 +2871,25 @@ def spec(self, name): self.previous = None else: # We've found the start of a new spec. Go back to do_parse + # and read this token again. + self.push_tokens([self.token]) + self.previous = None + break + + elif self.accept(HASH): + # Get spec by hash and confirm it matches what we already have + hash_spec = self.spec_by_hash() + if hash_spec.satisfies(spec): + spec = hash_spec break + else: + raise InvalidHashError(spec, hash_spec.dag_hash()) else: break # If there was no version in the spec, consier it an open range - if not added_version: + if not added_version and not spec._hash: spec.versions = VersionList(':') return spec @@ -3135,6 +3161,21 @@ def __init__(self, provided, required): class AmbiguousHashError(SpecError): def __init__(self, msg, *specs): - super(AmbiguousHashError, self).__init__(msg) - for spec in specs: - print(' ', spec.format('$.$@$%@+$+$=$#')) + specs_str = '\n ' + '\n '.join(spec.format('$.$@$%@+$+$=$/') + for spec in specs) + super(AmbiguousHashError, self).__init__(msg + specs_str) + + +class InvalidHashError(SpecError): + def __init__(self, spec, hash): + super(InvalidHashError, self).__init__( + "The spec specified by %s does not match provided spec %s" + % (hash, spec)) + + +class RedundantSpecError(SpecError): + def __init__(self, spec, addition): + super(RedundantSpecError, self).__init__( + "Attempting to add %s to spec %s which is already concrete." + " This is likely the result of adding to a spec specified by hash." + % (addition, spec)) diff --git a/lib/spack/spack/test/cmd/url.py b/lib/spack/spack/test/cmd/url.py new file mode 100644 index 0000000000000000000000000000000000000000..4c60d814ceadaa4e94820eddd543523f938b69a8 --- /dev/null +++ b/lib/spack/spack/test/cmd/url.py @@ -0,0 +1,116 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import argparse +import pytest + +from spack.cmd.url import * + + +@pytest.fixture(scope='module') +def parser(): + """Returns the parser for the ``url`` command""" + parser = argparse.ArgumentParser() + setup_parser(parser) + return parser + + +class MyPackage: + def __init__(self, name, versions): + self.name = name + self.versions = versions + + +def test_name_parsed_correctly(): + # Expected True + assert name_parsed_correctly(MyPackage('netcdf', []), 'netcdf') + assert name_parsed_correctly(MyPackage('r-devtools', []), 'devtools') + assert name_parsed_correctly(MyPackage('py-numpy', []), 'numpy') + assert name_parsed_correctly(MyPackage('octave-splines', []), 'splines') + + # Expected False + assert not name_parsed_correctly(MyPackage('', []), 'hdf5') + assert not name_parsed_correctly(MyPackage('hdf5', []), '') + assert not name_parsed_correctly(MyPackage('imagemagick', []), 'ImageMagick') # noqa + assert not name_parsed_correctly(MyPackage('yaml-cpp', []), 'yamlcpp') + assert not name_parsed_correctly(MyPackage('yamlcpp', []), 'yaml-cpp') + assert not name_parsed_correctly(MyPackage('r-py-parser', []), 'parser') + assert not name_parsed_correctly(MyPackage('oce', []), 'oce-0.18.0') # noqa + + +def test_version_parsed_correctly(): + # Expected True + assert version_parsed_correctly(MyPackage('', ['1.2.3']), '1.2.3') + assert version_parsed_correctly(MyPackage('', ['5.4a', '5.4b']), '5.4a') + assert version_parsed_correctly(MyPackage('', ['5.4a', '5.4b']), '5.4b') + + # Expected False + assert not version_parsed_correctly(MyPackage('', []), '1.2.3') + assert not version_parsed_correctly(MyPackage('', ['1.2.3']), '') + assert not version_parsed_correctly(MyPackage('', ['1.2.3']), '1.2.4') + assert not version_parsed_correctly(MyPackage('', ['3.4a']), '3.4') + assert not version_parsed_correctly(MyPackage('', ['3.4']), '3.4b') + assert not version_parsed_correctly(MyPackage('', ['0.18.0']), 'oce-0.18.0') # noqa + + +def test_url_parse(parser): + args = parser.parse_args(['parse', 'http://zlib.net/fossils/zlib-1.2.10.tar.gz']) + url(parser, args) + + +@pytest.mark.xfail +def test_url_parse_xfail(parser): + # No version in URL + args = parser.parse_args(['parse', 'http://www.netlib.org/voronoi/triangle.zip']) + url(parser, args) + + +def test_url_list(parser): + args = parser.parse_args(['list']) + total_urls = url_list(args) + + # The following two options should not change the number of URLs printed. + args = parser.parse_args(['list', '--color', '--extrapolation']) + colored_urls = url_list(args) + assert colored_urls == total_urls + + # The following two options should print fewer URLs than the default. + # If they print the same number of URLs, something is horribly broken. + # If they say we missed 0 URLs, something is probably broken too. + args = parser.parse_args(['list', '--incorrect-name']) + incorrect_name_urls = url_list(args) + assert 0 < incorrect_name_urls < total_urls + + args = parser.parse_args(['list', '--incorrect-version']) + incorrect_version_urls = url_list(args) + assert 0 < incorrect_version_urls < total_urls + + +def test_url_test(parser): + args = parser.parse_args(['test']) + (total_urls, correct_names, correct_versions, + name_count_dict, version_count_dict) = url_test(args) + + assert 0 < correct_names <= sum(name_count_dict.values()) <= total_urls # noqa + assert 0 < correct_versions <= sum(version_count_dict.values()) <= total_urls # noqa diff --git a/lib/spack/spack/test/graph.py b/lib/spack/spack/test/graph.py new file mode 100644 index 0000000000000000000000000000000000000000..ce7b07ed8669230d79742dfe3912b02f0df6a833 --- /dev/null +++ b/lib/spack/spack/test/graph.py @@ -0,0 +1,138 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from StringIO import StringIO + +from spack.spec import Spec +from spack.graph import AsciiGraph, topological_sort, graph_dot + + +def test_topo_sort(builtin_mock): + """Test topo sort gives correct order.""" + s = Spec('mpileaks').normalized() + + topo = topological_sort(s) + + assert topo.index('mpileaks') < topo.index('callpath') + assert topo.index('mpileaks') < topo.index('mpi') + assert topo.index('mpileaks') < topo.index('dyninst') + assert topo.index('mpileaks') < topo.index('libdwarf') + assert topo.index('mpileaks') < topo.index('libelf') + + assert topo.index('callpath') < topo.index('mpi') + assert topo.index('callpath') < topo.index('dyninst') + assert topo.index('callpath') < topo.index('libdwarf') + assert topo.index('callpath') < topo.index('libelf') + + assert topo.index('dyninst') < topo.index('libdwarf') + assert topo.index('dyninst') < topo.index('libelf') + + assert topo.index('libdwarf') < topo.index('libelf') + + +def test_static_graph_mpileaks(builtin_mock): + """Test a static spack graph for a simple package.""" + s = Spec('mpileaks').normalized() + + stream = StringIO() + graph_dot([s], static=True, out=stream) + + dot = stream.getvalue() + + assert ' "mpileaks" [label="mpileaks"]\n' in dot + assert ' "dyninst" [label="dyninst"]\n' in dot + assert ' "callpath" [label="callpath"]\n' in dot + assert ' "libelf" [label="libelf"]\n' in dot + assert ' "libdwarf" [label="libdwarf"]\n' in dot + + assert ' "dyninst" -> "libdwarf"\n' in dot + assert ' "callpath" -> "dyninst"\n' in dot + assert ' "mpileaks" -> "mpi"\n' in dot + assert ' "libdwarf" -> "libelf"\n' in dot + assert ' "callpath" -> "mpi"\n' in dot + assert ' "mpileaks" -> "callpath"\n' in dot + assert ' "dyninst" -> "libelf"\n' in dot + + +def test_dynamic_dot_graph_mpileaks(builtin_mock): + """Test dynamically graphing the mpileaks package.""" + s = Spec('mpileaks').normalized() + + stream = StringIO() + graph_dot([s], static=False, out=stream) + + dot = stream.getvalue() + + mpileaks_hash, mpileaks_lbl = s.dag_hash(), s.format('$_$/') + mpi_hash, mpi_lbl = s['mpi'].dag_hash(), s['mpi'].format('$_$/') + callpath_hash, callpath_lbl = ( + s['callpath'].dag_hash(), s['callpath'].format('$_$/')) + dyninst_hash, dyninst_lbl = ( + s['dyninst'].dag_hash(), s['dyninst'].format('$_$/')) + libdwarf_hash, libdwarf_lbl = ( + s['libdwarf'].dag_hash(), s['libdwarf'].format('$_$/')) + libelf_hash, libelf_lbl = ( + s['libelf'].dag_hash(), s['libelf'].format('$_$/')) + + assert ' "%s" [label="%s"]\n' % (mpileaks_hash, mpileaks_lbl) in dot + assert ' "%s" [label="%s"]\n' % (callpath_hash, callpath_lbl) in dot + assert ' "%s" [label="%s"]\n' % (mpi_hash, mpi_lbl) in dot + assert ' "%s" [label="%s"]\n' % (dyninst_hash, dyninst_lbl) in dot + assert ' "%s" [label="%s"]\n' % (libdwarf_hash, libdwarf_lbl) in dot + assert ' "%s" [label="%s"]\n' % (libelf_hash, libelf_lbl) in dot + + assert ' "%s" -> "%s"\n' % (dyninst_hash, libdwarf_hash) in dot + assert ' "%s" -> "%s"\n' % (callpath_hash, dyninst_hash) in dot + assert ' "%s" -> "%s"\n' % (mpileaks_hash, mpi_hash) in dot + assert ' "%s" -> "%s"\n' % (libdwarf_hash, libelf_hash) in dot + assert ' "%s" -> "%s"\n' % (callpath_hash, mpi_hash) in dot + assert ' "%s" -> "%s"\n' % (mpileaks_hash, callpath_hash) in dot + assert ' "%s" -> "%s"\n' % (dyninst_hash, libelf_hash) in dot + + +def test_ascii_graph_mpileaks(builtin_mock): + """Test dynamically graphing the mpileaks package.""" + s = Spec('mpileaks').normalized() + + stream = StringIO() + graph = AsciiGraph() + graph.write(s, out=stream, color=False) + string = stream.getvalue() + + # Some lines in spack graph still have trailing space + # TODO: fix this. + string = '\n'.join([line.rstrip() for line in string.split('\n')]) + + assert string == r'''o mpileaks +|\ +| o callpath +|/| +o | mpi + / +o dyninst +|\ +| o libdwarf +|/ +o libelf +''' diff --git a/lib/spack/spack/test/packages.py b/lib/spack/spack/test/packages.py index 6ae8a33a2473b6a981542efd04138ef2b555ac06..bc1f438e448f68b6bdfc93d6b06137d0aa1235fb 100644 --- a/lib/spack/spack/test/packages.py +++ b/lib/spack/spack/test/packages.py @@ -108,6 +108,13 @@ def test_inheritance_of_diretives(): assert 'mpi' in s +def test_dependency_extensions(): + s = Spec('extension2') + s.concretize() + deps = set(x.name for x in s.package.dependency_activations()) + assert deps == set(['extension1']) + + def test_import_class_from_package(builtin_mock): from spack.pkg.builtin.mock.mpich import Mpich # noqa diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 84c8650f15f6070710f88314a01c7e712f742c5f..2f3b2b1b8deec4634826b14ef23b3c686c0aa967 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -287,6 +287,14 @@ def test_unsatisfiable_compiler_flag(self): # 'mpich' is concrete: check_unsatisfiable('mpich', 'mpich cppflags="-O3"', True) + def test_copy_satisfies_transitive(self): + spec = Spec('dttop') + spec.concretize() + copy = spec.copy() + for s in spec.traverse(): + assert s.satisfies(copy[s.name]) + assert copy[s.name].satisfies(s) + def test_unsatisfiable_compiler_flag_mismatch(self): # No matchi in specs check_unsatisfiable( diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 043d9b176fb250c32af0c25f83fcb3f481ac483f..fcb6cfa907b7ec7378929b120e6c8204e841e72f 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -132,6 +132,13 @@ def test_package_names(self): self.check_parse("mvapich_foo") self.check_parse("_mvapich_foo") + def test_anonymous_specs(self): + self.check_parse("%intel") + self.check_parse("@2.7") + self.check_parse("^zlib") + self.check_parse("+foo") + self.check_parse("arch=test-None-None", "platform=test") + def test_simple_dependence(self): self.check_parse("openmpi^hwloc") self.check_parse("openmpi^hwloc^libunwind") @@ -218,6 +225,115 @@ def test_parse_errors(self): errors = ['x@@1.2', 'x ^y@@1.2', 'x@1.2::', 'x::'] self._check_raises(SpecParseError, errors) + def test_spec_by_hash(self, database): + specs = database.mock.db.query() + hashes = [s._hash for s in specs] # Preserves order of elements + + # Make sure the database is still the shape we expect + assert len(specs) > 3 + + self.check_parse(str(specs[0]), '/' + hashes[0]) + self.check_parse(str(specs[1]), '/ ' + hashes[1][:5]) + self.check_parse(str(specs[2]), specs[2].name + '/' + hashes[2]) + self.check_parse(str(specs[3]), + specs[3].name + '@' + str(specs[3].version) + + ' /' + hashes[3][:6]) + + def test_dep_spec_by_hash(self, database): + specs = database.mock.db.query() + hashes = [s._hash for s in specs] # Preserves order of elements + + # Make sure the database is still the shape we expect + assert len(specs) > 10 + assert specs[4].name in specs[10] + assert specs[-1].name in specs[10] + + spec1 = sp.Spec(specs[10].name + '^/' + hashes[4]) + assert specs[4].name in spec1 and spec1[specs[4].name] == specs[4] + spec2 = sp.Spec(specs[10].name + '%' + str(specs[10].compiler) + + ' ^ / ' + hashes[-1]) + assert (specs[-1].name in spec2 and + spec2[specs[-1].name] == specs[-1] and + spec2.compiler == specs[10].compiler) + spec3 = sp.Spec(specs[10].name + '^/' + hashes[4][:4] + + '^ / ' + hashes[-1][:5]) + assert (specs[-1].name in spec3 and + spec3[specs[-1].name] == specs[-1] and + specs[4].name in spec3 and spec3[specs[4].name] == specs[4]) + + def test_multiple_specs_with_hash(self, database): + specs = database.mock.db.query() + hashes = [s._hash for s in specs] # Preserves order of elements + + assert len(specs) > 3 + + output = sp.parse(specs[0].name + '/' + hashes[0] + '/' + hashes[1]) + assert len(output) == 2 + output = sp.parse('/' + hashes[0] + '/' + hashes[1]) + assert len(output) == 2 + output = sp.parse('/' + hashes[0] + '/' + hashes[1] + + ' ' + specs[2].name) + assert len(output) == 3 + output = sp.parse('/' + hashes[0] + + ' ' + specs[1].name + ' ' + specs[2].name) + assert len(output) == 3 + output = sp.parse('/' + hashes[0] + ' ' + + specs[1].name + ' / ' + hashes[1]) + assert len(output) == 2 + + def test_ambiguous_hash(self, database): + specs = database.mock.db.query() + hashes = [s._hash for s in specs] # Preserves order of elements + + # Make sure the database is as expected + assert hashes[1][:1] == hashes[2][:1] == 'b' + + ambiguous_hashes = ['/b', + specs[1].name + '/b', + specs[0].name + '^/b', + specs[0].name + '^' + specs[1].name + '/b'] + self._check_raises(AmbiguousHashError, ambiguous_hashes) + + def test_invalid_hash(self, database): + specs = database.mock.db.query() + hashes = [s._hash for s in specs] # Preserves order of elements + + # Make sure the database is as expected + assert (hashes[0] != hashes[3] and + hashes[1] != hashes[4] and len(specs) > 4) + + inputs = [specs[0].name + '/' + hashes[3], + specs[1].name + '^' + specs[4].name + '/' + hashes[0], + specs[1].name + '^' + specs[4].name + '/' + hashes[1]] + self._check_raises(InvalidHashError, inputs) + + def test_nonexistent_hash(self, database): + # This test uses database to make sure we don't accidentally access + # real installs, however unlikely + specs = database.mock.db.query() + hashes = [s._hash for s in specs] # Preserves order of elements + + # Make sure the database is as expected + assert 'abc123' not in [h[:6] for h in hashes] + + nonexistant_hashes = ['/abc123', + specs[0].name + '/abc123'] + self._check_raises(SystemExit, nonexistant_hashes) + + def test_redundant_spec(self, database): + specs = database.mock.db.query() + hashes = [s._hash for s in specs] # Preserves order of elements + + # Make sure the database is as expected + assert len(specs) > 3 + + redundant_specs = ['/' + hashes[0] + '%' + str(specs[0].compiler), + specs[1].name + '/' + hashes[1] + + '@' + str(specs[1].version), + specs[2].name + '/' + hashes[2] + '^ libelf', + '/' + hashes[3] + ' cflags="-O3 -fPIC"'] + self._check_raises(RedundantSpecError, redundant_specs) + def test_duplicate_variant(self): duplicates = [ 'x@1.2+debug+debug', diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index 93c443fde8df1bff65eaea90a6e2b232fc2c4b24..65f8e12e58fb36235650b927ec23788c4a783d7b 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -28,17 +28,17 @@ download location of the package, and figure out version and name information from there. -Example: when spack is given the following URL: +**Example:** when spack is given the following URL: - ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz + https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.12/src/hdf-4.2.12.tar.gz -It can figure out that the package name is ruby, and that it is at version -1.9.1-p243. This is useful for making the creation of packages simple: a user +It can figure out that the package name is ``hdf``, and that it is at version +``4.2.12``. This is useful for making the creation of packages simple: a user just supplies a URL and skeleton code is generated automatically. -Spack can also figure out that it can most likely download 1.8.1 at this URL: +Spack can also figure out that it can most likely download 4.2.6 at this URL: - ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.8.1.tar.gz + https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.6/src/hdf-4.2.6.tar.gz This is useful if a user asks for a package at a particular version number; spack doesn't need anyone to tell it where to get the tarball even though @@ -104,24 +104,23 @@ def strip_query_and_fragment(path): def split_url_extension(path): """Some URLs have a query string, e.g.: - 1. https://github.com/losalamos/CLAMR/blob/packages/PowerParser_v2.0.7.tgz?raw=true - 2. http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin.tar.gz - 3. https://gitlab.kitware.com/vtk/vtk/repository/archive.tar.bz2?ref=v7.0.0 + 1. https://github.com/losalamos/CLAMR/blob/packages/PowerParser_v2.0.7.tgz?raw=true + 2. http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin.tar.gz + 3. https://gitlab.kitware.com/vtk/vtk/repository/archive.tar.bz2?ref=v7.0.0 - In (1), the query string needs to be stripped to get at the - extension, but in (2) & (3), the filename is IN a single final query - argument. + In (1), the query string needs to be stripped to get at the + extension, but in (2) & (3), the filename is IN a single final query + argument. - This strips the URL into three pieces: prefix, ext, and suffix. - The suffix contains anything that was stripped off the URL to - get at the file extension. In (1), it will be '?raw=true', but - in (2), it will be empty. In (3) the suffix is a parameter that follows - after the file extension, e.g.: + This strips the URL into three pieces: ``prefix``, ``ext``, and ``suffix``. + The suffix contains anything that was stripped off the URL to + get at the file extension. In (1), it will be ``'?raw=true'``, but + in (2), it will be empty. In (3) the suffix is a parameter that follows + after the file extension, e.g.: - 1. ('https://github.com/losalamos/CLAMR/blob/packages/PowerParser_v2.0.7', '.tgz', '?raw=true') - 2. ('http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin', - '.tar.gz', None) - 3. ('https://gitlab.kitware.com/vtk/vtk/repository/archive', '.tar.bz2', '?ref=v7.0.0') + 1. ``('https://github.com/losalamos/CLAMR/blob/packages/PowerParser_v2.0.7', '.tgz', '?raw=true')`` + 2. ``('http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin', '.tar.gz', None)`` + 3. ``('https://gitlab.kitware.com/vtk/vtk/repository/archive', '.tar.bz2', '?ref=v7.0.0')`` """ prefix, ext, suffix = path, '', '' @@ -149,7 +148,7 @@ def determine_url_file_extension(path): """This returns the type of archive a URL refers to. This is sometimes confusing because of URLs like: - (1) https://github.com/petdance/ack/tarball/1.93_02 + (1) https://github.com/petdance/ack/tarball/1.93_02 Where the URL doesn't actually contain the filename. We need to know what type it is so that we can appropriately name files @@ -166,19 +165,44 @@ def determine_url_file_extension(path): return ext -def parse_version_offset(path, debug=False): - """Try to extract a version string from a filename or URL. This is taken - largely from Homebrew's Version class.""" +def parse_version_offset(path): + """Try to extract a version string from a filename or URL. + + :param str path: The filename or URL for the package + + :return: A tuple containing: + version of the package, + first index of version, + length of version string, + the index of the matching regex + the matching regex + + :rtype: tuple + + :raises UndetectableVersionError: If the URL does not match any regexes + """ original_path = path + # path: The prefix of the URL, everything before the ext and suffix + # ext: The file extension + # suffix: Any kind of query string that begins with a '?' path, ext, suffix = split_url_extension(path) - # Allow matches against the basename, to avoid including parent - # dirs in version name Remember the offset of the stem in the path + # stem: Everything from path after the final '/' stem = os.path.basename(path) offset = len(path) - len(stem) - version_types = [ + # List of the following format: + # + # [ + # (regex, string), + # ... + # ] + # + # The first regex that matches string will be used to determine + # the version of the package. Thefore, hyperspecific regexes should + # come first while generic, catch-all regexes should come last. + version_regexes = [ # GitHub tarballs, e.g. v1.2.3 (r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+)$', path), @@ -258,16 +282,13 @@ def parse_version_offset(path, debug=False): (r'\/(\d\.\d+)\/', path), # e.g. http://www.ijg.org/files/jpegsrc.v8d.tar.gz - (r'\.v(\d+[a-z]?)', stem)] + (r'\.v(\d+[a-z]?)', stem) + ] - for i, vtype in enumerate(version_types): - regex, match_string = vtype + for i, version_regex in enumerate(version_regexes): + regex, match_string = version_regex match = re.search(regex, match_string) if match and match.group(1) is not None: - if debug: - tty.msg("Parsing URL: %s" % path, - " Matched regex %d: r'%s'" % (i, regex)) - version = match.group(1) start = match.start(1) @@ -275,30 +296,74 @@ def parse_version_offset(path, debug=False): if match_string is stem: start += offset - return version, start, len(version) + return version, start, len(version), i, regex raise UndetectableVersionError(original_path) -def parse_version(path, debug=False): - """Given a URL or archive name, extract a version from it and return - a version object. +def parse_version(path): + """Try to extract a version string from a filename or URL. + + :param str path: The filename or URL for the package + + :return: The version of the package + :rtype: spack.version.Version + + :raises UndetectableVersionError: If the URL does not match any regexes """ - ver, start, l = parse_version_offset(path, debug=debug) - return Version(ver) + version, start, length, i, regex = parse_version_offset(path) + return Version(version) -def parse_name_offset(path, v=None, debug=False): - if v is None: - v = parse_version(path, debug=debug) +def parse_name_offset(path, v=None): + """Try to determine the name of a package from its filename or URL. + + :param str path: The filename or URL for the package + :param str v: The version of the package + + :return: A tuple containing: + name of the package, + first index of name, + length of name, + the index of the matching regex + the matching regex + + :rtype: tuple + + :raises UndetectableNameError: If the URL does not match any regexes + """ + original_path = path + # We really need to know the version of the package + # This helps us prevent collisions between the name and version + if v is None: + try: + v = parse_version(path) + except UndetectableVersionError: + # Not all URLs contain a version. We still want to be able + # to determine a name if possible. + v = '' + + # path: The prefix of the URL, everything before the ext and suffix + # ext: The file extension + # suffix: Any kind of query string that begins with a '?' path, ext, suffix = split_url_extension(path) - # Allow matching with either path or stem, as with the version. + # stem: Everything from path after the final '/' stem = os.path.basename(path) offset = len(path) - len(stem) - name_types = [ + # List of the following format: + # + # [ + # (regex, string), + # ... + # ] + # + # The first regex that matches string will be used to determine + # the name of the package. Thefore, hyperspecific regexes should + # come first while generic, catch-all regexes should come last. + name_regexes = [ (r'/sourceforge/([^/]+)/', path), (r'github.com/[^/]+/[^/]+/releases/download/%s/(.*)-%s$' % (v, v), path), @@ -316,10 +381,11 @@ def parse_name_offset(path, v=None, debug=False): (r'/([^/]+)%s' % v, path), (r'^([^/]+)[_.-]v?%s' % v, path), - (r'^([^/]+)%s' % v, path)] + (r'^([^/]+)%s' % v, path) + ] - for i, name_type in enumerate(name_types): - regex, match_string = name_type + for i, name_regex in enumerate(name_regexes): + regex, match_string = name_regex match = re.search(regex, match_string) if match: name = match.group(1) @@ -333,17 +399,38 @@ def parse_name_offset(path, v=None, debug=False): name = name.lower() name = re.sub('[_.]', '-', name) - return name, start, len(name) + return name, start, len(name), i, regex - raise UndetectableNameError(path) + raise UndetectableNameError(original_path) def parse_name(path, ver=None): - name, start, l = parse_name_offset(path, ver) + """Try to determine the name of a package from its filename or URL. + + :param str path: The filename or URL for the package + :param str ver: The version of the package + + :return: The name of the package + :rtype: str + + :raises UndetectableNameError: If the URL does not match any regexes + """ + name, start, length, i, regex = parse_name_offset(path, ver) return name def parse_name_and_version(path): + """Try to determine the name of a package and extract its version + from its filename or URL. + + :param str path: The filename or URL for the package + + :return: A tuple containing: + The name of the package + The version of the package + + :rtype: tuple + """ ver = parse_version(path) name = parse_name(path, ver) return (name, ver) @@ -371,12 +458,12 @@ def cumsum(elts, init=0, fn=lambda x: x): def substitution_offsets(path): """This returns offsets for substituting versions and names in the - provided path. It is a helper for substitute_version(). + provided path. It is a helper for :func:`substitute_version`. """ # Get name and version offsets try: - ver, vs, vl = parse_version_offset(path) - name, ns, nl = parse_name_offset(path, ver) + ver, vs, vl, vi, vregex = parse_version_offset(path) + name, ns, nl, ni, nregex = parse_name_offset(path, ver) except UndetectableNameError: return (None, -1, -1, (), ver, vs, vl, (vs,)) except UndetectableVersionError: @@ -444,21 +531,22 @@ def wildcard_version(path): def substitute_version(path, new_version): """Given a URL or archive name, find the version in the path and - substitute the new version for it. Replace all occurrences of - the version *if* they don't overlap with the package name. + substitute the new version for it. Replace all occurrences of + the version *if* they don't overlap with the package name. - Simple example:: - substitute_version('http://www.mr511.de/software/libelf-0.8.13.tar.gz', '2.9.3') - ->'http://www.mr511.de/software/libelf-2.9.3.tar.gz' + Simple example: - Complex examples:: - substitute_version('http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz', 2.1) - -> 'http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.1.tar.gz' + .. code-block:: python - # In this string, the "2" in mvapich2 is NOT replaced. - substitute_version('http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.tar.gz', 2.1) - -> 'http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.1.tar.gz' + substitute_version('http://www.mr511.de/software/libelf-0.8.13.tar.gz', '2.9.3') + >>> 'http://www.mr511.de/software/libelf-2.9.3.tar.gz' + Complex example: + + .. code-block:: python + + substitute_version('https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.12/src/hdf-4.2.12.tar.gz', '2.3') + >>> 'https://www.hdfgroup.org/ftp/HDF/releases/HDF2.3/src/hdf-2.3.tar.gz' """ (name, ns, nl, noffs, ver, vs, vl, voffs) = substitution_offsets(path) @@ -477,17 +565,16 @@ def substitute_version(path, new_version): def color_url(path, **kwargs): """Color the parts of the url according to Spack's parsing. - Colors are: - Cyan: The version found by parse_version_offset(). - Red: The name found by parse_name_offset(). - - Green: Instances of version string from substitute_version(). - Magenta: Instances of the name (protected from substitution). + Colors are: + | Cyan: The version found by :func:`parse_version_offset`. + | Red: The name found by :func:`parse_name_offset`. - Optional args: - errors=True Append parse errors at end of string. - subs=True Color substitutions as well as parsed name/version. + | Green: Instances of version string from :func:`substitute_version`. + | Magenta: Instances of the name (protected from substitution). + :param str path: The filename or URL for the package + :keyword bool errors: Append parse errors at end of string. + :keyword bool subs: Color substitutions as well as parsed name/version. """ errors = kwargs.get('errors', False) subs = kwargs.get('subs', False) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 943db726120b06998cc11b8d74fd19d242b2681b..a67ae04b245765ca8cff3ef3e40b533949392aee 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -167,6 +167,11 @@ function _spack_pathadd { fi } +# Export spack function so it is available in subshells (only works with bash) +if [ -n "${BASH_VERSION:-}" ]; then + export -f spack +fi + # # Figure out where this file is. Below code needs to be portable to # bash and zsh. @@ -193,3 +198,10 @@ _sp_dotkit_root=$(spack-python -c "print(spack.util.path.canonicalize_path(spack _sp_tcl_root=$(spack-python -c "print(spack.util.path.canonicalize_path(spack.config.get_config('config').get('module_roots', {}).get('tcl')))") _spack_pathadd DK_NODE "${_sp_dotkit_root%/}/$_sp_sys_type" _spack_pathadd MODULEPATH "${_sp_tcl_root%/}/$_sp_sys_type" + +# +# Add programmable tab completion for Bash +# +if [ -n "${BASH_VERSION:-}" ]; then + source $_sp_share_dir/spack-completion.bash +fi diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash new file mode 100755 index 0000000000000000000000000000000000000000..dde1a5280f7489adfc15673ff1d5aeb7c95ddec2 --- /dev/null +++ b/share/spack/spack-completion.bash @@ -0,0 +1,932 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +# The following global variables are used/set by Bash programmable completion +# COMP_CWORD: An index into ${COMP_WORDS} of the word containing the +# current cursor position +# COMP_LINE: The current command line +# COMP_WORDS: an array containing individual command arguments typed so far +# COMPREPLY: an array containing possible completions as a result of your +# function + +# Bash programmable completion for Spack +function _bash_completion_spack { + # In all following examples, let the cursor be denoted by brackets, i.e. [] + + # For our purposes, flags should not affect tab completion. For instance, + # `spack install []` and `spack -d install --jobs 8 []` should both give the same + # possible completions. Therefore, we need to ignore any flags in COMP_WORDS. + local COMP_WORDS_NO_FLAGS=() + local index=0 + while [[ "$index" -lt "$COMP_CWORD" ]] + do + if [[ "${COMP_WORDS[$index]}" == [a-z]* ]] + then + COMP_WORDS_NO_FLAGS+=("${COMP_WORDS[$index]}") + fi + let index++ + done + + # Options will be listed by a subfunction named after non-flag arguments. + # For example, `spack -d install []` will call _spack_install + # and `spack compiler add []` will call _spack_compiler_add + local subfunction=$(IFS='_'; echo "_${COMP_WORDS_NO_FLAGS[*]}") + + # However, the word containing the current cursor position needs to be + # added regardless of whether or not it is a flag. This allows us to + # complete something like `spack install --keep-st[]` + COMP_WORDS_NO_FLAGS+=("${COMP_WORDS[$COMP_CWORD]}") + + # Since we have removed all words after COMP_CWORD, we can safely assume + # that COMP_CWORD_NO_FLAGS is simply the index of the last element + local COMP_CWORD_NO_FLAGS=$(( ${#COMP_WORDS_NO_FLAGS[@]} - 1 )) + + # There is no guarantee that the cursor is at the end of the command line + # when tab completion is envoked. For example, in the following situation: + # `spack -d [] install` + # if the user presses the TAB key, a list of valid flags should be listed. + # Note that we cannot simply ignore everything after the cursor. In the + # previous scenario, the user should expect to see a list of flags, but + # not of other subcommands. Obviously, `spack -d list install` would be + # invalid syntax. To accomplish this, we use the variable list_options + # which is true if the current word starts with '-' or if the cursor is + # not at the end of the line. + local list_options=false + if [[ "${COMP_WORDS[$COMP_CWORD]}" == -* || \ + "$COMP_CWORD" -ne "${#COMP_WORDS[@]}-1" ]] + then + list_options=true + fi + + # In general, when envoking tab completion, the user is not expecting to + # see optional flags mixed in with subcommands or package names. Tab + # completion is used by those who are either lazy or just bad at spelling. + # If someone doesn't remember what flag to use, seeing single letter flags + # in their results won't help them, and they should instead consult the + # documentation. However, if the user explicitly declares that they are + # looking for a flag, we can certainly help them out. + # `spack install -[]` + # and + # `spack install --[]` + # should list all flags and long flags, respectively. Furthermore, if a + # subcommand has no non-flag completions, such as `spack arch []`, it + # should list flag completions. + + local cur=${COMP_WORDS_NO_FLAGS[$COMP_CWORD_NO_FLAGS]} + local prev=${COMP_WORDS_NO_FLAGS[$COMP_CWORD_NO_FLAGS-1]} + + #_test_vars + + # Make sure function exists before calling it + if [[ "$(type -t $subfunction)" == "function" ]] + then + COMPREPLY=($($subfunction)) + fi +} + +# Spack commands + +function _spack { + if $list_options + then + compgen -W "-h --help -d --debug -D --pdb -k --insecure -m --mock -p + --profile -v --verbose -s --stacktrace -V --version" -- "$cur" + else + compgen -W "$(_subcommands)" -- "$cur" + fi +} + +function _spack_activate { + if $list_options + then + compgen -W "-h --help -f --force" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_arch { + compgen -W "-h --help -p --platform" -- "$cur" +} + +function _spack_bootstrap { + # FIXME: What does this command even do? + if $list_options + then + compgen -W "-h --help -r --remote" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_build { + if $list_options + then + compgen -W "-h --help -v --verbose" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_cd { + if $list_options + then + compgen -W "-h --help -m --module-dir -r --spack-root -i --install-dir + -p --package-dir -P --packages -s --stage-dir -S --stages + -b --build-dir" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_checksum { + if $list_options + then + compgen -W "-h --help --keep-stage" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_clean { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_compiler { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "find add remove rm list info" -- "$cur" + fi +} + +function _spack_compiler_add { + if $list_options + then + compgen -W "-h --help --scope" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_compiler_find { + # Alias to `spack compiler add` + _spack_compiler_add +} + +function _spack_compiler_info { + if $list_options + then + compgen -W "-h --help --scope" -- "$cur" + else + compgen -W "$(_installed_compilers)" -- "$cur" + fi +} + +function _spack_compiler_list { + compgen -W "-h --help --scope" -- "$cur" +} + +function _spack_compiler_remove { + if $list_options + then + compgen -W "-h --help -a --all --scope" -- "$cur" + else + compgen -W "$(_installed_compilers)" -- "$cur" + fi +} + +function _spack_compiler_rm { + # Alias to `spack compiler remove` + _spack_compiler_remove +} + +function _spack_compilers { + compgen -W "-h --help --scope" -- "$cur" +} + +function _spack_config { + if $list_options + then + compgen -W "-h --help --scope" -- "$cur" + else + compgen -W "edit get" -- "$cur" + fi +} + +function _spack_config_edit { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "mirrors repos modules packages config compilers" -- "$cur" + fi +} + +function _spack_config_get { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "mirrors repos modules packages config compilers" -- "$cur" + fi +} + +function _spack_configure { + if $list_options + then + compgen -W "-h --help -v --verbose" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_create { + compgen -W "-h --help --keep-stage -n --name -t --template -r --repo + -N --namespace -f --force" -- "$cur" +} + +function _spack_deactivate { + if $list_options + then + compgen -W "-h --help -f --force -a --all" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_debug { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "create-db-tarball" -- "$cur" + fi +} + +function _spack_create-db-tarball { + compgen -W "-h --help" -- "$cur" +} + +function _spack_dependents { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_diy { + if $list_options + then + compgen -W "-h --help -i --ignore-dependencies --keep-prefix + --skip-patch -q --quiet --clean --dirty" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_doc { + # FIXME: What does this command even do? + compgen -W "-h --help" -- "$cur" +} + +function _spack_edit { + if $list_options + then + compgen -W "-h --help -b --build-system -c --command -t --test -m --module + -r --repo -N --namespace" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_env { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_extensions { + if $list_options + then + compgen -W "-h --help -l --long -p --paths -d --deps" -- "$cur" + else + compgen -W "go-bootstrap go lua octave python r ruby rust" -- "$cur" + fi +} + +function _spack_fetch { + if $list_options + then + compgen -W "-h --help -n --no-checksum -m --missing + -D --dependencies" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_find { + if $list_options + then + compgen -W "-h --help -s --short -p --paths -d --deps -l --long + -L --very-long -f --show-flags -e --explicit + -E --implicit -u --unknown -m --missing -v --variants + -M --only-missing -N --namespace" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_flake8 { + if $list_options + then + compgen -W "-h --help -k --keep-temp -o --output + -r --root-relative -U --no-untracked" -- "$cur" + else + compgen -o filenames -- "$cur" + fi +} + +function _spack_graph { + if $list_options + then + compgen -W "-h --help -a --ascii -d --dot -n --normalize -s --static + -i --installed -t --deptype" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_help { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_subcommands)" -- "$cur" + fi +} + +function _spack_info { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_install { + if $list_options + then + compgen -W "-h --help --only -j --jobs --keep-prefix --keep-stage + -n --no-checksum -v --verbose --fake --clean --dirty + --run-tests --log-format --log-file" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_list { + if $list_options + then + compgen -W "-h --help -d --search-description --format" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_load { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_location { + if $list_options + then + compgen -W "-h --help -m --module-dir -r --spack-root -i --install-dir + -p --package-dir -P --packages -s --stage-dir -S --stages + -b --build-dir" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_md5 { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -o filenames -- "$cur" + fi +} + +function _spack_mirror { + if $list_options + then + compgen -W "-h --help -n --no-checksum" -- "$cur" + else + compgen -W "add create list remove rm" -- "$cur" + fi +} + +function _spack_mirror_add { + if $list_options + then + compgen -W "-h --help --scope" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_mirror_create { + if $list_options + then + compgen -W "-h --help -d --directory -f --file + -D --dependencies -o --one-version-per-spec" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_mirror_list { + compgen -W "-h --help --scope" -- "$cur" +} + +function _spack_mirror_remove { + if $list_options + then + compgen -W "-h --help --scope" -- "$cur" + else + compgen -W "$(_mirrors)" -- "$cur" + fi +} + +function _spack_module { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "find loads refresh rm" -- "$cur" + fi +} + +function _spack_module_find { + if $list_options + then + compgen -W "-h --help -m --module-type" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_module_loads { + if $list_options + then + compgen -W "-h --help --input-only -p --prefix -x --exclude + -m --module-type -r --dependencies" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi + +} + +function _spack_module_refresh { + if $list_options + then + compgen -W "-h --help --delete-tree -m --module-type + -y --yes-to-all" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_module_rm { + if $list_options + then + compgen -W "-h --help -m --module-type -y --yes-to-all" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_patch { + if $list_options + then + compgen -W "-h --help -n --no-checksum" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_pkg { + # FIXME: What does this subcommand even do? + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "add added diff list removed" -- "$cur" + fi +} + +function _spack_pkg_add { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_pkg_added { + # FIXME: How to list git revisions? + compgen -W "-h --help" -- "$cur" +} + +function _spack_pkg_diff { + # FIXME: How to list git revisions? + compgen -W "-h --help" -- "$cur" +} + +function _spack_pkg_list { + # FIXME: How to list git revisions? + compgen -W "-h --help" -- "$cur" +} + +function _spack_pkg_removed { + # FIXME: How to list git revisions? + compgen -W "-h --help" -- "$cur" +} + +function _spack_providers { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "blas daal elf golang ipp lapack mkl + mpe mpi pil scalapack" -- "$cur" + fi +} + +function _spack_purge { + compgen -W "-h --help -s --stage -d --downloads + -m --misc-cache -a --all" -- "$cur" +} + +function _spack_python { + if $list_options + then + compgen -W "-h --help -c" -- "$cur" + else + compgen -o filenames -- "$cur" + fi +} + +function _spack_reindex { + compgen -W "-h --help" -- "$cur" +} + +function _spack_repo { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "add create list remove rm" -- "$cur" + fi +} + +function _spack_repo_add { + if $list_options + then + compgen -W "-h --help --scope" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_repo_create { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_repo_list { + compgen -W "-h --help --scope" -- "$cur" +} + +function _spack_repo_remove { + if $list_options + then + compgen -W "-h --help --scope" -- "$cur" + else + compgen -W "$(_repos)" -- "$cur" + fi +} + +function _spack_repo_rm { + # Alias to `spack repo remove` + _spack_repo_remove +} + +function _spack_restage { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_setup { + if $list_options + then + compgen -W "-h --help -i --ignore-dependencies -v --verbose + --clean --dirty" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_spec { + if $list_options + then + compgen -W "-h --help -l --long -L --very-long -y --yaml -c --cover + -N --namespaces -I --install-status -t --types" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_stage { + if $list_options + then + compgen -W "-h --help -n --no-checksum -p --path" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_test { + if $list_options + then + compgen -W "-h --help -H --pytest-help -l --list + -L --long-list" -- "$cur" + else + compgen -W "$(_tests)" -- "$cur" + fi +} + +function _spack_uninstall { + if $list_options + then + compgen -W "-h --help -f --force -a --all -d --dependents + -y --yes-to-all" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_unload { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_installed_packages)" + fi +} + +function _spack_unuse { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_installed_packages)" + fi +} + +function _spack_url { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "list parse test" -- "$cur" + fi +} + +function _spack_url_list { + compgen -W "-h --help -c --color -e --extrapolation -n --incorrect-name + -v --incorrect-version" -- "$cur" +} + +function _spack_url_parse { + compgen -W "-h --help -s --spider" -- "$cur" +} + +function _spack_url_test { + compgen -W "-h --help" -- "$cur" +} + +function _spack_use { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_installed_packages)" -- "$cur" + fi +} + +function _spack_versions { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_packages)" -- "$cur" + fi +} + +function _spack_view { + if $list_options + then + compgen -W "-h --help -v --verbose -e --exclude + -d --dependencies" -- "$cur" + else + compgen -W "add check hard hardlink remove rm soft + statlink status symlink" -- "$cur" + fi +} + +function _spack_view_add { + # Alias for `spack view symlink` + _spack_view_symlink +} + +function _spack_view_check { + # Alias for `spack view statlink` + _spack_view_statlink +} + +function _spack_view_hard { + # Alias for `spack view hardlink` + _spack_view_hardlink +} + +function _spack_view_hardlink { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_view_remove { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_view_rm { + # Alias for `spack view remove` + _spack_view_remove +} + +function _spack_view_soft { + # Alias for `spack view symlink` + _spack_view_symlink +} + +function _spack_view_statlink { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +function _spack_view_status { + # Alias for `spack view statlink` + _spack_view_statlink +} + +function _spack_view_symlink { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -o dirnames -- "$cur" + fi +} + +# Helper functions for subcommands + +function _subcommands { + spack help | grep "^ [a-z]" | awk '{print $1}' +} + +function _all_packages { + spack list +} + +function _installed_packages { + # Perl one-liner used to strip out color codes + spack find | grep -v "^--" | perl -pe 's/\e\[?.*?[\@-~]//g' +} + +function _installed_compilers { + spack compilers | egrep -v "^(-|=)" +} + +function _mirrors { + spack mirror list | awk '{print $1}' +} + +function _repos { + spack repo list | awk '{print $1}' +} + +function _tests { + spack test -l +} + +# Testing functions + +function _test_vars { + echo "-----------------------------------------------------" >> temp + echo "Full line: '$COMP_LINE'" >> temp + echo >> temp + echo "Word list w/ flags: $(_pretty_print COMP_WORDS[@])" >> temp + echo "# words w/ flags: '${#COMP_WORDS[@]}'" >> temp + echo "Cursor index w/ flags: '$COMP_CWORD'" >> temp + echo >> temp + echo "Word list w/out flags: $(_pretty_print COMP_WORDS_NO_FLAGS[@])" >> temp + echo "# words w/out flags: '${#COMP_WORDS_NO_FLAGS[@]}'" >> temp + echo "Cursor index w/out flags: '$COMP_CWORD_NO_FLAGS'" >> temp + echo >> temp + echo "Subfunction: '$subfunction'" >> temp + if $list_options + then + echo "List options: 'True'" >> temp + else + echo "List options: 'False'" >> temp + fi + echo "Current word: '$cur'" >> temp + echo "Previous word: '$prev'" >> temp +} + +# Pretty-prints one or more arrays +# Syntax: _pretty_print array1[@] ... +function _pretty_print { + for arg in $@ + do + local array=("${!arg}") + echo -n "$arg: [" + printf "'%s'" "${array[0]}" + printf ", '%s'" "${array[@]:1}" + echo "]" + done +} + +complete -F _bash_completion_spack spack diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py index 51704e3f4b60e7e2dd05c535cc1d05c2f6fce964..e82d2cd781cfb2a2f9b6baaa359082c4f5918788 100644 --- a/var/spack/repos/builtin.mock/packages/cmake-client/package.py +++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py @@ -22,9 +22,10 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from spack import * import os +from spack import * + def check(condition, msg): """Raise an install error if condition is False.""" @@ -39,6 +40,28 @@ class CmakeClient(CMakePackage): version('1.0', '4cb3ff35b2472aae70f542116d616e63') + callback_counter = 0 + + flipped = False + run_this = True + check_this_is_None = None + did_something = False + + @run_after('cmake') + @run_before('cmake', 'build', 'install') + def increment(self): + self.callback_counter += 1 + + @run_after('cmake') + @on_package_attributes(run_this=True, check_this_is_None=None) + def flip(self): + self.flipped = True + + @run_after('cmake') + @on_package_attributes(does_not_exist=None) + def do_not_execute(self): + self.did_something = True + def setup_environment(self, spack_env, run_env): spack_cc # Ensure spack module-scope variable is avaiabl check(from_cmake == "from_cmake", @@ -67,11 +90,15 @@ def setup_dependent_package(self, module, dspec): "setup_dependent_package.") def cmake(self, spec, prefix): - pass + assert self.callback_counter == 1 - build = cmake + def build(self, spec, prefix): + assert self.did_something is False + assert self.flipped is True + assert self.callback_counter == 3 def install(self, spec, prefix): + assert self.callback_counter == 4 # check that cmake is in the global scope. global cmake check(cmake is not None, "No cmake was in environment!") diff --git a/var/spack/repos/builtin.mock/packages/extendee/package.py b/var/spack/repos/builtin.mock/packages/extendee/package.py new file mode 100644 index 0000000000000000000000000000000000000000..f86bcf7de5ae0992c765922bccbebe4f3f744a46 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/extendee/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Extendee(Package): + """A package with extensions""" + + homepage = "http://www.example.com" + url = "http://www.example.com/extendee-1.0.tar.gz" + + extendable = True + + version('1.0', 'hash-extendee-1.0') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/extension1/package.py b/var/spack/repos/builtin.mock/packages/extension1/package.py new file mode 100644 index 0000000000000000000000000000000000000000..d3babc6ce40a42a0d28d0abefbd4fc49fe7fb60b --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/extension1/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Extension1(Package): + """A package which extends another package""" + + homepage = "http://www.example.com" + url = "http://www.example.com/extension1-1.0.tar.gz" + + extends('extendee') + + version('1.0', 'hash-extension1-1.0') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/extension2/package.py b/var/spack/repos/builtin.mock/packages/extension2/package.py new file mode 100644 index 0000000000000000000000000000000000000000..fcb23ab8ede6a247dd93c2ff6fbd3d43d8fc1813 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/extension2/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Extension2(Package): + """A package which extends another package. It also depends on another + package which extends the same package.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/extension2-1.0.tar.gz" + + extends('extendee') + depends_on('extension1', type=('build', 'run')) + + version('1.0', 'hash-extension2-1.0') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index 5c8d89475743e5958abeaf20b33463756ba0b039..4260b6b21b20912c0fe4f4459e2adf2dba080ce3 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -36,6 +36,8 @@ class AdolC(Package): version('2.6.2', '0f9547584c99c0673e4f81cf64e8d865') version('2.6.1', '1032b28427d6e399af4610e78c0f087b') + variant('advanced_branching', default=False, + description='Enable advanced branching to reduce retaping') variant('doc', default=True, description='Install documentation') variant('openmp', default=False, description='Enable OpenMP support') variant('sparse', default=False, description='Enable sparse drivers') @@ -45,10 +47,13 @@ class AdolC(Package): patch('openmp_exam_261.patch', when='@2.6.1') def install(self, spec, prefix): - make_args = ['--prefix=%s' % prefix] + make_args = ['--prefix=%s' % prefix, + '--enable-atrig-erf'] - # --with-cflags=FLAGS use CFLAGS=FLAGS (default: -O3 -Wall -ansi) - # --with-cxxflags=FLAGS use CXXFLAGS=FLAGS (default: -O3 -Wall) + if '+advanced_branching' in spec: + make_args.extend([ + '--enable-advanced-branching' + ]) if '+openmp' in spec: if spec.satisfies('%gcc'): diff --git a/var/spack/repos/builtin/packages/ant/package.py b/var/spack/repos/builtin/packages/ant/package.py index 81a0e089e5b45be0d52e3979e005a6d2eedf45a4..19f03e1e5360f861c77bfc798cf6a55066a185f7 100644 --- a/var/spack/repos/builtin/packages/ant/package.py +++ b/var/spack/repos/builtin/packages/ant/package.py @@ -32,9 +32,12 @@ class Ant(Package): """ homepage = "http://ant.apache.org/" - url = "http://apache.claz.org/ant/source/apache-ant-1.9.7-src.tar.gz" + url = "https://archive.apache.org/dist/ant/source/apache-ant-1.9.7-src.tar.gz" - version('1.9.7', 'a2fd9458c76700b7be51ef12f07d4bb1') + # 1.10.0 requires newer Java, not yet tested.... + # version('1.10.0', '2260301bb7734e34d8b96f1a5fd7979c') + version('1.9.8', '16253d516d5c33c4af9ef8fafcf1004b') + version('1.9.7', 'a2fd9458c76700b7be51ef12f07d4bb1') depends_on('jdk') diff --git a/var/spack/repos/builtin/packages/applewmproto/package.py b/var/spack/repos/builtin/packages/applewmproto/package.py index 8d7e360bfb05a2ecc2d53358a5d041c3ad14d506..41d7c4c10a9b06d66d3ef89a2e34f4838211a9df 100644 --- a/var/spack/repos/builtin/packages/applewmproto/package.py +++ b/var/spack/repos/builtin/packages/applewmproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Applewmproto(Package): +class Applewmproto(AutotoolsPackage): """Apple Rootless Window Management Extension. This extension defines a protcol that allows X window managers @@ -39,8 +39,3 @@ class Applewmproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/appres/package.py b/var/spack/repos/builtin/packages/appres/package.py index 47a9c5bb545f3ce6fe3b968f02ed7b4f469b59d5..ff13937a0e69c3ccf5a808ddbf46b775d62008d5 100644 --- a/var/spack/repos/builtin/packages/appres/package.py +++ b/var/spack/repos/builtin/packages/appres/package.py @@ -25,7 +25,7 @@ from spack import * -class Appres(Package): +class Appres(AutotoolsPackage): """The appres program prints the resources seen by an application (or subhierarchy of an application) with the specified class and instance names. It can be used to determine which resources a particular @@ -42,9 +42,3 @@ class Appres(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py new file mode 100644 index 0000000000000000000000000000000000000000..31a1d498daf1fcdeebf204fb49a198819797a34a --- /dev/null +++ b/var/spack/repos/builtin/packages/archer/package.py @@ -0,0 +1,56 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class Archer(Package): + """ARCHER, a data race detection tool for large OpenMP applications.""" + + homepage = "https://github.com/PRUNERS/ARCHER" + + version('1.0.0b', git='https://github.com/PRUNERS/ARCHER.git', + commit='2cf7ead36358842871d5bd9c33d499f62bf8dd38') + + depends_on('cmake', type='build') + depends_on('llvm+clang~gold') + depends_on('ninja', type='build') + depends_on('llvm-openmp-ompt') + + def install(self, spec, prefix): + + with working_dir('spack-build', create=True): + cmake_args = std_cmake_args[:] + cmake_args.extend([ + '-G', 'Ninja', + '-DCMAKE_C_COMPILER=clang', + '-DCMAKE_CXX_COMPILER=clang++', + '-DOMP_PREFIX:PATH=%s' % spec['llvm-openmp-ompt'].prefix, + ]) + + cmake('..', *cmake_args) + ninja = Executable('ninja') + ninja() + ninja('install') diff --git a/var/spack/repos/builtin/packages/asciidoc/package.py b/var/spack/repos/builtin/packages/asciidoc/package.py index 552030d965fc8119b714a65ec6e86d4aa2a8f3d5..428bb7d645c00354fb56021b456a07c0d4853ccb 100644 --- a/var/spack/repos/builtin/packages/asciidoc/package.py +++ b/var/spack/repos/builtin/packages/asciidoc/package.py @@ -25,7 +25,7 @@ from spack import * -class Asciidoc(Package): +class Asciidoc(AutotoolsPackage): """A presentable text document format for writing articles, UNIX man pages and other small to medium sized documents.""" @@ -38,9 +38,3 @@ class Asciidoc(Package): depends_on('libxslt') depends_on('docbook-xml') depends_on('docbook-xsl') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 16c59469fab114791bca36de08ce7162dae5f07d..851952be6606b855a354784110deb819b8d65d16 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -39,6 +39,7 @@ class Astyle(MakefilePackage): parallel = False + @property def build_directory(self): return join_path(self.stage.source_path, 'build', self.compiler.name) diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py index 0a7d48774d8a06e6f0a840526bd1cf10bab0e4c8..1375f2d0f92e7093d139b462b69057c07d83e575 100644 --- a/var/spack/repos/builtin/packages/atk/package.py +++ b/var/spack/repos/builtin/packages/atk/package.py @@ -25,7 +25,7 @@ from spack import * -class Atk(Package): +class Atk(AutotoolsPackage): """ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK interfaces, accessibility tools have full access to view and @@ -43,8 +43,3 @@ def url_for_version(self, version): """Handle atk's version-based custom URLs.""" url = 'http://ftp.gnome.org/pub/gnome/sources/atk' return url + '/%s/atk-%s.tar.xz' % (version.up_to(2), version) - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index d812350ae8fc4710f5bce148b16c20fcff892a70..3dcf8f36b5f03ea0597491c88f5d7919a161c6af 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -38,6 +38,8 @@ class Autoconf(AutotoolsPackage): depends_on('m4@1.4.6:', type='build') + build_directory = 'spack-build' + def _make_executable(self, name): return Executable(join_path(self.prefix.bin, name)) diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py index 6c0a47ff95a14a67f0e9663a3cffee7b2476695c..8643f5d836429fb9fc61972b0f09c248ae8f1528 100644 --- a/var/spack/repos/builtin/packages/automake/package.py +++ b/var/spack/repos/builtin/packages/automake/package.py @@ -37,6 +37,8 @@ class Automake(AutotoolsPackage): depends_on('autoconf', type='build') + build_directory = 'spack-build' + def _make_executable(self, name): return Executable(join_path(self.prefix.bin, name)) diff --git a/var/spack/repos/builtin/packages/bash-completion/package.py b/var/spack/repos/builtin/packages/bash-completion/package.py index 666a1bef13e69acd8cc91ee18998d90843b8a23a..0bd4d7c294add767683f5d48aab69ed37ab20812 100644 --- a/var/spack/repos/builtin/packages/bash-completion/package.py +++ b/var/spack/repos/builtin/packages/bash-completion/package.py @@ -25,10 +25,10 @@ from spack import * -class BashCompletion(Package): +class BashCompletion(AutotoolsPackage): """Programmable completion functions for bash.""" homepage = "https://github.com/scop/bash-completion" - url = "https://github.com/scop/bash-completion/archive/2.3.tar.gz" + url = "https://github.com/scop/bash-completion/archive/2.3.tar.gz" version('2.3', '67e50f5f3c804350b43f2b664c33dde811d24292') version('develop', git='https://github.com/scop/bash-completion.git') @@ -41,16 +41,9 @@ class BashCompletion(Package): # Other dependencies depends_on('bash@4.1:', type='run') - def install(self, spec, prefix): - make_args = ['--prefix=%s' % prefix] - - autoreconf('-i') - configure(*make_args) - make() - # make("check") # optional, requires dejagnu and tcllib - make("install", - parallel=False) - + @run_after('install') + def show_message_to_user(self): + prefix = self.prefix # Guidelines for individual user as provided by the author at # https://github.com/scop/bash-completion print('=====================================================') @@ -59,6 +52,6 @@ def install(self, spec, prefix): print('') print('# Use bash-completion, if available') print('[[ $PS1 && -f %s/share/bash-completion/bash_completion ]] && \ ' % prefix) # NOQA: ignore=E501 - print(' . %s/share/bash-completion/bash_completion' % prefix) + print(' . %s/share/bash-completion/bash_completion' % prefix) print('') print('=====================================================') diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py index e0cd114635e70b99cf7c9bd4392f78a87dbd000b..33168c2c34c0bc3abc9bb1bea91b5a3458ff78e7 100644 --- a/var/spack/repos/builtin/packages/bash/package.py +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -29,7 +29,7 @@ class Bash(Package): """The GNU Project's Bourne Again SHell.""" homepage = "https://www.gnu.org/software/bash/" - url = "ftp://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz" + url = "https://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz" version('4.3', '81348932d5da294953e15d4814c74dd1') diff --git a/var/spack/repos/builtin/packages/bdftopcf/package.py b/var/spack/repos/builtin/packages/bdftopcf/package.py index 095f0c1bd4c3ec61ce0d20bf02ca3a92443056a4..b6ddd04418107a90ab1ba62c728ac2772335ec98 100644 --- a/var/spack/repos/builtin/packages/bdftopcf/package.py +++ b/var/spack/repos/builtin/packages/bdftopcf/package.py @@ -25,7 +25,7 @@ from spack import * -class Bdftopcf(Package): +class Bdftopcf(AutotoolsPackage): """bdftopcf is a font compiler for the X server and font server. Fonts in Portable Compiled Format can be read by any architecture, although the file is structured to allow one particular architecture to read @@ -42,9 +42,3 @@ class Bdftopcf(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/beforelight/package.py b/var/spack/repos/builtin/packages/beforelight/package.py index 37a91f56148ff45f2317584c083aef8a9b38b79e..3c0cbcf3cb9013ef3469eb1fb95e0273218a0eef 100644 --- a/var/spack/repos/builtin/packages/beforelight/package.py +++ b/var/spack/repos/builtin/packages/beforelight/package.py @@ -25,7 +25,7 @@ from spack import * -class Beforelight(Package): +class Beforelight(AutotoolsPackage): """The beforelight program is a sample implementation of a screen saver for X servers supporting the MIT-SCREEN-SAVER extension. It is only recommended for use as a code sample, as it does not include features @@ -42,9 +42,3 @@ class Beforelight(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/bertini/package.py b/var/spack/repos/builtin/packages/bertini/package.py index 7dd17a062e51c7eee50c44506292853681f1c935..c6d169fbcc7f9fcff8575f5cac6f0870286aadf8 100644 --- a/var/spack/repos/builtin/packages/bertini/package.py +++ b/var/spack/repos/builtin/packages/bertini/package.py @@ -25,7 +25,7 @@ from spack import * -class Bertini(Package): +class Bertini(AutotoolsPackage): """Bertini is a general-purpose solver, written in C, that was created for research about polynomial continuation. It solves for the numerical solution of systems of polynomial equations using homotopy continuation.""" @@ -42,9 +42,3 @@ class Bertini(Package): depends_on('gmp') depends_on('mpfr') depends_on('mpi', when='+mpi') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/bigreqsproto/package.py b/var/spack/repos/builtin/packages/bigreqsproto/package.py index 61fd9c512168a360c11e262cb9bbca814e1c548a..f2542d921e2630793f1df8fb9a006dc2cd0dbed9 100644 --- a/var/spack/repos/builtin/packages/bigreqsproto/package.py +++ b/var/spack/repos/builtin/packages/bigreqsproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Bigreqsproto(Package): +class Bigreqsproto(AutotoolsPackage): """Big Requests Extension. This extension defines a protocol to enable the use of requests @@ -38,8 +38,3 @@ class Bigreqsproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index 70795f05ccf6b7deb07d3becdead44fa2e282e06..a9691fab8b1b565e64e84b145753c73d27b768d1 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -25,7 +25,7 @@ from spack import * -class Bison(Package): +class Bison(AutotoolsPackage): """Bison is a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.""" @@ -37,8 +37,4 @@ class Bison(Package): depends_on("m4", type='build') - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") + build_directory = 'spack-build' diff --git a/var/spack/repos/builtin/packages/bitmap/package.py b/var/spack/repos/builtin/packages/bitmap/package.py index 55fdacefd5a990a2300974c731e972683fdb9f62..80bc496013f7751519619159436a5b30806597c4 100644 --- a/var/spack/repos/builtin/packages/bitmap/package.py +++ b/var/spack/repos/builtin/packages/bitmap/package.py @@ -25,7 +25,7 @@ from spack import * -class Bitmap(Package): +class Bitmap(AutotoolsPackage): """bitmap, bmtoa, atobm - X bitmap (XBM) editor and converter utilities.""" homepage = "http://cgit.freedesktop.org/xorg/app/bitmap" @@ -43,9 +43,3 @@ class Bitmap(Package): depends_on('xproto@7.0.25:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 9e5894a6a84f91052ef58b945868302a0579d450..d12b88e734df6f5a5e091bc168282fdaaf7a9cc5 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -36,6 +36,7 @@ class Bzip2(Package): url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz" version('1.0.6', '00b516f4704d4a7cb50a1d97e6e8e15b') + variant('shared', default=True, description='Enables the build of shared libraries.') def patch(self): # bzip2 comes with two separate Makefiles for static and dynamic builds @@ -71,27 +72,30 @@ def patch(self): def install(self, spec, prefix): # Build the dynamic library first - make('-f', 'Makefile-libbz2_so') + if '+shared' in spec: + make('-f', 'Makefile-libbz2_so') + # Build the static library and everything else make() make('install', 'PREFIX={0}'.format(prefix)) - install('bzip2-shared', join_path(prefix.bin, 'bzip2')) + if '+shared' in spec: + install('bzip2-shared', join_path(prefix.bin, 'bzip2')) - v1, v2, v3 = (self.spec.version.up_to(i) for i in (1, 2, 3)) - if 'darwin' in self.spec.architecture: - lib = 'libbz2.dylib' - lib1, lib2, lib3 = ('libbz2.{0}.dylib'.format(v) - for v in (v1, v2, v3)) - else: - lib = 'libbz2.so' - lib1, lib2, lib3 = ('libbz2.so.{0}'.format(v) - for v in (v1, v2, v3)) + v1, v2, v3 = (self.spec.version.up_to(i) for i in (1, 2, 3)) + if 'darwin' in self.spec.architecture: + lib = 'libbz2.dylib' + lib1, lib2, lib3 = ('libbz2.{0}.dylib'.format(v) + for v in (v1, v2, v3)) + else: + lib = 'libbz2.so' + lib1, lib2, lib3 = ('libbz2.so.{0}'.format(v) + for v in (v1, v2, v3)) - install(lib3, join_path(prefix.lib, lib3)) - with working_dir(prefix.lib): - for l in (lib, lib1, lib2): - symlink(lib3, l) + install(lib3, join_path(prefix.lib, lib3)) + with working_dir(prefix.lib): + for l in (lib, lib1, lib2): + symlink(lib3, l) with working_dir(prefix.bin): force_remove('bunzip2', 'bzcat') diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py index 4ebf3811a5841b8524db36a335a68fb702cef9a7..8bb0e295afb86def7f0d3d099a3d1359ceafe394 100644 --- a/var/spack/repos/builtin/packages/c-blosc/package.py +++ b/var/spack/repos/builtin/packages/c-blosc/package.py @@ -31,20 +31,24 @@ class CBlosc(Package): """Blosc, an extremely fast, multi-threaded, meta-compressor library""" homepage = "http://www.blosc.org" - url = "https://github.com/Blosc/c-blosc/archive/v1.9.2.tar.gz" + url = "https://github.com/Blosc/c-blosc/archive/v1.11.1.tar.gz" - version('1.9.2', 'dd2d83069d74b36b8093f1c6b49defc5') - version('1.9.1', '7d708d3daadfacf984a87b71b1734ce2') - version('1.9.0', 'e4c1dc8e2c468e5cfa2bf05eeee5357a') - version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05') - version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f') + version('1.11.1', 'e236550640afa50155f3881f2d300206') + version('1.9.2', 'dd2d83069d74b36b8093f1c6b49defc5') + version('1.9.1', '7d708d3daadfacf984a87b71b1734ce2') + version('1.9.0', 'e4c1dc8e2c468e5cfa2bf05eeee5357a') + version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05') + version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f') + + variant('avx2', default=True, description='Enable AVX2 support') depends_on("cmake", type='build') depends_on("snappy") depends_on("zlib") def install(self, spec, prefix): - cmake('.', *std_cmake_args) + avx2 = '-DDEACTIVATE_AVX2=%s' % ('ON' if '~avx2' in spec else 'OFF') + cmake('.', avx2, *std_cmake_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/catch/package.py b/var/spack/repos/builtin/packages/catch/package.py index 8d2b0a1b2431295f6b56f23c8cb7fbce951f6a6f..880d0f88b57c85de9f74c8d155f7f7648aad7f28 100644 --- a/var/spack/repos/builtin/packages/catch/package.py +++ b/var/spack/repos/builtin/packages/catch/package.py @@ -31,6 +31,13 @@ class Catch(Package): homepage = "https://github.com/philsquared/Catch" url = "https://github.com/philsquared/Catch/archive/v1.3.0.tar.gz" + version('1.7.0', 'fe39f5b3eb07a5dd0e3f84a1335ceca7de8982e6') + version('1.6.1', '7d46961a3131655b986123f8a1f439a04a0af623') + version('1.6.0', '890a3b21085d796e13c3bfaf4b6c6f1d06e4a52e') + version('1.5.9', '8bc32146a5a2789cd3d3ce2893772e32f412f1b1') + version('1.5.0', 'c87397846ea5126febd39f513b413e32f9ed552b') + version('1.4.0', 'c165406968fbfb46949885da571cd528c62c4d9a') + version('1.3.5', '31553ba6e4bd0cc61e0507d6754847e354699284') version('1.3.0', 'e13694aaff72817d02af8ed27d077cd261b6e857') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/cdd/package.py b/var/spack/repos/builtin/packages/cdd/package.py index 4a0a0aefef751a84852229bd8d8e83083652b2b6..96414bc54b69560fe803cc15973d7e60f70939f9 100644 --- a/var/spack/repos/builtin/packages/cdd/package.py +++ b/var/spack/repos/builtin/packages/cdd/package.py @@ -33,7 +33,7 @@ class Cdd(Package): a general convex polyhedron given by a system of linear inequalities""" homepage = "https://www.inf.ethz.ch/personal/fukudak/cdd_home/cdd.html" - url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-061a.tar.gz" + url = "http://www.cs.mcgill.ca/~fukuda/download/cdd/cdd-061a.tar.gz" version('0.61a', '22c24a7a9349dd7ec0e24531925a02d9') @@ -42,7 +42,7 @@ class Cdd(Package): patch("Makefile.spack.patch") def url_for_version(self, version): - url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-{0}.tar.gz" + url = "http://www.cs.mcgill.ca/~fukuda/download/cdd/cdd-{0}.tar.gz" return url.format(version.joined) def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/cddlib/package.py b/var/spack/repos/builtin/packages/cddlib/package.py index ced5f46d1f417d6fe9723a0b0abe1f36de35af2a..50dc5ad472446c5f20ad1a0d952a1861514b8dd7 100644 --- a/var/spack/repos/builtin/packages/cddlib/package.py +++ b/var/spack/repos/builtin/packages/cddlib/package.py @@ -26,7 +26,7 @@ from spack import * -class Cddlib(Package): +class Cddlib(AutotoolsPackage): """The C-library cddlib is a C implementation of the Double Description Method of Motzkin et al. for generating all vertices (i.e. extreme points) and extreme rays of a general convex polyhedron in R^d given by a system @@ -51,8 +51,3 @@ def url_for_version(self, version): depends_on("gmp") depends_on("libtool", type="build") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py index 79af31ae216cb947fc94ff5dd36558e8a984fbd6..811b3ca9bc7bfac37c34a59174364f1fac8ad977 100644 --- a/var/spack/repos/builtin/packages/cfitsio/package.py +++ b/var/spack/repos/builtin/packages/cfitsio/package.py @@ -25,20 +25,38 @@ from spack import * -class Cfitsio(Package): +class Cfitsio(AutotoolsPackage): """CFITSIO is a library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format. """ homepage = 'http://heasarc.gsfc.nasa.gov/fitsio/' + version('3.410', '8a4a66fcdd816aae41768baa0b025552') version('3.370', 'abebd2d02ba5b0503c633581e3bfa116') + variant('bzip2', default=True, description='Enable bzip2 support') + variant('shared', default=True, description='Build shared libraries') + + depends_on('bzip2', when='+bzip2') + def url_for_version(self, version): - url = 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio{0}.tar.gz' + url = 'http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio{0}.tar.gz' return url.format(version.joined) - def install(self, spec, prefix): - configure('--prefix=' + prefix) - make() - make('install') + def configure_args(self): + spec = self.spec + extra_args = [] + if '+bzip2' in spec: + extra_args.append('--with-bzip2=%s' % spec['bzip2'].prefix), + return extra_args + + @property + def build_targets(self): + targets = ['all'] + + # Build shared if variant is set. + if '+shared' in self.spec: + targets += ['shared'] + + return targets diff --git a/var/spack/repos/builtin/packages/cityhash/package.py b/var/spack/repos/builtin/packages/cityhash/package.py index 85d948cc57a278bc971c820226e8fe6ac20b0f11..b98f39a33609c23565ca6dabb50536fd8ae8c3a0 100644 --- a/var/spack/repos/builtin/packages/cityhash/package.py +++ b/var/spack/repos/builtin/packages/cityhash/package.py @@ -23,10 +23,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -from spack.util.environment import * -class Cityhash(Package): +class Cityhash(AutotoolsPackage): """CityHash, a family of hash functions for strings.""" homepage = "https://github.com/google/cityhash" @@ -37,8 +36,5 @@ class Cityhash(Package): version('master', branch='master', git='https://github.com/google/cityhash.git') - def install(self, spec, prefix): - configure('--enable-sse4.2', '--prefix=%s' % prefix) - - make() - make("install") + def configure_args(self): + return ['--enable-sse4.2'] diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 60c95b918420b840a1da36655a7afdbf18fa63e0..4ff9615016b59b3d22a3887452e82ec365099d92 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -33,6 +33,7 @@ class Cmake(Package): list_url = 'https://cmake.org/files/' list_depth = 2 + version('3.7.2', '79bd7e65cd81ea3aa2619484ad6ff25a') version('3.7.1', 'd031d5a06e9f1c5367cdfc56fbd2a1c8') version('3.6.1', 'd6dd661380adacdb12f41b926ec99545') version('3.6.0', 'aa40fbecf49d99c083415c2411d12db9') @@ -62,7 +63,8 @@ class Cmake(Package): depends_on('qt', when='+qt') depends_on('python@2.7.11:', when='+doc', type='build') depends_on('py-sphinx', when='+doc', type='build') - depends_on('openssl', when='+openssl') + depends_on("openssl", when='+openssl') + depends_on("openssl@:1.0.99", when='@:3.6.9+openssl') depends_on('ncurses', when='+ncurses') # Cannot build with Intel, should be fixed in 3.6.2 diff --git a/var/spack/repos/builtin/packages/cmor/package.py b/var/spack/repos/builtin/packages/cmor/package.py index b5debf953772d3b673073131f56bbc77d35b5a0f..bb4f3b4df2295e721f1ff8d98d7d3d4b098f76bc 100644 --- a/var/spack/repos/builtin/packages/cmor/package.py +++ b/var/spack/repos/builtin/packages/cmor/package.py @@ -49,7 +49,7 @@ class Cmor(AutotoolsPackage): depends_on('python@:2.7', when='+python') depends_on('py-numpy', type=('build', 'run'), when='+python') - @AutotoolsPackage.precondition('configure') + @run_before('configure') def validate(self): if '+fortran' in self.spec and not self.compiler.fc: msg = 'cannot build a fortran variant without a fortran compiler' diff --git a/var/spack/repos/builtin/packages/compiz/package.py b/var/spack/repos/builtin/packages/compiz/package.py index ec21f5b4f2f91d27416e427f18d5945124f7344f..92820db10df876b2b0f23a8c4f9837f03ec29671 100644 --- a/var/spack/repos/builtin/packages/compiz/package.py +++ b/var/spack/repos/builtin/packages/compiz/package.py @@ -25,7 +25,7 @@ from spack import * -class Compiz(Package): +class Compiz(AutotoolsPackage): """compiz - OpenGL window and compositing manager. Compiz is an OpenGL compositing manager that use @@ -55,9 +55,3 @@ class Compiz(Package): depends_on('libpng') depends_on('glib') depends_on('gconf') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/compositeproto/package.py b/var/spack/repos/builtin/packages/compositeproto/package.py index 1b3fbda0af4ef6f5f54730505f071bdefc88066d..3d445bd7e8c3e2941d3660923a33354fabbf02a7 100644 --- a/var/spack/repos/builtin/packages/compositeproto/package.py +++ b/var/spack/repos/builtin/packages/compositeproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Compositeproto(Package): +class Compositeproto(AutotoolsPackage): """Composite Extension. This package contains header files and documentation for the composite @@ -38,8 +38,3 @@ class Compositeproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/constype/package.py b/var/spack/repos/builtin/packages/constype/package.py index dcf88fdd55c0da000386c69a0438da8cc063fed8..3a62e89727247db81fea746b0a6c48eab9c14c70 100644 --- a/var/spack/repos/builtin/packages/constype/package.py +++ b/var/spack/repos/builtin/packages/constype/package.py @@ -25,7 +25,7 @@ from spack import * -class Constype(Package): +class Constype(AutotoolsPackage): """constype prints on the standard output the Sun code for the type of display that the specified device is. @@ -39,9 +39,3 @@ class Constype(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py index 94cfa1134104ed6ce03cbd6b03325f1152c5423c..a3c77dda9ce1ddb2f187aecf0128b7f47721806d 100644 --- a/var/spack/repos/builtin/packages/coreutils/package.py +++ b/var/spack/repos/builtin/packages/coreutils/package.py @@ -25,7 +25,7 @@ from spack import * -class Coreutils(Package): +class Coreutils(AutotoolsPackage): """The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every @@ -35,8 +35,3 @@ class Coreutils(Package): url = "http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz" version('8.23', 'abed135279f87ad6762ce57ff6d89c41') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index ed8518f98fe91dabee320bd6cbb04837e557c353..f01cf9c73028af7064094f2d6393abde8a563ead 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -51,14 +51,14 @@ class Cuda(Package): homepage = "http://www.nvidia.com/object/cuda_home_new.html" version('8.0.44', '6dca912f9b7e2b7569b0074a41713640', expand=False, - url="file://%s/cuda_8.0.44_linux.run" % os.getcwd()) + url="https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_linux-run") version('7.5.18', '4b3bcecf0dfc35928a0898793cf3e4c6', expand=False, - url="file://%s/cuda_7.5.18_linux.run" % os.getcwd()) + url="http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run") version('6.5.14', '90b1b8f77313600cc294d9271741f4da', expand=False, - url="file://%s/cuda_6.5.14_linux_64.run" % os.getcwd()) + url="http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run") def install(self, spec, prefix): - runfile = glob(os.path.join(self.stage.path, 'cuda*.run'))[0] + runfile = glob(os.path.join(self.stage.path, 'cuda*run'))[0] chmod = which('chmod') chmod('+x', runfile) runfile = which(runfile) diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index a22ac5271417cf3360f60552624ecfa8f52faf0a..46d3ccc23bf999298d02f885bb88804a63711533 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -32,6 +32,7 @@ class Curl(Package): homepage = "http://curl.haxx.se" url = "http://curl.haxx.se/download/curl-7.46.0.tar.bz2" + version('7.52.1', 'dd014df06ff1d12e173de86873f9f77a') version('7.50.3', 'bd177fd6deecce00cfa7b5916d831c5e') version('7.50.2', '6e161179f7af4b9f8b6ea21420132719') version('7.50.1', '015f6a0217ca6f2c5442ca406476920b') diff --git a/var/spack/repos/builtin/packages/czmq/package.py b/var/spack/repos/builtin/packages/czmq/package.py index ef6374619bc9d96b0086483088fc9666efca2395..fd50197326dabc78e61542e90f0991c719224997 100644 --- a/var/spack/repos/builtin/packages/czmq/package.py +++ b/var/spack/repos/builtin/packages/czmq/package.py @@ -23,10 +23,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os -class Czmq(Package): +class Czmq(AutotoolsPackage): """ A C interface to the ZMQ library """ homepage = "http://czmq.zeromq.org" url = "https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz" @@ -39,23 +38,3 @@ class Czmq(Package): depends_on('autoconf', type='build') depends_on('pkg-config', type='build') depends_on('zeromq') - - def install(self, spec, prefix): - # Work around autogen.sh oddities - # bash = which("bash") - # bash("./autogen.sh") - mkdirp("config") - autoreconf = which("autoreconf") - autoreconf("--install", "--verbose", "--force", - "-I", "config", - "-I", os.path.join(spec['pkg-config'].prefix, - "share", "aclocal"), - "-I", os.path.join(spec['automake'].prefix, - "share", "aclocal"), - "-I", os.path.join(spec['libtool'].prefix, - "share", "aclocal"), - ) - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/damageproto/package.py b/var/spack/repos/builtin/packages/damageproto/package.py index 84e0fac3110d81cc16275e8ca60ef131d8507865..22eeeeddcb872592b1b641b47910385cecb86afa 100644 --- a/var/spack/repos/builtin/packages/damageproto/package.py +++ b/var/spack/repos/builtin/packages/damageproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Damageproto(Package): +class Damageproto(AutotoolsPackage): """X Damage Extension. This package contains header files and documentation for the X Damage @@ -38,8 +38,3 @@ class Damageproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/darshan-runtime/package.py b/var/spack/repos/builtin/packages/darshan-runtime/package.py index a03137438199cd26743bd8f7e6748e6654602ddd..93b2744e194106f6b5d4e507e382f592692e0b11 100644 --- a/var/spack/repos/builtin/packages/darshan-runtime/package.py +++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py @@ -34,7 +34,7 @@ class DarshanRuntime(Package): systems where you intend to instrument MPI applications.""" homepage = "http://www.mcs.anl.gov/research/projects/darshan/" - url = "ftp://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz" + url = "http://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz" version('3.1.0', '439d717323e6265b2612ed127886ae52') version('3.0.0', '732577fe94238936268d74d7d74ebd08') diff --git a/var/spack/repos/builtin/packages/darshan-util/package.py b/var/spack/repos/builtin/packages/darshan-util/package.py index 47b0497ca8fe020e8bf6ea32bc437af71acf5843..2a970fa95f7f1ffcc95e017f7b92105d8c9c1751 100644 --- a/var/spack/repos/builtin/packages/darshan-util/package.py +++ b/var/spack/repos/builtin/packages/darshan-util/package.py @@ -32,7 +32,7 @@ class DarshanUtil(Package): log files produced by Darshan (runtime).""" homepage = "http://www.mcs.anl.gov/research/projects/darshan/" - url = "ftp://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz" + url = "http://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz" version('3.1.0', '439d717323e6265b2612ed127886ae52') version('3.0.0', '732577fe94238936268d74d7d74ebd08') diff --git a/var/spack/repos/builtin/packages/datamash/package.py b/var/spack/repos/builtin/packages/datamash/package.py index 85adeca996e60c49d7252974d3e23e9e0c8732ae..4cf7d24ef18ddcfadd1576d719cb2b438df9ac77 100644 --- a/var/spack/repos/builtin/packages/datamash/package.py +++ b/var/spack/repos/builtin/packages/datamash/package.py @@ -25,7 +25,7 @@ from spack import * -class Datamash(Package): +class Datamash(AutotoolsPackage): """GNU datamash is a command-line program which performs basic numeric, textual and statistical operations on input textual data files. """ @@ -37,8 +37,3 @@ class Datamash(Package): version('1.0.7', '9f317bab07454032ba9c068e7f17b04b') version('1.0.6', 'ff26fdef0f343cb695cf1853e14a1a5b') version('1.0.5', '9a29549dc7feca49fdc5fab696614e11') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 66267b2d9a7c1277245fe677a1ab1791dacf7ac1..ca26edfb4001ed5f09053ae20175222395a6fb61 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -115,11 +115,19 @@ class Dealii(CMakePackage): depends_on("slepc@:3.6.3", when='@:8.4.1+slepc+petsc+mpi~int64') depends_on("trilinos", when='+trilinos+mpi') + # check that the combination of variants makes sense + def variants_check(self): + for p in ['+arpack', '+hdf5', '+netcdf', '+p4est', '+petsc', + '+slepc', '+trilinos']: + if p in self.spec and '+mpi' not in self.spec: + raise RuntimeError('The ' + p + ' variant requires +mpi') + def build_type(self): # CMAKE_BUILD_TYPE should be DebugRelease | Debug | Release return 'DebugRelease' def cmake_args(self): + self.variants_check() spec = self.spec options = [] @@ -192,7 +200,7 @@ def cmake_args(self): ]) # arpack - if '+arpack' in spec: + if '+arpack' in spec and '+mpi' in spec: options.extend([ '-DARPACK_DIR=%s' % spec['arpack-ng'].prefix, '-DDEAL_II_WITH_ARPACK=ON', @@ -204,7 +212,7 @@ def cmake_args(self): ]) # since Netcdf is spread among two, need to do it by hand: - if '+netcdf' in spec: + if '+netcdf' in spec and '+mpi' in spec: # take care of lib64 vs lib installed lib locations: if os.path.isdir(spec['netcdf-cxx'].prefix.lib): netcdfcxx_lib_dir = spec['netcdf-cxx'].prefix.lib diff --git a/var/spack/repos/builtin/packages/dmxproto/package.py b/var/spack/repos/builtin/packages/dmxproto/package.py index 34213bba5f55e3d53f8c5790a79758e43681a8c8..7aa025119111bdddd27c1d7dc9fb0af9f180aff8 100644 --- a/var/spack/repos/builtin/packages/dmxproto/package.py +++ b/var/spack/repos/builtin/packages/dmxproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Dmxproto(Package): +class Dmxproto(AutotoolsPackage): """Distributed Multihead X (DMX) Extension. This extension defines a protocol for clients to access a front-end proxy @@ -39,8 +39,3 @@ class Dmxproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/dri2proto/package.py b/var/spack/repos/builtin/packages/dri2proto/package.py index d05e7ea2316512d76f6e2fb6696407d93b9a1f0a..4c906013b4af67c4af7bb999531fe07183683ffc 100644 --- a/var/spack/repos/builtin/packages/dri2proto/package.py +++ b/var/spack/repos/builtin/packages/dri2proto/package.py @@ -25,7 +25,7 @@ from spack import * -class Dri2proto(Package): +class Dri2proto(AutotoolsPackage): """Direct Rendering Infrastructure 2 Extension. This extension defines a protocol to securely allow user applications to @@ -39,8 +39,3 @@ class Dri2proto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/dri3proto/package.py b/var/spack/repos/builtin/packages/dri3proto/package.py index cd2594d5da6b48404aefe5e0c0a0b62cf2985ea5..be8b521aae8c97a6c54c0a7a46c9ea0a49febc2e 100644 --- a/var/spack/repos/builtin/packages/dri3proto/package.py +++ b/var/spack/repos/builtin/packages/dri3proto/package.py @@ -25,7 +25,7 @@ from spack import * -class Dri3proto(Package): +class Dri3proto(AutotoolsPackage): """Direct Rendering Infrastructure 3 Extension. This extension defines a protocol to securely allow user applications to @@ -39,8 +39,3 @@ class Dri3proto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/editres/package.py b/var/spack/repos/builtin/packages/editres/package.py index 52ad33b1334d482a32be77ab5afca931a7ba36dc..d1823ec6fdf7dbf35f461a604ad1a88602ceaffa 100644 --- a/var/spack/repos/builtin/packages/editres/package.py +++ b/var/spack/repos/builtin/packages/editres/package.py @@ -25,7 +25,7 @@ from spack import * -class Editres(Package): +class Editres(AutotoolsPackage): """Dynamic resource editor for X Toolkit applications.""" homepage = "http://cgit.freedesktop.org/xorg/app/editres" @@ -40,9 +40,3 @@ class Editres(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/elemental/package.py b/var/spack/repos/builtin/packages/elemental/package.py new file mode 100644 index 0000000000000000000000000000000000000000..625f0a1e3eb1a2d96e4359e5cc62b581d9937653 --- /dev/null +++ b/var/spack/repos/builtin/packages/elemental/package.py @@ -0,0 +1,136 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Elemental(CMakePackage): + """Elemental: Distributed-memory dense and sparse-direct linear algebra + and optimization library.""" + + homepage = "http://libelemental.org" + url = "https://github.com/elemental/Elemental/archive/v0.87.6.tar.gz" + + version('0.87.6', '9fd29783d45b0a0e27c0df85f548abe9') + + variant('debug', default=False, + description='Builds a debug version of the libraries') + variant('shared', default=True, + description='Enables the build of shared libraries') + variant('hybrid', default=True, + description='Make use of OpenMP within MPI packing/unpacking') + variant('openmp_blas', default=False, + description='Use OpenMP for threading in the BLAS library') + variant('c', default=False, + description='Build C interface') + variant('python', default=False, + description='Install Python interface') + variant('parmetis', default=False, + description='Enable ParMETIS') + variant('quad', default=False, + description='Enable quad precision') + variant('int64', default=False, + description='Use 64bit integers') + # When this variant is set remove the normal dependencies since + # Elemental has to build BLAS and ScaLAPACK internally + variant('int64_blas', default=False, + description='Use 64bit integers for BLAS.' + ' Requires local build of BLAS library.') + variant('scalapack', default=False, + description='Build with ScaLAPACK library') + + depends_on('cmake', type='build') + # Note that this forces us to use OpenBLAS until #1712 is fixed + depends_on('blas', when='~openmp_blas ~int64_blas') + # Hack to forward variant to openblas package + # Allow Elemental to build internally when using 8-byte ints + depends_on('openblas +openmp', when='+openmp_blas ~int64_blas') + # Note that this forces us to use OpenBLAS until #1712 is fixed + depends_on('lapack', when='~openmp_blas') + depends_on('metis') + depends_on('metis +int64', when='+int64') + depends_on('mpi') + # Allow Elemental to build internally when using 8-byte ints + depends_on('scalapack', when='+scalapack ~int64_blas') + extends('python', when='+python') + depends_on('python@:2.8', when='+python') + + @property + def elemental_libs(self): + shared = True if '+shared' in self.spec else False + return find_libraries( + ['libEl'], root=self.prefix, shared=shared, recurse=True + ) + + def build_type(self): + """Returns the correct value for the ``CMAKE_BUILD_TYPE`` variable + :return: value for ``CMAKE_BUILD_TYPE`` + """ + if '+debug' in self.spec: + return 'Debug' + else: + return 'Release' + + def cmake_args(self): + spec = self.spec + args = [ + '-DCMAKE_INSTALL_MESSAGE:STRING=LAZY', + '-DEL_PREFER_OPENBLAS:BOOL=TRUE', + '-DEL_DISABLE_SCALAPACK:BOOL=%s' % ('~scalapack' in spec), + '-DGFORTRAN_LIB=libgfortran.so', + '-DBUILD_SHARED_LIBS:BOOL=%s' % ('+shared' in spec), + '-DEL_HYBRID:BOOL=%s' % ('+hybrid' in spec), + '-DEL_C_INTERFACE:BOOL=%s' % ('+c' in spec), + '-DINSTALL_PYTHON_PACKAGE:BOOL=%s' % ('+python' in spec), + '-DEL_DISABLE_PARMETIS:BOOL=%s' % ('~parmetis' in spec), + '-DEL_DISABLE_QUAD:BOOL=%s' % ('~quad' in spec), + '-DEL_USE_64BIT_INTS:BOOL=%s' % ('+int64' in spec), + '-DEL_USE_64BIT_BLAS_INTS:BOOL=%s' % ('+int64_blas' in spec)] + + # If using 64bit int BLAS libraries, elemental has to build + # them internally + if '+int64_blas' in spec: + args.extend(['-DEL_BLAS_SUFFIX:STRING={0}'.format(( + '_64_' if '+int64_blas' in spec else '_')), + '-DCUSTOM_BLAS_SUFFIX:BOOL=TRUE']), + if '+scalapack' in spec: + args.extend(['-DEL_LAPACK_SUFFIX:STRING={0}'.format(( + '_64_' if '+int64_blas' in spec else '_')), + '-DCUSTOM_LAPACK_SUFFIX:BOOL=TRUE']), + else: + math_libs = (spec['lapack'].lapack_libs + + spec['blas'].blas_libs) + + if '+scalapack' in spec: + math_libs = spec['scalapack'].scalapack_libs + math_libs + + args.extend([ + '-DMATH_LIBS:STRING={0}'.format(math_libs.search_flags), + '-DMATH_LIBS:STRING={0}'.format(math_libs.link_flags)]) + + if '+python' in spec: + args.extend([ + '-DPYTHON_SITE_PACKAGES:STRING={0}'.format(site_packages_dir)]) + + return args diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index ef8c2433c95e2aef7f8efb827c8efc2383e089b9..4a91c7db304bb4ed6728dc5ffe7f3fe7c0ec6794 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -25,7 +25,7 @@ from spack import * -class Elfutils(Package): +class Elfutils(AutotoolsPackage): """elfutils is a collection of various binary tools such as eu-objdump, eu-readelf, and other utilities that allow you to inspect and manipulate ELF files. Refer to Table 5.Tools Included @@ -35,16 +35,15 @@ class Elfutils(Package): homepage = "https://fedorahosted.org/elfutils/" + depends_on('libtool', type='build') + depends_on('automake', type='build') + depends_on('autoconf', type='build') + version('0.163', git='git://git.fedorahosted.org/git/elfutils.git', tag='elfutils-0.163') provides('elf') - def install(self, spec, prefix): - autoreconf = which('autoreconf') - autoreconf('-if') - - configure('--prefix=%s' % prefix, '--enable-maintainer-mode') - make() - make("install") + def configure_args(self): + return ['--enable-maintainer-mode'] diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index 1f9caee24c2119a366d75d8fa722da20484dd903..990ffd03cd7b4f440b9222bd3bdc06cb65d95528 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -25,7 +25,7 @@ from spack import * -class Emacs(Package): +class Emacs(AutotoolsPackage): """The Emacs programmable text editor.""" homepage = "https://www.gnu.org/software/emacs" @@ -47,7 +47,8 @@ class Emacs(Package): depends_on('libxaw', when='+X toolkit=athena') depends_on('gtkplus+X', when='+X toolkit=gtk') - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec args = [] toolkit = spec.variants['toolkit'].value if '+X' in spec: @@ -61,7 +62,4 @@ def install(self, spec, prefix): else: args = ['--without-x'] - configure('--prefix={0}'.format(prefix), *args) - - make() - make("install") + return args diff --git a/var/spack/repos/builtin/packages/es/package.py b/var/spack/repos/builtin/packages/es/package.py new file mode 100644 index 0000000000000000000000000000000000000000..80891b66006a2cc4a59f91ebcbae7b2307e55528 --- /dev/null +++ b/var/spack/repos/builtin/packages/es/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Es(AutotoolsPackage): + + """Es is an extensible shell. The language was derived from the Plan 9 + shell, rc, and was influenced by functional programming languages, + such as Scheme, and the Tcl embeddable programming language. This + implementation is derived from Byron Rakitzis's public domain + implementation of rc.""" + + homepage = "http://wryun.github.io/es-shell/" + url = "https://github.com/wryun/es-shell/releases/download/v0.9.1/es-0.9.1.tar.gz" + + version('0.9.1', 'bf4db55b47bcc99892468b2e0aec0c9e') diff --git a/var/spack/repos/builtin/packages/evieext/package.py b/var/spack/repos/builtin/packages/evieext/package.py index afc0245f506c5d8422331a04a63314e845c3ac12..8814ae31c00d6188621bd33526c63c610d24f9f2 100644 --- a/var/spack/repos/builtin/packages/evieext/package.py +++ b/var/spack/repos/builtin/packages/evieext/package.py @@ -25,7 +25,7 @@ from spack import * -class Evieext(Package): +class Evieext(AutotoolsPackage): """Extended Visual Information Extension (XEVIE). This extension defines a protocol for a client to determine information @@ -38,8 +38,3 @@ class Evieext(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/exuberant-ctags/package.py b/var/spack/repos/builtin/packages/exuberant-ctags/package.py index 10be30ab8bf2701d08f202b43897583aa41df812..5d1c1eafc6a29b46b4ccc6fed6323ac89b4cfc82 100644 --- a/var/spack/repos/builtin/packages/exuberant-ctags/package.py +++ b/var/spack/repos/builtin/packages/exuberant-ctags/package.py @@ -25,15 +25,9 @@ from spack import * -class ExuberantCtags(Package): +class ExuberantCtags(AutotoolsPackage): """The canonical ctags generator""" homepage = "ctags.sourceforge.net" url = "http://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz" version('5.8', 'c00f82ecdcc357434731913e5b48630d') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/fastx-toolkit/package.py b/var/spack/repos/builtin/packages/fastx-toolkit/package.py index 04b4d24b39c78d5ce63aa2cd84d286bdff9bf4d7..fed54b9b366847ac25a9f84bf1b51c3f1aaffd19 100644 --- a/var/spack/repos/builtin/packages/fastx-toolkit/package.py +++ b/var/spack/repos/builtin/packages/fastx-toolkit/package.py @@ -25,7 +25,7 @@ from spack import * -class FastxToolkit(Package): +class FastxToolkit(AutotoolsPackage): """The FASTX-Toolkit is a collection of command line tools for Short-Reads FASTA/FASTQ files preprocessing.""" @@ -35,9 +35,3 @@ class FastxToolkit(Package): version('0.0.14', 'bf1993c898626bb147de3d6695c20b40') depends_on('libgtextutils') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 838f6ff74441ad3f185762effb9aa57863b2d096..e35a1c92c333b2741f889ca2bb47fb5d7e041f5d 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -38,6 +38,7 @@ class Fftw(Package): version('3.3.5', '6cc08a3b9c7ee06fdd5b9eb02e06f569') version('3.3.4', '2edab8c06b24feeb3b82bbb3ebf3e7b3') + version('2.1.5', '8d16a84f3ca02a785ef9eb36249ba433') patch('pfft-3.3.5.patch', when="@3.3.5+pfft_patches", level=0) patch('pfft-3.3.4.patch', when="@3.3.4+pfft_patches", level=0) @@ -62,17 +63,19 @@ class Fftw(Package): depends_on('automake', type='build', when='+pfft_patches') depends_on('autoconf', type='build', when='+pfft_patches') - # TODO : add support for architecture specific optimizations as soon as - # targets are supported - def install(self, spec, prefix): + # Base options options = [ '--prefix={0}'.format(prefix), '--enable-shared', '--enable-threads' ] + if not self.compiler.f77 or not self.compiler.fc: + options.append("--disable-fortran") + if spec.satisfies('@:2'): + options.append('--enable-type-prefix') - # Add support for OpenMP + # Variants that affect every precision if '+openmp' in spec: # Note: Apple's Clang does not support OpenMP. if spec.satisfies('%clang'): @@ -80,34 +83,45 @@ def install(self, spec, prefix): if ver.endswith('-apple'): raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') - if not self.compiler.f77 or not self.compiler.fc: - options.append("--disable-fortran") + if spec.satisfies('@:2'): + # TODO: libtool strips CFLAGS, so 2.x libxfftw_threads + # isn't linked to the openmp library. Patch Makefile? + options.insert(0, 'CFLAGS=' + self.compiler.openmp_flag) if '+mpi' in spec: options.append('--enable-mpi') - if '+pfft_patches' in spec: autoreconf = which('autoreconf') autoreconf('-ifv') - configure(*options) + # SIMD support + # TODO: add support for more architectures + float_options = [] + double_options = [] + if 'x86_64' in spec.architecture and spec.satisfies('@3:'): + float_options.append('--enable-sse2') + double_options.append('--enable-sse2') + + # Build double precision + configure(*(options + double_options)) make() if self.run_tests: make("check") make("install") + # Build float/long double/quad variants if '+float' in spec: - configure('--enable-float', *options) + configure('--enable-float', *(options + float_options)) make() if self.run_tests: make("check") make("install") - if '+long_double' in spec: + if spec.satisfies('@3:+long_double'): configure('--enable-long-double', *options) make() if self.run_tests: make("check") make("install") - if '+quad' in spec: + if spec.satisfies('@3:+quad'): configure('--enable-quad-precision', *options) make() if self.run_tests: diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py index fb784b7571a6c4dc56ba12cbe211a7ab4d91fa57..f0dfac70c83d488a98b2f529e7467992bf4efb91 100644 --- a/var/spack/repos/builtin/packages/fish/package.py +++ b/var/spack/repos/builtin/packages/fish/package.py @@ -25,7 +25,7 @@ from spack import * -class Fish(Package): +class Fish(AutotoolsPackage): """fish is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family. """ @@ -35,9 +35,3 @@ class Fish(Package): list_url = "http://fishshell.com/" version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/fixesproto/package.py b/var/spack/repos/builtin/packages/fixesproto/package.py index 64852b40e2939e94bd124c798c471a9566e9064a..934848727fbcb0bee06f1bfd2a6cd9a9e299e45f 100644 --- a/var/spack/repos/builtin/packages/fixesproto/package.py +++ b/var/spack/repos/builtin/packages/fixesproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Fixesproto(Package): +class Fixesproto(AutotoolsPackage): """X Fixes Extension. The extension makes changes to many areas of the protocol to resolve @@ -39,8 +39,3 @@ class Fixesproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index 23b3c8b21a88ff4c0d11a6c073c002f44acd6c12..8f0c46bc56e79f1c7abf8badc401f33e02f4ca39 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -31,6 +31,7 @@ class Flex(AutotoolsPackage): homepage = "https://github.com/westes/flex" url = "https://github.com/westes/flex/releases/download/v2.6.1/flex-2.6.1.tar.gz" + version('2.6.3', 'a5f65570cd9107ec8a8ec88f17b31bb1') # Problematic version: # See issue #2554; https://github.com/westes/flex/issues/113 # version('2.6.2', 'cc6d76c333db7653d5caf423a3335239') @@ -43,7 +44,7 @@ class Flex(AutotoolsPackage): depends_on('help2man', type='build') # Older tarballs don't come with a configure script - depends_on('m4', type='build', when='@:2.6.0') + depends_on('m4', type='build') depends_on('autoconf', type='build', when='@:2.6.0') depends_on('automake', type='build', when='@:2.6.0') depends_on('libtool', type='build', when='@:2.6.0') @@ -60,11 +61,3 @@ def url_for_version(self, version): url += "/archive/flex-{0}.tar.gz".format(version.dashed) return url - - def autoreconf(self, spec, prefix): - pass - - @when('@:2.6.0') - def autoreconf(self, spec, prefix): - libtoolize('--install', '--force') - autoreconf('--install', '--force') diff --git a/var/spack/repos/builtin/packages/font-util/package.py b/var/spack/repos/builtin/packages/font-util/package.py index 0b310117c673a3abcf51c3e84adedd452c726cf2..03a466d00aa8cbe828ed2c54854f3331e40a42f5 100644 --- a/var/spack/repos/builtin/packages/font-util/package.py +++ b/var/spack/repos/builtin/packages/font-util/package.py @@ -25,7 +25,7 @@ from spack import * -class FontUtil(Package): +class FontUtil(AutotoolsPackage): """X.Org font package creation/installation utilities.""" homepage = "http://cgit.freedesktop.org/xorg/font/util" @@ -35,9 +35,3 @@ class FontUtil(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/fontcacheproto/package.py b/var/spack/repos/builtin/packages/fontcacheproto/package.py index 77feb8757384eaef05982f2667c12444d795bbf2..f793aba9cf1120131b2ba1d45d0fa1ff2e5e51c8 100644 --- a/var/spack/repos/builtin/packages/fontcacheproto/package.py +++ b/var/spack/repos/builtin/packages/fontcacheproto/package.py @@ -25,15 +25,10 @@ from spack import * -class Fontcacheproto(Package): +class Fontcacheproto(AutotoolsPackage): """X.org FontcacheProto protocol headers.""" homepage = "http://cgit.freedesktop.org/xorg/proto/fontcacheproto" url = "https://www.x.org/archive/individual/proto/fontcacheproto-0.1.3.tar.gz" version('0.1.3', '5a91ab914ffbfbc856e6fcde52e6f3e3') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/fontsproto/package.py b/var/spack/repos/builtin/packages/fontsproto/package.py index c3771e18fae9c3d8a4e85f9f8542a4d78be881a2..03e825c2f7523b52296eb071b2462a140879e7ce 100644 --- a/var/spack/repos/builtin/packages/fontsproto/package.py +++ b/var/spack/repos/builtin/packages/fontsproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Fontsproto(Package): +class Fontsproto(AutotoolsPackage): """X Fonts Extension.""" homepage = "http://cgit.freedesktop.org/xorg/proto/fontsproto" @@ -35,8 +35,3 @@ class Fontsproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/fonttosfnt/package.py b/var/spack/repos/builtin/packages/fonttosfnt/package.py index 016cab1ac86f9fc26f6695ec349b43fa6eb5070d..e8cc3a6f6f44fd430d5ed3244fb394ab7a60cbde 100644 --- a/var/spack/repos/builtin/packages/fonttosfnt/package.py +++ b/var/spack/repos/builtin/packages/fonttosfnt/package.py @@ -25,7 +25,7 @@ from spack import * -class Fonttosfnt(Package): +class Fonttosfnt(AutotoolsPackage): """Wrap a bitmap font in a sfnt (TrueType) wrapper.""" homepage = "http://cgit.freedesktop.org/xorg/app/fonttosfnt" @@ -39,9 +39,3 @@ class Fonttosfnt(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/fslsfonts/package.py b/var/spack/repos/builtin/packages/fslsfonts/package.py index 6e46bd6b5aa471441008836001f4da0cc969ea34..2becf5a346e0892464161effdc44e6eeed63a695 100644 --- a/var/spack/repos/builtin/packages/fslsfonts/package.py +++ b/var/spack/repos/builtin/packages/fslsfonts/package.py @@ -25,7 +25,7 @@ from spack import * -class Fslsfonts(Package): +class Fslsfonts(AutotoolsPackage): """fslsfonts produces a list of fonts served by an X font server.""" homepage = "http://cgit.freedesktop.org/xorg/app/fslsfonts" @@ -38,9 +38,3 @@ class Fslsfonts(Package): depends_on('xproto@7.0.25:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/fstobdf/package.py b/var/spack/repos/builtin/packages/fstobdf/package.py index 6358e33d2a761397edbe020f84f190d131d9fdce..7b2d433ef2a4752c22ca7f94162e6560db08a259 100644 --- a/var/spack/repos/builtin/packages/fstobdf/package.py +++ b/var/spack/repos/builtin/packages/fstobdf/package.py @@ -25,7 +25,7 @@ from spack import * -class Fstobdf(Package): +class Fstobdf(AutotoolsPackage): """The fstobdf program reads a font from a font server and prints a BDF file on the standard output that may be used to recreate the font. This is useful in testing servers, debugging font metrics, and @@ -42,9 +42,3 @@ class Fstobdf(Package): depends_on('xproto@7.0.25:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/gbenchmark/package.py b/var/spack/repos/builtin/packages/gbenchmark/package.py index 1c54f60243752ca470810c631ff6e833d2701fe8..a25ddd7a4da784fbc908b42f5be07e9de7c870c1 100644 --- a/var/spack/repos/builtin/packages/gbenchmark/package.py +++ b/var/spack/repos/builtin/packages/gbenchmark/package.py @@ -48,12 +48,3 @@ def patch(self): r'##### add_cxx_compiler_flag(-Werror', 'CMakeLists.txt' ) - - def cmake_args(self, spec, prefix): - if self.compiler.name == 'intel': - return [ - "-DCMAKE_CXX_FLAGS=-no-ansi-alias -fno-strict-aliasing", - "-DCMAKE_C_FLAGS=-no-ansi-alias -fno-strict-aliasing", - "-DBENCHMARK_ENABLE_TESTING=OFF" - ] - return [] diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 31da068d72d2442c9991d7056e1ae347ab20563b..a9fed4d8dd25059054fb87d22d7a990dec68ec1d 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -30,7 +30,7 @@ from os.path import isfile -class Gcc(Package): +class Gcc(AutotoolsPackage): """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, and Java.""" homepage = "https://gcc.gnu.org" @@ -85,7 +85,9 @@ class Gcc(Package): patch('piclibs.patch', when='+piclibs') patch('gcc-backport.patch', when='@4.7:4.9.2,5:5.3') - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec + prefix = self.spec.prefix # libjava/configure needs a minor fix to install into spack paths. filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) @@ -138,18 +140,15 @@ def install(self, spec, prefix): darwin_options = ["--with-build-config=bootstrap-debug"] options.extend(darwin_options) - build_dir = join_path(self.stage.path, 'spack-build') - configure = Executable(join_path(self.stage.source_path, 'configure')) - with working_dir(build_dir, create=True): - # Rest of install is straightforward. - configure(*options) - if sys.platform == 'darwin': - make("bootstrap") - else: - make() - make("install") + return options - self.write_rpath_specs() + build_directory = 'spack-build' + + @property + def build_targets(self): + if sys.platform == 'darwin': + return ['bootstrap'] + return [] @property def spec_dir(self): @@ -157,6 +156,7 @@ def spec_dir(self): spec_dir = glob("%s/lib64/gcc/*/*" % self.prefix) return spec_dir[0] if spec_dir else None + @run_after('install') def write_rpath_specs(self): """Generate a spec file so the linker adds a rpath to the libs the compiler used to build the executable.""" diff --git a/var/spack/repos/builtin/packages/gccmakedep/package.py b/var/spack/repos/builtin/packages/gccmakedep/package.py index ed2530d89e1b984519b62a68a1b3d24a8a3a726d..1e082bb0505125e9fdbe373a035edb989b938f44 100644 --- a/var/spack/repos/builtin/packages/gccmakedep/package.py +++ b/var/spack/repos/builtin/packages/gccmakedep/package.py @@ -25,7 +25,7 @@ from spack import * -class Gccmakedep(Package): +class Gccmakedep(AutotoolsPackage): """X.org gccmakedep utilities.""" homepage = "https://cgit.freedesktop.org/xorg/util/gccmakedep/" @@ -34,9 +34,3 @@ class Gccmakedep(Package): version('1.0.3', '127ddb6131eb4a56fdf6644a63ade788') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/gconf/package.py b/var/spack/repos/builtin/packages/gconf/package.py index 3b3abc71ed854bea78a74751e7328a7998c236b3..65023017840a9be201c97332ab2e7551caeab21e 100644 --- a/var/spack/repos/builtin/packages/gconf/package.py +++ b/var/spack/repos/builtin/packages/gconf/package.py @@ -25,11 +25,11 @@ from spack import * -class Gconf(Package): +class Gconf(AutotoolsPackage): """GConf is a system for storing application preferences.""" homepage = "https://projects.gnome.org/gconf/" - url = "ftp://ftp.gnome.org/pub/gnome/sources/GConf/3.2/GConf-3.2.6.tar.xz" + url = "http://ftp.gnome.org/pub/gnome/sources/GConf/3.2/GConf-3.2.6.tar.xz" version('3.2.6', '2b16996d0e4b112856ee5c59130e822c') @@ -43,9 +43,3 @@ class Gconf(Package): # gobject-2.0 >= 2.7.0 # dbus-1 >= 1.0.0 # dbus-glib-1 >= 0.74 - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py index 4d39086b0627d2925f23c657733c2be0dd15f680..115974472113d900e878db0b49f4744fd3cfb2a2 100644 --- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -25,7 +25,7 @@ from spack import * -class GdkPixbuf(Package): +class GdkPixbuf(AutotoolsPackage): """The Gdk Pixbuf is a toolkit for image loading and pixel buffer manipulation. It is used by GTK+ 2 and GTK+ 3 to load and manipulate images. In the past it was distributed as part of @@ -42,8 +42,3 @@ class GdkPixbuf(Package): depends_on("jpeg") depends_on("libpng") depends_on("libtiff") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/ghostscript-fonts/package.py b/var/spack/repos/builtin/packages/ghostscript-fonts/package.py index 1bf3f857b03211779935837a08fe756001a1e655..86c937d555441a90b3b00a6e5373913b70563d55 100644 --- a/var/spack/repos/builtin/packages/ghostscript-fonts/package.py +++ b/var/spack/repos/builtin/packages/ghostscript-fonts/package.py @@ -30,7 +30,7 @@ class GhostscriptFonts(Package): """Ghostscript Fonts""" homepage = "http://ghostscript.com/" - url = "ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ghostscript-fonts-std-8.11.tar.gz" + url = "https://www.imagemagick.org/download/delegates/ghostscript-fonts-std-8.11.tar.gz" version('8.11', '6865682b095f8c4500c54b285ff05ef6') diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py index 7082384b9b8673e7e110c8954bbf4b48f6e38eac..feca5b046bb612c0d03be5d0f6b6146ec89d44bd 100644 --- a/var/spack/repos/builtin/packages/giflib/package.py +++ b/var/spack/repos/builtin/packages/giflib/package.py @@ -25,7 +25,7 @@ from spack import * -class Giflib(Package): +class Giflib(AutotoolsPackage): """The GIFLIB project maintains the giflib service library, which has been pulling images out of GIFs since 1989.""" @@ -33,9 +33,3 @@ class Giflib(Package): url = "https://downloads.sourceforge.net/project/giflib/giflib-5.1.4.tar.bz2" version('5.1.4', '2c171ced93c0e83bb09e6ccad8e3ba2b') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index c7b239ef1229b13c1bf9fe5c2efb70f90cdeee78..a0a0879382e7ce0fed9af40792770fa4ea3e4e17 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -33,6 +33,7 @@ class Git(Package): homepage = "http://git-scm.com" url = "https://github.com/git/git/tarball/v2.7.1" + version('2.11.1', '2cf960f19e56f27248816809ae896794') version('2.11.0', 'c63fb83b86431af96f8e9722ebb3ca01') version('2.9.3', 'b0edfc0f3cb046aec7ed68a4b7282a75') version('2.9.2', '3ff8a9b30fd5c99a02e6d6585ab543fc') diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index 4d8085baf2a77b084e89dc3d3f93e6c7f8ebb8b5..cede9ae0ae840e297d196a04918a773bbff20333 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -23,10 +23,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os -class Glib(Package): +class Glib(AutotoolsPackage): """The GLib package contains a low-level libraries useful for providing data structure handling for C, portability wrappers and interfaces for such runtime functionality as an event loop, @@ -42,6 +41,7 @@ class Glib(Package): depends_on('autoconf', type='build') depends_on('automake', type='build') depends_on('libtool', type='build') + depends_on('m4', type='build') depends_on('pkg-config+internal_glib', type='build') depends_on('libffi') depends_on('zlib') @@ -54,22 +54,9 @@ class Glib(Package): # around a legitimate usage. patch('no-Werror=format-security.patch') + force_autoreconf = True + def url_for_version(self, version): """Handle glib's version-based custom URLs.""" url = 'http://ftp.gnome.org/pub/gnome/sources/glib' return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version) - - def install(self, spec, prefix): - autoreconf = which("autoreconf") - autoreconf("--install", "--verbose", "--force", - "-I", "config", - "-I", os.path.join(spec['pkg-config'].prefix, - "share", "aclocal"), - "-I", os.path.join(spec['automake'].prefix, - "share", "aclocal"), - "-I", os.path.join(spec['libtool'].prefix, - "share", "aclocal"), - ) - configure("--prefix=%s" % prefix) - make() - make("install", parallel=False) diff --git a/var/spack/repos/builtin/packages/globus-toolkit/package.py b/var/spack/repos/builtin/packages/globus-toolkit/package.py index 5cec13a5af0b6388693c7147843dbb3e3efedb2b..5cdc0689a776ecf0a916a968557d614ba3e54409 100644 --- a/var/spack/repos/builtin/packages/globus-toolkit/package.py +++ b/var/spack/repos/builtin/packages/globus-toolkit/package.py @@ -25,7 +25,7 @@ from spack import * -class GlobusToolkit(Package): +class GlobusToolkit(AutotoolsPackage): """The Globus Toolkit is an open source software toolkit used for building grids""" @@ -33,8 +33,3 @@ class GlobusToolkit(Package): url = "http://toolkit.globus.org/ftppub/gt6/installers/src/globus_toolkit-6.0.1470089956.tar.gz" version('6.0.1470089956', 'b77fe3cc5a5844df995688b0e630d077') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/glog/package.py b/var/spack/repos/builtin/packages/glog/package.py index 14f042732b8da9533c2904ddfc5a236745f7a5ec..11d679c7ffe093ec581071c52947d1b32a4ed2a3 100644 --- a/var/spack/repos/builtin/packages/glog/package.py +++ b/var/spack/repos/builtin/packages/glog/package.py @@ -25,15 +25,10 @@ from spack import * -class Glog(Package): +class Glog(AutotoolsPackage): """C++ implementation of the Google logging module.""" homepage = "https://github.com/google/glog" url = "https://github.com/google/glog/archive/v0.3.3.tar.gz" version('0.3.3', 'c1f86af27bd9c73186730aa957607ed0') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/glproto/package.py b/var/spack/repos/builtin/packages/glproto/package.py index 462e5290676364fe71a20ebb2eae37f61ffb04ce..8a5eaef660defe21778b9b92f5b785d2fb89c081 100644 --- a/var/spack/repos/builtin/packages/glproto/package.py +++ b/var/spack/repos/builtin/packages/glproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Glproto(Package): +class Glproto(AutotoolsPackage): """OpenGL Extension to the X Window System. This extension defines a protocol for the client to send 3D rendering @@ -38,8 +38,3 @@ class Glproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py index ca296350a4197e03d5e7a9fd0b7630e892d07cb7..ed89a46758a5ea2b22958e9f020a44d686bcd8d9 100644 --- a/var/spack/repos/builtin/packages/gmake/package.py +++ b/var/spack/repos/builtin/packages/gmake/package.py @@ -29,7 +29,7 @@ class Gmake(Package): """GNU Make.""" homepage = "http://gnu.org/gnu/make" - url = "ftp://ftp.gnu.org/gnu/make/make-4.0.tar.gz" + url = "https://ftp.gnu.org/gnu/make/make-4.0.tar.gz" version('4.0', 'b5e558f981326d9ca1bfdb841640721a') diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index fffd448443d32bea22bb064b63d065de5b22b63d..5c42fcf39fc2aab27029b1608da1cb1a2fc7ae82 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -38,6 +38,7 @@ class Gmsh(CMakePackage): homepage = 'http://gmsh.info' url = 'http://gmsh.info/src/gmsh-2.11.0-source.tgz' + version('2.16.0', 'e829eaf32ea02350a385202cc749341f2a3217c464719384b18f653edd028eea') version('2.15.0', '992a4b580454105f719f5bc05441d3d392ab0b4b80d4ea07b61ca3bdc974070a') version('2.12.0', '7fbd2ec8071e79725266e72744d21e902d4fe6fa9e7c52340ad5f4be5c159d09') version('2.11.0', 'f15b6e7ac9ca649c9a74440e1259d0db') diff --git a/var/spack/repos/builtin/packages/gnutls/package.py b/var/spack/repos/builtin/packages/gnutls/package.py index 5f7b0daf9bbecef6b178250e8e547ba310663606..638ef7e30cf117b8f46b6ae1a833f839fd5699a2 100644 --- a/var/spack/repos/builtin/packages/gnutls/package.py +++ b/var/spack/repos/builtin/packages/gnutls/package.py @@ -25,7 +25,7 @@ from spack import * -class Gnutls(Package): +class Gnutls(AutotoolsPackage): """GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols and technologies around them. It provides a simple C language application programming interface @@ -35,13 +35,8 @@ class Gnutls(Package): with focus on security and interoperability.""" homepage = "http://www.gnutls.org" - url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/gnutls-3.3.9.tar.xz" + url = "http://www.ring.gr.jp/pub/net/gnupg/gnutls/v3.3/gnutls-3.3.9.tar.xz" version('3.3.9', 'ff61b77e39d09f1140ab5a9cf52c58b6') depends_on("nettle") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index ad1436c0c379f9be8666083a44efeb2f519b4b6d..d0fb40096bc3596772a94c321383339f0893f6d5 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -42,6 +42,11 @@ # # - on CentOS 7 systems (and possibly others) you need to have the # glibc package installed or various static cgo tests fail. +# +# - When building on a *large* machine (144 cores, 1.5TB RAM) I need +# to run `ulimit -u 8192` to bump up the max number of user processes. +# Failure to do so results in an explosion in one of the tests and an +# epic stack trace.... class Go(Package): @@ -51,6 +56,7 @@ class Go(Package): extendable = True + version('1.7.5', '506de2d870409e9003e1440bcfeb3a65') version('1.7.4', '49c1076428a5d3b5ad7ac65233fcca2f') version('1.6.4', 'b023240be707b34059d2c114d3465c92') @@ -67,7 +73,7 @@ class Go(Package): patch('time_test.patch', when='@1.6.4:1.7.4') # https://github.com/golang/go/issues/17986 - patch('misc-cgo-testcshared.patch', level=0, when='@1.6.4:1.7.4') + patch('misc-cgo-testcshared.patch', level=0, when='@1.6.4:1.7.5') # NOTE: Older versions of Go attempt to download external files that have # since been moved while running the test suite. This patch modifies the diff --git a/var/spack/repos/builtin/packages/gource/package.py b/var/spack/repos/builtin/packages/gource/package.py index dda00420a3816c0d8b9312e30bc3c2be1e2b54ad..21994ad42ca7981006a4d6f89025f859c3ccd93b 100644 --- a/var/spack/repos/builtin/packages/gource/package.py +++ b/var/spack/repos/builtin/packages/gource/package.py @@ -25,11 +25,11 @@ from spack import * -class Gource(Package): +class Gource(AutotoolsPackage): """Software version control visualization.""" homepage = "http://gource.io" - url = "https://github.com/acaudwell/Gource/releases/download/gource-0.44/gource-0.44.tar.gz" + url = "https://github.com/acaudwell/Gource/releases/download/gource-0.44/gource-0.44.tar.gz" version('0.44', '79cda1bfaad16027d59cce55455bfab88b57c69d') @@ -49,15 +49,17 @@ class Gource(Package): depends_on('sdl2') depends_on('sdl2-image') - def install(self, spec, prefix): - make_args = ['--prefix=%s' % prefix, - '--disable-dependency-tracking', - '--without-x', - '--with-boost=%s' % spec['boost'].prefix] + parallel = False + force_autoreconf = True - autoreconf('-i') - configure(*make_args) - make() + def url_for_version(self, version): + tmp = 'https://github.com/acaudwell/Gource/releases/download/gource-{0}/gource-{0}.tar.gz' # NOQA: ignore=E501 + return tmp.format(version.dotted) - make("install", - parallel=False) + def configure_args(self): + spec = self.spec + return [ + '--disable-dependency-tracking', + '--without-x', + '--with-boost=%s' % spec['boost'].prefix + ] diff --git a/var/spack/repos/builtin/packages/gperf/package.py b/var/spack/repos/builtin/packages/gperf/package.py index 0ae07b33fcb9a62c6c65e192a3df18d4d5629116..e7dffa017a614f05dc8598cc93c37cc49517d51e 100644 --- a/var/spack/repos/builtin/packages/gperf/package.py +++ b/var/spack/repos/builtin/packages/gperf/package.py @@ -25,7 +25,7 @@ from spack import * -class Gperf(Package): +class Gperf(AutotoolsPackage): """GNU gperf is a perfect hash function generator. For a given list of strings, it produces a hash function and hash table, in form of C or C++ code, for looking up a value depending on the @@ -38,9 +38,4 @@ class Gperf(Package): version('3.0.4', 'c1f1db32fb6598d6a93e6e88796a8632') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - # make('check') # fails tests - make('install') + # NOTE: `make check` is known to fail tests diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py index c6ca6c8057d870caecb53e0fb2d941261853a87b..300e0ae7659996dc7895971613dfe89a97b3e5b9 100644 --- a/var/spack/repos/builtin/packages/gperftools/package.py +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -25,7 +25,7 @@ from spack import * -class Gperftools(Package): +class Gperftools(AutotoolsPackage): """Google's fast malloc/free implementation, especially for multi-threaded applications. Contains tcmalloc, heap-checker, heap-profiler, and cpu-profiler. @@ -40,8 +40,3 @@ class Gperftools(Package): url="https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz") depends_on("libunwind") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/grandr/package.py b/var/spack/repos/builtin/packages/grandr/package.py index 8097d4fa01c78d538d845972967c431b1533511f..dd56426ef842e5abece583b74c28ab96a7403af7 100644 --- a/var/spack/repos/builtin/packages/grandr/package.py +++ b/var/spack/repos/builtin/packages/grandr/package.py @@ -25,7 +25,7 @@ from spack import * -class Grandr(Package): +class Grandr(AutotoolsPackage): """RandR user interface using GTK+ libraries.""" homepage = "https://cgit.freedesktop.org/xorg/app/grandr" @@ -36,10 +36,3 @@ class Grandr(Package): depends_on('gtkplus@2.0.0:') depends_on('gconf') depends_on('xrandr@1.2:') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index d079188db617f99e70dd2ffe42b2a0a90d4ec1c6..fd5814ca08b4729c452252b17238fb118e87c4e0 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -39,7 +39,7 @@ class Gromacs(CMakePackage): """ homepage = 'http://www.gromacs.org' - url = 'ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.1.2.tar.gz' + url = 'http://ftp.gromacs.org/gromacs/gromacs-5.1.2.tar.gz' version('5.1.2', '614d0be372f1a6f1f36382b7a6fcab98') diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py index b53b688372ee84d8ea8a2eb3d6a84fb0628a8bf8..b17b1877ec4a3b8cfdd4003154b4ca56b1b34078 100644 --- a/var/spack/repos/builtin/packages/gtkplus/package.py +++ b/var/spack/repos/builtin/packages/gtkplus/package.py @@ -25,7 +25,7 @@ from spack import * -class Gtkplus(Package): +class Gtkplus(AutotoolsPackage): """The GTK+ 2 package contains libraries used for creating graphical user interfaces for applications.""" homepage = "http://www.gtk.org" @@ -47,8 +47,3 @@ def patch(self): # remove disable deprecated flag. filter_file(r'CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"', '', 'configure', string=True) - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/gts/package.py b/var/spack/repos/builtin/packages/gts/package.py index 2b3d4dd4f815c0136019f195ecba07d8510f5051..ea9443fb9d5ab0a1f300702a7e7cb8a94856e2be 100644 --- a/var/spack/repos/builtin/packages/gts/package.py +++ b/var/spack/repos/builtin/packages/gts/package.py @@ -25,7 +25,7 @@ from spack import * -class Gts(Package): +class Gts(AutotoolsPackage): """GTS stands for the GNU Triangulated Surface Library. It is an Open Source Free Software Library intended to provide a set of @@ -46,8 +46,3 @@ class Gts(Package): version('121130', '023ebb6b13b8707534182a3ef0d12908') depends_on('glib') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/guile/package.py b/var/spack/repos/builtin/packages/guile/package.py index 22aff1bddf337cf0d98160f06b9343a5e6444e86..15e24e5634596611402f58d98a7211b27ba393c5 100644 --- a/var/spack/repos/builtin/packages/guile/package.py +++ b/var/spack/repos/builtin/packages/guile/package.py @@ -30,7 +30,7 @@ class Guile(Package): the official extension language for the GNU operating system.""" homepage = "https://www.gnu.org/software/guile/" - url = "ftp://ftp.gnu.org/gnu/guile/guile-2.0.11.tar.gz" + url = "https://ftp.gnu.org/gnu/guile/guile-2.0.11.tar.gz" version('2.0.11', 'e532c68c6f17822561e3001136635ddd') diff --git a/var/spack/repos/builtin/packages/h5hut/package.py b/var/spack/repos/builtin/packages/h5hut/package.py index 22146372dcfbaa6bcac9e3b23dbf303d5a8b6ad6..b12549df0da1760ffa5e40244c1f6694253709e0 100644 --- a/var/spack/repos/builtin/packages/h5hut/package.py +++ b/var/spack/repos/builtin/packages/h5hut/package.py @@ -47,7 +47,7 @@ class H5hut(AutotoolsPackage): # install: .libs/libH5hut.a: No such file or directory parallel = False - @AutotoolsPackage.precondition('configure') + @run_before('configure') def validate(self): """Checks if Fortran compiler is available.""" diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py index 7c98c2a96a05d95401d084839b5fc03d24a61976..f8d5355f87ed9e5a70024528239d4433e339b339 100644 --- a/var/spack/repos/builtin/packages/harfbuzz/package.py +++ b/var/spack/repos/builtin/packages/harfbuzz/package.py @@ -25,7 +25,7 @@ from spack import * -class Harfbuzz(Package): +class Harfbuzz(AutotoolsPackage): """The Harfbuzz package contains an OpenType text shaping engine.""" homepage = "http://www.freedesktop.org/wiki/Software/HarfBuzz/" url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.37.tar.bz2" @@ -41,8 +41,3 @@ class Harfbuzz(Package): def patch(self): change_sed_delimiter('@', ';', 'src/Makefile.in') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 222af53601735275b6fa128fa841b7d77836f616..5e82818697d08c130c3f181ab682822d9fc3762f 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -70,7 +70,7 @@ class Hdf5(AutotoolsPackage): depends_on('szip', when='+szip') depends_on('zlib@1.1.2:') - @AutotoolsPackage.precondition('configure') + @run_before('configure') def validate(self): """ Checks if incompatible variants have been activated at the same time @@ -170,7 +170,7 @@ def configure(self, spec, prefix): arg for arg in m.group(1).split(' ') if arg != '-l'), 'libtool') - @AutotoolsPackage.sanity_check('install') + @run_after('install') def check_install(self): # Build and run a small program to test the installed HDF5 library spec = self.spec diff --git a/var/spack/repos/builtin/packages/heppdt/package.py b/var/spack/repos/builtin/packages/heppdt/package.py index 54c846ae33527320678a8624ec68f1633d5156cc..65946fb10285fab34bfc5a3c4c6db4d99786138e 100644 --- a/var/spack/repos/builtin/packages/heppdt/package.py +++ b/var/spack/repos/builtin/packages/heppdt/package.py @@ -26,7 +26,7 @@ from spack import * -class Heppdt(Package): +class Heppdt(AutotoolsPackage): """The HepPID library contains translation methods for particle ID's to and from various Monte Carlo generators and the PDG standard numbering scheme. We realize that the generators adhere closely @@ -40,9 +40,3 @@ class Heppdt(Package): version('3.03.01', 'd411f3bfdf9c4350d802241ba2629cc2') version('3.03.00', 'cd84d0a0454be982dcd8c285e060a7b3') version('2.06.01', '5688b4bdbd84b48ed5dd2545a3dc33c0') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/hsakmt/package.py b/var/spack/repos/builtin/packages/hsakmt/package.py index 0daad4afedf0e36b9d80b76463f26eb6d5ac57b6..534d5e4c84cd76006f8e7fe5e2732d9085153c57 100644 --- a/var/spack/repos/builtin/packages/hsakmt/package.py +++ b/var/spack/repos/builtin/packages/hsakmt/package.py @@ -25,7 +25,7 @@ from spack import * -class Hsakmt(Package): +class Hsakmt(AutotoolsPackage): """hsakmt is a thunk library that provides a userspace interface to amdkfd (AMD's HSA Linux kernel driver). It is the HSA equivalent of libdrm.""" @@ -33,9 +33,3 @@ class Hsakmt(Package): url = "https://www.x.org/archive/individual/lib/hsakmt-1.0.0.tar.gz" version('1.0.0', '9beb20104e505300daf541266c4c3c3d') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/htop/package.py b/var/spack/repos/builtin/packages/htop/package.py index 3df0a353567c92336a7f78a3b1af9d450c6b7ece..7a7cc418ce2fc53fc489eabe2118c41075e804e9 100644 --- a/var/spack/repos/builtin/packages/htop/package.py +++ b/var/spack/repos/builtin/packages/htop/package.py @@ -25,7 +25,7 @@ from spack import * -class Htop(Package): +class Htop(AutotoolsPackage): """htop is an interactive text-mode process viewer for Unix systems.""" homepage = "https://github.com/hishamhm/htop" @@ -34,8 +34,3 @@ class Htop(Package): version('2.0.2', '7d354d904bad591a931ad57e99fea84a') depends_on('ncurses') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/htslib/package.py b/var/spack/repos/builtin/packages/htslib/package.py index 1a8b8fd2f5e962937c436b1bd6b919b094c45fc4..77829e71b93acae3b6c59d42ae1ad4688bb70fda 100644 --- a/var/spack/repos/builtin/packages/htslib/package.py +++ b/var/spack/repos/builtin/packages/htslib/package.py @@ -25,7 +25,7 @@ from spack import * -class Htslib(Package): +class Htslib(AutotoolsPackage): """C library for high-throughput sequencing data formats.""" homepage = "https://github.com/samtools/htslib" @@ -34,8 +34,3 @@ class Htslib(Package): version('1.3.1', '16d78f90b72f29971b042e8da8be6843') depends_on('zlib') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - make() - make('install') diff --git a/lib/spack/spack/cmd/urls.py b/var/spack/repos/builtin/packages/hunspell/package.py similarity index 54% rename from lib/spack/spack/cmd/urls.py rename to var/spack/repos/builtin/packages/hunspell/package.py index f151581d7db61a7eae5b1c76568170aa9ab54c73..4e4cdce9487e6090e39c0443d1a7d287a2b8d806 100644 --- a/lib/spack/spack/cmd/urls.py +++ b/var/spack/repos/builtin/packages/hunspell/package.py @@ -22,38 +22,18 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import spack -import spack.url +from spack import * -description = "Inspect urls used by packages in spack." +class Hunspell(AutotoolsPackage): + """The most popular spellchecking library (sez the author...).""" -def setup_parser(subparser): - subparser.add_argument( - '-c', '--color', action='store_true', - help="Color the parsed version and name in the urls shown. " - "Version will be cyan, name red.") - subparser.add_argument( - '-e', '--extrapolation', action='store_true', - help="Color the versions used for extrapolation as well." - "Additional versions are green, names magenta.") + homepage = "http://hunspell.github.io/" + url = "https://github.com/hunspell/hunspell/archive/v1.6.0.tar.gz" + version('1.6.0', '047c3feb121261b76dc16cdb62f54483') -def urls(parser, args): - urls = set() - for pkg in spack.repo.all_packages(): - url = getattr(pkg.__class__, 'url', None) - if url: - urls.add(url) - - for params in pkg.versions.values(): - url = params.get('url', None) - if url: - urls.add(url) - - for url in sorted(urls): - if args.color or args.extrapolation: - print spack.url.color_url( - url, subs=args.extrapolation, errors=True) - else: - print url + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index 111c424b223c9acdf341afa8cf225d686bc4279f..68c92b3aff5903edc2391fc30ec148eac6750d1d 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -25,7 +25,7 @@ from spack import * -class Hwloc(Package): +class Hwloc(AutotoolsPackage): """The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern @@ -42,6 +42,7 @@ class Hwloc(Package): list_url = "http://www.open-mpi.org/software/hwloc/" list_depth = 3 + version('1.11.5', '8f5fe6a9be2eb478409ad5e640b2d3ba') version('1.11.4', 'b6f23eb59074fd09fdd84905d50b103d') version('1.11.3', 'c1d36a9de6028eac1d18ea4782ef958f') version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23') @@ -52,9 +53,3 @@ class Hwloc(Package): def url_for_version(self, version): return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version) - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/hydra/package.py b/var/spack/repos/builtin/packages/hydra/package.py index eee346ba498fc571ef209aa855cc638c8132e18e..4461adae2ef2e186918dfabe131715ff4152e179 100644 --- a/var/spack/repos/builtin/packages/hydra/package.py +++ b/var/spack/repos/builtin/packages/hydra/package.py @@ -25,7 +25,7 @@ from spack import * -class Hydra(Package): +class Hydra(AutotoolsPackage): """Hydra is a process management system for starting parallel jobs. Hydra is designed to natively work with existing launcher daemons (such as ssh, rsh, fork), as well as natively integrate with resource @@ -37,9 +37,3 @@ class Hydra(Package): list_depth = 2 version('3.2', '4d670916695bf7e3a869cc336a881b39') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/iceauth/package.py b/var/spack/repos/builtin/packages/iceauth/package.py index 59c6e0e7b710e6a52f77eb7d4ae4bb5dc5f03c56..6af0d0b4bb3e610fd27c7837276d2e34c1f01780 100644 --- a/var/spack/repos/builtin/packages/iceauth/package.py +++ b/var/spack/repos/builtin/packages/iceauth/package.py @@ -25,7 +25,7 @@ from spack import * -class Iceauth(Package): +class Iceauth(AutotoolsPackage): """The iceauth program is used to edit and display the authorization information used in connecting with ICE. It operates very much like the xauth program for X11 connection authentication records.""" @@ -40,9 +40,3 @@ class Iceauth(Package): depends_on('xproto@7.0.22:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/ico/package.py b/var/spack/repos/builtin/packages/ico/package.py index 5e523575cab28ecec146431463656274546d760b..2163e8566e970eb7b87b222817d3ad50e2b99f5f 100644 --- a/var/spack/repos/builtin/packages/ico/package.py +++ b/var/spack/repos/builtin/packages/ico/package.py @@ -25,7 +25,7 @@ from spack import * -class Ico(Package): +class Ico(AutotoolsPackage): """ico is a simple animation program that may be used for testing various X11 operations and extensions. It displays a wire-frame rotating polyhedron, with hidden lines removed, or a solid-fill polyhedron with @@ -41,9 +41,3 @@ class Ico(Package): depends_on('xproto@7.0.22:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/ilmbase/package.py b/var/spack/repos/builtin/packages/ilmbase/package.py index 873c830623fb8d8129ad28c3065010bb7aa0e34d..7f478f23415b097967e269d64605984c048b1054 100644 --- a/var/spack/repos/builtin/packages/ilmbase/package.py +++ b/var/spack/repos/builtin/packages/ilmbase/package.py @@ -25,7 +25,7 @@ from spack import * -class Ilmbase(Package): +class Ilmbase(AutotoolsPackage): """OpenEXR ILM Base libraries (high dynamic-range image file format)""" homepage = "http://www.openexr.com/" @@ -36,7 +36,3 @@ class Ilmbase(Package): version('2.0.1', '74c0d0d2873960bd0dc1993f8e03f0ae') version('1.0.2', '26c133ee8ca48e1196fbfb3ffe292ab4') version('0.9.0', '4df45f8116cb7a013b286caf6da30a2e') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - make('install') diff --git a/var/spack/repos/builtin/packages/imake/package.py b/var/spack/repos/builtin/packages/imake/package.py index 32542b039169e9b46c9a287c9b60b9c5bca88994..b15a019156a906ddb3904b458f68b57278098ade 100644 --- a/var/spack/repos/builtin/packages/imake/package.py +++ b/var/spack/repos/builtin/packages/imake/package.py @@ -25,7 +25,7 @@ from spack import * -class Imake(Package): +class Imake(AutotoolsPackage): """The imake build system.""" homepage = "http://www.snake.net/software/imake-stuff/" @@ -35,9 +35,3 @@ class Imake(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/inputproto/package.py b/var/spack/repos/builtin/packages/inputproto/package.py index 915986ef6810ea0de145a4fdc8f8d4b1014be98a..220c314ac6043d7ff954dd96ea2137ea1d13315b 100644 --- a/var/spack/repos/builtin/packages/inputproto/package.py +++ b/var/spack/repos/builtin/packages/inputproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Inputproto(Package): +class Inputproto(AutotoolsPackage): """X Input Extension. This extension defines a protocol to provide additional input devices @@ -38,8 +38,3 @@ class Inputproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/intel-gpu-tools/package.py b/var/spack/repos/builtin/packages/intel-gpu-tools/package.py index 132e29839b2fe4c4a96fac6456a5014e4548f979..f72ebf76e71a24e6fb651facba7bf312a4de3d58 100644 --- a/var/spack/repos/builtin/packages/intel-gpu-tools/package.py +++ b/var/spack/repos/builtin/packages/intel-gpu-tools/package.py @@ -25,7 +25,7 @@ from spack import * -class IntelGpuTools(Package): +class IntelGpuTools(AutotoolsPackage): """Intel GPU Tools is a collection of tools for development and testing of the Intel DRM driver. There are many macro-level test suites that get used against the driver, including xtest, rendercheck, piglit, and oglconform, @@ -58,10 +58,3 @@ class IntelGpuTools(Package): # python-docutils # x11proto-dri2-dev # xutils-dev - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py index f369e10d38cb96421cf31d75d47377f7f044a561..1d7ea1ee898818ee679e31a45a00784ce0c68c86 100644 --- a/var/spack/repos/builtin/packages/intel-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-mkl/package.py @@ -55,8 +55,8 @@ class IntelMkl(IntelInstaller): # virtual dependency provides('blas') provides('lapack') + provides('scalapack') provides('mkl') - # TODO: MKL also provides implementation of Scalapack. @property def blas_libs(self): @@ -83,6 +83,34 @@ def blas_libs(self): def lapack_libs(self): return self.blas_libs + @property + def scalapack_libs(self): + libnames = ['libmkl_scalapack'] + if self.spec.satisfies('^openmpi'): + libnames.append('libmkl_blacs_openmpi') + elif self.spec.satisfies('^mpich@1'): + libnames.append('libmkl_blacs') + elif self.spec.satisfies('^mpich@2:'): + libnames.append('libmkl_blacs_intelmpi') + elif self.spec.satisfies('^mvapich2'): + libnames.append('libmkl_blacs_intelmpi') + elif self.spec.satisfies('^mpt'): + libnames.append('libmkl_blacs_sgimpt') + # TODO: ^intel-parallel-studio can mean intel mpi, a compiler or a lib + # elif self.spec.satisfies('^intel-parallel-studio'): + # libnames.append('libmkl_blacs_intelmpi') + else: + raise InstallError("No MPI found for scalapack") + + shared = True if '+shared' in self.spec else False + integer = 'ilp64' if '+ilp64' in self.spec else 'lp64' + libs = find_libraries( + ['{0}_{1}'.format(l, integer) for l in libnames], + root=join_path(self.prefix.lib, 'intel64'), + shared=shared + ) + return libs + def install(self, spec, prefix): self.intel_prefix = os.path.join(prefix, "pkg") IntelInstaller.install(self, spec, prefix) diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 8564eeb9411ebe05567a1157dae62a49781347f7..fbafb4fb0d26b183a29d1d6e34304239c9fca5fc 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -77,7 +77,7 @@ class IntelParallelStudio(IntelInstaller): # virtual dependency provides('blas', when='+mkl') provides('lapack', when='+mkl') - # TODO: MKL also provides implementation of Scalapack. + provides('scalapack', when='+mkl') @property def blas_libs(self): @@ -104,6 +104,34 @@ def blas_libs(self): def lapack_libs(self): return self.blas_libs + @property + def scalapack_libs(self): + libnames = ['libmkl_scalapack'] + if self.spec.satisfies('^openmpi'): + libnames.append('libmkl_blacs_openmpi') + elif self.spec.satisfies('^mpich@1'): + libnames.append('libmkl_blacs') + elif self.spec.satisfies('^mpich@2:'): + libnames.append('libmkl_blacs_intelmpi') + elif self.spec.satisfies('^mvapich2'): + libnames.append('libmkl_blacs_intelmpi') + elif self.spec.satisfies('^mpt'): + libnames.append('libmkl_blacs_sgimpt') + # TODO: ^intel-parallel-studio can mean intel mpi, a compiler or a lib + # elif self.spec.satisfies('^intel-parallel-studio'): + # libnames.append('libmkl_blacs_intelmpi') + else: + raise InstallError("No MPI found for scalapack") + + shared = True if '+shared' in self.spec else False + integer = 'ilp64' if '+ilp64' in self.spec else 'lp64' + libs = find_libraries( + ['{0}_{1}'.format(l, integer) for l in libnames], + root=join_path(self.prefix, 'mkl', 'lib', 'intel64'), + shared=shared + ) + return libs + def url_for_version(self, version): """Assume the tarball is in the current directory.""" @@ -127,20 +155,7 @@ def url_for_version(self, version): return url + ".tgz" - def check_variants(self, spec): - error_message = '\t{variant} can not be turned off if "+all" is set' - - if self.spec.satisfies('+all'): - errors = [error_message.format(variant=x) - for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools') - if ('~' + x) in self.spec] - if errors: - errors = ['incompatible variants given'] + errors - raise InstallError('\n'.join(errors)) - def install(self, spec, prefix): - self.check_variants(spec) - base_components = "ALL" # when in doubt, install everything mpi_components = "" mkl_components = "" diff --git a/var/spack/repos/builtin/packages/itstool/package.py b/var/spack/repos/builtin/packages/itstool/package.py index b8b2b4459f2d1d49069f8ab5d416e2ca0ee9bff7..c78e7404991cc32c5555d94a2f656560dd139592 100644 --- a/var/spack/repos/builtin/packages/itstool/package.py +++ b/var/spack/repos/builtin/packages/itstool/package.py @@ -25,7 +25,7 @@ from spack import * -class Itstool(Package): +class Itstool(AutotoolsPackage): """ITS Tool allows you to translate your XML documents with PO files, using rules from the W3C Internationalization Tag Set (ITS) to determine what to translate and how to separate it into PO file messages.""" @@ -37,8 +37,3 @@ class Itstool(Package): version('2.0.1', '40935cfb08228488bd45575e5f001a34') version('2.0.0', 'd8c702c3e8961db83d04182c2aa4730b') version('1.2.0', 'c0925f6869e33af8e7fe56848c129152') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py index 839251f47b4bbd90774bf5fa26dfc7816a384250..ddd08f862f260bf2793841ac9ec5976892736dc7 100644 --- a/var/spack/repos/builtin/packages/jemalloc/package.py +++ b/var/spack/repos/builtin/packages/jemalloc/package.py @@ -31,6 +31,7 @@ class Jemalloc(Package): homepage = "http://www.canonware.com/jemalloc/" url = "https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2" + version('4.4.0', '81b59778e19696d99e2f7922820671b0') version('4.3.1', 'f204c0ea1aef92fbb339dc640de338a6') version('4.2.1', '094b0a7b8c77c464d0dc8f0643fd3901') version('4.2.0', 'e6b5d5a1ea93a04207528d274efdd144') diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/jpeg/package.py index 594240d9507fcf6e1fb6b5cbe4d789a65aabd3f2..5c45a2889c2524adce3f0aee0fb0326969701a1d 100644 --- a/var/spack/repos/builtin/packages/jpeg/package.py +++ b/var/spack/repos/builtin/packages/jpeg/package.py @@ -25,7 +25,7 @@ from spack import * -class Jpeg(Package): +class Jpeg(AutotoolsPackage): """libjpeg is a widely used free library with functions for handling the JPEG image data format. It implements a JPEG codec (encoding and decoding) alongside various utilities for handling JPEG data.""" @@ -35,10 +35,3 @@ class Jpeg(Package): version('9b', '6a9996ce116ec5c52b4870dbcd6d3ddb') version('9a', '3353992aecaee1805ef4109aadd433e7') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("test") - make("install") diff --git a/var/spack/repos/builtin/packages/judy/package.py b/var/spack/repos/builtin/packages/judy/package.py index 8b8b261e535863b40505d1f6c330b48d7ee423c5..ddcec05c2260c364dfb6a997f235f8e406b59edb 100644 --- a/var/spack/repos/builtin/packages/judy/package.py +++ b/var/spack/repos/builtin/packages/judy/package.py @@ -25,16 +25,11 @@ from spack import * -class Judy(Package): +class Judy(AutotoolsPackage): """Judy: General-purpose dynamic array, associative array and hash-trie.""" homepage = "http://judy.sourceforge.net/" url = "http://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz" version('1.0.5', '115a0d26302676e962ae2f70ec484a54') - parallel = False - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make("install") + parallel = False diff --git a/var/spack/repos/builtin/packages/kbproto/package.py b/var/spack/repos/builtin/packages/kbproto/package.py index 356d1c6b4fd4a5ec48638855cf08e37eb37092c5..aaf4c9e1d1a706b8ff07c3ec0c385a51e62fd71b 100644 --- a/var/spack/repos/builtin/packages/kbproto/package.py +++ b/var/spack/repos/builtin/packages/kbproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Kbproto(Package): +class Kbproto(AutotoolsPackage): """X Keyboard Extension. This extension defines a protcol to provide a number of new capabilities @@ -38,8 +38,3 @@ class Kbproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/lammps/Makefile.inc b/var/spack/repos/builtin/packages/lammps/Makefile.inc new file mode 100644 index 0000000000000000000000000000000000000000..6986a255b7ed62caa75a2b5733d5ffd3ce3a26f0 --- /dev/null +++ b/var/spack/repos/builtin/packages/lammps/Makefile.inc @@ -0,0 +1,49 @@ +SHELL = /bin/sh + +# --------------------------------------------------------------------- +# build rules and dependencies +# do not edit this section + +include Makefile.package.settings +include Makefile.package + +EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC) +EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH) +EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB) +EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS) +EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS) + +# Path to src files + +vpath %.cpp .. +vpath %.h .. + +# Link target + +$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS) + $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE) + $(SIZE) $(EXE) + +# Library targets + +lib: $(OBJ) $(EXTRA_LINK_DEPENDS) + $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ) + +shlib: $(OBJ) $(EXTRA_LINK_DEPENDS) + $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \ + $(OBJ) $(EXTRA_LIB) $(LIB) + +# Compilation rules + +%.o:%.cpp + $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $< + +# Individual dependencies + +depend : fastdep.exe $(SRC) + @./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1 + +fastdep.exe: ../DEPEND/fastdep.c + cc -O -o $@ $< + +sinclude .depend diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py new file mode 100644 index 0000000000000000000000000000000000000000..d7c41f2e2e27823ec19e247ff8e59ab0452b4f99 --- /dev/null +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -0,0 +1,207 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# +# Please also see the LICENSE file for our notice and the LGPL. +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import os +import string +import datetime as dt + + +class Lammps(MakefilePackage): + """LAMMPS stands for Large-scale Atomic/Molecular Massively + Parallel Simulator.""" + homepage = "http://lammps.sandia.gov/" + url = "https://github.com/lammps/lammps/archive/stable_17Nov2016.tar.gz" + + version('2016.11.17', '8aecc58a39f9775203517c62a592d13b') + + def url_for_version(self, version): + vdate = dt.datetime.strptime(str(version), "%Y.%m.%d") + return "https://github.com/lammps/lammps/archive/stable_{0}.tar.gz".format( + vdate.strftime("%d%b%Y")) + + supported_packages = ['voronoi', 'rigid', 'user-nc-dump', + 'user-atc', 'meam', 'manybody'] + + for pkg in supported_packages: + variant(pkg, default=False, + description='Activate the {0} package'.format(pkg)) + variant('lib', default=True, + description='Build the liblammps in addition to the executable') + + depends_on('mpi') + depends_on('fftw') + depends_on('voropp', when='+voronoi') + depends_on('netcdf+mpi', when='+user-nc-dump') + depends_on('blas', when='+user-atc') + depends_on('lapack', when='+user-atc') + + def setup_environment(self, spack_env, run_env): + self.target_name = self.compiler.name + + def edit(self, spec, prefix): + config = [] + + config.append('CC = c++') + if self.compiler.name == 'intel': + # This is taken from MAKE/OPTIONS/Makefile.intel_cpu_intelmpi + config.append('OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits') # noqa: E501 + config.append('CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload -fno-alias -ansi-alias -restrict $(OPTFLAGS)') # noqa: E501 + config.append('LINKFLAGS = -qopenmp $(OPTFLAGS)') + else: + # This is taken from MAKE/OPTIONS/Makefile.g++ + config.append('OPTFLAGS = -O3') + config.append('CCFLAGS = -fopenmp') + config.append('LINKFLAGS = -fopenmp $(OPTFLAGS)') + + config.append('SHFLAGS = -fPIC') + config.append('DEPFLAGS = -M') + config.append('LINK = c++') + + config.append('LIB = ') + config.append('SIZE = size') + + config.append('ARCHIVE = ar') + config.append('ARFLAGS = -rc') + config.append('SHLIBFLAGS = -shared') + + config.append('LMP_INC = -DLAMMPS_GZIP') + + mpi_path = self.spec['mpi'].prefix.lib + mpi_inc = self.spec['mpi'].prefix.include + + config.append( + 'MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I{0}'.format( + mpi_inc)) + config.append('MPI_PATH = -L{0}'.format(mpi_path)) + config.append('MPI_LIB = {0}'.format( + ' '.join(self.spec['mpi'].mpicxx_shared_libs))) + + config.append('FFT_INC = -DFFT_FFTW3 -L{0}'.format( + self.spec['fftw'].prefix.include)) + config.append('FFT_PATH = -L{0}'.format(self.spec['fftw'].prefix.lib)) + config.append('FFT_LIB = -lfftw3') + + config.append('JPG_INC = ') + config.append('JPG_PATH = ') + config.append('JPG_LIB = ') + + makefile_inc_template = \ + join_path(os.path.dirname(self.module.__file__), + 'Makefile.inc') + with open(makefile_inc_template, "r") as fhr: + config.extend(fhr.read().split('\n')) + + with working_dir('src/MAKE/'): + with open('Makefile.{0}'.format(self.target_name), 'w') as fh: + fh.write('\n'.join(config)) + + def build_meam(self): + with working_dir('lib/meam'): + filter_file(r'EXTRAMAKE = Makefile.lammps.ifort', + 'EXTRAMAKE = Makefile.lammps.spack', + 'Makefile.ifort') + filter_file('F90 = *ifort', + 'F90 = {0}'.format(self.compiler.fc), + 'Makefile.ifort') + + with open('Makefile.lammps.spack', 'w') as fh: + syslib = '' + syspath = '' + if self.compiler.name == 'gcc': + syslib = '-lgfortran' + elif self.compiler.name == 'intel': + syslib = '-lifcore' + + makefile = ['meam_SYSINC =', + 'meam_SYSLIB = {0}'.format(syslib), + 'meam_SYSPATH = {0}'.format(syspath)] + + fh.write('\n'.join(makefile)) + + make('lib', '-f', 'Makefile.ifort') + + def build_user_atc(self): + with working_dir('lib/atc'): + filter_file(r'CC =.*', + 'CC = {0}'.format(self.compiler.cxx), + 'Makefile.icc') + + mpi_include = self.spec['mpi'].prefix.include + + filter_file(r'CCFLAGS = *', + 'CCFLAGS = -I{0} '.format(mpi_include), + 'Makefile.icc') + + filter_file('LINK =.*', + 'LINK = {0}'.format(self.compiler.cxx), + 'Makefile.icc') + + make('lib', '-f', 'Makefile.icc') + with open('Makefile.lammps', 'w') as fh: + lapack_blas = (self.spec['lapack'].lapack_libs + + self.spec['blas'].blas_libs) + makefile = [ + 'user-atc_SYSINC =', + 'user-atc_SYSLIB = {0}'.format(lapack_blas.ld_flags), + 'user-atc_SYSPATH = '] + fh.write('\n'.join(makefile)) + + def build_voronoi(self): + # no need to set the voronoi_SYS variable in Makefile.lammps + # since the spack wrapper takes care of the path + with working_dir('src/VORONOI'): + filter_file(r'#include "voro\+\+\.hh"', + '#include <voro++/voro++.hh>', + 'compute_voronoi_atom.h') + + def build(self, spec, prefix): + for pkg in self.supported_packages: + _build_pkg_name = string.replace('build_{0}'.format(pkg), '-', '_') + if hasattr(self, _build_pkg_name): + _build_pkg = getattr(self, _build_pkg_name) + _build_pkg() + + with working_dir('src'): + for pkg in self.supported_packages: + if '+{0}'.format(pkg) in spec: + make('yes-{0}'.format(pkg)) + + make(self.target_name) + + if '+lib' in spec: + make('mode=shlib', self.target_name) + + def install(self, spec, prefix): + with working_dir('src'): + mkdirp(prefix.bin) + install('lmp_{0}'.format(self.target_name), prefix.bin) + + if '+lib' in spec: + mkdirp(prefix.lib) + install('liblammps_{0}.{1}'.format(self.target_name, + dso_suffix), prefix.lib) + + # TODO: install the necessary headers + mkdirp(prefix.include) diff --git a/var/spack/repos/builtin/packages/lbxproxy/package.py b/var/spack/repos/builtin/packages/lbxproxy/package.py index 3de3ade0c9d364e854c2729343c2e50024fb3ac8..3895134a7ca71b8a1ff78bfe2cd0468dc292a956 100644 --- a/var/spack/repos/builtin/packages/lbxproxy/package.py +++ b/var/spack/repos/builtin/packages/lbxproxy/package.py @@ -25,7 +25,7 @@ from spack import * -class Lbxproxy(Package): +class Lbxproxy(AutotoolsPackage): """lbxproxy accepts client connections, multiplexes them over a single connection to the X server, and performs various optimizations on the X protocol to make it faster over low bandwidth and/or high latency @@ -50,9 +50,3 @@ class Lbxproxy(Package): depends_on('bigreqsproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/lcms/package.py b/var/spack/repos/builtin/packages/lcms/package.py index 4d3fc59568a3bc160d6b866968da7d66cab8cf6e..ad85ebe055899df01bb4f6cc54a69285067d9a2c 100644 --- a/var/spack/repos/builtin/packages/lcms/package.py +++ b/var/spack/repos/builtin/packages/lcms/package.py @@ -25,7 +25,7 @@ from spack import * -class Lcms(Package): +class Lcms(AutotoolsPackage): """Little cms is a color management library. Implements fast transforms between ICC profiles. It is focused on speed, and is portable across several platforms (MIT license).""" @@ -37,8 +37,3 @@ class Lcms(Package): depends_on("jpeg") depends_on("libtiff") depends_on("zlib") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libapplewm/package.py b/var/spack/repos/builtin/packages/libapplewm/package.py index 85408053ad2d2a17d168085f04f070c18cd963d2..35091985e3753e35e9c436c72bee384af24fbc1c 100644 --- a/var/spack/repos/builtin/packages/libapplewm/package.py +++ b/var/spack/repos/builtin/packages/libapplewm/package.py @@ -25,7 +25,7 @@ from spack import * -class Libapplewm(Package): +class Libapplewm(AutotoolsPackage): """AppleWM is a simple library designed to interface with the Apple-WM extension. This extension allows X window managers to better interact with the Mac OS X Aqua user interface when running X11 in a rootless mode.""" @@ -43,12 +43,6 @@ class Libapplewm(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - # Crashes with this error message on Linux: - # HIServices/Processes.h: No such file or directory - # May only build properly on macOS? - - make() - make('install') + # Crashes with this error message on Linux: + # HIServices/Processes.h: No such file or directory + # May only build properly on macOS? diff --git a/var/spack/repos/builtin/packages/libarchive/package.py b/var/spack/repos/builtin/packages/libarchive/package.py index e439bf894ffb3896cc62ecc188c2e4ec74f1ab36..0edb3521d12cf52a0d36b81820e9431668279a6e 100644 --- a/var/spack/repos/builtin/packages/libarchive/package.py +++ b/var/spack/repos/builtin/packages/libarchive/package.py @@ -25,7 +25,7 @@ from spack import * -class Libarchive(Package): +class Libarchive(AutotoolsPackage): """libarchive: C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats.""" @@ -48,10 +48,5 @@ class Libarchive(Package): depends_on('libxml2') depends_on('expat') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - if self.run_tests: - make('check') # cannot build test suite with Intel compilers - make('install') + # NOTE: `make check` is known to fail with the Intel compilers + # The build test suite cannot be built with Intel diff --git a/var/spack/repos/builtin/packages/libcanberra/package.py b/var/spack/repos/builtin/packages/libcanberra/package.py new file mode 100644 index 0000000000000000000000000000000000000000..dfeb5c9c3e996fc54055904ee445add2849f9b36 --- /dev/null +++ b/var/spack/repos/builtin/packages/libcanberra/package.py @@ -0,0 +1,68 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Libcanberra(AutotoolsPackage): + """libcanberra is an implementation of the XDG Sound Theme and + Name Specifications, for generating event sounds on free desktops, + such as GNOME.""" + + homepage = "http://0pointer.de/lennart/projects/libcanberra/" + url = "http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz" + + version('0.30', '34cb7e4430afaf6f447c4ebdb9b42072') + + # TODO: Add variants and dependencies for the following audio support: + # ALSA, OSS, PulseAudio, udev, GStreamer, null, GTK3+ , tdb + + variant('gtk', default=False, description='Enable optional GTK+ support') + + depends_on('libxrender', when='+gtk') + depends_on('libxext', when='+gtk') + depends_on('libx11', when='+gtk') + depends_on('libxinerama', when='+gtk') + depends_on('libxrandr', when='+gtk') + depends_on('libxcursor', when='+gtk') + depends_on('libxcomposite', when='+gtk') + depends_on('libxdamage', when='+gtk') + depends_on('libxfixes', when='+gtk') + depends_on('libxcb', when='+gtk') + depends_on('libxau', when='+gtk') + depends_on('gtkplus', when='+gtk') + + depends_on('libvorbis') + + depends_on('pkg-config@0.9.0:', type='build') + + def configure_args(self): + args = ['--enable-static'] + + if '+gtk' in self.spec: + args.append('--enable-gtk') + else: + args.append('--disable-gtk') + + return args diff --git a/var/spack/repos/builtin/packages/libcerf/package.py b/var/spack/repos/builtin/packages/libcerf/package.py index 1964f03b95848044aba16833816cc8b6863ef483..82637431d6440ad37c513cc630548057f8b1da91 100644 --- a/var/spack/repos/builtin/packages/libcerf/package.py +++ b/var/spack/repos/builtin/packages/libcerf/package.py @@ -26,7 +26,7 @@ from spack import * -class Libcerf(Package): +class Libcerf(AutotoolsPackage): """A self-contained C library providing complex error functions, based on Faddeeva's plasma dispersion function w(z). Also provides Dawson's integral and Voigt's convolution of a Gaussian and a Lorentzian @@ -37,13 +37,12 @@ class Libcerf(Package): version('1.3', 'b3504c467204df71e62aeccf73a25612') - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec options = [] # Clang reports unused functions as errors, see # http://clang.debian.net/status.php?version=3.8.1&key=UNUSED_FUNCTION if spec.satisfies('%clang'): options.append('CFLAGS=-Wno-unused-function') - configure('--prefix=%s' % prefix, *options) - make() - make("install") + return options diff --git a/var/spack/repos/builtin/packages/libcircle/package.py b/var/spack/repos/builtin/packages/libcircle/package.py index 971c29f5f1ca623cc2740c5e7fbb70910c51f68f..e1063292190596c0f0b48e6fdb6b64ef4b8ac82a 100644 --- a/var/spack/repos/builtin/packages/libcircle/package.py +++ b/var/spack/repos/builtin/packages/libcircle/package.py @@ -25,7 +25,7 @@ from spack import * -class Libcircle(Package): +class Libcircle(AutotoolsPackage): """libcircle provides an efficient distributed queue on a cluster, using self-stabilizing work stealing.""" @@ -35,8 +35,3 @@ class Libcircle(Package): url='https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz') depends_on('mpi') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libdmx/package.py b/var/spack/repos/builtin/packages/libdmx/package.py index fa469fd4232bb8ec2023ef99064725cc9c476c55..2aeb5b9fbb37abd1e7b7f8f451de7f2e0ed9d086 100644 --- a/var/spack/repos/builtin/packages/libdmx/package.py +++ b/var/spack/repos/builtin/packages/libdmx/package.py @@ -25,7 +25,7 @@ from spack import * -class Libdmx(Package): +class Libdmx(AutotoolsPackage): """libdmx - X Window System DMX (Distributed Multihead X) extension library.""" @@ -41,9 +41,3 @@ class Libdmx(Package): depends_on('dmxproto@2.2.99.1:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libedit/package.py b/var/spack/repos/builtin/packages/libedit/package.py index 235e7648bcaa709b9eec1808326bfd03717b083b..5dcee61caba4c81fca858a2f08b69d9e08925860 100644 --- a/var/spack/repos/builtin/packages/libedit/package.py +++ b/var/spack/repos/builtin/packages/libedit/package.py @@ -25,7 +25,7 @@ from spack import * -class Libedit(Package): +class Libedit(AutotoolsPackage): """An autotools compatible port of the NetBSD editline library""" homepage = "http://thrysoee.dk/editline/" url = "http://thrysoee.dk/editline/libedit-20150325-3.1.tar.gz" @@ -34,9 +34,3 @@ class Libedit(Package): url="http://thrysoee.dk/editline/libedit-20150325-3.1.tar.gz") depends_on('ncurses') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libepoxy/package.py b/var/spack/repos/builtin/packages/libepoxy/package.py index 364ea1e30c5d099f2bcdd9e3a2756ac0d59e6f97..32c95fdda428a3340930ed43e17d7ccddabe5e06 100644 --- a/var/spack/repos/builtin/packages/libepoxy/package.py +++ b/var/spack/repos/builtin/packages/libepoxy/package.py @@ -25,15 +25,10 @@ from spack import * -class Libepoxy(Package): +class Libepoxy(AutotoolsPackage): """Epoxy is a library for handling OpenGL function pointer management for you.""" homepage = "https://github.com/anholt/libepoxy" url = "https://github.com/anholt/libepoxy/releases/download/v1.3.1/libepoxy-1.3.1.tar.bz2" version('1.3.1', '96f6620a9b005a503e7b44b0b528287d') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py index 65b3a716c0a651e28f9c1786b5cb2a6cd5d569a5..f06c46a7159064764299f46f5eea6a568d91ee11 100644 --- a/var/spack/repos/builtin/packages/libevent/package.py +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -25,7 +25,7 @@ from spack import * -class Libevent(Package): +class Libevent(AutotoolsPackage): """The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support @@ -48,17 +48,17 @@ class Libevent(Package): version('2.0.13', 'af786b4b3f790c9d3279792edf7867fc') version('2.0.12', '42986228baf95e325778ed328a93e070') + # Does not build with OpenSSL 1.1.0 variant('openssl', default=True, description="Build with encryption enabled at the libevent level.") - depends_on('openssl', when='+openssl') + depends_on('openssl @:1.0', when='+openssl') - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec configure_args = [] if '+openssl' in spec: configure_args.append('--enable-openssl') else: - configure_args.append('--enable-openssl') + configure_args.append('--disable-openssl') - configure("--prefix=%s" % prefix, *configure_args) - make() - make("install") + return configure_args diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py index ddb7709ddfc35a7467e237ef0866d2069e0d7452..79ba50d77a2f1501f0ecd7267fe7f8700e5d9544 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -33,7 +33,7 @@ class Libffi(AutotoolsPackage): homepage = "https://sourceware.org/libffi/" version('3.2.1', '83b89587607e3eb65c70d361f13bab43', - url="ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") + url="https://www.mirrorservice.org/sites/sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") # version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = # "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug # $(lib64) instead of ${lib64} in libffi.pc diff --git a/var/spack/repos/builtin/packages/libfontenc/package.py b/var/spack/repos/builtin/packages/libfontenc/package.py index 1c7fa196d9d88631add1f460b534d521e94665e9..945f74ccad3eb505b1cc4edc67d87d2f5f31370e 100644 --- a/var/spack/repos/builtin/packages/libfontenc/package.py +++ b/var/spack/repos/builtin/packages/libfontenc/package.py @@ -25,7 +25,7 @@ from spack import * -class Libfontenc(Package): +class Libfontenc(AutotoolsPackage): """libfontenc - font encoding library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libfontenc" @@ -38,9 +38,3 @@ class Libfontenc(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libfs/package.py b/var/spack/repos/builtin/packages/libfs/package.py index 96bf62afd7f965f9522ec1492e0c214232b2e85f..96cb396b0ae7db6915e145438cae73e8570e36f3 100644 --- a/var/spack/repos/builtin/packages/libfs/package.py +++ b/var/spack/repos/builtin/packages/libfs/package.py @@ -25,7 +25,7 @@ from spack import * -class Libfs(Package): +class Libfs(AutotoolsPackage): """libFS - X Font Service client library. This library is used by clients of X Font Servers (xfs), such as @@ -41,9 +41,3 @@ class Libfs(Package): depends_on('xtrans', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py index b556def4d3b522bba0e11a8af9a98f3eea294b86..1eae9c6530a11784a15c60275be81541db5930c6 100644 --- a/var/spack/repos/builtin/packages/libgcrypt/package.py +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -25,20 +25,15 @@ from spack import * -class Libgcrypt(Package): +class Libgcrypt(AutotoolsPackage): """Libgcrypt is a general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptographic building blocks: symmetric ciphers, hash algorithms, MACs, public key algorithms, large integer functions, random numbers and a lot of supporting functions. """ homepage = "http://www.gnu.org/software/libgcrypt/" - url = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.2.tar.bz2" + url = "http://gd.tuwien.ac.at/pub/gnupg/libgcrypt/libgcrypt-1.6.2.tar.bz2" version('1.6.2', 'b54395a93cb1e57619943c082da09d5f') depends_on("libgpg-error") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py index 6329adf8f3e7655155d5fbef62a5181e2d3fcdd1..58867c85f8d3e95f150193dc2564e760eb472f75 100644 --- a/var/spack/repos/builtin/packages/libgd/package.py +++ b/var/spack/repos/builtin/packages/libgd/package.py @@ -26,7 +26,7 @@ from spack import * -class Libgd(Package): +class Libgd(AutotoolsPackage): """GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and "wrappers" are available for Perl, PHP and other languages. GD creates PNG, JPEG, GIF, @@ -38,8 +38,9 @@ class Libgd(Package): """ homepage = "https://github.com/libgd/libgd" - url = "https://github.com/libgd/libgd/archive/gd-2.1.1.tar.gz" + url = 'https://github.com/libgd/libgd/releases/download/gd-2.2.4/libgd-2.2.4.tar.gz' + version('2.2.4', '0a3c307b5075edbe1883543dd1153c02') version('2.2.3', 'a67bd15fa33d4aac0a1c7904aed19f49') version('2.1.1', 'e91a1a99903e460e7ba00a794e72cc1e') @@ -54,19 +55,3 @@ class Libgd(Package): depends_on('libpng') depends_on('libtiff') depends_on('fontconfig') - - def install(self, spec, prefix): - autoreconf("--install", "--force", - "-I", "m4", - "-I", join_path(spec['gettext'].prefix, - "share", "aclocal"), - "-I", join_path(spec['pkg-config'].prefix, - "share", "aclocal"), - "-I", join_path(spec['automake'].prefix, - "share", "aclocal"), - "-I", join_path(spec['libtool'].prefix, - "share", "aclocal") - ) - configure('--prefix={0}'.format(prefix)) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libgpg-error/package.py b/var/spack/repos/builtin/packages/libgpg-error/package.py index a0e2acd51601d0b71928442c90afa0dbb67963c3..67cd1759c0ca0a1accdb40db5f03f1e5783f8ebe 100644 --- a/var/spack/repos/builtin/packages/libgpg-error/package.py +++ b/var/spack/repos/builtin/packages/libgpg-error/package.py @@ -25,19 +25,14 @@ from spack import * -class LibgpgError(Package): +class LibgpgError(AutotoolsPackage): """Libgpg-error is a small library that defines common error values for all GnuPG components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the future. """ homepage = "https://www.gnupg.org/related_software/libgpg-error" - url = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.18.tar.bz2" + url = "http://gd.tuwien.ac.at/pub/gnupg/libgpg-error/libgpg-error-1.18.tar.bz2" version('1.21', 'ab0b5aba6d0a185b41d07bda804fd8b2') version('1.18', '12312802d2065774b787cbfc22cc04e9') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libgtextutils/package.py b/var/spack/repos/builtin/packages/libgtextutils/package.py index 201e0318694e04d0c75413663fba6dfb77a719fb..05b6b7dabe717d96d869354cf7e185baa0a9a1df 100644 --- a/var/spack/repos/builtin/packages/libgtextutils/package.py +++ b/var/spack/repos/builtin/packages/libgtextutils/package.py @@ -25,16 +25,10 @@ from spack import * -class Libgtextutils(Package): +class Libgtextutils(AutotoolsPackage): """Gordon's Text utils Library.""" homepage = "https://github.com/agordon/libgtextutils" url = "https://github.com/agordon/libgtextutils/releases/download/0.7/libgtextutils-0.7.tar.gz" version('0.7', '593c7c62e3c76ec49f5736eed4f96806') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libhio/package.py b/var/spack/repos/builtin/packages/libhio/package.py index 17bd86d310fecc8083d4fa34fa86e878d272d0c6..181aca979f71e1e3bcc3dbba1a232cf6a0680e28 100644 --- a/var/spack/repos/builtin/packages/libhio/package.py +++ b/var/spack/repos/builtin/packages/libhio/package.py @@ -25,7 +25,7 @@ from spack import * -class Libhio(Package): +class Libhio(AutotoolsPackage): """ A library for writing to hierarchical data store systems. """ @@ -38,8 +38,3 @@ class Libhio(Package): depends_on("libjson-c") depends_on("bzip2") depends_on("pkg-config", type="build") - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libice/package.py b/var/spack/repos/builtin/packages/libice/package.py index 1f6fd2f9015b91d3d5f46e03e7efc56b9fc552c7..36436df501cc30358e59e3c34026fcb86a8bc83c 100644 --- a/var/spack/repos/builtin/packages/libice/package.py +++ b/var/spack/repos/builtin/packages/libice/package.py @@ -25,7 +25,7 @@ from spack import * -class Libice(Package): +class Libice(AutotoolsPackage): """libICE - Inter-Client Exchange Library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libICE" @@ -37,9 +37,3 @@ class Libice(Package): depends_on('xtrans', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index 3fe159d7b99f3fba33779d2eec2d15321dd41366..8b9413bc86b4a348ad28b5bc1992a839b4dd363c 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -25,7 +25,7 @@ from spack import * -class LibjpegTurbo(Package): +class LibjpegTurbo(AutotoolsPackage): """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG compression and decompression. libjpeg is a library that implements JPEG image encoding, decoding and @@ -43,8 +43,3 @@ class LibjpegTurbo(Package): # TODO: Implement the selection between two supported assemblers. # depends_on("yasm", type='build') depends_on("nasm", type='build') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/liblbxutil/package.py b/var/spack/repos/builtin/packages/liblbxutil/package.py index 1de59defd6c7b86b36fab89c3be9586ea8aef1d8..fe1be09cf97a7452645b8ac85b6aee2b5aa1dbed 100644 --- a/var/spack/repos/builtin/packages/liblbxutil/package.py +++ b/var/spack/repos/builtin/packages/liblbxutil/package.py @@ -25,7 +25,7 @@ from spack import * -class Liblbxutil(Package): +class Liblbxutil(AutotoolsPackage): """liblbxutil - Low Bandwith X extension (LBX) utility routines.""" homepage = "http://cgit.freedesktop.org/xorg/lib/liblbxutil" @@ -43,9 +43,3 @@ class Liblbxutil(Package): # undefined symbol: Xalloc # See https://bugs.freedesktop.org/show_bug.cgi?id=8421 # Adding a dependency on libxdmcp and adding LIBS=-lXdmcp did not fix it - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libmng/package.py b/var/spack/repos/builtin/packages/libmng/package.py index a77aada79cc7978f2831cf083c8e3440a5014c3d..c8ea90401b2392aa201a5bc3474aaeebb43225b5 100644 --- a/var/spack/repos/builtin/packages/libmng/package.py +++ b/var/spack/repos/builtin/packages/libmng/package.py @@ -25,7 +25,7 @@ from spack import * -class Libmng(Package): +class Libmng(AutotoolsPackage): """libmng -THE reference library for reading, displaying, writing and examining Multiple-Image Network Graphics. MNG is the animation extension to the popular PNG image-format.""" @@ -43,7 +43,6 @@ def patch(self): filter_file(r'^(\#include \<jpeglib\.h\>)', '#include<stdio.h>\n\\1', 'libmng_types.h') - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") + @run_before('configure') + def clean_configure_directory(self): + make('distclean') diff --git a/var/spack/repos/builtin/packages/libmonitor/package.py b/var/spack/repos/builtin/packages/libmonitor/package.py index f680baa26558fe29aaf3be94b2dde2ec1e2b9562..26a87c78fa41356ca7cf8be6d7955950b2c0fea1 100644 --- a/var/spack/repos/builtin/packages/libmonitor/package.py +++ b/var/spack/repos/builtin/packages/libmonitor/package.py @@ -25,7 +25,7 @@ from spack import * -class Libmonitor(Package): +class Libmonitor(AutotoolsPackage): """Libmonitor is a library for process and thread control.""" homepage = "https://github.com/HPCToolkit/libmonitor" version('20130218', git='https://github.com/HPCToolkit/libmonitor.git', @@ -36,8 +36,3 @@ class Libmonitor(Package): patch('libmonitorkrell-0000.patch', when='@20130218+krellpatch') patch('libmonitorkrell-0001.patch', when='@20130218+krellpatch') patch('libmonitorkrell-0002.patch', when='@20130218+krellpatch') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libnbc/package.py b/var/spack/repos/builtin/packages/libnbc/package.py index 414498a37aea3ede3488a1adcbac190ac6f0abaf..e135fa6835e1c2cdf17febe81c7e88446d849e22 100644 --- a/var/spack/repos/builtin/packages/libnbc/package.py +++ b/var/spack/repos/builtin/packages/libnbc/package.py @@ -25,7 +25,7 @@ from spack import * -class Libnbc(Package): +class Libnbc(AutotoolsPackage): """LibNBC is a prototypic implementation of a nonblocking interface for MPI collective operations. Based on ANSI C and MPI-1, it supports all MPI-1 collective operations in a @@ -37,8 +37,3 @@ class Libnbc(Package): version('1.1.1', 'ece5c94992591a9fa934a90e5dbe50ce') depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libogg/package.py b/var/spack/repos/builtin/packages/libogg/package.py new file mode 100644 index 0000000000000000000000000000000000000000..bb80764b7cd75d06f62536836cbef41cf5222c59 --- /dev/null +++ b/var/spack/repos/builtin/packages/libogg/package.py @@ -0,0 +1,35 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Libogg(AutotoolsPackage): + """Ogg is a multimedia container format, and the native file and stream + format for the Xiph.org multimedia codecs.""" + + homepage = "https://www.xiph.org/ogg/" + url = "http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz" + + version('1.3.2', 'b72e1a1dbadff3248e4ed62a4177e937') diff --git a/var/spack/repos/builtin/packages/liboldx/package.py b/var/spack/repos/builtin/packages/liboldx/package.py index 9e85f1ed65f8470095ab458119793a622b92d5c8..1bec00bfe3718add1eae0b6726bee3f8877fa0ea 100644 --- a/var/spack/repos/builtin/packages/liboldx/package.py +++ b/var/spack/repos/builtin/packages/liboldx/package.py @@ -25,7 +25,7 @@ from spack import * -class Liboldx(Package): +class Liboldx(AutotoolsPackage): """X version 10 backwards compatibility.""" homepage = "https://cgit.freedesktop.org/xorg/lib/liboldX/" @@ -37,9 +37,3 @@ class Liboldx(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libpthread-stubs/package.py b/var/spack/repos/builtin/packages/libpthread-stubs/package.py index fdaf327c2a7e5837243bff10ba7d6fd7e861b2c9..911bf6814c7b6065d1a884c434cf95d818ca0dc2 100644 --- a/var/spack/repos/builtin/packages/libpthread-stubs/package.py +++ b/var/spack/repos/builtin/packages/libpthread-stubs/package.py @@ -25,7 +25,7 @@ from spack import * -class LibpthreadStubs(Package): +class LibpthreadStubs(AutotoolsPackage): """The libpthread-stubs package provides weak aliases for pthread functions not provided in libc or otherwise available by default.""" @@ -33,8 +33,3 @@ class LibpthreadStubs(Package): url = "https://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.gz" version('0.3', 'a09d928c4af54fe5436002345ef71138') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/libquo/package.py b/var/spack/repos/builtin/packages/libquo/package.py index 8856913bb261a023dd802f0143fcfb36da6f11c7..76a508f9c612a0c91830e37d72e9a51364dbf8c0 100644 --- a/var/spack/repos/builtin/packages/libquo/package.py +++ b/var/spack/repos/builtin/packages/libquo/package.py @@ -23,19 +23,16 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os -class Libquo(Package): - """A high-level, easy to use programming interface tailored specifically - for MPI/MPI+X codes that may benefit from evolving process binding - policies during their execution. QUO allows for arbitrary process binding - policies to be enacted and reverted during the execution of an MPI/MPI+X - application as different computational phases are entered and exited, - respectively.""" +class Libquo(AutotoolsPackage): - homepage = "https://github.com/losalamos/libquo" - url = "https://github.com/losalamos/libquo/archive/v1.2.9.tar.gz" + """QUO (as in "status quo") is a runtime library that aids in accommodating + thread-level heterogeneity in dynamic, phased MPI+X applications comprising + single- and multi-threaded libraries.""" + + homepage = "https://github.com/lanl/libquo" + url = "https://github.com/lanl/libquo/archive/v1.2.9.tar.gz" version('1.2.9', 'ca82ab33f13e2b89983f81e7c02e98c2') @@ -44,25 +41,8 @@ class Libquo(Package): depends_on('automake', type='build') depends_on('libtool', type='build') - def install(self, spec, prefix): - autoreconf_options = [ - '--install', - '--verbose', - '--force', - '-I', 'config', - '-I', os.path.join(spec['automake'].prefix, - 'share', 'aclocal'), - '-I', os.path.join(spec['libtool'].prefix, - 'share', 'aclocal') - ] - autoreconf(*autoreconf_options) - - configure_options = [ - '--prefix={0}'.format(prefix), - 'CC=%s' % join_path(spec['mpi'].prefix.bin, "mpicc"), - 'FC=%s' % join_path(spec['mpi'].prefix.bin, "mpif90") + def configure_args(self): + return [ + 'CC={0}'.format(self.spec['mpi'].mpicc), + 'FC={0}'.format(self.spec['mpi'].mpifc) ] - configure(*configure_options) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libsigsegv/package.py b/var/spack/repos/builtin/packages/libsigsegv/package.py index a5a3e8eb5ff92535e4b7c04b0a5ae48fd9237275..f354b260a9246a296dc40cb0986c8eaa7d4437ad 100644 --- a/var/spack/repos/builtin/packages/libsigsegv/package.py +++ b/var/spack/repos/builtin/packages/libsigsegv/package.py @@ -29,7 +29,7 @@ class Libsigsegv(AutotoolsPackage): """GNU libsigsegv is a library for handling page faults in user mode.""" homepage = "https://www.gnu.org/software/libsigsegv/" - url = "ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz" + url = "https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz" patch('patch.new_config_guess', when='@2.10') diff --git a/var/spack/repos/builtin/packages/libsm/package.py b/var/spack/repos/builtin/packages/libsm/package.py index 4affd50127b4a50ebaafa9e5340be562d59241b4..9479da07d7a5473f85af4ff886a39b92bfb868c4 100644 --- a/var/spack/repos/builtin/packages/libsm/package.py +++ b/var/spack/repos/builtin/packages/libsm/package.py @@ -25,7 +25,7 @@ from spack import * -class Libsm(Package): +class Libsm(AutotoolsPackage): """libSM - X Session Management Library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libSM" @@ -39,9 +39,3 @@ class Libsm(Package): depends_on('xtrans', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py index 805881ce0707cdce177932775bca056af41d2d63..a7e3ab10aed4e942efa2708699096759d9f3860f 100644 --- a/var/spack/repos/builtin/packages/libsodium/package.py +++ b/var/spack/repos/builtin/packages/libsodium/package.py @@ -25,7 +25,7 @@ from spack import * -class Libsodium(Package): +class Libsodium(AutotoolsPackage): """Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more.""" homepage = "https://download.libsodium.org/doc/" @@ -44,9 +44,3 @@ def url_for_version(self, version): if version < Version('1.0.4'): url += 'old/' return url + 'libsodium-{0}.tar.gz'.format(version) - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py index 70c371b3b817ce955827c08f4eec59ec9de14448..3e5b57a965613e43f0a492f196257e90addb1452 100644 --- a/var/spack/repos/builtin/packages/libtiff/package.py +++ b/var/spack/repos/builtin/packages/libtiff/package.py @@ -28,7 +28,7 @@ class Libtiff(AutotoolsPackage): """libtiff graphics format library""" homepage = "http://www.simplesystems.org/libtiff/" - url = "ftp://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz" + url = "http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz" version('4.0.6', 'd1d2e940dea0b5ad435f21f03d96dd72') version('4.0.3', '051c1068e6a0627f461948c365290410') diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index cd12503681403e4f8b03d6992d8a360d5b038d04..ae706089c9757fed6ebc36129ef29058d019826d 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -36,6 +36,8 @@ class Libtool(AutotoolsPackage): depends_on('m4@1.4.6:', type='build') + build_directory = 'spack-build' + def _make_executable(self, name): return Executable(join_path(self.prefix.bin, name)) diff --git a/var/spack/repos/builtin/packages/libunistring/package.py b/var/spack/repos/builtin/packages/libunistring/package.py index 5b8837e72b27a09b50014c4a162e8e28153f116f..08657f89d19363e2fa5795176a82644cd463d16f 100644 --- a/var/spack/repos/builtin/packages/libunistring/package.py +++ b/var/spack/repos/builtin/packages/libunistring/package.py @@ -25,7 +25,7 @@ from spack import * -class Libunistring(Package): +class Libunistring(AutotoolsPackage): """This library provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.""" @@ -34,9 +34,4 @@ class Libunistring(Package): version('0.9.6', 'cb09c398020c27edac10ca590e9e9ef3') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - # make('check') # test-verify fails for me, contacted developers - make('install') + # NOTE: `make check` fails test-verify diff --git a/var/spack/repos/builtin/packages/libunwind/package.py b/var/spack/repos/builtin/packages/libunwind/package.py index 63ab4aec59b3a8b380d01800996f29b1b7e92b8d..1e727f84f37b874f5b920e369efd52a7b4997122 100644 --- a/var/spack/repos/builtin/packages/libunwind/package.py +++ b/var/spack/repos/builtin/packages/libunwind/package.py @@ -25,15 +25,10 @@ from spack import * -class Libunwind(Package): +class Libunwind(AutotoolsPackage): """A portable and efficient C programming interface (API) to determine the call-chain of a program.""" homepage = "http://www.nongnu.org/libunwind/" url = "http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz" version('1.1', 'fb4ea2f6fbbe45bf032cd36e586883ce') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libuuid/package.py b/var/spack/repos/builtin/packages/libuuid/package.py index b8f6b1cc3af73026727ae81a6843a7bdcfd3fe38..31f109cba3bae100f12ebff32f1457d3aa9fc297 100644 --- a/var/spack/repos/builtin/packages/libuuid/package.py +++ b/var/spack/repos/builtin/packages/libuuid/package.py @@ -25,16 +25,10 @@ from spack import * -class Libuuid(Package): +class Libuuid(AutotoolsPackage): """Portable uuid C library""" homepage = "http://sourceforge.net/projects/libuuid/" url = "http://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibuuid%2F&ts=1433881396&use_mirror=iweb" version('1.0.3', 'd44d866d06286c08ba0846aba1086d68') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py index dae10809f22dbc58f1c1d8a3e907a976bf8523a7..2f303280daf436e0f6cdf6aaa7682e1ad41ce2fa 100644 --- a/var/spack/repos/builtin/packages/libuv/package.py +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -25,7 +25,7 @@ from spack import * -class Libuv(Package): +class Libuv(AutotoolsPackage): """Multi-platform library with a focus on asynchronous IO""" homepage = "http://libuv.org" url = "https://github.com/libuv/libuv/archive/v1.9.0.tar.gz" @@ -36,11 +36,8 @@ class Libuv(Package): depends_on('autoconf', type='build') depends_on('libtool', type='build') - def install(self, spec, prefix): + def autoreconf(self, spec, prefix): + # This is needed because autogen.sh generates on-the-fly + # an m4 macro needed during configuration bash = which("bash") bash('autogen.sh') - configure('--prefix=%s' % prefix) - - make() - make("check") - make("install") diff --git a/var/spack/repos/builtin/packages/libvorbis/package.py b/var/spack/repos/builtin/packages/libvorbis/package.py new file mode 100644 index 0000000000000000000000000000000000000000..e716abe46dc71cccefcdef8c27d0d4eede46a298 --- /dev/null +++ b/var/spack/repos/builtin/packages/libvorbis/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Libvorbis(AutotoolsPackage): + """Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, + general-purpose compressed audio format for mid to high quality (8kHz- + 48.0kHz, 16+ bit, polyphonic) audio and music at fixed and variable + bitrates from 16 to 128 kbps/channel.""" + + homepage = "https://xiph.org/vorbis/" + url = "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz" + + version('1.3.5', '7220e089f3be3412a2317d6fde9e3944') + + depends_on('libogg') + + depends_on('pkg-config@0.9.0:', type='build') + + # `make check` crashes when run in parallel + parallel = False diff --git a/var/spack/repos/builtin/packages/libwindowswm/package.py b/var/spack/repos/builtin/packages/libwindowswm/package.py index 3836e0d419477d590762908588efb91ae0830604..5b331f428cb6e2bbeb878b758d87a51cdc59793f 100644 --- a/var/spack/repos/builtin/packages/libwindowswm/package.py +++ b/var/spack/repos/builtin/packages/libwindowswm/package.py @@ -25,7 +25,7 @@ from spack import * -class Libwindowswm(Package): +class Libwindowswm(AutotoolsPackage): """WindowsWM - Cygwin/X rootless window management extension. WindowsWM is a simple library designed to interface with the @@ -45,9 +45,3 @@ class Libwindowswm(Package): depends_on('windowswmproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libx11/package.py b/var/spack/repos/builtin/packages/libx11/package.py index c5df2e0f83efa7d929b5acf4063cc68138abbcb5..d9c28836b8e3c4dd384706a4ea8b12e5fe5f3d87 100644 --- a/var/spack/repos/builtin/packages/libx11/package.py +++ b/var/spack/repos/builtin/packages/libx11/package.py @@ -25,7 +25,7 @@ from spack import * -class Libx11(Package): +class Libx11(AutotoolsPackage): """libX11 - Core X11 protocol client library.""" homepage = "https://www.x.org/" @@ -42,10 +42,3 @@ class Libx11(Package): depends_on('inputproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py index eb1f1326c64cb5e190c5c13cd146708551465190..bf4e9f5e4eb5b2ade3d6a6f48b9dbac84d1e236d 100644 --- a/var/spack/repos/builtin/packages/libxau/package.py +++ b/var/spack/repos/builtin/packages/libxau/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxau(Package): +class Libxau(AutotoolsPackage): """The libXau package contains a library implementing the X11 Authorization Protocol. This is useful for restricting client access to the display.""" @@ -38,10 +38,3 @@ class Libxau(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/libxaw/package.py b/var/spack/repos/builtin/packages/libxaw/package.py index 9f92ff57d2dff0984a373543867df78d7973f9a4..f3779be7ed3e70e2f30ec0cfbefac9a28e8a5e7c 100644 --- a/var/spack/repos/builtin/packages/libxaw/package.py +++ b/var/spack/repos/builtin/packages/libxaw/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxaw(Package): +class Libxaw(AutotoolsPackage): """Xaw is the X Athena Widget Set. Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library.""" @@ -44,9 +44,3 @@ class Libxaw(Package): depends_on('xextproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxaw3d/package.py b/var/spack/repos/builtin/packages/libxaw3d/package.py index 498f57cbca319ae052f25a11d051ffad66d84b85..0e350aa2ce3e37bba4e38068cacee6d467d3b591 100644 --- a/var/spack/repos/builtin/packages/libxaw3d/package.py +++ b/var/spack/repos/builtin/packages/libxaw3d/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxaw3d(Package): +class Libxaw3d(AutotoolsPackage): """Xaw3d is the X 3D Athena Widget Set. Xaw3d is a widget set based on the X Toolkit Intrinsics (Xt) Library.""" @@ -42,9 +42,3 @@ class Libxaw3d(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index 9fa1c6f97ce79b8cab05b0caab62caeb49e0834c..0e4d00da979897d758c294ccd0784b30984b1829 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxcb(Package): +class Libxcb(AutotoolsPackage): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and @@ -52,10 +52,3 @@ def patch(self): 'typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/libxcomposite/package.py b/var/spack/repos/builtin/packages/libxcomposite/package.py index 48cba002500d9ce097de029c947faab51b21f086..30d3a4c0caedc99e7349245b4b6d09e9c1179362 100644 --- a/var/spack/repos/builtin/packages/libxcomposite/package.py +++ b/var/spack/repos/builtin/packages/libxcomposite/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxcomposite(Package): +class Libxcomposite(AutotoolsPackage): """libXcomposite - client library for the Composite extension to the X11 protocol.""" @@ -40,9 +40,3 @@ class Libxcomposite(Package): depends_on('compositeproto@0.4:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxcursor/package.py b/var/spack/repos/builtin/packages/libxcursor/package.py index 215452ef52545fa79828ecdb4bde6f6dee8b8331..ee5065bfa4fd6a29f4b30302cbe67db98ba03a2d 100644 --- a/var/spack/repos/builtin/packages/libxcursor/package.py +++ b/var/spack/repos/builtin/packages/libxcursor/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxcursor(Package): +class Libxcursor(AutotoolsPackage): """libXcursor - X Window System Cursor management library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXcursor" @@ -40,9 +40,3 @@ class Libxcursor(Package): depends_on('fixesproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxdamage/package.py b/var/spack/repos/builtin/packages/libxdamage/package.py index 448ac21945ccd762446640efe43a00a006cf90e9..4eca877421f59940e177ad6ffc98946853f08dc8 100644 --- a/var/spack/repos/builtin/packages/libxdamage/package.py +++ b/var/spack/repos/builtin/packages/libxdamage/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxdamage(Package): +class Libxdamage(AutotoolsPackage): """This package contains the library for the X Damage extension.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXdamage" @@ -41,9 +41,3 @@ class Libxdamage(Package): depends_on('xextproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxdmcp/package.py b/var/spack/repos/builtin/packages/libxdmcp/package.py index c05d4b87719b96d1a51d555f6e24e16115ad6f33..7c4fd068f0dca6b659c4adf54d95494a45d21024 100644 --- a/var/spack/repos/builtin/packages/libxdmcp/package.py +++ b/var/spack/repos/builtin/packages/libxdmcp/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxdmcp(Package): +class Libxdmcp(AutotoolsPackage): """libXdmcp - X Display Manager Control Protocol library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXdmcp" @@ -36,10 +36,3 @@ class Libxdmcp(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/libxevie/package.py b/var/spack/repos/builtin/packages/libxevie/package.py index b9f0e4163137e5bdf883e7d8c3acc6f054d66777..7435027b48b72491d66bf3724ad957277c63f37c 100644 --- a/var/spack/repos/builtin/packages/libxevie/package.py +++ b/var/spack/repos/builtin/packages/libxevie/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxevie(Package): +class Libxevie(AutotoolsPackage): """Xevie - X Event Interception Extension (XEvIE).""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXevie" @@ -41,9 +41,3 @@ class Libxevie(Package): depends_on('evieext', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxext/package.py b/var/spack/repos/builtin/packages/libxext/package.py index 192ab3957a13362d23b74745ebb4466ce99ff30f..528f00cc357a3321f3b6d58a01fdbc595ec2162a 100644 --- a/var/spack/repos/builtin/packages/libxext/package.py +++ b/var/spack/repos/builtin/packages/libxext/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxext(Package): +class Libxext(AutotoolsPackage): """libXext - library for common extensions to the X11 protocol.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXext" @@ -39,9 +39,3 @@ class Libxext(Package): depends_on('xextproto@7.1.99:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxfixes/package.py b/var/spack/repos/builtin/packages/libxfixes/package.py index 6b8b599a8566d5d0c5551b0c69f72ecf7fefec6c..6add3bb56d9c26045a8b85f2c5103bcdc9f5270b 100644 --- a/var/spack/repos/builtin/packages/libxfixes/package.py +++ b/var/spack/repos/builtin/packages/libxfixes/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxfixes(Package): +class Libxfixes(AutotoolsPackage): """This package contains header files and documentation for the XFIXES extension. Library and server implementations are separate.""" @@ -41,9 +41,3 @@ class Libxfixes(Package): depends_on('xextproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxfont/package.py b/var/spack/repos/builtin/packages/libxfont/package.py index 1ebf321c9f74c749bfb1a50f12270fd8547a436f..7538c34f078b26923b4522894248863dc917ba96 100644 --- a/var/spack/repos/builtin/packages/libxfont/package.py +++ b/var/spack/repos/builtin/packages/libxfont/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxfont(Package): +class Libxfont(AutotoolsPackage): """libXfont provides the core of the legacy X11 font system, handling the index files (fonts.dir, fonts.alias, fonts.scale), the various font file formats, and rasterizing them. It is used by the X servers, the @@ -46,9 +46,3 @@ class Libxfont(Package): depends_on('fontsproto@2.1.3:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxfont2/package.py b/var/spack/repos/builtin/packages/libxfont2/package.py index 8611e65ebb9c5b1d1ba64d58f7299d73d48f568f..bc1dc06dd034926d934405ad91f86dd724fea24e 100644 --- a/var/spack/repos/builtin/packages/libxfont2/package.py +++ b/var/spack/repos/builtin/packages/libxfont2/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxfont2(Package): +class Libxfont2(AutotoolsPackage): """libXfont provides the core of the legacy X11 font system, handling the index files (fonts.dir, fonts.alias, fonts.scale), the various font file formats, and rasterizing them. It is used by the X servers, the @@ -46,9 +46,3 @@ class Libxfont2(Package): depends_on('fontsproto@2.1.3:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxfontcache/package.py b/var/spack/repos/builtin/packages/libxfontcache/package.py index 5421f093cad90d4809e82c98d1fe6ed076f52884..c4a4d5675a85c176fb8022d62f037fc41ea98caf 100644 --- a/var/spack/repos/builtin/packages/libxfontcache/package.py +++ b/var/spack/repos/builtin/packages/libxfontcache/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxfontcache(Package): +class Libxfontcache(AutotoolsPackage): """Xfontcache - X-TrueType font cache extension client library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXfontcache" @@ -40,9 +40,3 @@ class Libxfontcache(Package): depends_on('fontcacheproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxft/package.py b/var/spack/repos/builtin/packages/libxft/package.py index b1b8f853d0d98263ade282fb1802bc2ae6e66b4f..8385b4168a6f0121e6eb374d9e02ff282e9e5c44 100644 --- a/var/spack/repos/builtin/packages/libxft/package.py +++ b/var/spack/repos/builtin/packages/libxft/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxft(Package): +class Libxft(AutotoolsPackage): """X FreeType library. Xft version 2.1 was the first stand alone release of Xft, a library that @@ -44,9 +44,3 @@ class Libxft(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxi/package.py b/var/spack/repos/builtin/packages/libxi/package.py index 4e9a2735790e605b11b7817bae357e235c31701b..5334ef9044cb1ad03e507b1f253726dbdeca8ffa 100644 --- a/var/spack/repos/builtin/packages/libxi/package.py +++ b/var/spack/repos/builtin/packages/libxi/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxi(Package): +class Libxi(AutotoolsPackage): """libXi - library for the X Input Extension.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXi" @@ -40,9 +40,3 @@ class Libxi(Package): depends_on('xproto@7.0.13:', type='build') depends_on('xextproto@7.0.3:', type='build') depends_on('inputproto@2.2.99.1:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxinerama/package.py b/var/spack/repos/builtin/packages/libxinerama/package.py index a001c41ca7870451338ffe88b92208c6440577ae..9e3633629a53ae7c760b14a27736092fb7f17d51 100644 --- a/var/spack/repos/builtin/packages/libxinerama/package.py +++ b/var/spack/repos/builtin/packages/libxinerama/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxinerama(Package): +class Libxinerama(AutotoolsPackage): """libXinerama - API for Xinerama extension to X11 Protocol.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXinerama" @@ -40,9 +40,3 @@ class Libxinerama(Package): depends_on('xineramaproto@1.1.99.1:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxkbfile/package.py b/var/spack/repos/builtin/packages/libxkbfile/package.py index af8029a024afdd02b95b2469b23353df86960621..daafa8dd654f6353a39384ce69e526ef2f5a119e 100644 --- a/var/spack/repos/builtin/packages/libxkbfile/package.py +++ b/var/spack/repos/builtin/packages/libxkbfile/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxkbfile(Package): +class Libxkbfile(AutotoolsPackage): """XKB file handling routines.""" homepage = "https://cgit.freedesktop.org/xorg/lib/libxkbfile" @@ -38,9 +38,3 @@ class Libxkbfile(Package): depends_on('kbproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxkbui/package.py b/var/spack/repos/builtin/packages/libxkbui/package.py index d0c132d97002ddd85beff319c8c3cce905a7e6c0..b6a40b656d2606a61371a5936f2db817aa4543f4 100644 --- a/var/spack/repos/builtin/packages/libxkbui/package.py +++ b/var/spack/repos/builtin/packages/libxkbui/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxkbui(Package): +class Libxkbui(AutotoolsPackage): """X.org libxkbui library.""" homepage = "https://cgit.freedesktop.org/xorg/lib/libxkbui/" @@ -39,9 +39,3 @@ class Libxkbui(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index bbb934ab9fa6eb08305dc53096e574943e40cc51..470998d882633c081995fffca678860a9232d625 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxml2(Package): +class Libxml2(AutotoolsPackage): """Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free software available under the MIT License.""" @@ -45,7 +45,8 @@ class Libxml2(Package): depends_on('pkg-config@0.9.0:', type='build') - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec if '+python' in spec: python_args = [ '--with-python={0}'.format(spec['python'].prefix), @@ -54,9 +55,4 @@ def install(self, spec, prefix): else: python_args = ['--without-python'] - configure('--prefix={0}'.format(prefix), *python_args) - - make() - if self.run_tests: - make('check') - make('install') + return python_args diff --git a/var/spack/repos/builtin/packages/libxmu/package.py b/var/spack/repos/builtin/packages/libxmu/package.py index dbba5f168d213abf3cbe6a37611f1a8a351b5b8a..937cf750133950abb024136af6abca2e6626b5ab 100644 --- a/var/spack/repos/builtin/packages/libxmu/package.py +++ b/var/spack/repos/builtin/packages/libxmu/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxmu(Package): +class Libxmu(AutotoolsPackage): """This library contains miscellaneous utilities and is not part of the Xlib standard. It contains routines which only use public interfaces so that it may be layered on top of any proprietary implementation of Xlib @@ -43,9 +43,3 @@ class Libxmu(Package): depends_on('xextproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxp/package.py b/var/spack/repos/builtin/packages/libxp/package.py index 10aaccc54f292d638de0cc839b5dd6d6097533a8..95d4bfa2f80f37761658a98041565134a7ed2ce5 100644 --- a/var/spack/repos/builtin/packages/libxp/package.py +++ b/var/spack/repos/builtin/packages/libxp/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxp(Package): +class Libxp(AutotoolsPackage): """libXp - X Print Client Library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXp" @@ -41,9 +41,3 @@ class Libxp(Package): depends_on('printproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py index b726e74b0becd4b260064990b534c529aaf56eee..cfb269db7f91602f92c4143efa68194c207b5e9b 100644 --- a/var/spack/repos/builtin/packages/libxpm/package.py +++ b/var/spack/repos/builtin/packages/libxpm/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxpm(Package): +class Libxpm(AutotoolsPackage): """libXpm - X Pixmap (XPM) image file format library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXpm" @@ -42,9 +42,3 @@ class Libxpm(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxpresent/package.py b/var/spack/repos/builtin/packages/libxpresent/package.py index e65d4353a00fc00787b82a00c0b204e7c7cdcdc9..5237b164a0ff5fb9112832cbdc1a49f94feac347 100644 --- a/var/spack/repos/builtin/packages/libxpresent/package.py +++ b/var/spack/repos/builtin/packages/libxpresent/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxpresent(Package): +class Libxpresent(AutotoolsPackage): """This package contains header files and documentation for the Present extension. Library and server implementations are separate.""" @@ -41,9 +41,3 @@ class Libxpresent(Package): depends_on('xextproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxprintapputil/package.py b/var/spack/repos/builtin/packages/libxprintapputil/package.py index fc66b76ac087aa94480a11212870bcffb4918eca..ef1963c30068809e74c36ca32274570b18b1383d 100644 --- a/var/spack/repos/builtin/packages/libxprintapputil/package.py +++ b/var/spack/repos/builtin/packages/libxprintapputil/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxprintapputil(Package): +class Libxprintapputil(AutotoolsPackage): """Xprint application utility routines.""" homepage = "https://cgit.freedesktop.org/xorg/lib/libXprintAppUtil/" @@ -41,9 +41,3 @@ class Libxprintapputil(Package): depends_on('printproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxprintutil/package.py b/var/spack/repos/builtin/packages/libxprintutil/package.py index 8eb768958f666cb2cbf410760967e447357f4bfc..b55123a39793768abbe5115a7bd102de76bda817 100644 --- a/var/spack/repos/builtin/packages/libxprintutil/package.py +++ b/var/spack/repos/builtin/packages/libxprintutil/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxprintutil(Package): +class Libxprintutil(AutotoolsPackage): """Xprint application utility routines.""" homepage = "https://cgit.freedesktop.org/xorg/lib/libXprintUtil/" @@ -41,9 +41,3 @@ class Libxprintutil(Package): depends_on('printproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxrandr/package.py b/var/spack/repos/builtin/packages/libxrandr/package.py index 56c36c0c7bcdbc278eb886b494a5af217a554829..773be3ab8bf62eb63c46a14e7d6e1b9050d91121 100644 --- a/var/spack/repos/builtin/packages/libxrandr/package.py +++ b/var/spack/repos/builtin/packages/libxrandr/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxrandr(Package): +class Libxrandr(AutotoolsPackage): """libXrandr - X Resize, Rotate and Reflection extension library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXrandr" @@ -42,9 +42,3 @@ class Libxrandr(Package): depends_on('renderproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxrender/package.py b/var/spack/repos/builtin/packages/libxrender/package.py index c5a6dac1be2b3090b91a124990876c72083bc1b4..9c7e657f1dc3bab54ef45bb10b5f73b289d61393 100644 --- a/var/spack/repos/builtin/packages/libxrender/package.py +++ b/var/spack/repos/builtin/packages/libxrender/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxrender(Package): +class Libxrender(AutotoolsPackage): """libXrender - library for the Render Extension to the X11 protocol.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXrender" @@ -38,9 +38,3 @@ class Libxrender(Package): depends_on('renderproto@0.9:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxres/package.py b/var/spack/repos/builtin/packages/libxres/package.py index 6d0684c4b812bec51bfcc22e4ccdb359303ef1e6..c8a77403466fc6ddb98dad1cd317f6922125d798 100644 --- a/var/spack/repos/builtin/packages/libxres/package.py +++ b/var/spack/repos/builtin/packages/libxres/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxres(Package): +class Libxres(AutotoolsPackage): """libXRes - X-Resource extension client library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXRes" @@ -40,9 +40,3 @@ class Libxres(Package): depends_on('resourceproto@1.0:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxscrnsaver/package.py b/var/spack/repos/builtin/packages/libxscrnsaver/package.py index c9ca6ac1c864efb5eef7e12d5ab15cf5b39b8e06..14f3aa0f04ccd58c4bd5848981615c0d5498e581 100644 --- a/var/spack/repos/builtin/packages/libxscrnsaver/package.py +++ b/var/spack/repos/builtin/packages/libxscrnsaver/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxscrnsaver(Package): +class Libxscrnsaver(AutotoolsPackage): """XScreenSaver - X11 Screen Saver extension client library""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXScrnSaver" @@ -40,9 +40,3 @@ class Libxscrnsaver(Package): depends_on('scrnsaverproto@1.2:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py index d4f4c8520305316d5cac88e29d3725fbb4548383..63604865bde2e3316519b24eae6059666f29f525 100644 --- a/var/spack/repos/builtin/packages/libxshmfence/package.py +++ b/var/spack/repos/builtin/packages/libxshmfence/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxshmfence(Package): +class Libxshmfence(AutotoolsPackage): """libxshmfence - Shared memory 'SyncFence' synchronization primitive. This library offers a CPU-based synchronization primitive compatible @@ -40,10 +40,3 @@ class Libxshmfence(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/libxt/package.py b/var/spack/repos/builtin/packages/libxt/package.py index c657c866b40d092b0bddc4f4d9b65b176f4fc913..1bab6854d9553fdaf0e17071b4a809db6dd11488 100644 --- a/var/spack/repos/builtin/packages/libxt/package.py +++ b/var/spack/repos/builtin/packages/libxt/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxt(Package): +class Libxt(AutotoolsPackage): """libXt - X Toolkit Intrinsics library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXt" @@ -41,9 +41,3 @@ class Libxt(Package): depends_on('kbproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxtrap/package.py b/var/spack/repos/builtin/packages/libxtrap/package.py index 4589f98a8704ba14cfc472b031fc32b958c2cd82..2b22fb1679ce1cd933d73490a5ee936e4a20c880 100644 --- a/var/spack/repos/builtin/packages/libxtrap/package.py +++ b/var/spack/repos/builtin/packages/libxtrap/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxtrap(Package): +class Libxtrap(AutotoolsPackage): """libXTrap is the Xlib-based client API for the DEC-XTRAP extension. XTrap was a proposed standard extension for X11R5 which facilitated the @@ -50,9 +50,3 @@ class Libxtrap(Package): depends_on('xextproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxtst/package.py b/var/spack/repos/builtin/packages/libxtst/package.py index 0d16643f94f545378bffcd70e277ed3bffead0bd..aaff481afc4bbb25bd93da06fbd5dad8e4696ef2 100644 --- a/var/spack/repos/builtin/packages/libxtst/package.py +++ b/var/spack/repos/builtin/packages/libxtst/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxtst(Package): +class Libxtst(AutotoolsPackage): """libXtst provides the Xlib-based client API for the XTEST & RECORD extensions. @@ -51,9 +51,3 @@ class Libxtst(Package): depends_on('inputproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxv/package.py b/var/spack/repos/builtin/packages/libxv/package.py index 03f10a1842c2c8084f978d835c148926f44c754c..2662da8647464d13856635e03e9db89236509f52 100644 --- a/var/spack/repos/builtin/packages/libxv/package.py +++ b/var/spack/repos/builtin/packages/libxv/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxv(Package): +class Libxv(AutotoolsPackage): """libXv - library for the X Video (Xv) extension to the X Window System.""" @@ -41,9 +41,3 @@ class Libxv(Package): depends_on('videoproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxvmc/package.py b/var/spack/repos/builtin/packages/libxvmc/package.py index 9d5695c2c1036a8b60c0a453f35169f2c6168c02..8492f660a401d75e18adf134b281e93fe6141b3a 100644 --- a/var/spack/repos/builtin/packages/libxvmc/package.py +++ b/var/spack/repos/builtin/packages/libxvmc/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxvmc(Package): +class Libxvmc(AutotoolsPackage): """X.org libXvMC library.""" homepage = "https://cgit.freedesktop.org/xorg/lib/libXvMC" @@ -41,9 +41,3 @@ class Libxvmc(Package): depends_on('videoproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxxf86dga/package.py b/var/spack/repos/builtin/packages/libxxf86dga/package.py index 292c5d213bd3f01ecf7558dc7b146425a9cf2024..501a40705fde68c30cbab1157957fa1afdb68684 100644 --- a/var/spack/repos/builtin/packages/libxxf86dga/package.py +++ b/var/spack/repos/builtin/packages/libxxf86dga/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxxf86dga(Package): +class Libxxf86dga(AutotoolsPackage): """libXxf86dga - Client library for the XFree86-DGA extension.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXxf86dga" @@ -41,9 +41,3 @@ class Libxxf86dga(Package): depends_on('xf86dgaproto@2.0.99.2:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxxf86misc/package.py b/var/spack/repos/builtin/packages/libxxf86misc/package.py index 0247f8b57cfc7ac8964c5c9ab4f1981146579dd6..8e6f743183df9f8de66e781ad8ad3f8bc1952f8c 100644 --- a/var/spack/repos/builtin/packages/libxxf86misc/package.py +++ b/var/spack/repos/builtin/packages/libxxf86misc/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxxf86misc(Package): +class Libxxf86misc(AutotoolsPackage): """libXxf86misc - Extension library for the XFree86-Misc X extension.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXxf86misc" @@ -41,9 +41,3 @@ class Libxxf86misc(Package): depends_on('xf86miscproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/libxxf86vm/package.py b/var/spack/repos/builtin/packages/libxxf86vm/package.py index feec5ff3d21fdb4e70b419024ed7d2cadefcc93b..6f91c62a2d2fee4f7ce9c2df2031e373c9d2660a 100644 --- a/var/spack/repos/builtin/packages/libxxf86vm/package.py +++ b/var/spack/repos/builtin/packages/libxxf86vm/package.py @@ -25,7 +25,7 @@ from spack import * -class Libxxf86vm(Package): +class Libxxf86vm(AutotoolsPackage): """libXxf86vm - Extension library for the XFree86-VidMode X extension.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libXxf86vm" @@ -41,9 +41,3 @@ class Libxxf86vm(Package): depends_on('xf86vidmodeproto@2.2.99.1:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/listres/package.py b/var/spack/repos/builtin/packages/listres/package.py index c6b3d149f68c65df0a4d1031d4dbd634904f9c89..3727ddc0b496c93f8a3e43e594c5c5e2e9950454 100644 --- a/var/spack/repos/builtin/packages/listres/package.py +++ b/var/spack/repos/builtin/packages/listres/package.py @@ -25,7 +25,7 @@ from spack import * -class Listres(Package): +class Listres(AutotoolsPackage): """The listres program generates a list of X resources for a widget in an X client written using a toolkit based on libXt.""" @@ -41,9 +41,3 @@ class Listres(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py new file mode 100644 index 0000000000000000000000000000000000000000..8b83f216b60dedfd0bc69829b1386bacdfad149b --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py @@ -0,0 +1,62 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class LlvmOpenmpOmpt(Package): + """The OpenMP subproject provides an OpenMP runtime for use with the + OpenMP implementation in Clang. This branch includes experimental + changes for OMPT, the OpenMP Tools interface""" + + homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp" + + # align-to-tr-rebased branch + version('3.9.2b', + git='https://github.com/OpenMPToolsInterface/LLVM-openmp.git', + commit='982a08bcf3df9fb5afc04ac3bada47f19cc4e3d3') + + depends_on('cmake', type='build') + depends_on('llvm+clang~gold') + depends_on('ninja', type='build') + + def install(self, spec, prefix): + + with working_dir('spack-build', create=True): + cmake_args = std_cmake_args[:] + cmake_args.extend([ + '-G', 'Ninja', + '-DCMAKE_C_COMPILER=clang', + '-DCMAKE_CXX_COMPILER=clang++', + '-DCMAKE_BUILD_TYPE=Release', + '-DLIBOMP_OMPT_SUPPORT=on', + '-DLIBOMP_OMPT_BLAME=on', + '-DLIBOMP_OMPT_TRACE=on' + ]) + + cmake('..', *cmake_args) + ninja = Executable('ninja') + ninja() + ninja('install') diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 06572ea312185127806d265c25c0aca4c9de9d3f..1da14feb4f43abe91bbc17747101688919b2663a 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -77,6 +77,7 @@ class Llvm(Package): # Universal dependency depends_on('python@2.7:2.8') # Seems not to support python 3.X.Y + depends_on('py-lit') # lldb dependencies depends_on('ncurses', when='+lldb') @@ -98,46 +99,55 @@ class Llvm(Package): 'url': base_url % {'pkg': 'compiler-rt'}, 'destination': 'projects', 'placement': 'compiler-rt', + 'variant': '+compiler-rt', }, 'openmp': { 'url': base_url % {'pkg': 'openmp'}, 'destination': 'projects', 'placement': 'openmp', + 'variant': '+clang', }, 'libcxx': { 'url': base_url % {'pkg': 'libcxx'}, 'destination': 'projects', 'placement': 'libcxx', + 'variant': '+libcxx', }, 'libcxxabi': { 'url': base_url % {'pkg': 'libcxxabi'}, 'destination': 'projects', 'placement': 'libcxxabi', + 'variant': '+libcxx', }, 'cfe': { 'url': base_url % {'pkg': 'cfe'}, 'destination': 'tools', 'placement': 'clang', + 'variant': '+clang', }, 'clang-tools-extra': { 'url': base_url % {'pkg': 'clang-tools-extra'}, 'destination': 'tools/clang/tools', 'placement': 'extra', + 'variant': '+clang', }, 'lldb': { 'url': base_url % {'pkg': 'lldb'}, 'destination': 'tools', 'placement': 'lldb', + 'variant': '+lldb', }, 'polly': { 'url': base_url % {'pkg': 'polly'}, 'destination': 'tools', 'placement': 'polly', + 'variant': '+polly', }, - 'llvm-libunwind': { + 'libunwind': { 'url': base_url % {'pkg': 'libunwind'}, 'destination': 'projects', 'placement': 'libunwind', + 'variant': '+internal_unwind', }, } releases = [ @@ -153,9 +163,24 @@ class Llvm(Package): 'cfe': 'http://llvm.org/svn/llvm-project/cfe/trunk', 'clang-tools-extra': 'http://llvm.org/svn/llvm-project/clang-tools-extra/trunk', 'lldb': 'http://llvm.org/svn/llvm-project/lldb/trunk', - 'llvm-libunwind': 'http://llvm.org/svn/llvm-project/libunwind/trunk', + 'libunwind': 'http://llvm.org/svn/llvm-project/libunwind/trunk', } }, + { + 'version': '3.9.1', + 'md5': '3259018a7437e157f3642df80f1983ea', + 'resources': { + 'compiler-rt': 'aadc76e7e180fafb10fb729444e287a3', + 'openmp': 'f076916bf2f49229b4df9fa0bb002599', + 'polly': '2cc7fe2bd9539775ba140abfd375bec6', + 'libcxx': '75a3214224301fc543fa6a38bdf7efe0', + 'libcxxabi': '62fd584b38cc502172c2ffab041b5fcc', + 'cfe': '45713ec5c417ed9cad614cd283d786a1', + 'clang-tools-extra': '1a01d545a064fcbc46a2f05f6880d3d7', + 'lldb': '91399402f287d3f637db1207113deecb', + 'libunwind': 'f273dd0ed638ad0601b23176a36f187b', + } + }, { 'version': '3.9.0', 'md5': 'f2093e98060532449eb7d2fcfd0bc6c6', @@ -168,7 +193,7 @@ class Llvm(Package): 'cfe': '29e1d86bee422ab5345f5e9fb808d2dc', 'clang-tools-extra': 'f4f663068c77fc742113211841e94d5e', 'lldb': '968d053c3c3d7297983589164c6999e9', - 'llvm-libunwind': '3e5c87c723a456be599727a444b1c166', + 'libunwind': '3e5c87c723a456be599727a444b1c166', } }, { @@ -183,7 +208,7 @@ class Llvm(Package): 'cfe': '4ff2f8844a786edb0220f490f7896080', 'clang-tools-extra': '6e49f285d0b366cc3cab782d8c92d382', 'lldb': '9e4787b71be8e432fffd31e13ac87623', - 'llvm-libunwind': 'd66e2387e1d37a8a0c8fe6a0063a3bab', + 'libunwind': 'd66e2387e1d37a8a0c8fe6a0063a3bab', } }, { @@ -198,7 +223,7 @@ class Llvm(Package): 'cfe': 'cc99e7019bb74e6459e80863606250c5', 'clang-tools-extra': 'c2344f50e0eea0b402f0092a80ddc036', 'lldb': 'a5da35ed9cc8c8817ee854e3dbfba00e', - 'llvm-libunwind': '162ade468607f153cca12be90b5194fa', + 'libunwind': '162ade468607f153cca12be90b5194fa', } }, { @@ -213,7 +238,7 @@ class Llvm(Package): 'cfe': '0acd026b5529164197563d135a8fd83e', 'clang-tools-extra': '5d49ff745037f061a7c86aeb6a24c3d2', 'lldb': 'a106d8a0d21fc84d76953822fbaf3398', - 'llvm-libunwind': '814bd52c9247c5d04629658fbcb3ab8c', + 'libunwind': '814bd52c9247c5d04629658fbcb3ab8c', } }, { @@ -228,7 +253,7 @@ class Llvm(Package): 'cfe': '8f9d27335e7331cf0a4711e952f21f01', 'clang-tools-extra': 'd5a87dacb65d981a427a536f6964642e', 'lldb': 'e5931740400d1dc3e7db4c7ba2ceff68', - 'llvm-libunwind': '9a75392eb7eb8ed5c0840007e212baf5', + 'libunwind': '9a75392eb7eb8ed5c0840007e212baf5', } }, { @@ -267,7 +292,8 @@ class Llvm(Package): resource(name=name, svn=repo, destination=resources[name]['destination'], - when='@%(version)s' % release, + when='@%s%s' % (release['version'], + resources[name].get('variant', "")), placement=resources[name].get('placement', None)) else: version(release['version'], release['md5'], url=llvm_url % release) @@ -277,7 +303,8 @@ class Llvm(Package): url=resources[name]['url'] % release, md5=md5, destination=resources[name]['destination'], - when='@%(version)s' % release, + when='@%s%s' % (release['version'], + resources[name].get('variant', "")), placement=resources[name].get('placement', None)) def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index 9ac270bab5c97a2c79a6daeb362faff250ed3d6d..01df3c7f24b6a7640281459e72433c4fd74e95a6 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -26,7 +26,7 @@ from glob import glob -class Lmod(Package): +class Lmod(AutotoolsPackage): """Lmod is a Lua based module system that easily handles the MODULEPATH Hierarchical problem. Environment Modules provide a convenient way to dynamically change the users' environment through modulefiles. This @@ -66,7 +66,3 @@ def patch(self): if self.spec.version <= Version('6.4.3'): for tclscript in glob('src/*.tcl'): filter_file(r'^#!.*tclsh', '#!@path_to_tclsh@', tclscript) - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make('install') diff --git a/var/spack/repos/builtin/packages/lndir/package.py b/var/spack/repos/builtin/packages/lndir/package.py index a7ce892502daf4318103f383d5c110ee5daeed21..ce3a199fe2a33271932a4ba13d649949a1361862 100644 --- a/var/spack/repos/builtin/packages/lndir/package.py +++ b/var/spack/repos/builtin/packages/lndir/package.py @@ -25,7 +25,7 @@ from spack import * -class Lndir(Package): +class Lndir(AutotoolsPackage): """lndir - create a shadow directory of symbolic links to another directory tree.""" @@ -36,9 +36,3 @@ class Lndir(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/lwgrp/package.py b/var/spack/repos/builtin/packages/lwgrp/package.py index 9322d69b9b0baf2f8bfd0d2b5f0c43584aea0069..169f7540be826802e4563c27a5a5d31161ca0b41 100644 --- a/var/spack/repos/builtin/packages/lwgrp/package.py +++ b/var/spack/repos/builtin/packages/lwgrp/package.py @@ -25,7 +25,7 @@ from spack import * -class Lwgrp(Package): +class Lwgrp(AutotoolsPackage): """Thie light-weight group library provides process group representations using O(log N) space and time.""" @@ -35,8 +35,3 @@ class Lwgrp(Package): version('1.0.2', 'ab7ba3bdd8534a651da5076f47f27d8a') depends_on('mpi') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/lwm2/package.py b/var/spack/repos/builtin/packages/lwm2/package.py index 063204b84a455132e56742a86b6f50f947299201..03cb6342716ddeafbc3a8c8c1cdcdfcfdbeb5078 100644 --- a/var/spack/repos/builtin/packages/lwm2/package.py +++ b/var/spack/repos/builtin/packages/lwm2/package.py @@ -25,7 +25,7 @@ from spack import * -class Lwm2(Package): +class Lwm2(AutotoolsPackage): """LWM2: Light Weight Measurement Module. This is a PMPI module that can collect a number of time-sliced MPI and POSIX I/O measurements from a program. @@ -36,8 +36,3 @@ class Lwm2(Package): depends_on("papi") depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/lz4/package.py b/var/spack/repos/builtin/packages/lz4/package.py index de7e566e709c639dd6a9b46e8f091bec51fbb3ec..8529941919655d8c96d3f00254c3d72a5e345a38 100644 --- a/var/spack/repos/builtin/packages/lz4/package.py +++ b/var/spack/repos/builtin/packages/lz4/package.py @@ -31,13 +31,22 @@ class Lz4(Package): an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.""" - homepage = "http://cyan4973.github.io/lz4/" - url = "https://github.com/Cyan4973/lz4/archive/r131.tar.gz" + homepage = "http://lz4.github.io/lz4/" + url = "https://github.com/lz4/lz4/archive/v1.7.5.tar.gz" - version('131', '42b09fab42331da9d3fb33bd5c560de9') + version('1.7.5', 'c9610c5ce97eb431dddddf0073d919b9') + version('1.3.1', '42b09fab42331da9d3fb33bd5c560de9') # depends_on('valgrind', type='test') + def url_for_version(self, version): + url = "https://github.com/lz4/lz4/archive" + + if version > Version('1.3.1'): + return "{0}/v{1}.tar.gz".format(url, version) + else: + return "{0}/r{1}.tar.gz".format(url, version.joined) + def install(self, spec, prefix): make() if self.run_tests: diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index ebfbc28612e9a7a073b2b2b86a79516418c8503e..128e1c2a41ff8e7eeaa6db7027df47a533bdd5a4 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -29,8 +29,9 @@ class M4(AutotoolsPackage): """GNU M4 is an implementation of the traditional Unix macro processor.""" homepage = "https://www.gnu.org/software/m4/m4.html" - url = "ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz" + url = "https://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz" + version('1.4.18', 'a077779db287adf4e12a035029002d28') version('1.4.17', 'a5e9954b1dae036762f7b13673a2cf76') patch('pgi.patch', when='@1.4.17') @@ -40,6 +41,8 @@ class M4(AutotoolsPackage): depends_on('libsigsegv', when='+sigsegv') + build_directory = 'spack-build' + def configure_args(self): spec = self.spec args = ['--enable-c++'] diff --git a/var/spack/repos/builtin/packages/makedepend/package.py b/var/spack/repos/builtin/packages/makedepend/package.py index 5675793abc092fc120ac41dd110a07aa29f11d75..68be988d82f86ea078eb1e511ed02a15c055ff37 100644 --- a/var/spack/repos/builtin/packages/makedepend/package.py +++ b/var/spack/repos/builtin/packages/makedepend/package.py @@ -25,7 +25,7 @@ from spack import * -class Makedepend(Package): +class Makedepend(AutotoolsPackage): """makedepend - create dependencies in makefiles.""" homepage = "http://cgit.freedesktop.org/xorg/util/makedepend" @@ -35,10 +35,3 @@ class Makedepend(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/matio/package.py b/var/spack/repos/builtin/packages/matio/package.py index a33b23a4e95084f308963575bc47866115744332..3c48b8f3fc0c14e68ad11319761dff2ae713ccf1 100644 --- a/var/spack/repos/builtin/packages/matio/package.py +++ b/var/spack/repos/builtin/packages/matio/package.py @@ -37,6 +37,8 @@ class Matio(AutotoolsPackage): description='support for compressed mat files') variant("hdf5", default=True, description='support for version 7.3 mat files via hdf5') + variant("shared", default=True, description='Enables the build of shared libraries.') + depends_on("zlib", when="+zlib") depends_on("hdf5", when="+hdf5") @@ -47,4 +49,6 @@ def configure_args(self): args.append("--with-zlib=%s" % self.spec['zlib'].prefix) if '+hdf5' in self.spec: args.append("--with-hdf5=%s" % self.spec['hdf5'].prefix) + if '+shared' not in self.spec: + args.append("--disable-shared") return args diff --git a/var/spack/repos/builtin/packages/maven/package.py b/var/spack/repos/builtin/packages/maven/package.py index c4e0a1d0a493c7a4509a1e5d623f6694bd15429a..60c9e387cbb7d8fc522818d94fe4acf633bfa484 100644 --- a/var/spack/repos/builtin/packages/maven/package.py +++ b/var/spack/repos/builtin/packages/maven/package.py @@ -30,7 +30,7 @@ class Maven(Package): """Apache Maven is a software project management and comprehension tool.""" homepage = "https://maven.apache.org/index.html" - url = "http://www.gtlib.gatech.edu/pub/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz" + url = "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.tar.gz" version('3.3.9', '516923b3955b6035ba6b0a5b031fbd8b') diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index f19bb466fd99a3044f195377777073cefe55ae26..7d6c55969612079adc285443146332047e83d15b 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -25,12 +25,12 @@ from spack import * -class Mesa(Package): +class Mesa(AutotoolsPackage): """Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.""" homepage = "http://www.mesa3d.org" - url = "ftp://ftp.freedesktop.org/pub/mesa/12.0.3/mesa-12.0.3.tar.gz" + url = "http://ftp.iij.ad.jp/pub/X11/x.org/pub/mesa/12.0.3/mesa-12.0.3.tar.gz" version('12.0.3', '60c5f9897ddc38b46f8144c7366e84ad') @@ -59,9 +59,3 @@ class Mesa(Package): # TODO: Add package for systemd, provides libudev # Using the system package manager to install systemd didn't work for me - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index b66677288c1c925bdc387a96b5b4dc9fd1378c09..f15d544b7bead01379d605850d8bc69687d8d91d 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -186,6 +186,15 @@ def install(self, spec, prefix): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') + else: + # Remove all RPATH options + # (RPATHxxx options somehow trigger cmake to link dynamically) + rpath_options = [] + for o in options: + if o.find('RPATH') >= 0: + rpath_options.append(o) + for o in rpath_options: + options.remove(o) if '+debug' in spec: options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) diff --git a/var/spack/repos/builtin/packages/mkfontdir/package.py b/var/spack/repos/builtin/packages/mkfontdir/package.py index 15c85b24e46e354ce5ba2c9ee41bc25dad0c3147..1a43a028a86f6499e28c09fd3d64a710c2c097e2 100644 --- a/var/spack/repos/builtin/packages/mkfontdir/package.py +++ b/var/spack/repos/builtin/packages/mkfontdir/package.py @@ -25,7 +25,7 @@ from spack import * -class Mkfontdir(Package): +class Mkfontdir(AutotoolsPackage): """mkfontdir creates the fonts.dir files needed by the legacy X server core font system. The current implementation is a simple wrapper script around the mkfontscale program, which must be built and installed first.""" @@ -39,9 +39,3 @@ class Mkfontdir(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/mkfontscale/package.py b/var/spack/repos/builtin/packages/mkfontscale/package.py index 4c907831b6874e75fcffbcc5b244ebd147c1c980..397ba03a629815276086100e717822bf74aa2c57 100644 --- a/var/spack/repos/builtin/packages/mkfontscale/package.py +++ b/var/spack/repos/builtin/packages/mkfontscale/package.py @@ -25,7 +25,7 @@ from spack import * -class Mkfontscale(Package): +class Mkfontscale(AutotoolsPackage): """mkfontscale creates the fonts.scale and fonts.dir index files used by the legacy X11 font system.""" @@ -40,9 +40,3 @@ class Mkfontscale(Package): depends_on('xproto@7.0.25:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/mpc/package.py b/var/spack/repos/builtin/packages/mpc/package.py index 2fe3900981158c19da82ac7c5d3d086b5f4675b3..39c4f3d8c086ac00854d35eace83752d23b2626b 100644 --- a/var/spack/repos/builtin/packages/mpc/package.py +++ b/var/spack/repos/builtin/packages/mpc/package.py @@ -25,12 +25,12 @@ from spack import * -class Mpc(Package): +class Mpc(AutotoolsPackage): """Gnu Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.""" homepage = "http://www.multiprecision.org" - url = "ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.2.tar.gz" + url = "https://ftp.gnu.org/gnu/mpc/mpc-1.0.2.tar.gz" version('1.0.3', 'd6a1d5f8ddea3abd2cc3e98f58352d26') version('1.0.2', '68fadff3358fb3e7976c7a398a0af4c3') @@ -40,11 +40,6 @@ class Mpc(Package): def url_for_version(self, version): if version < Version("1.0.1"): - return "http://www.multiprecision.org/mpc/download/mpc-%s.tar.gz" % version # NOQA + return "http://www.multiprecision.org/mpc/download/mpc-%s.tar.gz" % version else: - return "ftp://ftp.gnu.org/gnu/mpc/mpc-%s.tar.gz" % version - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") + return "https://ftp.gnu.org/gnu/mpc/mpc-%s.tar.gz" % version diff --git a/var/spack/repos/builtin/packages/mpe2/package.py b/var/spack/repos/builtin/packages/mpe2/package.py index a129d5994977d8b99246759abef711902b72b944..78201281bb061469c98cf3c8c060c2494c8b96af 100644 --- a/var/spack/repos/builtin/packages/mpe2/package.py +++ b/var/spack/repos/builtin/packages/mpe2/package.py @@ -29,7 +29,7 @@ class Mpe2(Package): """Message Passing Extensions (MPE): Parallel, shared X window graphics""" homepage = "http://www.mcs.anl.gov/research/projects/perfvis/software/MPE/" - url = "ftp://ftp.mcs.anl.gov/pub/mpi/mpe/mpe2-1.3.0.tar.gz" + url = "http://ftp.mcs.anl.gov/pub/mpi/mpe/mpe2-1.3.0.tar.gz" version('1.3.0', '67bf0c7b2e573df3ba0d2059a96c2f7b') diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py index 4612d0384991863832bd0335fb8a43e82927daae..5dc33b2fb9825195cec2e736239b4c5043b6e034 100644 --- a/var/spack/repos/builtin/packages/mpfr/package.py +++ b/var/spack/repos/builtin/packages/mpfr/package.py @@ -25,7 +25,7 @@ from spack import * -class Mpfr(Package): +class Mpfr(AutotoolsPackage): """The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.""" homepage = "http://www.mpfr.org" @@ -36,8 +36,3 @@ class Mpfr(Package): version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19') depends_on('gmp') # mpir is a drop-in replacement for this - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index dd864acbe31be4c8901befcfc8f1c2ce4f7ef46d..4c34f3e3a0a5e76e0f35757859abd4a62b3cab04 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -86,7 +86,7 @@ def setup_dependent_package(self, module, dep_spec): join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix)) ] - @AutotoolsPackage.precondition('autoreconf') + @run_before('autoreconf') def die_without_fortran(self): # Until we can pass variants such as +fortran through virtual # dependencies depends_on('mpi'), require Fortran compiler to @@ -106,7 +106,7 @@ def configure_args(self): '--{0}-ibverbs'.format('with' if '+verbs' in spec else 'without') ] - @AutotoolsPackage.sanity_check('install') + @run_after('install') def filter_compilers(self): """Run after install to make the MPI compilers use the compilers that Spack built the package with. diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py index 78e1dca68ae471b52525ce537e43c887f479a6b3..235c66c882ec5683542d6e94e550ccebd695e8fc 100644 --- a/var/spack/repos/builtin/packages/mpip/package.py +++ b/var/spack/repos/builtin/packages/mpip/package.py @@ -26,7 +26,7 @@ import os -class Mpip(Package): +class Mpip(AutotoolsPackage): """mpiP: Lightweight, Scalable MPI Profiling""" homepage = "http://mpip.sourceforge.net/" url = "http://downloads.sourceforge.net/project/mpip/mpiP/mpiP-3.4.1/mpiP-3.4.1.tar.gz" @@ -38,7 +38,5 @@ class Mpip(Package): depends_on('libunwind', when=os.uname()[4] == "x86_64", type="build") depends_on("mpi", type="build") - def install(self, spec, prefix): - configure("--prefix=" + prefix, "--without-f77") - make() - make("install") + def configure_args(self): + return ['--without-f77'] diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index 9da9e29a2e9360cfa957584e1604e7696c3de502..81938827f1fa4af9bbc0756238f5f6e22ee3d260 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -25,10 +25,10 @@ from spack import * -class Mrnet(Package): +class Mrnet(AutotoolsPackage): """The MRNet Multi-Cast Reduction Network.""" homepage = "http://paradyn.org/mrnet" - url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" + url = "http://ftp.cs.wisc.edu/pub/paradyn/mrnet/mrnet_5.0.1.tar.gz" list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" version('5.0.1-2', git='https://github.com/dyninst/mrnet.git', @@ -43,14 +43,13 @@ class Mrnet(Package): depends_on("boost") - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec + config_args = ['--enable-shared'] + # Build the MRNet LW thread safe libraries when the # lwthreads variant is present if '+lwthreads' in spec: - configure("--prefix=%s" % prefix, "--enable-shared", - "--enable-ltwt-threadsafe") - else: - configure("--prefix=%s" % prefix, "--enable-shared") + config_args.append('--enable-ltwt-threadsafe') - make() - make("install") + return config_args diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 82d0c606b682e9b3579b3e6813c13232bed5e598..1d87d6f35a3a9cdcd2ba17df9ef978c71654799b 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -81,7 +81,7 @@ def write_makefile_inc(self): lapack_blas = (self.spec['lapack'].lapack_libs + self.spec['blas'].blas_libs) - makefile_conf = ["LIBBLAS = %s" % lapack_blas.joined()] + makefile_conf = ["LIBBLAS = %s" % lapack_blas.ld_flags] orderings = ['-Dpord'] diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py index 29e3b27d6ea74a995f3e27eaa5371a2aeb325e01..bae1984bde8c5c5d2b16c4188958f2f0432c48ec 100644 --- a/var/spack/repos/builtin/packages/mxml/package.py +++ b/var/spack/repos/builtin/packages/mxml/package.py @@ -25,7 +25,7 @@ from spack import * -class Mxml(Package): +class Mxml(AutotoolsPackage): """Mini-XML is a small XML library that you can use to read and write XML and XML-like data files in your application without requiring large non-standard libraries. @@ -44,7 +44,5 @@ class Mxml(Package): # (Can use whatever compiler you want to use) # Case statement to change CC and CXX flags - def install(self, spec, prefix): - configure('--prefix=%s' % prefix, "--disable-shared", 'CFLAGS=-static') - make() - make("install") + def configure_args(self): + return ['--disable-shared', 'CFLAGS=-static'] diff --git a/var/spack/repos/builtin/packages/nano/package.py b/var/spack/repos/builtin/packages/nano/package.py index 3e87ec8ffe835ebb309fbe5753076918ec8b526b..d303b5e424305d4c28a52ca8ad857ea2d53cb55e 100644 --- a/var/spack/repos/builtin/packages/nano/package.py +++ b/var/spack/repos/builtin/packages/nano/package.py @@ -25,7 +25,7 @@ from spack import * -class Nano(Package): +class Nano(AutotoolsPackage): """Tiny little text editor""" homepage = "http://www.nano-editor.org" @@ -33,8 +33,3 @@ class Nano(Package): version('2.6.3', '1213c7f17916e65afefc95054c1f90f9') version('2.6.2', '58568a4b8a33841d774c25f285fc11c1') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py index 9faccccaaea4dda5aff5e953858ebc60ef03c93b..979d002b4cf8337a7b31d0d1ce8c51c56d89018f 100644 --- a/var/spack/repos/builtin/packages/nasm/package.py +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -25,15 +25,10 @@ from spack import * -class Nasm(Package): +class Nasm(AutotoolsPackage): """NASM (Netwide Assembler) is an 80x86 assembler designed for portability and modularity. It includes a disassembler as well.""" homepage = "http://www.nasm.us" url = "http://www.nasm.us/pub/nasm/releasebuilds/2.11.06/nasm-2.11.06.tar.xz" version('2.11.06', '2b958e9f5d200641e6fc9564977aecc5') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py index 5c3cf300d2dde2392973938ec50b8b906350c0c8..6f83aa9139e106a09b429f98d3db33e92e0c6644 100644 --- a/var/spack/repos/builtin/packages/ncview/package.py +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -25,10 +25,10 @@ from spack import * -class Ncview(Package): +class Ncview(AutotoolsPackage): """Simple viewer for NetCDF files.""" homepage = "http://meteora.ucsd.edu/~pierce/ncview_home_page.html" - url = "ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz" + url = "https://fossies.org/linux/misc/ncview-2.1.7.tar.gz" version('2.1.7', 'debd6ca61410aac3514e53122ab2ba07') @@ -36,9 +36,3 @@ class Ncview(Package): depends_on('udunits2') depends_on('libpng') depends_on('libxaw') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py index 2da30c7b0c0b9353da57c8b9e4a3d2d077c342b2..36ab8766b927130fe0aa4953a1c37b9b59d635b9 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py @@ -34,8 +34,9 @@ class NetcdfCxx4(AutotoolsPackage): version('4.2.1', 'd019853802092cf686254aaba165fc81') depends_on('netcdf') + + depends_on('automake', type='build') depends_on('autoconf', type='build') + depends_on('libtool', type='build') - def autoreconf(self, spec, prefix): - # Rebuild to prevent problems of inconsistency in git repo - which('autoreconf')('-ivf') + force_autoreconf = True diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index 79a1be2090d58647085ad74d478c82da90ba8bb1..34d3bd41c6feeeea4d8f49bc90866341c34e7ad0 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -31,8 +31,9 @@ class Netcdf(AutotoolsPackage): and sharing of array-oriented scientific data.""" homepage = "http://www.unidata.ucar.edu/software/netcdf" - url = "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.tar.gz" + url = "http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-4.3.3.tar.gz" + version('4.4.1.1', '503a2d6b6035d116ed53b1d80c811bda') version('4.4.1', '7843e35b661c99e1d49e60791d5072d8') version('4.4.0', 'cffda0cbd97fdb3a06e9274f7aef438e') version('4.3.3.1', '5c9dad3705a3408d27f696e5b31fb88c') diff --git a/var/spack/repos/builtin/packages/netgauge/package.py b/var/spack/repos/builtin/packages/netgauge/package.py index b57cdbe5f3720408d2d28021b643a2b56810ef80..e7e669410bab35d76e9d3030cc1839d89576cc1c 100644 --- a/var/spack/repos/builtin/packages/netgauge/package.py +++ b/var/spack/repos/builtin/packages/netgauge/package.py @@ -25,7 +25,7 @@ from spack import * -class Netgauge(Package): +class Netgauge(AutotoolsPackage): """Netgauge is a high-precision network parameter measurement tool. It supports benchmarking of many different network protocols and communication patterns. The main focus lies on accuracy, @@ -37,8 +37,3 @@ class Netgauge(Package): version('2.4.6', 'e0e040ec6452e93ca21ccc54deac1d7f') depends_on("mpi") - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py index 7e2b758bc0161e3303b940e99631028f1a2b1c28..6112dc6507e320e1b138d51874a4d310df968949 100644 --- a/var/spack/repos/builtin/packages/nettle/package.py +++ b/var/spack/repos/builtin/packages/nettle/package.py @@ -25,7 +25,7 @@ from spack import * -class Nettle(Package): +class Nettle(AutotoolsPackage): """The Nettle package contains the low-level cryptographic library that is designed to fit easily in many contexts.""" @@ -37,11 +37,3 @@ class Nettle(Package): depends_on('gmp') depends_on('m4', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - if self.run_tests: - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/npm/package.py b/var/spack/repos/builtin/packages/npm/package.py index 7910a8af9babd552bd2fb196fc2bd66c49f07942..500674d1d8f15fb3a65b3f266ce93e1150491b23 100644 --- a/var/spack/repos/builtin/packages/npm/package.py +++ b/var/spack/repos/builtin/packages/npm/package.py @@ -26,7 +26,7 @@ from spack import * -class Npm(Package): +class Npm(AutotoolsPackage): """npm: A package manager for javascript.""" homepage = "https://github.com/npm/npm" @@ -37,18 +37,10 @@ class Npm(Package): version('3.10.5', '46002413f4a71de9b0da5b506bf1d992') depends_on('node-js') - + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): npm_config_cache_dir = "%s/npm-cache" % dependent_spec.prefix if not os.path.isdir(npm_config_cache_dir): mkdir(npm_config_cache_dir) run_env.set('npm_config_cache', npm_config_cache_dir) spack_env.set('npm_config_cache', npm_config_cache_dir) - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - if self.run_tests: - make('test') - - make('install') diff --git a/var/spack/repos/builtin/packages/ocaml/package.py b/var/spack/repos/builtin/packages/ocaml/package.py index 9488d3b7a62ff795172f17d7fc5e373fc916c83e..75c19ec7c614847c801dc1d2343291481d61ce19 100644 --- a/var/spack/repos/builtin/packages/ocaml/package.py +++ b/var/spack/repos/builtin/packages/ocaml/package.py @@ -38,6 +38,6 @@ class Ocaml(Package): def install(self, spec, prefix): configure('-prefix', '{0}'.format(prefix)) - + make('world.opt') make('install') diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 2d518d83c344709f52088fc52dda7bae07367f87..c3488c137af449c3e796cace17656f0968532e7f 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -32,8 +32,8 @@ class Oce(Package): Open CASCADE library. """ homepage = "https://github.com/tpaviot/oce" - url = "https://github.com/tpaviot/oce/archive/OCE-0.17.tar.gz" + version('0.18', '226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993') version('0.17.2', 'bf2226be4cd192606af677cf178088e5') version('0.17.1', '36c67b87093c675698b483454258af91') version('0.17', 'f1a89395c4b0d199bea3db62b85f818d') @@ -46,6 +46,10 @@ class Oce(Package): depends_on('cmake@2.8:', type='build') depends_on('tbb', when='+tbb') + def url_for_version(self, version): + return 'https://github.com/tpaviot/oce/archive/OCE-%s.tar.gz' % ( + version.dotted) + # There is a bug in OCE which appears with Clang (version?) or GCC 6.0 # and has to do with compiler optimization, see # https://github.com/tpaviot/oce/issues/576 @@ -56,8 +60,9 @@ class Oce(Package): # fix build with Xcode 8 "previous definition of CLOCK_REALTIME" # reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643 - if (platform.system() == "Darwin") and (platform.mac_ver()[0] == '10.12'): - patch('sierra.patch') + if (platform.system() == "Darwin") and ( + '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12'): + patch('sierra.patch', when='@0.17.2:0.18') def install(self, spec, prefix): options = [] @@ -85,8 +90,13 @@ def install(self, spec, prefix): '-DOCE_OSX_USE_COCOA:BOOL=ON', ]) - options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + if '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12': + # use @rpath on Sierra due to limit of dynamic loader + options.append('-DCMAKE_MACOSX_RPATH=ON') + else: + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) cmake('.', *options) make("install/strip") - make("test") + if self.run_tests: + make("test") diff --git a/var/spack/repos/builtin/packages/oce/sierra.patch b/var/spack/repos/builtin/packages/oce/sierra.patch index 8db3af5e37cd6f3fe4cccf387a7f95fbd0f46e34..1c0c86569bf85bbb466420fc1113800f457418e7 100644 --- a/var/spack/repos/builtin/packages/oce/sierra.patch +++ b/var/spack/repos/builtin/packages/oce/sierra.patch @@ -1,45 +1,12 @@ -diff --git a/adm/cmake/TKernel/CMakeLists.txt b/adm/cmake/TKernel/CMakeLists.txt -index 54e241e..72873c6 100644 ---- a/adm/cmake/TKernel/CMakeLists.txt -+++ b/adm/cmake/TKernel/CMakeLists.txt -@@ -29,7 +29,7 @@ if(WIN32) - set(TOOLKIT_LIBS ${TOOLKIT_LIBS} ${CSF_SOCKETLibs_LIB} ${CSF_advapi32_LIB} ${CSF_gdi32_LIB} ${CSF_user32_LIB} ${CSF_kernel32_LIB} ${CSF_psapi_LIB}) - else(WIN32) - # An implementation for Mac OS X has been added in src/OSD/gettime_osx.h -- if(NOT APPLE) -+ if(APPLE) - include( CheckFunctionExists ) - check_function_exists( clock_gettime CLOCK_GETTIME_IN_LIBC ) - if(NOT CLOCK_GETTIME_IN_LIBC) -@@ -40,7 +40,7 @@ else(WIN32) - endif(NOT CLOCK_GETTIME_IN_LIBRT) - set(TOOLKIT_LIBS ${TOOLKIT_LIBS} rt) - endif(NOT CLOCK_GETTIME_IN_LIBC) -- endif(NOT APPLE) -+ endif(APPLE) - endif(WIN32) - - # Adde-DHAVE_TBB in TKernel in order to benefit from Standard_MMgrTBBalloc -@@ -70,4 +70,3 @@ if (OCE_BUILD_TKERNEL_WITH_INSTALL_RPATH) - set_target_properties_install_rpath(${TOOLKIT} "${OCE_INSTALL_LIB_DIR_RPATH};${OCE_INSTALL_PACKAGE_LIB_DIR_RPATH}") - set_target_properties(${TOOLKIT} PROPERTIES BUILD_WITH_INSTALL_RPATH ON) - endif () -- diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx -index 444f844..25970d0 100644 ---- a/src/OSD/OSD_Chronometer.cxx +index f7374fb..63ac140 100644 +--- a/src/OSD/OSD_Chronometer.cxx.old +++ b/src/OSD/OSD_Chronometer.cxx @@ -51,7 +51,7 @@ #include <mach/mach.h> #endif -#if defined(__APPLE__) && defined(__MACH__) -+#if defined(__OOOOPPLE__) && defined(__MACH__) ++#if defined(__APPLE__) && !defined(__MAC_10_12) #include "gettime_osx.h" #endif - -@@ -283,4 +283,3 @@ void OSD_Chronometer::Show (Standard_Real& user, - system = Cumul_sys; - if (!StopSav) Start(); - } -- diff --git a/var/spack/repos/builtin/packages/oclock/package.py b/var/spack/repos/builtin/packages/oclock/package.py index 84da93c36ec8662569d081b0034f3d85baf8f7d3..ec656b23f12125f625e2b128961f3dea53a02837 100644 --- a/var/spack/repos/builtin/packages/oclock/package.py +++ b/var/spack/repos/builtin/packages/oclock/package.py @@ -25,7 +25,7 @@ from spack import * -class Oclock(Package): +class Oclock(AutotoolsPackage): """oclock is a simple analog clock using the SHAPE extension to make a round (possibly transparent) window.""" @@ -42,9 +42,3 @@ class Oclock(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index df144c8bbbd6c28587cf7b82a6ea191775859c33..ed8d28ebdad57ad301d82157fe119b2a31fa5948 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -26,7 +26,7 @@ import sys -class Octave(Package): +class Octave(AutotoolsPackage): """GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other @@ -34,10 +34,11 @@ class Octave(Package): Matlab. It may also be used as a batch-oriented language.""" homepage = "https://www.gnu.org/software/octave/" - url = "ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz" + url = "https://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz" extendable = True + version('4.2.0', '443ba73782f3531c94bcf016f2f0362a58e186ddb8269af7dcce973562795567') version('4.0.2', 'c2a5cacc6e4c52f924739cdf22c2c687') version('4.0.0', 'a69f8320a4f20a8480c1b278b1adb799') @@ -97,15 +98,18 @@ class Octave(Package): depends_on('suite-sparse', when='+suitesparse') depends_on('zlib', when='+zlib') - def install(self, spec, prefix): - config_args = [ - "--prefix=%s" % prefix - ] + def configure_args(self): + # See + # https://github.com/macports/macports-ports/blob/master/math/octave/ + # https://github.com/Homebrew/homebrew-science/blob/master/octave.rb + + spec = self.spec + config_args = [] # Required dependencies config_args.extend([ - "--with-blas=%s" % spec['blas'].prefix.lib, - "--with-lapack=%s" % spec['lapack'].prefix.lib + "--with-blas=%s" % spec['blas'].blas_libs.ld_flags, + "--with-lapack=%s" % spec['lapack'].lapack_libs.ld_flags ]) # Strongly recommended dependencies @@ -210,10 +214,7 @@ def install(self, spec, prefix): else: config_args.append("--without-z") - configure(*config_args) - - make() - make("install") + return config_args # ======================================================================== # Set up environment to make install easy for Octave extensions. diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index d5a70f077b54fca842142600deafa99e2a62213e..327031b87e9808a00edfd85a5a42fb9469618f19 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -68,7 +68,7 @@ def blas_libs(self): def lapack_libs(self): return self.blas_libs - @MakefilePackage.precondition('edit') + @run_before('edit') def check_compilers(self): # As of 06/2016 there is no mechanism to specify that packages which # depends on Blas/Lapack need C or/and Fortran symbols. For now @@ -126,7 +126,7 @@ def build_targets(self): return self.make_defs + targets - @MakefilePackage.sanity_check('build') + @run_after('build') def check_build(self): make('tests', *self.make_defs) @@ -138,7 +138,7 @@ def install_targets(self): ] return make_args + self.make_defs - @MakefilePackage.sanity_check('install') + @run_after('install') def check_install(self): spec = self.spec # Openblas may pass its own test but still fail to compile Lapack diff --git a/var/spack/repos/builtin/packages/openmpi/fix_multidef_pmi_class.patch b/var/spack/repos/builtin/packages/openmpi/fix_multidef_pmi_class.patch new file mode 100644 index 0000000000000000000000000000000000000000..28ebd9aeca954bfce031cf3accd9a5fa0bfbbd92 --- /dev/null +++ b/var/spack/repos/builtin/packages/openmpi/fix_multidef_pmi_class.patch @@ -0,0 +1,54 @@ +diff -Naur openmpi-2.0.1.orig/opal/mca/pmix/cray/pmix_cray.c openmpi-2.0.1/opal/mca/pmix/cray/pmix_cray.c +--- openmpi-2.0.1.orig/opal/mca/pmix/cray/pmix_cray.c 2016-08-23 04:56:37.000000000 +0800 ++++ openmpi-2.0.1/opal/mca/pmix/cray/pmix_cray.c 2017-01-31 01:05:34.302807465 +0800 +@@ -6,7 +6,7 @@ + * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All + * rights reserved. + * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. +- * Copyright (c) 2014-2015 Research Organization for Information Science ++ * Copyright (c) 2014-2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * $COPYRIGHT$ + * +@@ -127,7 +127,7 @@ + opal_pmix_op_cbfunc_t opcbfunc; + void *cbdata; + } pmi_opcaddy_t; +-OBJ_CLASS_INSTANCE(pmi_opcaddy_t, ++static OBJ_CLASS_INSTANCE(pmi_opcaddy_t, + opal_object_t, + NULL, NULL); + +diff -Naur openmpi-2.0.1.orig/opal/mca/pmix/s1/pmix_s1.c openmpi-2.0.1/opal/mca/pmix/s1/pmix_s1.c +--- openmpi-2.0.1.orig/opal/mca/pmix/s1/pmix_s1.c 2016-08-23 04:56:37.000000000 +0800 ++++ openmpi-2.0.1/opal/mca/pmix/s1/pmix_s1.c 2017-01-31 01:06:08.014808847 +0800 +@@ -1,7 +1,7 @@ + /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ + /* + * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +- * Copyright (c) 2014-2015 Research Organization for Information Science ++ * Copyright (c) 2014-2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * $COPYRIGHT$ + * +@@ -88,7 +88,7 @@ + opal_pmix_op_cbfunc_t opcbfunc; + void *cbdata; + } pmi_opcaddy_t; +-OBJ_CLASS_INSTANCE(pmi_opcaddy_t, ++static OBJ_CLASS_INSTANCE(pmi_opcaddy_t, + opal_object_t, + NULL, NULL); + +diff -Naur openmpi-2.0.1.orig/opal/mca/pmix/s2/pmix_s2.c openmpi-2.0.1/opal/mca/pmix/s2/pmix_s2.c +--- openmpi-2.0.1.orig/opal/mca/pmix/s2/pmix_s2.c 2016-08-23 04:56:37.000000000 +0800 ++++ openmpi-2.0.1/opal/mca/pmix/s2/pmix_s2.c 2017-01-31 01:06:27.718809655 +0800 +@@ -95,7 +95,7 @@ + opal_pmix_op_cbfunc_t opcbfunc; + void *cbdata; + } pmi_opcaddy_t; +-OBJ_CLASS_INSTANCE(pmi_opcaddy_t, ++static OBJ_CLASS_INSTANCE(pmi_opcaddy_t, + opal_object_t, + NULL, NULL); + diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 754cc8d93e0d1e5380d26eb401da14ca5940c269..562ef22a0961ad91ca637a9e6a66df8c7de6192e 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -39,6 +39,9 @@ def _verbs_dir(): # Remove executable name and "bin" directory path = os.path.dirname(path) path = os.path.dirname(path) + # There's usually no "/include" on Unix; use "/usr/include" instead + if path == "/": + path = "/usr" return path except: return None @@ -60,6 +63,7 @@ class Openmpi(AutotoolsPackage): list_url = "http://www.open-mpi.org/software/ompi/" list_depth = 3 + version('2.0.2', 'ecd99aa436a1ca69ce936a96d6a3fa48') version('2.0.1', '6f78155bd7203039d2448390f3b51c96') version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674') version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b') @@ -72,6 +76,7 @@ class Openmpi(AutotoolsPackage): patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") patch('llnl-platforms.patch', when="@1.6.5") patch('configure.patch', when="@1.10.0:1.10.1") + patch('fix_multidef_pmi_class.patch', when="@2.0.0:2.0.1") # Fabrics variant('psm', default=False, description='Build support for the PSM library') @@ -142,7 +147,7 @@ def verbs(self): elif self.spec.satisfies('@1.7:'): return 'verbs' - @AutotoolsPackage.precondition('autoreconf') + @run_before('autoreconf') def die_without_fortran(self): # Until we can pass variants such as +fortran through virtual # dependencies depends_on('mpi'), require Fortran compiler to @@ -236,7 +241,7 @@ def configure_args(self): return config_args - @AutotoolsPackage.sanity_check('install') + @run_after('install') def filter_compilers(self): """Run after install to make the MPI compilers use the compilers that Spack built the package with. diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 12b5ed9c522973fd8afcda71679d4f13763ba306..f74a4203561fd59163e8b11218c535c6d1d8b803 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -28,14 +28,22 @@ class Openssl(Package): - """The OpenSSL Project is a collaborative effort to develop a - robust, commercial-grade, full-featured, and Open Source - toolkit implementing the Secure Sockets Layer (SSL v2/v3) and - Transport Layer Security (TLS v1) protocols as well as a - full-strength general purpose cryptography library.""" + """OpenSSL is an open source project that provides a robust, + commercial-grade, and full-featured toolkit for the Transport + Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. + It is also a general-purpose cryptography library.""" homepage = "http://www.openssl.org" - url = "ftp://openssl.org/source/openssl-1.0.1h.tar.gz" + url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" + list_url = "https://www.openssl.org/source/old/" + list_depth = 2 + # Note: Version 1.0.2 is the "long-term support" version that will + # remain supported until 2019. We could thus make this version the + # preferred version, if we find that many packages cannot handle + # version 1.1. + version('1.1.0d', '711ce3cd5f53a99c0e12a7d5804f0f63') + version('1.1.0c', '601e8191f72b18192a937ecf1a800f3f') + version('1.0.2k', 'f965fc0bf01bf882b31314b61391ae65') version('1.0.2j', '96322138f0b69e61b7212bc53d5e912b') version('1.0.2i', '678374e63f8df456a697d3e5e5a931fb') version('1.0.2h', '9392e65072ce4b614c1392eefc1f23d0') @@ -48,7 +56,11 @@ class Openssl(Package): version('1.0.1r', '1abd905e079542ccae948af37e393d28') version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') - depends_on("zlib") + depends_on('zlib') + + # 'make test' requires Test::More version 0.96 + depends_on('perl@5.14.0:', type='build') + parallel = False def handle_fetch_error(self, error): @@ -67,7 +79,9 @@ def install(self, spec, prefix): # where it happens automatically?) env['KERNEL_BITS'] = '64' - options = ['zlib', 'no-krb5', 'shared'] + options = ['zlib', 'shared'] + if spec.satisfies('@1.0'): + options.append('no-krb5') config = Executable('./config') config('--prefix=%s' % prefix, @@ -80,4 +94,6 @@ def install(self, spec, prefix): filter_file(r'-arch x86_64', '', 'Makefile') make() + if self.run_tests: + make('test') # 'VERBOSE=1' make('install') diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 93a08c4f2d756e532639f69e220208a5655a8df4..ef3f2f54d19b2c9d0a152514bd536e3982caa5cb 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -31,6 +31,7 @@ class P4est(AutotoolsPackage): homepage = "http://www.p4est.org" url = "http://p4est.github.io/release/p4est-1.1.tar.gz" + version('2.0', 'c522c5b69896aab39aa5a81399372a19a6b03fc6200d2d5d677d9a22fe31029a') version('1.1', '37ba7f4410958cfb38a2140339dbf64f') # build dependencies diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py index c45054be5811358814d0a1f81f45930559d84ffe..0f082527b9642febad9ab1cf93d0f3811ebff2e9 100644 --- a/var/spack/repos/builtin/packages/pango/package.py +++ b/var/spack/repos/builtin/packages/pango/package.py @@ -25,7 +25,7 @@ from spack import * -class Pango(Package): +class Pango(AutotoolsPackage): """Pango is a library for laying out and rendering of text, with an emphasis on internationalization. It can be used anywhere that text layout is needed, though most of the work on Pango so @@ -49,6 +49,4 @@ class Pango(Package): depends_on("glib") def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() make("install", parallel=False) diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 90a7490e7532077820b35380838297a56e3c72e8..115f1604b7736a1b21a67334b8c8f4717282f9e9 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -41,6 +41,7 @@ class Papi(Package): homepage = "http://icl.cs.utk.edu/papi/index.html" url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz" + version('5.5.1', '86a8a6f3d0f34cd83251da3514aae15d') version('5.5.0', '5e1244a04ca031d4cc29b46ce3dd05b5') version('5.4.3', '3211b5a5bb389fe692370f5cf4cc2412') version('5.4.1', '9134a99219c79767a11463a76b0b01a2') diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index 65512017ef6c985cf9a2f8036b4a15554070de8c..0563bd06867a7d84861c6c4b14a8cae57ba62a54 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -32,7 +32,9 @@ class ParallelNetcdf(AutotoolsPackage): homepage = "https://trac.mcs.anl.gov/projects/parallel-netcdf" url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-1.6.1.tar.gz" + list_url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/download.html" + version('1.8.0', '825825481aa629eb82f21ca37afff1609b8eeb07') version('1.7.0', '267eab7b6f9dc78c4d0e6def2def3aea4bc7c9f0') version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34') diff --git a/var/spack/repos/builtin/packages/parallel/package.py b/var/spack/repos/builtin/packages/parallel/package.py index 81c019565125eb95eec5f03ee5bb1d69764123ee..4297e8acb011f35375eb6d58aeed6173748bcd6a 100644 --- a/var/spack/repos/builtin/packages/parallel/package.py +++ b/var/spack/repos/builtin/packages/parallel/package.py @@ -25,7 +25,7 @@ from spack import * -class Parallel(Package): +class Parallel(AutotoolsPackage): """GNU parallel is a shell tool for executing jobs in parallel using one or more computers. A job can be a single command or a small script that has to be run for each of the lines in the input. @@ -36,9 +36,3 @@ class Parallel(Package): version('20160422', '24621f684130472694333709bd4454cb') version('20160322', '4e81e0d36902ab4c4e969ee6f35e6e57') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index 74e00cc9e014f81afe336c371f95360188613adf..0e6cd5390a0c2a9acc6685491f4df06bfa6d58e6 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -71,6 +71,16 @@ def install(self, spec, prefix): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') + else: + # Remove all RPATH options + # (RPATHxxx options somehow trigger cmake to link dynamically) + rpath_options = [] + for o in options: + if o.find('RPATH') >= 0: + rpath_options.append(o) + for o in rpath_options: + options.remove(o) + if '+debug' in spec: options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py index c391f491ebb7e33cbe7965eb477e72e86c8f2a01..1d429361b69b1f82f688fee4c0dbe24e71a1cfa1 100644 --- a/var/spack/repos/builtin/packages/patchelf/package.py +++ b/var/spack/repos/builtin/packages/patchelf/package.py @@ -25,7 +25,7 @@ from spack import * -class Patchelf(Package): +class Patchelf(AutotoolsPackage): """PatchELF is a small utility to modify the dynamic linker and RPATH of ELF executables.""" @@ -37,8 +37,3 @@ class Patchelf(Package): version('0.9', '3c265508526760f233620f35d79c79fc') version('0.8', '407b229e6a681ffb0e2cdd5915cb2d01') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index a2236e682b0aadbdaaa26ec7489d3b54ea264cc8..f1a106f8d7963afb138236274f1a225c51069324 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -30,7 +30,7 @@ class Pcre(Package): libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.""" homepage = "http://www.pcre.org""" - url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2" + url = "https://ftp.pcre.org/pub/pcre/pcre-8.36.tar.bz2" version('8.39', 'e3fca7650a0556a2647821679d81f585') version('8.38', '00aabbfe56d5a48b270f999b508c5ad2') diff --git a/var/spack/repos/builtin/packages/pcre2/package.py b/var/spack/repos/builtin/packages/pcre2/package.py index a2739e0584460738b22601dea4b857a558224d02..5fb582cab0c50194a162977ce2b12691efdc550e 100644 --- a/var/spack/repos/builtin/packages/pcre2/package.py +++ b/var/spack/repos/builtin/packages/pcre2/package.py @@ -25,16 +25,11 @@ from spack import * -class Pcre2(Package): +class Pcre2(AutotoolsPackage): """The PCRE2 package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.""" homepage = "http://www.pcre.org""" - url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.20.tar.bz2" + url = "https://ftp.pcre.org/pub/pcre/pcre2-10.20.tar.bz2" version('10.20', 'dcd027c57ecfdc8a6c3af9d0acf5e3f7') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py index bed01aeefb8cf118ab999d6f02db5fd5fc91747f..081c32c861d922dc1667277959cd1bf662634de3 100644 --- a/var/spack/repos/builtin/packages/pdt/package.py +++ b/var/spack/repos/builtin/packages/pdt/package.py @@ -25,7 +25,7 @@ from spack import * -class Pdt(Package): +class Pdt(AutotoolsPackage): """Program Database Toolkit (PDT) is a framework for analyzing source code written in several programming languages and for making rich program knowledge accessible to developers of static and dynamic @@ -43,8 +43,3 @@ class Pdt(Package): version('3.20', 'c3edabe202926abe04552e33cd39672d') version('3.19', '5c5e1e6607086aa13bf4b1b9befc5864') version('3.18.1', 'e401534f5c476c3e77f05b7f73b6c4f2') - - def install(self, spec, prefix): - configure('-prefix=%s' % prefix) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index d71a7492bad7b2f5c9d6a9ee865c63c1a4922a7c..ec0837e6a03f970b375682bd82dc5516ddf7c75f 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -35,8 +35,9 @@ class Perl(Package): """Perl 5 is a highly capable, feature-rich programming language with over 27 years of development.""" homepage = "http://www.perl.org" - url = "http://www.cpan.org/src/5.0/perl-5.22.2.tar.gz" + url = "http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz" + version('5.24.1', '765ef511b5b87a164e2531403ee16b3c') version('5.24.0', 'c5bf7f3285439a2d3b6a488e14503701') version('5.22.2', '5767e2a10dd62a46d7b57f74a90d952b') version('5.20.3', 'd647d0ea5a7a8194c34759ab9f2610cd') diff --git a/var/spack/repos/builtin/packages/pflotran/package.py b/var/spack/repos/builtin/packages/pflotran/package.py index 347f792453ed0f5bd6362e5274dae84e6ec32dd8..fc7069304104cd5d9ebf480c5ce33625892888ce 100644 --- a/var/spack/repos/builtin/packages/pflotran/package.py +++ b/var/spack/repos/builtin/packages/pflotran/package.py @@ -38,7 +38,7 @@ class Pflotran(AutotoolsPackage): commmit='4734cf5e606b') depends_on('mpi') - depends_on('hdf5@1.8.12+mpi+fortran') + depends_on('hdf5@1.8.12:+mpi+fortran') depends_on('petsc@develop+hdf5+metis',when='@develop') depends_on('petsc@for-pflotran-0.1.0+hdf5+metis',when='@0.1.0') diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py index 60dfdf74055faac9e4e8d0f1ac69bc0e13b3b437..69949b0017d6470a182898bf425af23f50fd0b3e 100644 --- a/var/spack/repos/builtin/packages/plumed/package.py +++ b/var/spack/repos/builtin/packages/plumed/package.py @@ -27,7 +27,7 @@ from spack import * -class Plumed(Package): +class Plumed(AutotoolsPackage): """PLUMED is an open source library for free energy calculations in molecular systems which works together with some of the most popular molecular dynamics engines. @@ -67,6 +67,8 @@ class Plumed(Package): depends_on('gsl', when='+gsl') depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') # Dictionary mapping PLUMED versions to the patches it provides # interactively @@ -84,6 +86,8 @@ class Plumed(Package): } } + force_autoreconf = True + def apply_patch(self, other): plumed = subprocess.Popen( [join_path(self.spec.prefix.bin, 'plumed'), 'patch', '-p'], @@ -99,12 +103,15 @@ def setup_dependent_package(self, module, ext_spec): # Make plumed visible from dependent packages module.plumed = Executable(join_path(self.spec.prefix.bin, 'plumed')) - def install(self, spec, prefix): + @run_before('autoreconf') + def filter_gslcblas(self): # This part is needed to avoid linking with gsl cblas # interface which will mask the cblas interface # provided by optimized libraries due to linking order filter_file('-lgslcblas', '', 'configure.ac') - autoreconf('-ivf') + + def configure_args(self): + spec = self.spec # From plumed docs : # Also consider that this is different with respect to what some other @@ -114,8 +121,7 @@ def install(self, spec, prefix): # with MPI you should use: # # > ./configure CXX="$MPICXX" - configure_opts = ['--prefix=' + prefix] - + configure_opts = [] # If using MPI then ensure the correct compiler wrapper is used. if '+mpi' in spec: configure_opts.extend([ @@ -153,6 +159,4 @@ def install(self, spec, prefix): configure_opts.extend([ '--enable-modules={0}'.format("".join(module_opts))]) - configure(*configure_opts) - make() - make('install') + return configure_opts diff --git a/var/spack/repos/builtin/packages/presentproto/package.py b/var/spack/repos/builtin/packages/presentproto/package.py index ca145abb6b1a9db1edb678e4929b8a7a5958273f..32560ade65ca9259b59ddb8945a3f514755ac2a1 100644 --- a/var/spack/repos/builtin/packages/presentproto/package.py +++ b/var/spack/repos/builtin/packages/presentproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Presentproto(Package): +class Presentproto(AutotoolsPackage): """Present protocol specification and Xlib/Xserver headers.""" homepage = "https://cgit.freedesktop.org/xorg/proto/presentproto/" @@ -35,8 +35,3 @@ class Presentproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/printproto/package.py b/var/spack/repos/builtin/packages/printproto/package.py index 151924dd490b9982c71a6b60b66c1de7678b9fb5..0f905c3172f0c0e3342030f5c46a4e9cbadb1233 100644 --- a/var/spack/repos/builtin/packages/printproto/package.py +++ b/var/spack/repos/builtin/packages/printproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Printproto(Package): +class Printproto(AutotoolsPackage): """Xprint extension to the X11 protocol - a portable, network-transparent printing system.""" @@ -36,8 +36,3 @@ class Printproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py index 06ab6108b636dea55d53d05c7991ce4d0bf35047..3008baa690ee2b51600bc69ba6283379b73dce7c 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -25,7 +25,7 @@ from spack import * -class Proj(Package): +class Proj(AutotoolsPackage): """Cartographic Projections""" homepage = "https://github.com/OSGeo/proj.4/wiki" url = "http://download.osgeo.org/proj/proj-4.9.2.tar.gz" @@ -35,11 +35,3 @@ class Proj(Package): version('4.8.0', 'd815838c92a29179298c126effbb1537') version('4.7.0', '927d34623b52e0209ba2bfcca18fe8cd') version('4.6.1', '7dbaab8431ad50c25669fd3fb28dc493') - - # No dependencies - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index bf0073b16a82bde555d1d0e89bf5601cb3a91ae3..34d167b28c9388d876ff528a9336262bc54d4093 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -25,16 +25,16 @@ from spack import * -class Protobuf(Package): +class Protobuf(AutotoolsPackage): """Google's data interchange format.""" homepage = "https://developers.google.com/protocol-buffers" url = "https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2" + version('3.0.2', '845b39e4b7681a2ddfd8c7f528299fbb', url='https://github.com/google/protobuf/archive/v3.0.2.tar.gz') version('2.5.0', 'a72001a9067a4c2c4e0e836d0f92ece4') - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("check") - make("install") + depends_on('m4', when='@3.0.2:') + depends_on('autoconf', when='@3.0.2:') + depends_on('automake', when='@3.0.2:') + depends_on('libtool', when='@3.0.2:') diff --git a/var/spack/repos/builtin/packages/proxymngr/package.py b/var/spack/repos/builtin/packages/proxymngr/package.py index 896f4a516b7c07d9893620f0f58f5bf6d4fffacf..896f2d00b747ac463a007032bdab3de70c536f74 100644 --- a/var/spack/repos/builtin/packages/proxymngr/package.py +++ b/var/spack/repos/builtin/packages/proxymngr/package.py @@ -25,7 +25,7 @@ from spack import * -class Proxymngr(Package): +class Proxymngr(AutotoolsPackage): """The proxy manager (proxymngr) is responsible for resolving requests from xfindproxy (and other similar clients), starting new proxies when appropriate, and keeping track of all of the available proxy services. @@ -44,9 +44,3 @@ class Proxymngr(Package): depends_on('xproxymanagementprotocol', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py index 4a35134e40ae634a3bda7c905321bc7af2644fea..d2934eb3c77a3fa5e8a0dffd1479173e4746a21b 100644 --- a/var/spack/repos/builtin/packages/py-basemap/package.py +++ b/var/spack/repos/builtin/packages/py-basemap/package.py @@ -44,7 +44,7 @@ class PyBasemap(PythonPackage): def setup_environment(self, spack_env, run_env): spack_env.set('GEOS_DIR', self.spec['geos'].prefix) - @PythonPackage.sanity_check('install') + @run_after('install') def post_install_patch(self): spec = self.spec # We are not sure if this fix is needed before Python 3.5.2. diff --git a/var/spack/repos/builtin/packages/py-ipdb/package.py b/var/spack/repos/builtin/packages/py-ipdb/package.py index ab7982a76a3c6998fefdd5c3dbe5cd56c8586cdc..a79ade5d004e2680014fb9ca5238a671e14e6c11 100644 --- a/var/spack/repos/builtin/packages/py-ipdb/package.py +++ b/var/spack/repos/builtin/packages/py-ipdb/package.py @@ -25,7 +25,7 @@ from spack import * -class PyIpdb(Package): +class PyIpdb(PythonPackage): """ipdb is the iPython debugger and has many additional features, including a better interactive debugging experience via colorized output.""" @@ -39,7 +39,6 @@ class PyIpdb(Package): # this the original packager does not know what they are. See the 3rd party # section on ipdb's GitHub: # https://github.com/gotcha/ipdb#third-party-support - extends('python') depends_on('python@2.6:2.7,3.2:') # Dependencies gathered from: @@ -52,7 +51,3 @@ class PyIpdb(Package): depends_on('py-six', type=('build', 'link')) depends_on('py-pexpect', type=('build', 'link')) depends_on('py-prompt-toolkit', type=('build', 'link')) - - def install(self, spec, prefix): - # Installation is uncomplicated, this should suffice. - setup_py('install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-lit/package.py b/var/spack/repos/builtin/packages/py-lit/package.py new file mode 100644 index 0000000000000000000000000000000000000000..238d1b150014bbae3f5730c33d947bab5a399d9a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-lit/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyLit(PythonPackage): + """lit is a portable tool for executing LLVM and Clang style test suites, + summarizing their results, and providing indication of failures. lit is + designed to be a lightweight testing tool with as simple a user + interface as possible.""" + + homepage = "https://pypi.python.org/pypi/lit" + url = "https://pypi.python.org/packages/5b/a0/dbed2c8dfb220eb9a5a893257223cd0ff791c0fbc34ce2f1a957fa4b6c6f/lit-0.5.0.tar.gz" + + version('0.5.0', '8144660cc692be8fb903395a5f06564d') + + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index d808b0fc4bfb54356348094ba947e2bf0bfb73af..fc40dce9c115187a9675b8846c34aa37cc85e710 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -95,7 +95,7 @@ class PyMatplotlib(PythonPackage): # depends_on('ttconv') depends_on('py-six@1.9.0:', type=('build', 'run')) - @PythonPackage.sanity_check('install') + @run_after('install') def set_backend(self): spec = self.spec prefix = self.prefix diff --git a/var/spack/repos/builtin/packages/py-meep/package.py b/var/spack/repos/builtin/packages/py-meep/package.py index 0ebba77ac628c0eaafac3c290d9bb67e0c517a64..64ca4e25d93caa8f57033e0310dc367df29120b0 100644 --- a/var/spack/repos/builtin/packages/py-meep/package.py +++ b/var/spack/repos/builtin/packages/py-meep/package.py @@ -51,8 +51,8 @@ class PyMeep(PythonPackage): phases = ['clean', 'build_ext', 'install', 'bdist'] - def setup_file(self, spec, prefix): - return 'setup-mpi.py' if '+mpi' in spec else 'setup.py' + def setup_file(self): + return 'setup-mpi.py' if '+mpi' in self.spec else 'setup.py' def common_args(self, spec, prefix): include_dirs = [ diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 25a5f04b8c67799724c4d9f9f8d259c4c45fdb3c..a48f5a1955281c6c4cadacca080ce173754f3bfa 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -75,10 +75,56 @@ def patch(self): lapackblas += spec['blas'].blas_libs if '+blas' in spec or '+lapack' in spec: + # note that one should not use [blas_opt] and [lapack_opt], see + # https://github.com/numpy/numpy/commit/ffd4332262ee0295cb942c94ed124f043d801eb6 with open('site.cfg', 'w') as f: - f.write('[DEFAULT]\n') - f.write('libraries=%s\n' % ','.join(lapackblas.names)) - f.write('library_dirs=%s\n' % ':'.join(lapackblas.directories)) + # Unfortunately, numpy prefers to provide each BLAS/LAPACK + # differently. + names = ','.join(lapackblas.names) + dirs = ':'.join(lapackblas.directories) + # First, workout the defaults. + # The section title for the defaults changed in @1.10, see + # https://github.com/numpy/numpy/blob/master/site.cfg.example + if spec.satisfies('@:1.9.2'): + f.write('[DEFAULT]\n') + else: + f.write('[ALL]\n') + if not ('^openblas' in spec or + '^mkl' in spec or + '^atlas' in spec): + f.write('libraries=%s\n' % names) + f.write('library_dirs=%s\n' % dirs) + if not ((platform.system() == "Darwin") and (platform.mac_ver()[0] == '10.12')): f.write('rpath=%s\n' % ':'.join(lapackblas.directories)) + + # Now special treatment for some (!) BLAS/LAPACK. Note that + # in this case library_dirs can not be specified within [ALL]. + if '^openblas' in spec: + f.write('[openblas]\n') + f.write('libraries=%s\n' % names) + f.write('library_dirs=%s\n' % dirs) + elif '^mkl' in spec: + # numpy does not expect system libraries needed for MKL + # here. + # names = [x for x in names if x.startswith('mkl')] + # FIXME: as of @1.11.2, numpy does not work with separately + # specified threading and interface layers. A workaround is + # a terribly bad idea to use mkl_rt. In this case Spack + # won't no longer be able to guarantee that one and the + # same variant of Blas/Lapack (32/64bit, threaded/serial) + # is used within the DAG. This may lead to a lot of + # hard-to-debug segmentation faults on user's side. Users + # may also break working installation by (unconciously) + # setting environment variable to switch between different + # interface and threading layers dynamically. From this + # perspective it is no different from throwing away RPATH's + # and using LD_LIBRARY_PATH throughout Spack. + f.write('[mkl]\n') + f.write('mkl_libs=%s\n' % 'mkl_rt') + f.write('library_dirs=%s\n' % dirs) + elif '^atlas' in spec: + f.write('[atlas]\n') + f.write('atlas_libs=%s\n' % names) + f.write('library_dirs=%s\n' % dirs) diff --git a/var/spack/repos/builtin/packages/py-psutil/package.py b/var/spack/repos/builtin/packages/py-psutil/package.py index 7aa776d2a12a627014813ff96553940f1150c134..539f0bdbd7f1d96aa7e24b7728b9d63d568ee7cc 100644 --- a/var/spack/repos/builtin/packages/py-psutil/package.py +++ b/var/spack/repos/builtin/packages/py-psutil/package.py @@ -25,7 +25,7 @@ from spack import * -class PyPsutil(Package): +class PyPsutil(PythonPackage): """psutil is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python.""" @@ -35,9 +35,5 @@ class PyPsutil(Package): version('5.0.1', '153dc8be94badc4072016ceeac7808dc') - extends('python') depends_on('python@2.6:') depends_on('py-setuptools', type='build') - - def install(self, spec, prefix): - setup_py('install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-pypar/package.py b/var/spack/repos/builtin/packages/py-pypar/package.py index f10b6d807f3f93c24e38b2f2c7545daab58aec0f..6ba999c063fa2792503e621f36956396511eacc6 100644 --- a/var/spack/repos/builtin/packages/py-pypar/package.py +++ b/var/spack/repos/builtin/packages/py-pypar/package.py @@ -37,8 +37,7 @@ class PyPypar(PythonPackage): depends_on('mpi') depends_on('py-numpy', type=('build', 'run')) + build_directory = 'source' + def url_for_version(self, version): return "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pypar/pypar-%s.tgz" % version - - def build_directory(self): - return 'source' diff --git a/var/spack/repos/builtin/packages/py-sphinx-bootstrap-theme/package.py b/var/spack/repos/builtin/packages/py-sphinx-bootstrap-theme/package.py index 38f127dfc4491de03198c518832dc616a079ecad..bcc68cbc646c56a438e85d1882526c4037e0efc7 100644 --- a/var/spack/repos/builtin/packages/py-sphinx-bootstrap-theme/package.py +++ b/var/spack/repos/builtin/packages/py-sphinx-bootstrap-theme/package.py @@ -25,7 +25,7 @@ from spack import * -class PySphinxBootstrapTheme(Package): +class PySphinxBootstrapTheme(PythonPackage): """Sphinx Bootstrap Theme.""" homepage = "https://pypi.python.org/pypi/sphinx-bootstrap-theme/" @@ -33,9 +33,4 @@ class PySphinxBootstrapTheme(Package): version('0.4.13', '32e513a9c8ffbb8c1e4b036e8f74fb51') - extends('python') - depends_on('py-setuptools', type='build') - - def install(self, spec, prefix): - setup_py('install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-xpyb/package.py b/var/spack/repos/builtin/packages/py-xpyb/package.py index 49c6343c4528496cd9e40f04edfbecef818564bb..136da54dcf35cfbb1a4ee071a70c7d0a03757aa5 100644 --- a/var/spack/repos/builtin/packages/py-xpyb/package.py +++ b/var/spack/repos/builtin/packages/py-xpyb/package.py @@ -25,7 +25,7 @@ from spack import * -class PyXpyb(Package): +class PyXpyb(AutotoolsPackage): """xpyb provides a Python binding to the X Window System protocol via libxcb.""" @@ -39,9 +39,3 @@ class PyXpyb(Package): depends_on('libxcb@1.5:') depends_on('xcb-proto@1.7.1:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/py-yt/package.py b/var/spack/repos/builtin/packages/py-yt/package.py index 6ab967d8a51b7495b420d38c055397e03e09b1f7..4a61bfcec992ff5ca25650b2e9755a38dc53d91e 100644 --- a/var/spack/repos/builtin/packages/py-yt/package.py +++ b/var/spack/repos/builtin/packages/py-yt/package.py @@ -65,7 +65,7 @@ class PyYt(PythonPackage): depends_on("py-sympy", type=('build', 'run')) depends_on("python @2.7:2.999,3.4:") - @PythonPackage.sanity_check('install') + @run_after('install') def check_install(self): # The Python interpreter path can be too long for this # yt = Executable(join_path(prefix.bin, "yt")) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 348b075e2f4b0c9b45836b6386e6cf424b54e7bc..9a04aaf98124d92f606e53b5c64fbe573153be72 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -148,6 +148,16 @@ def install(self, spec, prefix): make() make('install') + self.sysconfigfilename = '_sysconfigdata.py' + if spec.satisfies('@3.6:'): + # Python 3.6.0 renamed the sys config file + python3 = os.path.join(prefix.bin, + 'python{0}'.format(self.version.up_to(1))) + python = Executable(python3) + sc = 'import sysconfig; print(sysconfig._get_sysconfigdata_name())' + cf = python('-c', sc, output=str).strip('\n') + self.sysconfigfilename = '{0}.py'.format(cf) + self._save_distutil_vars(prefix) self.filter_compilers(prefix) @@ -207,12 +217,11 @@ def _save_distutil_vars(self, prefix): input_filename = None for filename in [join_path(lib_dir, 'python{0}'.format(self.version.up_to(2)), - '_sysconfigdata.py') + self.sysconfigfilename) for lib_dir in [prefix.lib, prefix.lib64]]: if os.path.isfile(filename): input_filename = filename break - if not input_filename: return @@ -301,7 +310,7 @@ def filter_compilers(self, prefix): config_dirname = 'config-{0}m'.format( self.version.up_to(2)) if self.spec.satisfies('@3:') else 'config' - rel_filenames = ['_sysconfigdata.py', + rel_filenames = [self.sysconfigfilename, join_path(config_dirname, 'Makefile')] abs_filenames = [join_path(dirname, filename) for dirname in diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 95698018fa41ae258b64b79214f92532df7514f9..447af5f1af83008853ea05ac5ceef171de775cc8 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -227,7 +227,7 @@ def common_config_args(self): @when('@3') def configure(self): # A user reported that this was necessary to link Qt3 on ubuntu - os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib' + os.environ['LD_LIBRARY_PATH'] += os.pathsep + os.getcwd() + '/lib' configure('-prefix', self.prefix, '-v', '-thread', diff --git a/var/spack/repos/builtin/packages/r-adabag/package.py b/var/spack/repos/builtin/packages/r-adabag/package.py new file mode 100644 index 0000000000000000000000000000000000000000..aa160478568df38a23467f3b03286f5fcae1a8d2 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-adabag/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RAdabag(RPackage): + """Applies Multiclass AdaBoost.M1, SAMME and Bagging.""" + + homepage = "https://cran.r-project.org/package=adabag" + url = "https://cran.r-project.org/src/contrib/adabag_4.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/adabag" + + version('4.1', '2e019f053d49f62ebb3b1697bbb50afa') + + depends_on('r-rpart', type=('build', 'run')) + depends_on('r-mlbench', type=('build', 'run')) + depends_on('r-caret', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-assertthat/package.py b/var/spack/repos/builtin/packages/r-assertthat/package.py index 97c29b4a999213ff04be13aad1a7dd3949cd88b0..b8ab7d7a0cd2c6169e3620bca88a7d9f33414162 100644 --- a/var/spack/repos/builtin/packages/r-assertthat/package.py +++ b/var/spack/repos/builtin/packages/r-assertthat/package.py @@ -31,7 +31,8 @@ class RAssertthat(RPackage): producing friendly error messages so that your users know what they've done wrong.""" - homepage = "https://cran.r-project.org/web/packages/assertthat/index.html" + homepage = "https://cran.r-project.org/package=assertthat" url = "https://cran.r-project.org/src/contrib/assertthat_0.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/assertthat" version('0.1', '59f9d7f7c00077ea54d763b78eeb5798') diff --git a/var/spack/repos/builtin/packages/r-biocinstaller/package.py b/var/spack/repos/builtin/packages/r-biocinstaller/package.py new file mode 100644 index 0000000000000000000000000000000000000000..c145de688cc2bb22c80c48fb702bd1f16fd49ce2 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-biocinstaller/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RBiocinstaller(RPackage): + """This package is used to install and update Bioconductor, CRAN, + and (some) github packages.""" + + homepage = "http://bioconductor.org/packages/devel/bioc/html/BiocInstaller.html" + url = "http://bioconductor.org/packages/devel/bioc/src/contrib/BiocInstaller_1.25.3.tar.gz" + + version('1.25.3', '6214770455a5122dca5544861f52c91d') + + depends_on('r@3.4.0:') diff --git a/var/spack/repos/builtin/packages/r-car/package.py b/var/spack/repos/builtin/packages/r-car/package.py index 80a0206a8ac7bf6d07056093233c7006a7df7d0f..56c87c27a6dc8ee1e137d72fae0f6cba758cc33f 100644 --- a/var/spack/repos/builtin/packages/r-car/package.py +++ b/var/spack/repos/builtin/packages/r-car/package.py @@ -30,13 +30,14 @@ class RCar(RPackage): Companion to Applied Regression, Second Edition, Sage, 2011.""" homepage = "https://r-forge.r-project.org/projects/car/" - url = "https://cran.r-project.org/src/contrib/car_2.1-2.tar.gz" + url = "https://cran.r-project.org/src/contrib/car_2.1-4.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/car" + version('2.1-4', 'a66c307e8ccf0c336ed197c0f1799565') version('2.1-2', '0f78ad74ef7130126d319acec23951a0') - depends_on('r-mass', type=('build','run')) - depends_on('r-mgcv', type=('build','run')) - depends_on('r-nnet', type=('build','run')) - depends_on('r-pbkrtest', type=('build','run')) - depends_on('r-quantreg', type=('build','run')) + depends_on('r-mass', type=('build', 'run')) + depends_on('r-mgcv', type=('build', 'run')) + depends_on('r-nnet', type=('build', 'run')) + depends_on('r-pbkrtest', type=('build', 'run')) + depends_on('r-quantreg', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-caret/package.py b/var/spack/repos/builtin/packages/r-caret/package.py index d795cfa204758f0458e1a910d3f72c427d56941c..277fdc71430cc5c9fd34b3ecaf5b71265f366d9a 100644 --- a/var/spack/repos/builtin/packages/r-caret/package.py +++ b/var/spack/repos/builtin/packages/r-caret/package.py @@ -30,15 +30,19 @@ class RCaret(RPackage): models.""" homepage = "https://github.com/topepo/caret/" - url = "https://cran.r-project.org/src/contrib/caret_6.0-70.tar.gz" + url = "https://cran.r-project.org/src/contrib/caret_6.0-73.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/caret" + version('6.0-73', 'ca869e3357b5358f028fb926eb62eb70') version('6.0-70', '202d7abb6a679af716ea69fb2573f108') - depends_on('r-lattice', type=('build','run')) - depends_on('r-ggplot2', type=('build','run')) - depends_on('r-car', type=('build','run')) - depends_on('r-foreach', type=('build','run')) - depends_on('r-plyr', type=('build','run')) - depends_on('r-nlme', type=('build','run')) - depends_on('r-reshape2', type=('build','run')) + depends_on('r@2.10:') + + depends_on('r-lattice@0.20:', type=('build', 'run')) + depends_on('r-ggplot2', type=('build', 'run')) + depends_on('r-car', type=('build', 'run')) + depends_on('r-foreach', type=('build', 'run')) + depends_on('r-plyr', type=('build', 'run')) + depends_on('r-modelmetrics@1.1.0:', type=('build', 'run')) + depends_on('r-nlme', type=('build', 'run')) + depends_on('r-reshape2', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-checkpoint/package.py b/var/spack/repos/builtin/packages/r-checkpoint/package.py new file mode 100644 index 0000000000000000000000000000000000000000..5fd862fa46fefa9213f28b33f079871025e608c2 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-checkpoint/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCheckpoint(RPackage): + """The goal of checkpoint is to solve the problem of package + reproducibility in R. Specifically, checkpoint allows you to + install packages as they existed on CRAN on a specific snapshot + date as if you had a CRAN time machine.""" + + homepage = "https://cran.r-project.org/package=checkpoint" + url = "https://cran.r-project.org/src/contrib/checkpoint_0.3.18.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/checkpoint" + + version('0.3.18', '021d7faeb72c36167951e103b2b065ea') + version('0.3.15', 'a4aa8320338f1434a330d984e97981ea') + + depends_on('r@3.0.0:') diff --git a/var/spack/repos/builtin/packages/r-cluster/package.py b/var/spack/repos/builtin/packages/r-cluster/package.py index 29e16c2271584a375a7203ee30d21e1a6156c228..caa96a380a1c98a6d76d1a8af37d4159e0802f86 100644 --- a/var/spack/repos/builtin/packages/r-cluster/package.py +++ b/var/spack/repos/builtin/packages/r-cluster/package.py @@ -31,7 +31,8 @@ class RCluster(RPackage): (1990) "Finding Groups in Data".""" homepage = "https://cran.r-project.org/web/packages/cluster/index.html" - url = "https://cran.r-project.org/src/contrib/cluster_2.0.4.tar.gz" + url = "https://cran.r-project.org/src/contrib/cluster_2.0.5.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/cluster" + version('2.0.5', '7330f209ebce960bdee1a6d6679cb85a') version('2.0.4', 'bb4deceaafb1c42bb1278d5d0dc11e59') diff --git a/var/spack/repos/builtin/packages/r-codetools/package.py b/var/spack/repos/builtin/packages/r-codetools/package.py index 39186bf54a14dabb0f5bfa8863346055f83ab4b9..60b8fc2cc8ac67d18b7ad449971be51e2150e112 100644 --- a/var/spack/repos/builtin/packages/r-codetools/package.py +++ b/var/spack/repos/builtin/packages/r-codetools/package.py @@ -29,7 +29,8 @@ class RCodetools(RPackage): """Code analysis tools for R.""" homepage = "https://cran.r-project.org/web/packages/codetools/index.html" - url = "https://cran.r-project.org/src/contrib/codetools_0.2-14.tar.gz" + url = "https://cran.r-project.org/src/contrib/codetools_0.2-15.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/codetools" + version('0.2-15', '37419cbc3de81984cf6d9b207d4f62d4') version('0.2-14', '7ec41d4f8bd6ba85facc8c5e6adc1f4d') diff --git a/var/spack/repos/builtin/packages/r-coin/package.py b/var/spack/repos/builtin/packages/r-coin/package.py new file mode 100644 index 0000000000000000000000000000000000000000..51b61a6164e105255771ae4d3aa5ef45bde0441b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-coin/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCoin(RPackage): + """Conditional inference procedures for the general independence problem + including two-sample, K-sample (non-parametric ANOVA), correlation, + censored, ordered and multivariate problems.""" + + homepage = "https://cran.r-project.org/package=coin" + url = "https://cran.r-project.org/src/contrib/coin_1.1-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/coin" + + version('1.1-3', '97d3d21f1e4a5762e36dd718dd2d0661') + + depends_on('r@2.14.0:') + + depends_on('r-survival', type=('build', 'run')) + depends_on('r-modeltools@0.2-9:', type=('build', 'run')) + depends_on('r-mvtnorm@1.0-5:', type=('build', 'run')) + depends_on('r-multcomp', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-colorspace/package.py b/var/spack/repos/builtin/packages/r-colorspace/package.py index b7561ea36031c34beb32982b3130c971ecc883e7..af2895acbf4beed5e31672fc5a48091819766ff9 100644 --- a/var/spack/repos/builtin/packages/r-colorspace/package.py +++ b/var/spack/repos/builtin/packages/r-colorspace/package.py @@ -32,7 +32,8 @@ class RColorspace(RPackage): are provided.""" homepage = "https://cran.r-project.org/web/packages/colorspace/index.html" - url = "https://cran.r-project.org/src/contrib/colorspace_1.2-6.tar.gz" + url = "https://cran.r-project.org/src/contrib/colorspace_1.3-2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/colorspace" + version('1.3-2', '63000bab81d995ff167df76fb97b2984') version('1.2-6', 'a30191e9caf66f77ff4e99c062e9dce1') diff --git a/var/spack/repos/builtin/packages/r-corrplot/package.py b/var/spack/repos/builtin/packages/r-corrplot/package.py new file mode 100644 index 0000000000000000000000000000000000000000..ccae3bf91384e638dab8ed538a371118b7aad91e --- /dev/null +++ b/var/spack/repos/builtin/packages/r-corrplot/package.py @@ -0,0 +1,36 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCorrplot(RPackage): + """A graphical display of a correlation matrix or general matrix. + It also contains some algorithms to do matrix reordering.""" + + homepage = "https://cran.r-project.org/package=corrplot" + url = "https://cran.r-project.org/src/contrib/corrplot_0.77.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/corrplot" + + version('0.77', '2a5d54fd5c65618b9afba1a32f6b4542') diff --git a/var/spack/repos/builtin/packages/r-cubist/package.py b/var/spack/repos/builtin/packages/r-cubist/package.py new file mode 100644 index 0000000000000000000000000000000000000000..acc02613833cc40ade257a8697ce9a5f227012e6 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-cubist/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RCubist(RPackage): + """Regression modeling using rules with added instance-based corrections""" + + homepage = "https://cran.r-project.org/package=Cubist" + url = "https://cran.r-project.org/src/contrib/Cubist_0.0.19.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/Cubist" + + version('0.0.19', 'bf9364f655536ec03717fd2ad6223a47') + + depends_on('r-lattice', type=('build', 'run')) + depends_on('r-reshape2', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py index 7b62d1be6030f1e131bb6ec07e64c84991fb6b1d..ae9ccf3f5e8d57d57e458c31e31659a71dff2410 100644 --- a/var/spack/repos/builtin/packages/r-curl/package.py +++ b/var/spack/repos/builtin/packages/r-curl/package.py @@ -37,10 +37,12 @@ class RCurl(RPackage): package with http specific tools and logic.""" homepage = "https://github.com/jeroenooms/curl" - url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz" + url = "https://cran.r-project.org/src/contrib/curl_2.3.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/curl" - version('1.0', '93d34926d6071e1fba7e728b482f0dd9') + version('2.3', '7250ee8caed98ba76906ab4d32da60f8') + version('1.0', '93d34926d6071e1fba7e728b482f0dd9') version('0.9.7', 'a101f7de948cb828fef571c730f39217') + depends_on('r@3.0.0:') depends_on('curl') diff --git a/var/spack/repos/builtin/packages/r-datatable/package.py b/var/spack/repos/builtin/packages/r-data-table/package.py similarity index 90% rename from var/spack/repos/builtin/packages/r-datatable/package.py rename to var/spack/repos/builtin/packages/r-data-table/package.py index 23802524e82d39bd41b92e88385f7b41b550bf91..4381d1e0f88b2838be046922e7fd48cf535bcf09 100644 --- a/var/spack/repos/builtin/packages/r-datatable/package.py +++ b/var/spack/repos/builtin/packages/r-data-table/package.py @@ -25,16 +25,17 @@ from spack import * -class RDatatable(RPackage): +class RDataTable(RPackage): """Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete of columns by group using no copies at all, list columns and a fast file reader (fread). Offers a natural and flexible syntax, for faster development.""" homepage = "https://github.com/Rdatatable/data.table/wiki" - url = "https://cran.r-project.org/src/contrib/data.table_1.9.6.tar.gz" + url = "https://cran.r-project.org/src/contrib/data.table_1.10.0.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/data.table" - version('1.9.6', 'b1c0c7cce490bdf42ab288541cc55372') + version('1.10.0', 'f0e08dd5ba1b3f46c59dd1574fe497c1') + version('1.9.6', 'b1c0c7cce490bdf42ab288541cc55372') - depends_on('r-chron', type=('build', 'run')) + depends_on('r@3.0.0:') diff --git a/var/spack/repos/builtin/packages/r-devtools/package.py b/var/spack/repos/builtin/packages/r-devtools/package.py index 9895a3b3900f0feba9e242cbe8523786ecec5bbd..c994f557c81d6ce34622ae214b889dca9085fae8 100644 --- a/var/spack/repos/builtin/packages/r-devtools/package.py +++ b/var/spack/repos/builtin/packages/r-devtools/package.py @@ -29,16 +29,19 @@ class RDevtools(RPackage): """Collection of package development tools.""" homepage = "https://github.com/hadley/devtools" - url = "https://cran.r-project.org/src/contrib/devtools_1.11.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/devtools_1.12.0.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/devtools" + version('1.12.0', '73b46c446273566e5b21c9f5f72aeca3') version('1.11.1', '242672ee27d24dddcbdaac88c586b6c2') - depends_on('r-httr', type=('build', 'run')) - depends_on('r-memoise', type=('build', 'run')) + depends_on('r@3.0.2:') + + depends_on('r-httr@0.4:', type=('build', 'run')) + depends_on('r-memoise@1.0.0:', type=('build', 'run')) depends_on('r-whisker', type=('build', 'run')) depends_on('r-digest', type=('build', 'run')) - depends_on('r-rstudioapi', type=('build', 'run')) + depends_on('r-rstudioapi@0.2.0:', type=('build', 'run')) depends_on('r-jsonlite', type=('build', 'run')) - depends_on('r-git2r', type=('build', 'run')) + depends_on('r-git2r@0.11.0:', type=('build', 'run')) depends_on('r-withr', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-digest/package.py b/var/spack/repos/builtin/packages/r-digest/package.py index 7e077442f9626a49244e2fa2505952ccbcabe2a9..08f5af0aca30b6521b9ed61c56cf8c64bf1b9a27 100644 --- a/var/spack/repos/builtin/packages/r-digest/package.py +++ b/var/spack/repos/builtin/packages/r-digest/package.py @@ -44,7 +44,11 @@ class RDigest(RPackage): used.""" homepage = "http://dirk.eddelbuettel.com/code/digest.html" - url = "https://cran.r-project.org/src/contrib/digest_0.6.9.tar.gz" + url = "https://cran.r-project.org/src/contrib/digest_0.6.12.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/digest" - version('0.6.9', '48048ce6c466bdb124716e45ba4a0e83') + version('0.6.12', '738efd4d9a37c5a4001ae66e954ce07e') + version('0.6.11', '52a864f55846b48b3cab0b5d0304a82a') + version('0.6.9', '48048ce6c466bdb124716e45ba4a0e83') + + depends_on('r@2.4.1:') diff --git a/var/spack/repos/builtin/packages/r-domc/package.py b/var/spack/repos/builtin/packages/r-domc/package.py new file mode 100644 index 0000000000000000000000000000000000000000..1a44aa537d778cc60c80df68dfc8460c3324c2dc --- /dev/null +++ b/var/spack/repos/builtin/packages/r-domc/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RDomc(RPackage): + """Provides a parallel backend for the %dopar% function using + the multicore functionality of the parallel package.""" + + homepage = "https://cran.r-project.org/package=doMC" + url = "https://cran.r-project.org/src/contrib/doMC_1.3.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/doMC" + + version('1.3.4', 'f965b09add9056e84f99a831dc3af7d1') + + depends_on('r@2.14.0:') + + depends_on('r-foreach@1.2.0:', type=('build', 'run')) + depends_on('r-iterators@1.0.0:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-ellipse/package.py b/var/spack/repos/builtin/packages/r-ellipse/package.py new file mode 100644 index 0000000000000000000000000000000000000000..1f6144285e926d5e781418e9bb4c2a2b9eae9176 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ellipse/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class REllipse(RPackage): + """This package contains various routines for drawing ellipses and + ellipse-like confidence regions.""" + + homepage = "https://cran.r-project.org/package=ellipse" + url = "https://cran.r-project.org/src/contrib/ellipse_0.3-8.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ellipse" + + version('0.3-8', '385f5ec5e49bcda4317ca9dffd33f771') + + depends_on('r@2.0.0:') diff --git a/var/spack/repos/builtin/packages/r-evaluate/package.py b/var/spack/repos/builtin/packages/r-evaluate/package.py index cf6c72dc62ea3d76eb657d0db06ced8bcb8fdf0a..004048e9857a5464b9a72c7f1fef832009678359 100644 --- a/var/spack/repos/builtin/packages/r-evaluate/package.py +++ b/var/spack/repos/builtin/packages/r-evaluate/package.py @@ -35,6 +35,9 @@ class REvaluate(RPackage): url = "https://cran.rstudio.com/src/contrib/evaluate_0.9.tar.gz" list_url = "https://cran.rstudio.com/src/contrib/Archive/evaluate" - version('0.9', '877d89ce8a9ef7f403b1089ca1021775') + version('0.10', 'c49326babf984a8b36e7e276da370ad2') + version('0.9', '877d89ce8a9ef7f403b1089ca1021775') - depends_on('r-stringr', type=('build', 'run')) + depends_on('r@3.0.2:') + + depends_on('r-stringr@0.6.2:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-ggplot2/package.py b/var/spack/repos/builtin/packages/r-ggplot2/package.py index 3b4c437f0c22e977e378c38831a63b854c4d79cd..e5c80e4b7997c3f9a102bc8d8449efbb9002e0ee 100644 --- a/var/spack/repos/builtin/packages/r-ggplot2/package.py +++ b/var/spack/repos/builtin/packages/r-ggplot2/package.py @@ -35,14 +35,19 @@ class RGgplot2(RPackage): documentation and examples.""" homepage = "http://ggplot2.org/" - url = "https://cran.r-project.org/src/contrib/ggplot2_2.1.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/ggplot2_2.2.1.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/ggplot2" + version('2.2.1', '14c5a3507bc123c6e7e9ad3bef7cee5c') version('2.1.0', '771928cfb97c649c720423deb3ec7fd3') + depends_on('r@3.1:') + depends_on('r-digest', type=('build', 'run')) - depends_on('r-gtable', type=('build', 'run')) + depends_on('r-gtable@0.1.1:', type=('build', 'run')) depends_on('r-mass', type=('build', 'run')) - depends_on('r-plyr', type=('build', 'run')) + depends_on('r-plyr@1.7.1:', type=('build', 'run')) depends_on('r-reshape2', type=('build', 'run')) - depends_on('r-scales', type=('build', 'run')) + depends_on('r-scales@0.4.1', type=('build', 'run')) + depends_on('r-tibble', type=('build', 'run')) + depends_on('r-lazyeval', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-git2r/package.py b/var/spack/repos/builtin/packages/r-git2r/package.py index 7c4ff3144bacf147be3447b669dc7dae98af965a..a0df2d9b23031c548fe3fc7f2383366869d74ed1 100644 --- a/var/spack/repos/builtin/packages/r-git2r/package.py +++ b/var/spack/repos/builtin/packages/r-git2r/package.py @@ -31,10 +31,13 @@ class RGit2r(RPackage): data and running some basic 'Git' commands.""" homepage = "https://github.com/ropensci/git2r" - url = "https://cran.r-project.org/src/contrib/git2r_0.15.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/git2r_0.18.0.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/git2r" + version('0.18.0', 'fb5741eb490c3d6e23a751a72336f24d') version('0.15.0', '57658b3298f9b9aadc0dd77b4ef6a1e1') + depends_on('r@3.0.2:') + depends_on('zlib') depends_on('openssl') diff --git a/var/spack/repos/builtin/packages/r-httpuv/package.py b/var/spack/repos/builtin/packages/r-httpuv/package.py index e4b60893b612a35a7963296010c84df4b7f52af6..a81e3c3fb1825755ea15b87500ac39fa502f7f71 100644 --- a/var/spack/repos/builtin/packages/r-httpuv/package.py +++ b/var/spack/repos/builtin/packages/r-httpuv/package.py @@ -40,4 +40,6 @@ class RHttpuv(RPackage): version('1.3.3', 'c78ae068cf59e949b9791be987bb4489') - depends_on('r-rcpp', type=('build', 'run')) + depends_on('r@2.15.1:') + + depends_on('r-rcpp@0.11.0:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-httr/package.py b/var/spack/repos/builtin/packages/r-httr/package.py index 55a5b0efab2b2fe02dcdf0f2a46604910616fd5e..b27bee4fbbe06fa8782affabf665c9ea3ac3be99 100644 --- a/var/spack/repos/builtin/packages/r-httr/package.py +++ b/var/spack/repos/builtin/packages/r-httr/package.py @@ -31,13 +31,16 @@ class RHttr(RPackage): request components (authenticate(), add_headers() and so on).""" homepage = "https://github.com/hadley/httr" - url = "https://cran.r-project.org/src/contrib/httr_1.1.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/httr_1.2.1.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/httr" + version('1.2.1', 'c469948dedac9ab3926f23cf484b33d9') version('1.1.0', '5ffbbc5c2529e49f00aaa521a2b35600') + depends_on('r@3.0.0:') + depends_on('r-jsonlite', type=('build', 'run')) depends_on('r-mime', type=('build', 'run')) - depends_on('r-curl', type=('build', 'run')) + depends_on('r-curl@0.9.1:', type=('build', 'run')) depends_on('r-openssl', type=('build', 'run')) depends_on('r-r6', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-ipred/package.py b/var/spack/repos/builtin/packages/r-ipred/package.py new file mode 100644 index 0000000000000000000000000000000000000000..37accb6ee28fc037d089ee22a2bc03e46433652b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ipred/package.py @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RIpred(RPackage): + """Improved predictive models by indirect classification and bagging for + classification, regression and survival problems as well as resampling + based estimators of prediction error.""" + + homepage = "https://cran.r-project.org/package=ipred" + url = "https://cran.r-project.org/src/contrib/ipred_0.9-5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ipred" + + version('0.9-5', 'ce8768547a7aa9554ad3650b18ea3cbd') + + depends_on('r@2.10:') + + depends_on('r-rpart@3.1-8:', type=('build', 'run')) + depends_on('r-mass', type=('build', 'run')) + depends_on('r-survival', type=('build', 'run')) + depends_on('r-nnet', type=('build', 'run')) + depends_on('r-class', type=('build', 'run')) + depends_on('r-prodlim', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-irlba/package.py b/var/spack/repos/builtin/packages/r-irlba/package.py index e0d1b325659eae343384f6a35432578734d1e501..ad383492ff2193d15b6cedb5fb894815e270d9d1 100644 --- a/var/spack/repos/builtin/packages/r-irlba/package.py +++ b/var/spack/repos/builtin/packages/r-irlba/package.py @@ -31,9 +31,10 @@ class RIrlba(RPackage): matrices.""" homepage = "https://cran.r-project.org/web/packages/irlba/index.html" - url = "https://cran.r-project.org/src/contrib/irlba_2.0.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/irlba_2.1.2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/irlba" + version('2.1.2', '290940abf6662ed10c0c5a8db1bc6e88') version('2.0.0', '557674cf8b68fea5b9f231058c324d26') depends_on('r-matrix', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-jsonlite/package.py b/var/spack/repos/builtin/packages/r-jsonlite/package.py index 7368187af5dc6c79b81edf70c61a31720082baa0..4a690d475a6c8a63a2ec48f5cb5740aebc202ab0 100644 --- a/var/spack/repos/builtin/packages/r-jsonlite/package.py +++ b/var/spack/repos/builtin/packages/r-jsonlite/package.py @@ -38,8 +38,9 @@ class RJsonlite(RPackage): use with dynamic data in systems and applications.""" homepage = "https://github.com/jeroenooms/jsonlite" - url = "https://cran.r-project.org/src/contrib/jsonlite_1.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/jsonlite_1.2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/jsonlite" + version('1.2', '80cd2678ae77254be470f5931db71c51') version('1.0', 'c8524e086de22ab39b8ac8000220cc87') version('0.9.21', '4fc382747f88a79ff0718a0d06bed45d') diff --git a/var/spack/repos/builtin/packages/r-kernlab/package.py b/var/spack/repos/builtin/packages/r-kernlab/package.py new file mode 100644 index 0000000000000000000000000000000000000000..67159297ab092fea849400335c44dffccf7680a9 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-kernlab/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RKernlab(RPackage): + """Kernel-based machine learning methods for classification, regression, + clustering, novelty detection, quantile regression and dimensionality + reduction. Among other methods 'kernlab' includes Support Vector Machines, + Spectral Clustering, Kernel PCA, Gaussian Processes and a QP solver.""" + + homepage = "https://cran.r-project.org/package=kernlab" + url = "https://cran.r-project.org/src/contrib/kernlab_0.9-25.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/kernlab" + + version('0.9-25', '1182a2a336a79fd2cf70b4bc5a35353f') + + depends_on('r@2.10:') diff --git a/var/spack/repos/builtin/packages/r-kernsmooth/package.py b/var/spack/repos/builtin/packages/r-kernsmooth/package.py new file mode 100644 index 0000000000000000000000000000000000000000..14e58072dc507cc61994fcfd713c4bdf3f32fc72 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-kernsmooth/package.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RKernsmooth(RPackage): + """Functions for kernel smoothing (and density estimation).""" + + homepage = "https://cran.r-project.org/package=KernSmooth" + url = "https://cran.r-project.org/src/contrib/KernSmooth_2.23-15.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/KernSmooth" + + version('2.23-15', '746cdf26dec72004cf19978e87dcc982') + + depends_on('r@2.5.0:') diff --git a/var/spack/repos/builtin/packages/r-kknn/package.py b/var/spack/repos/builtin/packages/r-kknn/package.py new file mode 100644 index 0000000000000000000000000000000000000000..bd5d688b140ecd0df0d2967f8f72e49d5b7db47b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-kknn/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RKknn(RPackage): + """Weighted k-Nearest Neighbors for Classification, Regression and + Clustering.""" + + homepage = "https://cran.r-project.org/package=kknn" + url = "https://cran.r-project.org/src/contrib/kknn_1.3.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/kknn" + + version('1.3.1', '372cd84f618cd5005f8c4c5721755117') + + depends_on('r@2.10:') + + depends_on('r-igraph@1.0:', type=('build', 'run')) + depends_on('r-matrix', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-lava/package.py b/var/spack/repos/builtin/packages/r-lava/package.py new file mode 100644 index 0000000000000000000000000000000000000000..c38f9003ea8478756a7eaa35a10470feabe8a731 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-lava/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RLava(RPackage): + """Estimation and simulation of latent variable models.""" + + homepage = "https://cran.r-project.org/package=lava" + url = "https://cran.r-project.org/src/contrib/lava_1.4.6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/lava" + + version('1.4.7', '28039248a7039ba9281d172e4dbf9543') + + depends_on('r@3.0:') + + depends_on('r-numderiv', type=('build', 'run')) + depends_on('r-survival', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-matrix/package.py b/var/spack/repos/builtin/packages/r-matrix/package.py index 07c2eaf9da17def0f5a51f8d68a88ab032b56c92..ba1323a73728f37bf4e171cbceb10695a205446f 100644 --- a/var/spack/repos/builtin/packages/r-matrix/package.py +++ b/var/spack/repos/builtin/packages/r-matrix/package.py @@ -30,9 +30,10 @@ class RMatrix(RPackage): using 'LAPACK' and 'SuiteSparse'.""" homepage = "http://matrix.r-forge.r-project.org/" - url = "https://cran.r-project.org/src/contrib/Matrix_1.2-6.tar.gz" + url = "https://cran.r-project.org/src/contrib/Matrix_1.2-8.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/Matrix" + version('1.2-8', '4a6406666bf97d3ec6b698eea5d9c0f5') version('1.2-6', 'f545307fb1284861e9266c4e9712c55e') depends_on('r-lattice', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-mda/package.py b/var/spack/repos/builtin/packages/r-mda/package.py new file mode 100644 index 0000000000000000000000000000000000000000..4a3325abec155c9b3cf6cef117df4535d485aeab --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mda/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMda(RPackage): + """Mixture and flexible discriminant analysis, multivariate adaptive + regression splines (MARS), BRUTO.""" + + homepage = "https://cran.r-project.org/package=mda" + url = "https://cran.r-project.org/src/contrib/mda_0.4-9.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mda" + + version('0.4-9', '2ce1446c4a013e0ebcc1099a00269ad9') + + depends_on('r@1.9.0:') + + depends_on('r-class', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-mgcv/package.py b/var/spack/repos/builtin/packages/r-mgcv/package.py index c8cb067275eb09515b1469acaec5ddf622ee6d38..611abfd47c1ffd33c9dd192f7cee9efbc4493e22 100644 --- a/var/spack/repos/builtin/packages/r-mgcv/package.py +++ b/var/spack/repos/builtin/packages/r-mgcv/package.py @@ -32,9 +32,10 @@ class RMgcv(RPackage): beyond the exponential family.""" homepage = "https://cran.r-project.org/package=mgcv" - url = "https://cran.r-project.org/src/contrib/mgcv_1.8-13.tar.gz" + url = "https://cran.r-project.org/src/contrib/mgcv_1.8-16.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/mgcv" + version('1.8-16', '4c1d85e0f80b017bccb4b63395842911') version('1.8-13', '30607be3aaf44b13bd8c81fc32e8c984') depends_on('r-nlme', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-mlbench/package.py b/var/spack/repos/builtin/packages/r-mlbench/package.py new file mode 100644 index 0000000000000000000000000000000000000000..ec7957d5f7140e6ae61fb1389fde0931ce65d92b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mlbench/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RMlbench(RPackage): + """A collection of artificial and real-world machine learning benchmark + problems, including, e.g., several data sets from the UCI repository.""" + + homepage = "https://cran.r-project.org/web/packages/mlbench/index.html" + url = "https://cran.r-project.org/src/contrib/mlbench_2.1-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mlbench" + + version('2.1-1', '9f06848b8e137b8a37417c92d8e57f3b') + + depends_on('r@2.10:') + + depends_on('r-lattice', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-modelmetrics/package.py b/var/spack/repos/builtin/packages/r-modelmetrics/package.py new file mode 100644 index 0000000000000000000000000000000000000000..99644ef1900ba65221e3f83dd4346eb5c9bd14db --- /dev/null +++ b/var/spack/repos/builtin/packages/r-modelmetrics/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RModelmetrics(RPackage): + """Collection of metrics for evaluating models written in C++ using + 'Rcpp'.""" + + homepage = "https://cran.r-project.org/package=ModelMetrics" + url = "https://cran.r-project.org/src/contrib/ModelMetrics_1.1.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/ModelMetrics" + + version('1.1.0', 'd43175001f0531b8810d2802d76b7b44') + + depends_on('r@3.2.2:') + + depends_on('r-rcpp', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-modeltools/package.py b/var/spack/repos/builtin/packages/r-modeltools/package.py new file mode 100644 index 0000000000000000000000000000000000000000..97c3cf0682b35b5da3d7557d4411857cd493263f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-modeltools/package.py @@ -0,0 +1,35 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RModeltools(RPackage): + """A collection of tools to deal with statistical models.""" + + homepage = "https://cran.r-project.org/package=modeltools" + url = "https://cran.r-project.org/src/contrib/modeltools_0.2-21.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/modeltools" + + version('0.2-21', '3bf56b2e7bf78981444385d87eeccdd7') diff --git a/var/spack/repos/builtin/packages/r-multcomp/package.py b/var/spack/repos/builtin/packages/r-multcomp/package.py index 70704a9c6185c22e93d050643fd87a22807f8cb1..0dbfb14ea009cc754d9b78aa31aebac03d74ac1f 100644 --- a/var/spack/repos/builtin/packages/r-multcomp/package.py +++ b/var/spack/repos/builtin/packages/r-multcomp/package.py @@ -38,8 +38,8 @@ class RMultcomp(RPackage): version('1.4-6', 'f1353ede2ed78b23859a7f1f1f9ebe88') - depends_on('r-mvtnorm', type=('build', 'run')) - depends_on('r-survival', type=('build', 'run')) - depends_on('r-thdata', type=('build', 'run')) - depends_on('r-sandwich', type=('build', 'run')) + depends_on('r-mvtnorm@1.0-3:', type=('build', 'run')) + depends_on('r-survival@2.39-4:', type=('build', 'run')) + depends_on('r-th-data@1.0-2:', type=('build', 'run')) + depends_on('r-sandwich@2.3-0:', type=('build', 'run')) depends_on('r-codetools', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-nlme/package.py b/var/spack/repos/builtin/packages/r-nlme/package.py index 869e03ab51dc9c0c1f971f5e4134b258b209a634..32fa484f60a49319f87ed4810f1efb52c93f9510 100644 --- a/var/spack/repos/builtin/packages/r-nlme/package.py +++ b/var/spack/repos/builtin/packages/r-nlme/package.py @@ -29,9 +29,10 @@ class RNlme(RPackage): """Fit and compare Gaussian linear and nonlinear mixed-effects models.""" homepage = "https://cran.r-project.org/package=nlme" - url = "https://cran.r-project.org/src/contrib/nlme_3.1-128.tar.gz" + url = "https://cran.r-project.org/src/contrib/nlme_3.1-130.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/nlme" + version('3.1-130', '1935d6e308a8018ed8e45d25c8731288') version('3.1-128', '3d75ae7380bf123761b95a073eb55008') depends_on('r-lattice', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-numderiv/package.py b/var/spack/repos/builtin/packages/r-numderiv/package.py new file mode 100644 index 0000000000000000000000000000000000000000..135c4f414184aaad033c1698c1f8cb4333ec6cc8 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-numderiv/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RNumderiv(RPackage): + """Methods for calculating (usually) accurate numerical first and + second order derivatives.""" + + homepage = "https://cran.r-project.org/package=numDeriv" + url = "https://cran.r-project.org/src/contrib/numDeriv_2016.8-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/numDeriv" + + version('2016.8-1', '30e486298d5126d86560095be8e8aac1') + + depends_on('r@2.11.1:') diff --git a/var/spack/repos/builtin/packages/r-openssl/package.py b/var/spack/repos/builtin/packages/r-openssl/package.py index bf9f38be723c4f31a35cda8eda08f656fe702600..8b20482c32235e8da4c6514509e9898f427360c8 100644 --- a/var/spack/repos/builtin/packages/r-openssl/package.py +++ b/var/spack/repos/builtin/packages/r-openssl/package.py @@ -38,9 +38,10 @@ class ROpenssl(RPackage): calculations on large multibyte integers.""" homepage = "https://github.com/jeroenooms/openssl#readme" - url = "https://cran.r-project.org/src/contrib/openssl_0.9.4.tar.gz" + url = "https://cran.r-project.org/src/contrib/openssl_0.9.6.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/openssl" + version('0.9.6', '7ef137929d9dd07db690d35db242ba4b') version('0.9.4', '82a890e71ed0e74499878bedacfb8ccb') - depends_on('openssl') + depends_on('openssl@1.0.1:') diff --git a/var/spack/repos/builtin/packages/r-pacman/package.py b/var/spack/repos/builtin/packages/r-pacman/package.py new file mode 100644 index 0000000000000000000000000000000000000000..a51633fbb4d11bb5678eb5e87d2354af82908492 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-pacman/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RPacman(RPackage): + """Tools to more conveniently perform tasks associated with add-on + packages. pacman conveniently wraps library and package related functions + and names them in an intuitive and consistent fashion. It seeks to combine + functionality from lower level functions which can speed up workflow.""" + + homepage = "https://cran.r-project.org/package=pacman" + url = "https://cran.r-project.org/src/contrib/pacman_0.4.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/pacman" + + version('0.4.1', 'bf18fe6d1407d31e00b337d9b07fb648') + + depends_on('r@3.0.2:') + + depends_on('r-devtools', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-party/package.py b/var/spack/repos/builtin/packages/r-party/package.py new file mode 100644 index 0000000000000000000000000000000000000000..23f66ca4a4dd894bec504a2b97d816b6df907a65 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-party/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RParty(RPackage): + """A computational toolbox for recursive partitioning.""" + + homepage = "https://cran.r-project.org/web/packages/party/index.html" + url = "https://cran.r-project.org/src/contrib/party_1.1-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/party" + + version('1.1-2', '40a00336cf8418042d2ab616675c8ddf') + + depends_on('r@2.14.0:') + + depends_on('r-mvtnorm@1.0-2:', type=('build', 'run')) + depends_on('r-modeltools@0.1-21:', type=('build', 'run')) + depends_on('r-strucchange', type=('build', 'run')) + depends_on('r-survival@2.37-7:', type=('build', 'run')) + depends_on('r-coin@1.1-0:', type=('build', 'run')) + depends_on('r-zoo', type=('build', 'run')) + depends_on('r-sandwich@1.1-1:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-pbkrtest/package.py b/var/spack/repos/builtin/packages/r-pbkrtest/package.py index 2d51d2b9586ec1edde69fad2de434532a18573ea..2a2edc50ce53e65de23a3bb88d3314f7ae784e34 100644 --- a/var/spack/repos/builtin/packages/r-pbkrtest/package.py +++ b/var/spack/repos/builtin/packages/r-pbkrtest/package.py @@ -37,7 +37,10 @@ class RPbkrtest(RPackage): list_url = "https://cran.r-project.org/src/contrib/Archive/pbkrtest" version('0.4-6', '0a7d9ff83b8d131af9b2335f35781ef9') + version('0.4-4', '5e54b1b1b35413dd1d24ef15735ec645') - depends_on('r-lme4', type=('build', 'run')) - depends_on('r-matrix', type=('build', 'run')) + depends_on('r@3.2.3:') + + depends_on('r-lme4@1.1.10:', type=('build', 'run')) + depends_on('r-matrix@1.2.3:', type=('build', 'run')) depends_on('r-mass', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-plotrix/package.py b/var/spack/repos/builtin/packages/r-plotrix/package.py index 8a17c72f9120aa50378ab2110df718ffb6155ee2..0cd3423f733fb3d0dac803b4f54523c5716863e0 100644 --- a/var/spack/repos/builtin/packages/r-plotrix/package.py +++ b/var/spack/repos/builtin/packages/r-plotrix/package.py @@ -29,7 +29,8 @@ class RPlotrix(RPackage): """Lots of plots, various labeling, axis and color scaling functions.""" homepage = "https://cran.r-project.org/package=plotrix" - url = "https://cran.r-project.org/src/contrib/plotrix_3.6-3.tar.gz" + url = "https://cran.r-project.org/src/contrib/plotrix_3.6-4.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/plotrix" + version('3.6-4', 'efe9b9b093d8903228a9b56c46d943fa') version('3.6-3', '23e3e022a13a596e9b77b40afcb4a2ef') diff --git a/var/spack/repos/builtin/packages/r-pls/package.py b/var/spack/repos/builtin/packages/r-pls/package.py new file mode 100644 index 0000000000000000000000000000000000000000..ddb18ff42ecbd22d60683d923f94d177f2d9cafa --- /dev/null +++ b/var/spack/repos/builtin/packages/r-pls/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RPls(RPackage): + """Multivariate regression methods Partial Least Squares Regression (PLSR), + Principal Component Regression (PCR) and Canonical Powered Partial Least + Squares (CPPLS).""" + + homepage = "https://cran.r-project.org/package=pls" + url = "https://cran.r-project.org/src/contrib/pls_2.6-0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/pls" + + version('2.6-0', '04e02e8e46d983c5ed53c1f952b329df') + + depends_on('r@2.10:') diff --git a/var/spack/repos/builtin/packages/r-prodlim/package.py b/var/spack/repos/builtin/packages/r-prodlim/package.py new file mode 100644 index 0000000000000000000000000000000000000000..5219578d9437e0d888000258a097a544312a6cd4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-prodlim/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RProdlim(RPackage): + """Product-Limit Estimation for Censored Event History Analysis. Fast and + user friendly implementation of nonparametric estimators for censored event + history (survival) analysis. Kaplan-Meier and Aalen-Johansen method.""" + + homepage = "https://cran.r-project.org/package=prodlim" + url = "https://cran.r-project.org/src/contrib/prodlim_1.5.9.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/prodlim" + + version('1.5.9', 'e0843053c9270e41b657a733d6675dc9') + + depends_on('r@2.9.0:') + + depends_on('r-rcpp@0.11.5:', type=('build', 'run')) + depends_on('r-survival', type=('build', 'run')) + depends_on('r-kernsmooth', type=('build', 'run')) + depends_on('r-lava', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-quantreg/package.py b/var/spack/repos/builtin/packages/r-quantreg/package.py index 2d5091ccafe9aaa735e2131e8737aadc8d516e84..c9bdaefa44ed22988bff451c026a30ac90a081da 100644 --- a/var/spack/repos/builtin/packages/r-quantreg/package.py +++ b/var/spack/repos/builtin/packages/r-quantreg/package.py @@ -34,9 +34,10 @@ class RQuantreg(RPackage): included.""" homepage = "https://cran.r-project.org/package=quantreg" - url = "https://cran.r-project.org/src/contrib/quantreg_5.26.tar.gz" + url = "https://cran.r-project.org/src/contrib/quantreg_5.29.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/quantreg" + version('5.29', '643ca728200d13f8c2e62365204e9907') version('5.26', '1d89ed932fb4d67ae2d5da0eb8c2989f') depends_on('r-sparsem', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-r6/package.py b/var/spack/repos/builtin/packages/r-r6/package.py index e64a8a65324c6d8a06687978985900ea29914334..700771f40fd1197f60fbfcf113e17ddfaa9ad99c 100644 --- a/var/spack/repos/builtin/packages/r-r6/package.py +++ b/var/spack/repos/builtin/packages/r-r6/package.py @@ -34,7 +34,10 @@ class RR6(RPackage): classes are defined in different packages.""" homepage = "https://github.com/wch/R6/" - url = "https://cran.r-project.org/src/contrib/R6_2.1.2.tar.gz" + url = "https://cran.r-project.org/src/contrib/R6_2.2.0.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/R6" + version('2.2.0', '659d83b2d3f7a308a48332b4cfbdab49') version('2.1.2', 'b6afb9430e48707be87638675390e457') + + depends_on('r@3.0:') diff --git a/var/spack/repos/builtin/packages/r-rcpp/package.py b/var/spack/repos/builtin/packages/r-rcpp/package.py index b447dea8bdda907e5ba152cb1e60feea2a5cfcf8..5b89324970ea062300685671f85f071f816cc5a5 100644 --- a/var/spack/repos/builtin/packages/r-rcpp/package.py +++ b/var/spack/repos/builtin/packages/r-rcpp/package.py @@ -37,8 +37,9 @@ class RRcpp(RPackage): last two.""" homepage = "http://dirk.eddelbuettel.com/code/rcpp.html" - url = "https://cran.r-project.org/src/contrib/Rcpp_0.12.6.tar.gz" + url = "https://cran.r-project.org/src/contrib/Rcpp_0.12.9.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/Rcpp" + version('0.12.9', '691c49b12794507288b728ede03668a5') version('0.12.6', 'db4280fb0a79cd19be73a662c33b0a8b') version('0.12.5', 'f03ec05b4e391cc46e7ce330e82ff5e2') diff --git a/var/spack/repos/builtin/packages/r-rcppeigen/package.py b/var/spack/repos/builtin/packages/r-rcppeigen/package.py index 23ec0bc27bc700c17a54b7a4458e8eb65706f3a7..b33e938d5bf33a6859710e7249e9f7e20db43ec3 100644 --- a/var/spack/repos/builtin/packages/r-rcppeigen/package.py +++ b/var/spack/repos/builtin/packages/r-rcppeigen/package.py @@ -41,9 +41,10 @@ class RRcppeigen(RPackage): GNU GPL version 2 or later, as is the rest of 'Rcpp'.""" homepage = "http://eigen.tuxfamily.org/" - url = "https://cran.r-project.org/src/contrib/RcppEigen_0.3.2.8.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/RcppEigen_0.3.2.9.0.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/RcppEigen" + version('0.3.2.9.0', '14a7786882a5d9862d53c4b2217df318') version('0.3.2.8.1', '4146e06e4fdf7f4d08db7839069d479f') depends_on('r-matrix', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-reshape2/package.py b/var/spack/repos/builtin/packages/r-reshape2/package.py index d27231e139fb6ac96437766f51c0948d4d54ce6d..ca65e006dc23af2a43e50ab93a5438814277b284 100644 --- a/var/spack/repos/builtin/packages/r-reshape2/package.py +++ b/var/spack/repos/builtin/packages/r-reshape2/package.py @@ -30,9 +30,10 @@ class RReshape2(RPackage): and dcast (or acast).""" homepage = "https://github.com/hadley/reshape" - url = "https://cran.r-project.org/src/contrib/reshape2_1.4.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/reshape2_1.4.2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/reshape2" + version('1.4.2', 'c851a0312191b8c5bab956445df7cf5f') version('1.4.1', '41e9dffdf5c6fa830321ac9c8ebffe00') depends_on('r-plyr', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-rminer/package.py b/var/spack/repos/builtin/packages/r-rminer/package.py new file mode 100644 index 0000000000000000000000000000000000000000..b22612a2389d28b93a1a8a66fc02d68b39ff4a29 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rminer/package.py @@ -0,0 +1,54 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRminer(RPackage): + """Facilitates the use of data mining algorithms in classification and + regression (including time series forecasting) tasks by presenting a short + and coherent set of functions.""" + + homepage = "http://www3.dsi.uminho.pt/pcortez/rminer.html" + url = "https://cran.r-project.org/src/contrib/rminer_1.4.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rminer" + + version('1.4.2', '7d5d90f4ae030cf647d67aa962412c05') + + depends_on('r-plotrix', type=('build', 'run')) + depends_on('r-lattice', type=('build', 'run')) + depends_on('r-nnet', type=('build', 'run')) + depends_on('r-kknn', type=('build', 'run')) + depends_on('r-pls', type=('build', 'run')) + depends_on('r-mass', type=('build', 'run')) + depends_on('r-mda', type=('build', 'run')) + depends_on('r-rpart', type=('build', 'run')) + depends_on('r-randomforest', type=('build', 'run')) + depends_on('r-adabag', type=('build', 'run')) + depends_on('r-party', type=('build', 'run')) + depends_on('r-cubist', type=('build', 'run')) + depends_on('r-kernlab', type=('build', 'run')) + depends_on('r-e1071', type=('build', 'run')) + depends_on('r-glmnet', type=('build', 'run')) + depends_on('r-xgboost', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-rpart-plot/package.py b/var/spack/repos/builtin/packages/r-rpart-plot/package.py new file mode 100644 index 0000000000000000000000000000000000000000..d7d40f215457115b2dd64c46d7359603cae8af29 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rpart-plot/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRpartPlot(RPackage): + """Plot 'rpart' models. Extends plot.rpart() and text.rpart() in the + 'rpart' package.""" + + homepage = "https://cran.r-project.org/package=rpart.plot" + url = "https://cran.r-project.org/src/contrib/rpart.plot_2.1.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rpart.plot" + + version('2.1.0', 'fb0f8edfe22c464683ee82aa429136f9') + + depends_on('r-rpart@4.1-0:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-rpart/package.py b/var/spack/repos/builtin/packages/r-rpart/package.py new file mode 100644 index 0000000000000000000000000000000000000000..a81c9d7d9199ae03c6587f3aff85c687b0ee4c04 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rpart/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RRpart(RPackage): + """Recursive partitioning for classification, regression and + survival trees.""" + + homepage = "https://cran.r-project.org/package=rpart" + url = "https://cran.r-project.org/src/contrib/rpart_4.1-10.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rpart" + + version('4.1-10', '15873cded4feb3ef44d63580ba3ca46e') + + depends_on('r@2.15.0:') diff --git a/var/spack/repos/builtin/packages/r-sandwich/package.py b/var/spack/repos/builtin/packages/r-sandwich/package.py index 62bd2880e593bc7ea1fc9aa1b8dca8dfa8797ce6..bae8e82d68b7c0928974675fd090176a44080302 100644 --- a/var/spack/repos/builtin/packages/r-sandwich/package.py +++ b/var/spack/repos/builtin/packages/r-sandwich/package.py @@ -35,4 +35,6 @@ class RSandwich(RPackage): version('2.3-4', 'a621dbd8a57b6e1e036496642aadc2e5') + depends_on('r@2.0.0:') + depends_on('r-zoo', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-scales/package.py b/var/spack/repos/builtin/packages/r-scales/package.py index e3832f78e08c927f0fde62a68abbe3d4dc2f552a..e88ef144cfa142de56db2a2ada75e402860dd4e8 100644 --- a/var/spack/repos/builtin/packages/r-scales/package.py +++ b/var/spack/repos/builtin/packages/r-scales/package.py @@ -30,9 +30,10 @@ class RScales(RPackage): automatically determining breaks and labels for axes and legends.""" homepage = "https://github.com/hadley/scales" - url = "https://cran.r-project.org/src/contrib/scales_0.4.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/scales_0.4.1.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/scales" + version('0.4.1', '3fb2218866a7fe4c1f6e66790876f85a') version('0.4.0', '7b5602d9c55595901192248bca25c099') depends_on('r-rcolorbrewer', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-sparsem/package.py b/var/spack/repos/builtin/packages/r-sparsem/package.py index 370497e395d19a6b94f77d9e321b10796f562e29..bcd11a5c1f3adfdbbc92201c3f299610ad10300b 100644 --- a/var/spack/repos/builtin/packages/r-sparsem/package.py +++ b/var/spack/repos/builtin/packages/r-sparsem/package.py @@ -31,7 +31,8 @@ class RSparsem(RPackage): subsetting and Kronecker products.""" homepage = "http://www.econ.uiuc.edu/~roger/research/sparse/sparse.html" - url = "https://cran.r-project.org/src/contrib/SparseM_1.7.tar.gz" + url = "https://cran.r-project.org/src/contrib/SparseM_1.74.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/SparseM" - version('1.7', '7b5b0ab166a0929ef6dcfe1d97643601') + version('1.74', 'a16c9b7db172dfd2b7b6508c48e81a5d') + version('1.7', '7b5b0ab166a0929ef6dcfe1d97643601') diff --git a/var/spack/repos/builtin/packages/r-stringi/package.py b/var/spack/repos/builtin/packages/r-stringi/package.py index d89238f3d73377f2276c125ebda1becba6f26944..b116c328f587591ba302750c368007c0671c4709 100644 --- a/var/spack/repos/builtin/packages/r-stringi/package.py +++ b/var/spack/repos/builtin/packages/r-stringi/package.py @@ -37,9 +37,10 @@ class RStringi(RPackage): etc.""" homepage = "http://www.gagolewski.com/software/stringi/" - url = "https://cran.r-project.org/src/contrib/stringi_1.1.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/stringi_1.1.2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/stringi" + version('1.1.2', '0ec2faa62643e1900734c0eaf5096648') version('1.1.1', '32b919ee3fa8474530c4942962a6d8d9') depends_on('icu4c') diff --git a/var/spack/repos/builtin/packages/r-stringr/package.py b/var/spack/repos/builtin/packages/r-stringr/package.py index de8d83b50074d4ffc2ee827c07e4afed903dae63..4accd04e51e0c8d11720c3b498d0460015fae0f1 100644 --- a/var/spack/repos/builtin/packages/r-stringr/package.py +++ b/var/spack/repos/builtin/packages/r-stringr/package.py @@ -33,9 +33,10 @@ class RStringr(RPackage): into the input of another.""" homepage = "https://cran.r-project.org/web/packages/stringr/index.html" - url = "https://cran.r-project.org/src/contrib/stringr_1.0.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/stringr_1.1.0.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/stringr" + version('1.1.0', '47973a33944c6d5db9524b1e835b8a5d') version('1.0.0', '5ca977c90351f78b1b888b379114a7b4') depends_on('r-stringi', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-strucchange/package.py b/var/spack/repos/builtin/packages/r-strucchange/package.py new file mode 100644 index 0000000000000000000000000000000000000000..6d00d314020f0ea8ca6f837a1ba0efac31c9405d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-strucchange/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class RStrucchange(RPackage): + """Testing, monitoring and dating structural changes in (linear) + regression models.""" + + homepage = "https://cran.r-project.org/package=strucchange" + url = "https://cran.r-project.org/src/contrib/strucchange_1.5-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/strucchange" + + version('1.5-1', 'fc751fc011df9c8df82d577298cb8395') + + depends_on('r@2.10.0:') + + depends_on('r-zoo', type=('build', 'run')) + depends_on('r-sandwich', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-survival/package.py b/var/spack/repos/builtin/packages/r-survival/package.py index 1df00f0c935e94f06219c7637180f00150e06aad..067cdcfd6bfc7d8a6f5865523257f894f490cd50 100644 --- a/var/spack/repos/builtin/packages/r-survival/package.py +++ b/var/spack/repos/builtin/packages/r-survival/package.py @@ -31,9 +31,10 @@ class RSurvival(RPackage): models, and parametric accelerated failure time models.""" homepage = "https://cran.r-project.org/package=survival" - url = "https://cran.r-project.org/src/contrib/survival_2.39-5.tar.gz" + url = "https://cran.r-project.org/src/contrib/survival_2.40-1.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/survival" + version('2.40-1', 'a2474b656cd723791268e3114481b8a7') version('2.39-5', 'a3cc6b5762e8c5c0bb9e64a276710be2') depends_on('r-matrix', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-thdata/package.py b/var/spack/repos/builtin/packages/r-th-data/package.py similarity index 94% rename from var/spack/repos/builtin/packages/r-thdata/package.py rename to var/spack/repos/builtin/packages/r-th-data/package.py index cf2b01e6e8b2fa3d8240dd6d8e3fbcd7caa0cfe5..b9c5fab0d07748f2fd69dab5bcdf7bb9fad41160 100644 --- a/var/spack/repos/builtin/packages/r-thdata/package.py +++ b/var/spack/repos/builtin/packages/r-th-data/package.py @@ -25,13 +25,14 @@ from spack import * -class RThdata(RPackage): +class RThData(RPackage): """Contains data sets used in other packages Torsten Hothorn maintains.""" homepage = "https://cran.r-project.org/package=TH.data" - url = "https://cran.r-project.org/src/contrib/TH.data_1.0-7.tar.gz" + url = "https://cran.r-project.org/src/contrib/TH.data_1.0-8.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/TH.data" + version('1.0-8', '2cc20acc8b470dff1202749b4bea55c4') version('1.0-7', '3e8b6b1a4699544f175215aed7039a94') depends_on('r-survival', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-tibble/package.py b/var/spack/repos/builtin/packages/r-tibble/package.py index 39dfc3893bafc9dbd93f3d8a60844bf75b36f8f7..a06b33e7f21a3b791947f5b1f054b4978e3092bf 100644 --- a/var/spack/repos/builtin/packages/r-tibble/package.py +++ b/var/spack/repos/builtin/packages/r-tibble/package.py @@ -30,11 +30,14 @@ class RTibble(RPackage): capabilities than traditional data frames.""" homepage = "https://github.com/hadley/tibble" - url = "https://cran.r-project.org/src/contrib/tibble_1.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/tibble_1.2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/tibble" + version('1.2', 'bdbc3d67aa16860741add6d6ec20ea13') version('1.1', '2fe9f806109d0b7fadafb1ffafea4cb8') + depends_on('r@3.1.2:') + depends_on('r-assertthat', type=('build', 'run')) - depends_on('r-lazyeval', type=('build', 'run')) + depends_on('r-lazyeval@0.1.10:', type=('build', 'run')) depends_on('r-rcpp', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-withr/package.py b/var/spack/repos/builtin/packages/r-withr/package.py index 785050ed87330cd1b57ea088efa9e0074f5bd63e..082b94e2a62100f8afed2ca891b2d7e33457573a 100644 --- a/var/spack/repos/builtin/packages/r-withr/package.py +++ b/var/spack/repos/builtin/packages/r-withr/package.py @@ -32,7 +32,10 @@ class RWithr(RPackage): dependencies to provide access to these functions.""" homepage = "http://github.com/jimhester/withr" - url = "https://cran.r-project.org/src/contrib/withr_1.0.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/withr_1.0.2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/withr" + version('1.0.2', 'ca52b729af9bbaa14fc8b7bafe38663c') version('1.0.1', 'ac38af2c6f74027c9592dd8f0acb7598') + + depends_on('r@3.0.2:') diff --git a/var/spack/repos/builtin/packages/r-xgboost/package.py b/var/spack/repos/builtin/packages/r-xgboost/package.py index 766191dcc16b932a7aad51ea9006fb779ed00713..4246d73e498084b58f05a7b19cb1cc9a0aba0b59 100644 --- a/var/spack/repos/builtin/packages/r-xgboost/package.py +++ b/var/spack/repos/builtin/packages/r-xgboost/package.py @@ -37,12 +37,19 @@ class RXgboost(RPackage): users are also allowed to define their own objectives easily.""" homepage = "https://github.com/dmlc/xgboost" - url = "https://cran.r-project.org/src/contrib/xgboost_0.4-4.tar.gz" + url = "https://cran.r-project.org/src/contrib/xgboost_0.6-4.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/xgboost" + version('0.6-4', '86e517e3ce39f8a01de796920f6b425e') version('0.4-4', 'c24d3076058101a71de4b8af8806697c') - depends_on('r-matrix', type=('build', 'run')) - depends_on('r-datatable', type=('build', 'run')) - depends_on('r-magrittr', type=('build', 'run')) + depends_on('r@3.3.0:') + + depends_on('r-matrix@1.1-0:', type=('build', 'run')) + depends_on('r-data-table@1.9.6:', type=('build', 'run')) + depends_on('r-magrittr@1.5:', type=('build', 'run')) + depends_on('r-stringi@0.5.2:', type=('build', 'run')) + + # This is not listed as required, but installation fails without it + # ERROR: dependency 'stringr' is not available for package 'xgboost' depends_on('r-stringr', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r-zoo/package.py b/var/spack/repos/builtin/packages/r-zoo/package.py index 230c78a61ac1d897668b0c0d535a965d65b4b86e..7418d36a64d3af5a833a4127b062c51b38ee65c1 100644 --- a/var/spack/repos/builtin/packages/r-zoo/package.py +++ b/var/spack/repos/builtin/packages/r-zoo/package.py @@ -33,9 +33,10 @@ class RZoo(RPackage): methods to extend standard generics.""" homepage = "http://zoo.r-forge.r-project.org/" - url = "https://cran.r-project.org/src/contrib/zoo_1.7-13.tar.gz" + url = "https://cran.r-project.org/src/contrib/zoo_1.7-14.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/zoo" + version('1.7-14', '8c577a7c1e535c899ab14177b1039c32') version('1.7-13', '99521dfa4c668e692720cefcc5a1bf30') depends_on('r-lattice', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index 3fed62d1fa7c3259a5afaea4402e9581b148d318..842affc4ccebeb5e6dcd8f8cc7b95ecebcb73c7c 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -28,7 +28,7 @@ import shutil -class R(Package): +class R(AutotoolsPackage): """R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a wide variety of statistical and graphical techniques: linear and nonlinear modelling, @@ -36,10 +36,11 @@ class R(Package): Please consult the R project homepage for further information.""" homepage = "https://www.r-project.org" - url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" + url = "https://cloud.r-project.org/src/base/R-3/R-3.3.2.tar.gz" extendable = True + version('3.3.2', '2437014ef40641cdc9673e89c040b7a8') version('3.3.1', 'f50a659738b73036e2f5635adbd229c5') version('3.3.0', '5a7506c8813432d1621c9725e86baf7a') version('3.2.3', '1ba3dac113efab69e706902810cc2970') @@ -63,7 +64,7 @@ class R(Package): depends_on('ncurses') depends_on('icu4c') depends_on('glib') - depends_on('zlib@:1.2.8') + depends_on('zlib@1.2.5:') depends_on('bzip2') depends_on('libtiff') depends_on('jpeg') @@ -82,33 +83,46 @@ class R(Package): depends_on('pcre') depends_on('jdk') + patch('zlib.patch', when='@:3.3.2') + @property def etcdir(self): return join_path(prefix, 'rlib', 'R', 'etc') - def install(self, spec, prefix): - rlibdir = join_path(prefix, 'rlib') - configure_args = ['--prefix=%s' % prefix, - '--libdir=%s' % rlibdir, - '--enable-R-shlib', - '--enable-BLAS-shlib', - '--enable-R-framework=no'] + def configure_args(self): + spec = self.spec + prefix = self.prefix + + config_args = [ + '--libdir={0}'.format(join_path(prefix, 'rlib')), + '--enable-R-shlib', + '--enable-BLAS-shlib', + '--enable-R-framework=no' + ] + if '+external-lapack' in spec: - configure_args.extend(['--with-blas', '--with-lapack']) + config_args.extend([ + '--with-blas', + '--with-lapack' + ]) - configure(*configure_args) - make() - make('install') + if '+X' in spec: + config_args.append('--with-x') + else: + config_args.append('--without-x') + return config_args + + @run_after('install') + def copy_makeconf(self): # Make a copy of Makeconf because it will be needed to properly build R # dependencies in Spack. src_makeconf = join_path(self.etcdir, 'Makeconf') dst_makeconf = join_path(self.etcdir, 'Makeconf.spack') shutil.copy(src_makeconf, dst_makeconf) - self.filter_compilers(spec, prefix) - - def filter_compilers(self, spec, prefix): + @run_after('install') + def filter_compilers(self): """Run after install to tell the configuration files and Makefiles to use the compilers that Spack built the package with. diff --git a/var/spack/repos/builtin/packages/r/zlib.patch b/var/spack/repos/builtin/packages/r/zlib.patch new file mode 100644 index 0000000000000000000000000000000000000000..673d5352fac5fbf2616a6d7016feb1950f0b0128 --- /dev/null +++ b/var/spack/repos/builtin/packages/r/zlib.patch @@ -0,0 +1,29 @@ +*** a/configure 2017-01-21 21:48:35.077000000 +0000 +--- b/configure 2017-01-21 21:50:50.700000000 +0000 +*************** +*** 35496,35505 **** + #include <string.h> + #include <zlib.h> + int main() { +! #ifdef ZLIB_VERSION +! /* Work around Debian bug: it uses 1.2.3.4 even though there was no such +! version on the master site zlib.net */ +! exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0); + #else + exit(1); + #endif +--- 35496,35509 ---- + #include <string.h> + #include <zlib.h> + int main() { +! /* Checking ZLIB_VERNUM trick learned here: +! * https://github.com/TransitApp/protobuf/blob/master/configure.ac#L95 +! */ +! #ifdef ZLIB_VERNUM +! if (ZLIB_VERNUM < 0x1250) { +! exit(1); +! } +! exit(0); + #else + exit(1); + #endif diff --git a/var/spack/repos/builtin/packages/randrproto/package.py b/var/spack/repos/builtin/packages/randrproto/package.py index ecff886a3ba58a5dcd9425a3894ea13c39bee195..ff336204486e950ed64d98da3181036d6120ed29 100644 --- a/var/spack/repos/builtin/packages/randrproto/package.py +++ b/var/spack/repos/builtin/packages/randrproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Randrproto(Package): +class Randrproto(AutotoolsPackage): """X Resize and Rotate Extension (RandR). This extension defines a protocol for clients to dynamically change X @@ -39,8 +39,3 @@ class Randrproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py index abb6ba04ce4d282de54b8c95d5052916481ca307..631a49183f3491f24662ac60b1dac31350b46450 100644 --- a/var/spack/repos/builtin/packages/readline/package.py +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -25,7 +25,7 @@ from spack import * -class Readline(Package): +class Readline(AutotoolsPackage): """The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are @@ -34,13 +34,11 @@ class Readline(Package): recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" homepage = "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" - url = "ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz" + url = "https://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz" version('6.3', '33c8fb279e981274f485fd91da77e94a') depends_on("ncurses") - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + def build(self, spec, prefix): make("SHLIB_LIBS=-lncurses") - make("install") diff --git a/var/spack/repos/builtin/packages/recordproto/package.py b/var/spack/repos/builtin/packages/recordproto/package.py index 02018a76ff50f45143631fbb0132d7a8bcce4d6f..b38eeae0790dd8958fd536a50bee0ffd57f39c18 100644 --- a/var/spack/repos/builtin/packages/recordproto/package.py +++ b/var/spack/repos/builtin/packages/recordproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Recordproto(Package): +class Recordproto(AutotoolsPackage): """X Record Extension. This extension defines a protocol for the recording and playback of user @@ -38,8 +38,3 @@ class Recordproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/rendercheck/package.py b/var/spack/repos/builtin/packages/rendercheck/package.py index 07cc809e9ad38cebe6d448e30b87c5f222ce36d5..f53925fe287733952ac793b5c0660916e3226086 100644 --- a/var/spack/repos/builtin/packages/rendercheck/package.py +++ b/var/spack/repos/builtin/packages/rendercheck/package.py @@ -25,7 +25,7 @@ from spack import * -class Rendercheck(Package): +class Rendercheck(AutotoolsPackage): """rendercheck is a program to test a Render extension implementation against separate calculations of expected output.""" @@ -40,9 +40,3 @@ class Rendercheck(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/renderproto/package.py b/var/spack/repos/builtin/packages/renderproto/package.py index 10be4c941c4ab0f4681b03f1d989ac742ee836d8..81348d7347ec05cecb70408b32807350e0f067fc 100644 --- a/var/spack/repos/builtin/packages/renderproto/package.py +++ b/var/spack/repos/builtin/packages/renderproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Renderproto(Package): +class Renderproto(AutotoolsPackage): """X Rendering Extension. This extension defines the protcol for a digital image composition as @@ -38,8 +38,3 @@ class Renderproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/resourceproto/package.py b/var/spack/repos/builtin/packages/resourceproto/package.py index 4e0a495d83ff185fba2cdcab44bf80920ed37c61..11e143b5fc3752cdabeb6ce2c487910e3db71173 100644 --- a/var/spack/repos/builtin/packages/resourceproto/package.py +++ b/var/spack/repos/builtin/packages/resourceproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Resourceproto(Package): +class Resourceproto(AutotoolsPackage): """X Resource Extension. This extension defines a protocol that allows a client to query the @@ -38,8 +38,3 @@ class Resourceproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/rgb/package.py b/var/spack/repos/builtin/packages/rgb/package.py index ddc5419305537b225e1fb07bcd03b8603c9d1366..985b90449d5f9881f3f404fab2505eec0c1dd017 100644 --- a/var/spack/repos/builtin/packages/rgb/package.py +++ b/var/spack/repos/builtin/packages/rgb/package.py @@ -25,7 +25,7 @@ from spack import * -class Rgb(Package): +class Rgb(AutotoolsPackage): """X color name database. This package includes both the list mapping X color names to RGB values @@ -42,10 +42,3 @@ class Rgb(Package): depends_on('xorg-server') depends_on('xproto', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/rstart/package.py b/var/spack/repos/builtin/packages/rstart/package.py index 7b80e88ae7e1a5056321b2e49d33d533bd009991..198c9c8be521b836e384bea89235214cf7a37539 100644 --- a/var/spack/repos/builtin/packages/rstart/package.py +++ b/var/spack/repos/builtin/packages/rstart/package.py @@ -25,7 +25,7 @@ from spack import * -class Rstart(Package): +class Rstart(AutotoolsPackage): """This package includes both the client and server sides implementing the protocol described in the "A Flexible Remote Execution Protocol Based on rsh" paper found in the specs/ subdirectory. @@ -41,9 +41,3 @@ class Rstart(Package): depends_on('xproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/rsync/package.py b/var/spack/repos/builtin/packages/rsync/package.py index 4e741b255f299205a904554ec7fdb33a23a32b3f..2c21262b39e94c6c7d4e4237904899625e30603b 100644 --- a/var/spack/repos/builtin/packages/rsync/package.py +++ b/var/spack/repos/builtin/packages/rsync/package.py @@ -25,16 +25,10 @@ from spack import * -class Rsync(Package): +class Rsync(AutotoolsPackage): """An open source utility that provides fast incremental file transfer.""" homepage = "https://rsync.samba.org" url = "https://download.samba.org/pub/rsync/rsync-3.1.1.tar.gz" version('3.1.2', '0f758d7e000c0f7f7d3792610fad70cb') version('3.1.1', '43bd6676f0b404326eee2d63be3cdcfe') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/screen/package.py b/var/spack/repos/builtin/packages/screen/package.py index 7edfb44a4d9a2f73f9586ee9a96e1cadd7f9584a..542612f2075efcc618f80e1ab959884dfa1a59d4 100644 --- a/var/spack/repos/builtin/packages/screen/package.py +++ b/var/spack/repos/builtin/packages/screen/package.py @@ -25,7 +25,7 @@ from spack import * -class Screen(Package): +class Screen(AutotoolsPackage): """Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. """ @@ -51,8 +51,3 @@ class Screen(Package): version('3.7.1', '27cdd29318446561ef7c966041cbd2c9') depends_on('ncurses') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/scripts/package.py b/var/spack/repos/builtin/packages/scripts/package.py index 7086cfd6fe1499e8b579cebb6ba344a802eb2733..4bdf63e70ad7e9eb184b4cd55401cea078c58ac2 100644 --- a/var/spack/repos/builtin/packages/scripts/package.py +++ b/var/spack/repos/builtin/packages/scripts/package.py @@ -25,7 +25,7 @@ from spack import * -class Scripts(Package): +class Scripts(AutotoolsPackage): """Various X related scripts.""" homepage = "http://cgit.freedesktop.org/xorg/app/scripts" @@ -37,9 +37,3 @@ class Scripts(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/scrnsaverproto/package.py b/var/spack/repos/builtin/packages/scrnsaverproto/package.py index 3675fd0effadc8bc38897165219bc7e79861d22b..c849d127135c73f63db1f97fe0a52db8064651fe 100644 --- a/var/spack/repos/builtin/packages/scrnsaverproto/package.py +++ b/var/spack/repos/builtin/packages/scrnsaverproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Scrnsaverproto(Package): +class Scrnsaverproto(AutotoolsPackage): """MIT Screen Saver Extension. This extension defines a protocol to control screensaver features @@ -38,8 +38,3 @@ class Scrnsaverproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/sdl2-image/package.py b/var/spack/repos/builtin/packages/sdl2-image/package.py index 5df207ac55b17c4fefde5dbb8ea3475ec05d8029..6e953a145144974b1a32cae744d19d4e5c0e3a70 100644 --- a/var/spack/repos/builtin/packages/sdl2-image/package.py +++ b/var/spack/repos/builtin/packages/sdl2-image/package.py @@ -25,7 +25,7 @@ from spack import * -class Sdl2Image(Package): +class Sdl2Image(AutotoolsPackage): """SDL is designed to provide the bare bones of creating a graphical program. """ @@ -35,9 +35,3 @@ class Sdl2Image(Package): version('2.0.1', 'd94b94555ba022fa249a53a021dc3606') depends_on('sdl2') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/sed/package.py b/var/spack/repos/builtin/packages/sed/package.py index f2a240e1b3d67ef6c0dbf55674a836f781dc9fcb..57e00f4e77b19f51de79d8174a643296cbacc284 100644 --- a/var/spack/repos/builtin/packages/sed/package.py +++ b/var/spack/repos/builtin/packages/sed/package.py @@ -25,15 +25,9 @@ from spack import * -class Sed(Package): +class Sed(AutotoolsPackage): """GNU implementation of the famous stream editor.""" homepage = "http://www.gnu.org/software/sed/" url = "http://ftpmirror.gnu.org/sed/sed-4.2.2.tar.bz2" version('4.2.2', '7ffe1c7cdc3233e1e0c4b502df253974') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/sessreg/package.py b/var/spack/repos/builtin/packages/sessreg/package.py index 2ab505cc7ae10c249f0ac6262ad9c8294824e57d..d50e65f4b03963a975a1618e548e258449d853f6 100644 --- a/var/spack/repos/builtin/packages/sessreg/package.py +++ b/var/spack/repos/builtin/packages/sessreg/package.py @@ -25,7 +25,7 @@ from spack import * -class Sessreg(Package): +class Sessreg(AutotoolsPackage): """Sessreg is a simple program for managing utmp/wtmp entries for X sessions. It was originally written for use with xdm, but may also be used with other display managers such as gdm or kdm.""" @@ -43,9 +43,3 @@ def patch(self): kwargs = {'string': True} filter_file('$(CPP) $(DEFS)', '$(CPP) -P $(DEFS)', 'man/Makefile.in', **kwargs) - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/setxkbmap/package.py b/var/spack/repos/builtin/packages/setxkbmap/package.py index db365530c9442a468bf6c60f6f7cf4997c0cd778..2c0f4380e30eceadfad4146a24a1307fa56f1c80 100644 --- a/var/spack/repos/builtin/packages/setxkbmap/package.py +++ b/var/spack/repos/builtin/packages/setxkbmap/package.py @@ -25,7 +25,7 @@ from spack import * -class Setxkbmap(Package): +class Setxkbmap(AutotoolsPackage): """setxkbmap is an X11 client to change the keymaps in the X server for a specified keyboard to use the layout determined by the options listed on the command line.""" @@ -40,9 +40,3 @@ class Setxkbmap(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/showfont/package.py b/var/spack/repos/builtin/packages/showfont/package.py index 232988193bf60477b2cf6cb052aa45355eee9d27..2dd836031181dad62938f03371591ba1fa244e06 100644 --- a/var/spack/repos/builtin/packages/showfont/package.py +++ b/var/spack/repos/builtin/packages/showfont/package.py @@ -25,7 +25,7 @@ from spack import * -class Showfont(Package): +class Showfont(AutotoolsPackage): """showfont displays data about a font from an X font server. The information shown includes font information, font properties, character metrics, and character bitmaps.""" @@ -39,9 +39,3 @@ class Showfont(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/smproxy/package.py b/var/spack/repos/builtin/packages/smproxy/package.py index 5bdde800d48bc34306512caadea0fa80807afb9f..f7c7ebfe990b3c22e67c0e2ff6852fe9a6bb05cc 100644 --- a/var/spack/repos/builtin/packages/smproxy/package.py +++ b/var/spack/repos/builtin/packages/smproxy/package.py @@ -25,7 +25,7 @@ from spack import * -class Smproxy(Package): +class Smproxy(AutotoolsPackage): """smproxy allows X applications that do not support X11R6 session management to participate in an X11R6 session.""" @@ -41,9 +41,3 @@ class Smproxy(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/snappy/package.py b/var/spack/repos/builtin/packages/snappy/package.py index 1e94980c925d8099fcad1598833cf321322d92c1..c7b8118a24855948216ab84a86d6c1293c1511b0 100644 --- a/var/spack/repos/builtin/packages/snappy/package.py +++ b/var/spack/repos/builtin/packages/snappy/package.py @@ -25,15 +25,10 @@ from spack import * -class Snappy(Package): +class Snappy(AutotoolsPackage): """A fast compressor/decompressor: https://code.google.com/p/snappy""" homepage = "https://code.google.com/p/snappy" url = "https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz" version('1.1.3', '7358c82f133dc77798e4c2062a749b73') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/sowing/package.py b/var/spack/repos/builtin/packages/sowing/package.py index f7f6297488a853db4a920001653a21856425dac6..5dc23579b8005743ba2069489d065f2768493471 100644 --- a/var/spack/repos/builtin/packages/sowing/package.py +++ b/var/spack/repos/builtin/packages/sowing/package.py @@ -26,7 +26,7 @@ from spack import * -class Sowing(Package): +class Sowing(AutotoolsPackage): """Sowing generates Fortran interfaces and documentation for PETSc and MPICH. """ @@ -36,7 +36,5 @@ class Sowing(Package): version('1.1.23-p1', '65aaf3ae2a4c0f30d532fec291702e16') - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) + def build(self, spec, prefix): make('ALL', parallel=False) - make("install") diff --git a/var/spack/repos/builtin/packages/spark/package.py b/var/spack/repos/builtin/packages/spark/package.py index 84b63fa87f8bb617b16b427c0c5dcc23a12cf77e..24dca5571dfd9913061895e5bd30d902f4cad1bf 100644 --- a/var/spack/repos/builtin/packages/spark/package.py +++ b/var/spack/repos/builtin/packages/spark/package.py @@ -33,7 +33,7 @@ class Spark(Package): """ homepage = "http://spark.apache.org" - url = "http://mirrors.ocf.berkeley.edu/apache/spark/spark-2.0.0/spark-2.0.0-bin-without-hadoop.tgz" + url = "http://archive.apache.org/dist/spark/spark-2.0.0/spark-2.0.0-bin-without-hadoop.tgz" variant('hadoop', default=False, description='Build with Hadoop') @@ -41,6 +41,8 @@ class Spark(Package): depends_on('jdk', type=('build', 'run')) depends_on('hadoop', when='+hadoop', type=('build', 'run')) + version('2.1.0', '21d4471e78250775b1fa7c0e6c3a1326') + version('2.0.2', '32110c1bb8f081359738742bd26bced1') version('2.0.0', '8a5307d973da6949a385aefb6ff747bb') version('1.6.2', '304394fbe2899211217f0cd9e9b2b5d9') version('1.6.1', 'fcf4961649f15af1fea78c882e65b001') diff --git a/var/spack/repos/builtin/packages/sparsehash/package.py b/var/spack/repos/builtin/packages/sparsehash/package.py index e5abd42ae6e0d65f0d9af2433bc88eba395ceeae..6216987bce1824815489c61e84831ebdac70c6c3 100644 --- a/var/spack/repos/builtin/packages/sparsehash/package.py +++ b/var/spack/repos/builtin/packages/sparsehash/package.py @@ -25,15 +25,9 @@ from spack import * -class Sparsehash(Package): +class Sparsehash(AutotoolsPackage): """Sparse and dense hash-tables for C++ by Google""" homepage = "https://github.com/sparsehash/sparsehash" url = "https://github.com/sparsehash/sparsehash/archive/sparsehash-2.0.3.tar.gz" version('2.0.3', 'd8d5e2538c1c25577b3f066d7a55e99e') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/spectrum-mpi/package.py b/var/spack/repos/builtin/packages/spectrum-mpi/package.py new file mode 100644 index 0000000000000000000000000000000000000000..28ba423b9cc9f7bcd9512f7c5f831afb832c2389 --- /dev/null +++ b/var/spack/repos/builtin/packages/spectrum-mpi/package.py @@ -0,0 +1,64 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at International Business Machines Corporation +# +# This file is part of Spack. +# Created by Serban Maerean, serban@us.ibm.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class SpectrumMpi(Package): + """ + IBM MPI implementation from Spectrum MPI. + + """ + + homepage = "http://www-03.ibm.com/systems/spectrum-computing/products/mpi" + + provides('mpi') + + def install(self, spec, prefix): + raise InstallError('IBM MPI is not installable; it is vendor supplied') + + def setup_dependent_package(self, module, dependent_spec): + # get the compiler names + if '%xl' in dependent_spec or '%xl_r' in dependent_spec: + self.spec.mpicc = join_path(self.prefix.bin, 'mpixlc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpixlC') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpixlf') + self.spec.mpifc = join_path(self.prefix.bin, 'mpixlf') + else: + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + if '%xl' in dependent_spec or '%xl_r' in dependent_spec: + spack_env.set('MPICC', join_path(self.prefix.bin, 'mpixlc')) + spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpixlC')) + spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpixlf')) + spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpixlf')) + else: + spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) + spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpic++')) + spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) + spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) diff --git a/var/spack/repos/builtin/packages/spindle/package.py b/var/spack/repos/builtin/packages/spindle/package.py index 213d41e97059f1f447e55b37b32c888cdd667276..c23fb56f034106292b032237f6bfd5cc8be89e64 100644 --- a/var/spack/repos/builtin/packages/spindle/package.py +++ b/var/spack/repos/builtin/packages/spindle/package.py @@ -25,7 +25,7 @@ from spack import * -class Spindle(Package): +class Spindle(AutotoolsPackage): """Spindle improves the library-loading performance of dynamically linked HPC applications. Without Spindle large MPI jobs can overload on a shared file system when loading dynamically @@ -38,8 +38,3 @@ class Spindle(Package): version('0.8.1', 'f11793a6b9d8df2cd231fccb2857d912') depends_on("launchmon") - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/spot/package.py b/var/spack/repos/builtin/packages/spot/package.py index 096aa24c0275d3921cfc2db5671354fa07fe724a..abb1776aaf4b9562c5dcf8b0aad1de27a868d011 100644 --- a/var/spack/repos/builtin/packages/spot/package.py +++ b/var/spack/repos/builtin/packages/spot/package.py @@ -25,7 +25,7 @@ from spack import * -class Spot(Package): +class Spot(AutotoolsPackage): """Spot is a C++11 library for omega-automata manipulation and model checking.""" homepage = "https://spot.lrde.epita.fr/index.html" @@ -35,9 +35,3 @@ class Spot(Package): # depends_on("gcc@4.8:", type='build') depends_on("python@3.2:") - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py index 1c424b5ca0e975d31d8acaa19fc32f06727042c7..2ebdc1fdcbe78742817488c39ba36b5ff036da94 100644 --- a/var/spack/repos/builtin/packages/swiftsim/package.py +++ b/var/spack/repos/builtin/packages/swiftsim/package.py @@ -58,13 +58,6 @@ def setup_environment(self, spack_env, run_env): tty.warn('This is needed to clone SWIFT repository') spack_env.set('GIT_SSL_NO_VERIFY', 1) - def autoreconf(self, spec, prefix): - libtoolize() - aclocal() - autoconf() - autogen = Executable('./autogen.sh') - autogen() - def configure_args(self): return ['--prefix=%s' % self.prefix, '--enable-mpi' if '+mpi' in self.spec else '--disable-mpi', diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index b43246dcee2b579779075240dbdad8f8a85405aa..3bc1f9ac2ad3f889d6c2746010f6152b9a0b4de7 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -25,7 +25,7 @@ from spack import * -class Swig(Package): +class Swig(AutotoolsPackage): """SWIG is an interface compiler that connects programs written in C and C++ with scripting languages such as Perl, Python, Ruby, and Tcl. It works by taking the declarations found in C/C++ @@ -38,6 +38,7 @@ class Swig(Package): homepage = "http://www.swig.org" url = "http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz" + version('3.0.11', '13732eb0f1ab2123d180db8425c1edea') version('3.0.10', 'bb4ab8047159469add7d00910e203124') version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') @@ -46,8 +47,3 @@ class Swig(Package): version('1.3.40', '2df766c9e03e02811b1ab4bba1c7b9cc') depends_on('pcre') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/symengine/package.py b/var/spack/repos/builtin/packages/symengine/package.py index f3fc13474cb6702120f7a898e7b55bb127114364..e3c00f849aef1168067cb02677e89d8d38fb29d2 100644 --- a/var/spack/repos/builtin/packages/symengine/package.py +++ b/var/spack/repos/builtin/packages/symengine/package.py @@ -23,9 +23,10 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import sys -class Symengine(Package): +class Symengine(CMakePackage): """SymEngine is a fast symbolic manipulation library, written in C++.""" homepage = "https://github.com/symengine/symengine" @@ -35,7 +36,9 @@ class Symengine(Package): version('0.1.0', '41ad7daed61fc5a77c285eb6c7303425') version('develop', git='https://github.com/symengine/symengine.git') - variant('flint', default=True, + variant('boostmp', default=False, + description='Compile with Boost multi-precision integer library') + variant('flint', default=False, description='Compile with Flint integer library') variant('mpc', default=True, description='Compile with MPC library') @@ -54,20 +57,22 @@ class Symengine(Package): depends_on('cmake', type='build') # Other dependencies - depends_on('gmp') # mpir is a drop-in replacement for this - depends_on('mpc', when='+mpc') # Could also be built against mpir - depends_on('mpfr', when='+mpfr') # Could also be built against mpir - depends_on('flint', when='+flint') # Could also be built against mpir - depends_on('piranha', when='+piranha~flint') # Could also be built against mpir # NOQA + # NOTE: mpir is a drop-in replacement for gmp + # NOTE: [mpc,mpfr,flint,piranha] could also be built against mpir + depends_on('boost', when='+boostmp') + depends_on('gmp', when='~boostmp') + depends_on('mpc', when='+mpc~boostmp') + depends_on('mpfr', when='+mpfr~boostmp') + depends_on('flint', when='+flint~boostmp') + depends_on('piranha', when='+piranha~flint~boostmp') - def install(self, spec, prefix): - options = [] - options.extend(std_cmake_args) + def build_type(self): + # CMAKE_BUILD_TYPE should be Debug | Release + return 'Release' - # CMAKE_BUILD_TYPE should be Debug | Release - for word in options[:]: - if word.startswith('-DCMAKE_BUILD_TYPE'): - options.remove(word) + def cmake_args(self): + spec = self.spec + options = [] # See https://github.com/symengine/symengine/blob/master/README.md # for build options @@ -76,38 +81,47 @@ def install(self, spec, prefix): '-DWITH_SYMENGINE_RCP:BOOL=ON', '-DWITH_SYMENGINE_THREAD_SAFE:BOOL=%s' % ( 'ON' if ('+thread_safe' or '+openmp') in spec else 'OFF'), - '-DBUILD_TESTS:BOOL=ON', + '-DBUILD_TESTS:BOOL=%s' % ( + 'ON' if self.run_tests else 'OFF'), '-DBUILD_BENCHMARKS:BOOL=ON', - '-DWITH_MPC:BOOL=%s' % ( - 'ON' if '+mpc' in spec else 'OFF'), - '-DWITH_MPFR:BOOL=%s' % ( - 'ON' if '+mpfr' in spec else 'OFF'), - '-DINTEGER_CLASS:STRING=gmp', '-DWITH_OPENMP:BOOL=%s' % ( 'ON' if '+openmp' in spec else 'OFF'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ( 'ON' if '+shared' in spec else 'OFF'), ]) - if '+flint' in spec: + if sys.platform == 'darwin': options.extend([ - '-DWITH_FLINT:BOOL=ON', - '-DINTEGER_CLASS:STRING=flint' + '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=on' ]) - elif '+piranha' in spec: + + if '+boostmp' in spec: options.extend([ - '-DWITH_PIRANHA:BOOL=ON', - '-DINTEGER_CLASS:STRING=piranha' + '-DINTEGER_CLASS:STRING=boostmp', + '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include, + '-DWITH_MPC:BOOL=OFF', + '-DWITH_MPFR:BOOL=OFF', ]) else: options.extend([ - '-DINTEGER_CLASS:STRING=gmp' + '-DWITH_MPC:BOOL=%s' % ( + 'ON' if '+mpc' in spec else 'OFF'), + '-DWITH_MPFR:BOOL=%s' % ( + 'ON' if '+mpfr' in spec else 'OFF'), ]) + if '+flint' in spec: + options.extend([ + '-DWITH_FLINT:BOOL=ON', + '-DINTEGER_CLASS:STRING=flint' + ]) + elif '+piranha' in spec: + options.extend([ + '-DWITH_PIRANHA:BOOL=ON', + '-DINTEGER_CLASS:STRING=piranha' + ]) + else: + options.extend([ + '-DINTEGER_CLASS:STRING=gmp' + ]) - with working_dir('spack-build', create=True): - cmake('..', *options) - - make() - make('install') - if self.run_tests: - ctest() + return options diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index d9b535305dba78614dc233022dbb5c8c74257b56..31678caac6d18b48a3541bfb948201fb09ef0fee 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -35,6 +35,7 @@ class Tcl(AutotoolsPackage): extensible.""" homepage = "http://www.tcl.tk" + version('8.6.6', '5193aea8107839a79df8ac709552ecb7') version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326') version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304') version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f') @@ -42,6 +43,8 @@ class Tcl(AutotoolsPackage): depends_on('zlib') + configure_directory = 'unix' + def url_for_version(self, version): base_url = 'http://prdownloads.sourceforge.net/tcl' return '{0}/tcl{1}-src.tar.gz'.format(base_url, version) @@ -52,10 +55,7 @@ def setup_environment(self, spack_env, env): env.set('TCL_LIBRARY', join_path(self.prefix.lib, 'tcl{0}'.format( self.spec.version.up_to(2)))) - def build_directory(self): - return 'unix' - - @AutotoolsPackage.sanity_check('install') + @run_after('install') def symlink_tclsh(self): with working_dir(self.prefix.bin): symlink('tclsh{0}'.format(self.version.up_to(2)), 'tclsh') diff --git a/var/spack/repos/builtin/packages/texlive/package.py b/var/spack/repos/builtin/packages/texlive/package.py index a960e5b68df597fa9bcca20c80b784be09f1cd60..27f6c4c7166ebdb888ceddb8a7d85341587e0966 100644 --- a/var/spack/repos/builtin/packages/texlive/package.py +++ b/var/spack/repos/builtin/packages/texlive/package.py @@ -41,7 +41,7 @@ class Texlive(Package): # digest values, but don't be surprised if this package is # briefly unbuildable. # - version('live', '01461ec2cc49fe0b14812eb67abbea46', + version('live', 'ad230fa814d122084c13d75c0b135fda', url="http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet/install-tl-unx.tar.gz") # There does not seem to be a complete list of schemes. @@ -59,9 +59,14 @@ class Texlive(Package): depends_on('perl', type='build') def install(self, spec, prefix): + # Using texlive's mirror system leads to mysterious problems, + # in lieu of being able to specify a repository as a variant, hardwire + # a particular (slow, but central) one for now. + _repository='http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet/' env = os.environ env['TEXLIVE_INSTALL_PREFIX'] = prefix perl = which('perl') scheme = spec.variants['scheme'].value perl('./install-tl', '-scheme', scheme, + '-repository', _repository, '-portable', '-profile', '/dev/null') diff --git a/var/spack/repos/builtin/packages/the-silver-searcher/package.py b/var/spack/repos/builtin/packages/the-silver-searcher/package.py index c98e964efa6090f13f38f489a344fd48329ecb88..9721554663f594bf884cf8a38bd3f6b65cb345e9 100644 --- a/var/spack/repos/builtin/packages/the-silver-searcher/package.py +++ b/var/spack/repos/builtin/packages/the-silver-searcher/package.py @@ -25,7 +25,7 @@ from spack import * -class TheSilverSearcher(Package): +class TheSilverSearcher(AutotoolsPackage): """Fast recursive grep alternative""" homepage = "http://geoff.greer.fm/ag/" url = "http://geoff.greer.fm/ag/releases/the_silver_searcher-0.32.0.tar.gz" @@ -36,9 +36,3 @@ class TheSilverSearcher(Package): depends_on('pcre') depends_on('xz') depends_on('pkg-config', type='build') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 071db04e6352058e3a43122e7136155449e7fa22..48fc32ebb97168a648585a5b19b7b6e5fcaffd95 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -34,6 +34,7 @@ class Tk(AutotoolsPackage): and more.""" homepage = "http://www.tcl.tk" + version('8.6.6', 'dd7dbb3a6523c42d05f6ab6e86096e99') version('8.6.5', '11dbbd425c3e0201f20d6a51482ce6c4') version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221') @@ -42,6 +43,8 @@ class Tk(AutotoolsPackage): depends_on("tcl") depends_on("libx11", when='+X') + configure_directory = 'unix' + def url_for_version(self, version): base_url = "http://prdownloads.sourceforge.net/tcl" return "{0}/tk{1}-src.tar.gz".format(base_url, version) @@ -52,9 +55,6 @@ def setup_environment(self, spack_env, run_env): run_env.set('TK_LIBRARY', join_path(self.prefix.lib, 'tk{0}'.format( self.spec.version.up_to(2)))) - def build_directory(self): - return 'unix' - def configure_args(self): spec = self.spec return ['--with-tcl={0}'.format(spec['tcl'].prefix.lib)] diff --git a/var/spack/repos/builtin/packages/transset/package.py b/var/spack/repos/builtin/packages/transset/package.py index 0f607387417dc52e2826a6ecce156aa48b3e1aa1..27f3a2f8823df0a7637ca78d3bf8eebbec0a2ab9 100644 --- a/var/spack/repos/builtin/packages/transset/package.py +++ b/var/spack/repos/builtin/packages/transset/package.py @@ -25,7 +25,7 @@ from spack import * -class Transset(Package): +class Transset(AutotoolsPackage): """transset is an utility for setting opacity property.""" homepage = "http://cgit.freedesktop.org/xorg/app/transset" @@ -38,9 +38,3 @@ class Transset(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/trapproto/package.py b/var/spack/repos/builtin/packages/trapproto/package.py index eebab74410035b5c09398c39c4d656cb556dff48..879ac569dfb212563527070545162b9ee5d5792d 100644 --- a/var/spack/repos/builtin/packages/trapproto/package.py +++ b/var/spack/repos/builtin/packages/trapproto/package.py @@ -25,15 +25,10 @@ from spack import * -class Trapproto(Package): +class Trapproto(AutotoolsPackage): """X.org TrapProto protocol headers.""" homepage = "https://cgit.freedesktop.org/xorg/proto/trapproto" url = "https://www.x.org/archive/individual/proto/trapproto-3.4.3.tar.gz" version('3.4.3', '1344759ae8d7d923e64f5eec078a679b') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 4b3412ce7af5221f481586ad9f3de16256a96e17..9add3b238ccb4da2c69502e99bf5386cbb91963d 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -25,6 +25,7 @@ from spack import * import os import sys +import platform # Trilinos is complicated to build, as an inspiration a couple of links to # other repositories which build it: @@ -157,6 +158,10 @@ def cmake_args(self): 'DEBUG' if '+debug' in spec else 'RELEASE'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ( 'ON' if '+shared' in spec else 'OFF'), + '-DTPL_FIND_SHARED_LIBS:BOOL=%s' % ( + 'ON' if '+shared' in spec else 'OFF'), + '-DTrilinos_LINK_SEARCH_START_STATIC:BOOL=%s' % ( + 'OFF' if '+shared' in spec else 'ON'), '-DTPL_ENABLE_MPI:BOOL=ON', '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', @@ -167,10 +172,15 @@ def cmake_args(self): '-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories), '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % self.prefix + '-DTPL_ENABLE_Netcdf:BOOL=ON' ]) + if '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12': + # use @rpath on Sierra due to limit of dynamic loader + options.append('-DCMAKE_MACOSX_RPATH=ON') + else: + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + # Force Trilinos to use the MPI wrappers instead of raw compilers # this is needed on Apple systems that require full resolution of # all symbols when linking shared libraries @@ -369,7 +379,7 @@ def cmake_args(self): ]) return options - @CMakePackage.sanity_check('install') + @run_after('install') def filter_python(self): # When trilinos is built with Python, libpytrilinos is included # through cmake configure files. Namely, Trilinos_LIBRARIES in diff --git a/var/spack/repos/builtin/packages/twm/package.py b/var/spack/repos/builtin/packages/twm/package.py index 3e37f4903d3b701e75e7718021c2728f9365cf7d..a1a221b969e9b3f0ff0757bf37e502330d5b0111 100644 --- a/var/spack/repos/builtin/packages/twm/package.py +++ b/var/spack/repos/builtin/packages/twm/package.py @@ -25,7 +25,7 @@ from spack import * -class Twm(Package): +class Twm(AutotoolsPackage): """twm is a window manager for the X Window System. It provides titlebars, shaped windows, several forms of icon management, user-defined macro functions, click-to-type and pointer-driven @@ -48,9 +48,3 @@ class Twm(Package): depends_on('flex', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/uberftp/package.py b/var/spack/repos/builtin/packages/uberftp/package.py index b0c6c8a42f0ddff1de59ae0eb330f31c0f0e0923..f9d0174b78acbf8ff629880b85297fb097ce354e 100644 --- a/var/spack/repos/builtin/packages/uberftp/package.py +++ b/var/spack/repos/builtin/packages/uberftp/package.py @@ -25,7 +25,7 @@ from spack import * -class Uberftp(Package): +class Uberftp(AutotoolsPackage): """UberFTP is an interactive (text-based) client for GridFTP""" homepage = "http://toolkit.globus.org/grid_software/data/uberftp.php" @@ -36,9 +36,3 @@ class Uberftp(Package): version('2_6', '784210976f259f9d19c0798c19778d34') depends_on('globus-toolkit') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/udunits2/package.py b/var/spack/repos/builtin/packages/udunits2/package.py index cfc8e30c413d586764df9f4559663b6d2fda7c1a..faf4055194759ca3360d40f6981a4eb809dcd21c 100644 --- a/var/spack/repos/builtin/packages/udunits2/package.py +++ b/var/spack/repos/builtin/packages/udunits2/package.py @@ -29,11 +29,34 @@ class Udunits2(AutotoolsPackage): """Automated units conversion""" homepage = "http://www.unidata.ucar.edu/software/udunits" - url = "ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.21.tar.gz" + url = "https://github.com/Unidata/UDUNITS-2/archive/v2.2.23.tar.gz" - version('2.2.21', '1f6d3375efc1f124790a4efb7102cdb7') + version('2.2.25', '373106a0fcd20c40fc53a975c9fa4fca') + version('2.2.24', '316911493e3b5c28ff7019223b4e27ea') + version('2.2.23', '0c0d9b1ebd7ad066233bedf40e66f1ba') + version('2.2.21', '167738b3ec886da1b92239de9cbbbc39') depends_on('expat') depends_on('bison', type='build') depends_on('flex', type='build') + depends_on('libtool', type='build') + depends_on('automake', type='build') + depends_on('autoconf', type='build') + depends_on('pkg-config', type='build') + + def autoreconf(self, spec, prefix): + # Work around autogen.sh oddities + # bash = which("bash") + # bash("./autogen.sh") + mkdirp("config") + autoreconf = which("autoreconf") + autoreconf("--install", "--verbose", "--force", + "-I", "config", + "-I", join_path(spec['pkg-config'].prefix, + "share", "aclocal"), + "-I", join_path(spec['automake'].prefix, + "share", "aclocal"), + "-I", join_path(spec['libtool'].prefix, + "share", "aclocal"), + ) diff --git a/var/spack/repos/builtin/packages/uncrustify/package.py b/var/spack/repos/builtin/packages/uncrustify/package.py index c3182d0dc8943e9cd12b714b61b22ce7a76a2852..7e4b3bd24d0e6fc811643c770dda917aab3d5c41 100644 --- a/var/spack/repos/builtin/packages/uncrustify/package.py +++ b/var/spack/repos/builtin/packages/uncrustify/package.py @@ -25,15 +25,10 @@ from spack import * -class Uncrustify(Package): +class Uncrustify(AutotoolsPackage): """Source Code Beautifier for C, C++, C#, ObjectiveC, Java, and others.""" homepage = "http://uncrustify.sourceforge.net/" url = "http://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.61/uncrustify-0.61.tar.gz" version('0.61', 'b6140106e74c64e831d0b1c4b6cf7727') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py index 15de127b7eac68601e64cd596eaa96dbd53743c4..8ce11d27ddfd0614d697a86dfaa032b3253e59d6 100644 --- a/var/spack/repos/builtin/packages/unixodbc/package.py +++ b/var/spack/repos/builtin/packages/unixodbc/package.py @@ -25,18 +25,12 @@ from spack import * -class Unixodbc(Package): +class Unixodbc(AutotoolsPackage): """ODBC is an open specification for providing application developers with a predictable API with which to access Data Sources. Data Sources include SQL Servers and any Data Source with an ODBC Driver.""" homepage = "http://www.unixodbc.org/" - url = "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz" + url = "http://www.unixodbc.org/unixODBC-2.3.4.tar.gz" version('2.3.4', 'bd25d261ca1808c947cb687e2034be81') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/util-macros/package.py b/var/spack/repos/builtin/packages/util-macros/package.py index 486d4463b0dc355a0532d6a734587d5a1050fca0..1d7515b4cf5f146917bc96eefd3e0b14d3770543 100644 --- a/var/spack/repos/builtin/packages/util-macros/package.py +++ b/var/spack/repos/builtin/packages/util-macros/package.py @@ -25,17 +25,13 @@ from spack import * -class UtilMacros(Package): +class UtilMacros(AutotoolsPackage): """This is a set of autoconf macros used by the configure.ac scripts in other Xorg modular packages, and is needed to generate new versions of their configure scripts with autoconf.""" homepage = "http://cgit.freedesktop.org/xorg/util/macros/" - url = "https://www.x.org/archive/individual/util/util-macros-1.19.0.tar.bz2" + url = "https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2" + version('1.19.1', '6e76e546a4e580f15cebaf8019ef1625') version('1.19.0', '1cf984125e75f8204938d998a8b6c1e1') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/valgrind/package.py b/var/spack/repos/builtin/packages/valgrind/package.py index e7ae227c27c57257ce278c92500af90673d7875e..0794e77ba09f04ed8ff2e0605ad533b8fd95925b 100644 --- a/var/spack/repos/builtin/packages/valgrind/package.py +++ b/var/spack/repos/builtin/packages/valgrind/package.py @@ -40,6 +40,7 @@ class Valgrind(Package): homepage = "http://valgrind.org/" url = "http://valgrind.org/downloads/valgrind-3.11.0.tar.bz2" + version('3.12.0', '6eb03c0c10ea917013a7622e483d61bb') version('3.11.0', '4ea62074da73ae82e0162d6550d3f129') version('3.10.1', '60ddae962bc79e7c95cfc4667245707f') version('3.10.0', '7c311a72a20388aceced1aa5573ce970') diff --git a/var/spack/repos/builtin/packages/videoproto/package.py b/var/spack/repos/builtin/packages/videoproto/package.py index 93b0e61ca430663b3a53857e4bc806736c182469..d1495fe33dae5b5c272634b30ad37faa615eb935 100644 --- a/var/spack/repos/builtin/packages/videoproto/package.py +++ b/var/spack/repos/builtin/packages/videoproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Videoproto(Package): +class Videoproto(AutotoolsPackage): """X Video Extension. This extension provides a protocol for a video output mechanism, @@ -38,8 +38,3 @@ class Videoproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/viewres/package.py b/var/spack/repos/builtin/packages/viewres/package.py index 3a3255507569a801efbd354e19b37f6483bca585..9e6daafc8b3f46931e286408e95fd95f570a4623 100644 --- a/var/spack/repos/builtin/packages/viewres/package.py +++ b/var/spack/repos/builtin/packages/viewres/package.py @@ -25,7 +25,7 @@ from spack import * -class Viewres(Package): +class Viewres(AutotoolsPackage): """viewres displays a tree showing the widget class hierarchy of the Athena Widget Set (libXaw).""" @@ -40,9 +40,3 @@ class Viewres(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/vizglow/package.py b/var/spack/repos/builtin/packages/vizglow/package.py index 9e4506b05a6ffadac1cd1d941b24dc93427e7df2..42e3e23aced0e3ef7a56b9b4ed1231768dbd2fba 100644 --- a/var/spack/repos/builtin/packages/vizglow/package.py +++ b/var/spack/repos/builtin/packages/vizglow/package.py @@ -39,20 +39,73 @@ class Vizglow(Package): homepage = "http://esgeetech.com/products/vizglow-plasma-modeling/" - version('2.2a-15', 'be2b5044f30f2b2c3bbe87a0037bf228', expand=False, + version('2.2alpha20', '2bef890c66f3a44aaf96f7c96788c89e', expand=False, + url="file://{0}/VizGlow_v2.2alpha20-Linux-x86_64-R09December2016-Install".format(os.getcwd())) + version('2.2alpha17', '1de268564363e0ee86f9ffff1c3b82e1', expand=False, + url="file://{0}/VizGlow_v2.2alpha17-R21November2016-Linux-x86_64-Install".format(os.getcwd())) + version('2.2alpha15', 'be2b5044f30f2b2c3bbe87a0037bf228', expand=False, url="file://{0}/VizGlow_v2.2alpha15-Linux-x86_64-R31October2016-Install".format(os.getcwd())) + # depends_on('mesa') # TODO: mesa build doesn't work for me + depends_on('zlib') + depends_on('freetype') + depends_on('fontconfig') + depends_on('libxrender') + depends_on('xterm') + # Can't get mozjs to build, packagekit -> polkit -> mozjs + # depends_on('packagekit+gtk') + depends_on('libcanberra+gtk') + # Licensing license_required = True license_comment = '#' license_files = ['esgeelm.lic'] license_vars = ['ESGEE_LICENSE_FILE'] + def configure(self, prefix): + # Dictionary of responses + responses = { + 'CreateDesktopShortcut': 'No', + 'CreateQuickLaunchShortcut': 'No', + 'InstallDir': prefix + } + + # Write response file + with open('spack-responses.txt', 'w') as response_file: + for key in responses: + response_file.write('{0}: {1}\n'.format(key, responses[key])) + def install(self, spec, prefix): + self.configure(prefix) + installer = glob.glob('VizGlow*Install')[0] chmod = which('chmod') chmod('+x', installer) installer = Executable(installer) - installer('--mode', 'silent', '--prefix', prefix) + installer('--mode', 'silent', '--response-file', 'spack-responses.txt') + + self.filter_ld_library_path(spec, prefix) + + def filter_ld_library_path(self, spec, prefix): + """Run after install to inject dependencies into LD_LIBRARY_PATH. + + If we don't do this, the run files will clear the LD_LIBRARY_PATH. + Since the installer is a binary file, we have no means of specifying + an RPATH to use.""" + + files = glob.glob(prefix + '/binaries/*.run') + + ld_library_path = ':'.join([ + spec['zlib'].prefix.lib, + spec['freetype'].prefix.lib, + spec['fontconfig'].prefix.lib, + spec['libxrender'].prefix.lib, + spec['libcanberra'].prefix.lib + ]) + + for runfile in files: + filter_file('(export LD_LIBRARY_PATH=)$', + r'\1{0}'.format(ld_library_path), + runfile) diff --git a/var/spack/repos/builtin/packages/voropp/package.py b/var/spack/repos/builtin/packages/voropp/package.py new file mode 100644 index 0000000000000000000000000000000000000000..0e39769927b27112f3baf4edf71caa8a9ea79d36 --- /dev/null +++ b/var/spack/repos/builtin/packages/voropp/package.py @@ -0,0 +1,53 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Voropp(MakefilePackage): + """Voro++ is a open source software library for the computation of the + Voronoi diagram, a widely-used tessellation that has applications in many + scientific fields.""" + + homepage = "http://math.lbl.gov/voro++/about.html" + + # This url is wrong but it passes the test the ++ make the url parser fail, + # the correct url is constructed by url_for_version that has to be used in + # any case due to the difference between the package name and the url + url = "http://math.lbl.gov/voropp/download/dir/voropp-0.4.6.tar.gz" + + version('0.4.6', '2338b824c3b7b25590e18e8df5d68af9') + + def url_for_version(self, version): + url = "http://math.lbl.gov/voro++/download/dir/voro++-{0}.tar.gz".format( # noqa: E501 + str(version)) + return url + + def edit(self, spec, prefix): + filter_file(r'CC=g\+\+', + 'CC={0}'.format(self.compiler.cxx), + 'config.mk') + filter_file(r'PREFIX=/usr/local', + 'PREFIX={0}'.format(self.prefix), + 'config.mk') diff --git a/var/spack/repos/builtin/packages/windowswmproto/package.py b/var/spack/repos/builtin/packages/windowswmproto/package.py index f163d1afb0b3d2f771a01c382c6d3452f8cd164d..9341cbd22c74519a0596890ebf6c09f2840ebdaf 100644 --- a/var/spack/repos/builtin/packages/windowswmproto/package.py +++ b/var/spack/repos/builtin/packages/windowswmproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Windowswmproto(Package): +class Windowswmproto(AutotoolsPackage): """This module provides the definition of the WindowsWM extension to the X11 protocol, used for coordination between an X11 server and the Microsoft Windows native window manager. @@ -37,8 +37,3 @@ class Windowswmproto(Package): url = "https://www.x.org/archive/individual/proto/windowswmproto-1.0.4.tar.gz" version('1.0.4', '558db92a8e4e1b07e9c62eca3f04dd8d') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/x11perf/package.py b/var/spack/repos/builtin/packages/x11perf/package.py index 91db1e8a59bdb10d9654befc603dd39c1e7655ac..89936e77f5421c5a02e996c3ff04e26aa63b55b3 100644 --- a/var/spack/repos/builtin/packages/x11perf/package.py +++ b/var/spack/repos/builtin/packages/x11perf/package.py @@ -25,7 +25,7 @@ from spack import * -class X11perf(Package): +class X11perf(AutotoolsPackage): """Simple X server performance benchmarker.""" homepage = "http://cgit.freedesktop.org/xorg/app/x11perf" @@ -41,9 +41,3 @@ class X11perf(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xauth/package.py b/var/spack/repos/builtin/packages/xauth/package.py index 6d6a03c8996317767d7136b0b3c8709881c0a4fa..fa172b5dc02d13e449b69daa5d2a3d3ca25da55c 100644 --- a/var/spack/repos/builtin/packages/xauth/package.py +++ b/var/spack/repos/builtin/packages/xauth/package.py @@ -25,7 +25,7 @@ from spack import * -class Xauth(Package): +class Xauth(AutotoolsPackage): """The xauth program is used to edit and display the authorization information used in connecting to the X server.""" @@ -43,9 +43,4 @@ class Xauth(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - # make('check') # TODO: add package for cmdtest build dependency - make('install') + # TODO: add package for cmdtest test dependency diff --git a/var/spack/repos/builtin/packages/xbacklight/package.py b/var/spack/repos/builtin/packages/xbacklight/package.py index f1a9ecc1242df9589b05944f72bbb16e65a99416..da9ab8f3bd12c0e7ccdba8723bc5eeab8ef2b009 100644 --- a/var/spack/repos/builtin/packages/xbacklight/package.py +++ b/var/spack/repos/builtin/packages/xbacklight/package.py @@ -25,7 +25,7 @@ from spack import * -class Xbacklight(Package): +class Xbacklight(AutotoolsPackage): """Xbacklight is used to adjust the backlight brightness where supported. It uses the RandR extension to find all outputs on the X server supporting backlight brightness control and changes them all in the @@ -41,9 +41,3 @@ class Xbacklight(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xbiff/package.py b/var/spack/repos/builtin/packages/xbiff/package.py index f5c53c5997de00a030e88cc15fef5758aa79b2b9..29bd9086d8b773533aaf81f4ad02fe26affc2f95 100644 --- a/var/spack/repos/builtin/packages/xbiff/package.py +++ b/var/spack/repos/builtin/packages/xbiff/package.py @@ -25,7 +25,7 @@ from spack import * -class Xbiff(Package): +class Xbiff(AutotoolsPackage): """xbiff provides graphical notification of new e-mail. It only handles mail stored in a filesystem accessible file, not via IMAP, POP or other remote access protocols.""" @@ -43,9 +43,3 @@ class Xbiff(Package): depends_on('xbitmaps', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xbitmaps/package.py b/var/spack/repos/builtin/packages/xbitmaps/package.py index 1c6fb79d3add3ae32e202875f140d9cb403e03d5..6fcaf1240d40f0ad523ea1fa4116184198e13fbe 100644 --- a/var/spack/repos/builtin/packages/xbitmaps/package.py +++ b/var/spack/repos/builtin/packages/xbitmaps/package.py @@ -25,7 +25,7 @@ from spack import * -class Xbitmaps(Package): +class Xbitmaps(AutotoolsPackage): """The xbitmaps package contains bitmap images used by multiple applications built in Xorg.""" @@ -36,8 +36,3 @@ class Xbitmaps(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xcalc/package.py b/var/spack/repos/builtin/packages/xcalc/package.py index a470d1c9d06d12445a37e84306b702e9efa16722..7b4717db65ab85e41ab324775a1445367aafcbf3 100644 --- a/var/spack/repos/builtin/packages/xcalc/package.py +++ b/var/spack/repos/builtin/packages/xcalc/package.py @@ -25,7 +25,7 @@ from spack import * -class Xcalc(Package): +class Xcalc(AutotoolsPackage): """xcalc is a scientific calculator X11 client that can emulate a TI-30 or an HP-10C.""" @@ -41,9 +41,3 @@ class Xcalc(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcb-demo/package.py b/var/spack/repos/builtin/packages/xcb-demo/package.py index 62433e3b32eb8c25626e73ca2a509ec688a1b58c..6c3ccfa8aaa40616695dc05d1f4d4f595b6c3208 100644 --- a/var/spack/repos/builtin/packages/xcb-demo/package.py +++ b/var/spack/repos/builtin/packages/xcb-demo/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbDemo(Package): +class XcbDemo(AutotoolsPackage): """xcb-demo: A collection of demo programs that use the XCB library.""" homepage = "https://xcb.freedesktop.org/" @@ -40,12 +40,5 @@ class XcbDemo(Package): depends_on('pkg-config@0.9.0:', type='build') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - # FIXME: crashes with the following error message - # X11/XCB/xcb.h: No such file or directory - - make() - make('check') - make('install') + # FIXME: crashes with the following error message + # X11/XCB/xcb.h: No such file or directory diff --git a/var/spack/repos/builtin/packages/xcb-proto/package.py b/var/spack/repos/builtin/packages/xcb-proto/package.py index d2ac54d34f4dbbd60ce89ced9d2f65c8e4955e46..be8a09ef62fa4b9c3e7e69dc0af18e29e20deebb 100644 --- a/var/spack/repos/builtin/packages/xcb-proto/package.py +++ b/var/spack/repos/builtin/packages/xcb-proto/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbProto(Package): +class XcbProto(AutotoolsPackage): """xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to generate the majority of its code and API.""" @@ -37,8 +37,4 @@ class XcbProto(Package): extends('python') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - # make('check') # fails xmllint validation - make('install') + # NOTE: `make check` fails xmllint validation diff --git a/var/spack/repos/builtin/packages/xcb-util-cursor/package.py b/var/spack/repos/builtin/packages/xcb-util-cursor/package.py index b25fb181a612a7c96d5a4e3bbb0ebdcda8566e48..83ae52ae934e1017afc8128d28982a0a65bfe2a3 100644 --- a/var/spack/repos/builtin/packages/xcb-util-cursor/package.py +++ b/var/spack/repos/builtin/packages/xcb-util-cursor/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbUtilCursor(Package): +class XcbUtilCursor(AutotoolsPackage): """The XCB util modules provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. These experimental libraries provide convenience functions @@ -43,9 +43,3 @@ class XcbUtilCursor(Package): depends_on('xcb-util-image') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcb-util-errors/package.py b/var/spack/repos/builtin/packages/xcb-util-errors/package.py index c287a0ec6e7455ed935714f44d1c3bf0c2555a0c..f7c950841d506df2037f47c9fc4bf62ef0715bf9 100644 --- a/var/spack/repos/builtin/packages/xcb-util-errors/package.py +++ b/var/spack/repos/builtin/packages/xcb-util-errors/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbUtilErrors(Package): +class XcbUtilErrors(AutotoolsPackage): """The XCB util modules provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. These experimental libraries provide convenience functions @@ -42,10 +42,3 @@ class XcbUtilErrors(Package): depends_on('xcb-proto', type='build') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/xcb-util-image/package.py b/var/spack/repos/builtin/packages/xcb-util-image/package.py index 4413c7e11dcc70126cde2ab84e0674b250b7ee4a..58a5f82d1817b56554a19eb1b625b3bb5825a0f8 100644 --- a/var/spack/repos/builtin/packages/xcb-util-image/package.py +++ b/var/spack/repos/builtin/packages/xcb-util-image/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbUtilImage(Package): +class XcbUtilImage(AutotoolsPackage): """The XCB util modules provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. These experimental libraries provide convenience functions @@ -43,10 +43,3 @@ class XcbUtilImage(Package): depends_on('xproto@7.0.8:', type='build') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('check') - make('install') diff --git a/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py b/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py index 0de6391b1831e17d1f870ab41ba9d33a4ef52e8f..026ac2a129d767075fe03d4a7ccc98aa0980a04c 100644 --- a/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py +++ b/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbUtilKeysyms(Package): +class XcbUtilKeysyms(AutotoolsPackage): """The XCB util modules provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. These experimental libraries provide convenience functions @@ -42,9 +42,3 @@ class XcbUtilKeysyms(Package): depends_on('xproto@7.0.8:', type='build') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py b/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py index d41c88206c9d22056874c8442ca6c20ab6a1028c..aa4db3311280661dc4188b2415c2c9ab466f924b 100644 --- a/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py +++ b/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbUtilRenderutil(Package): +class XcbUtilRenderutil(AutotoolsPackage): """The XCB util modules provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. These experimental libraries provide convenience functions @@ -41,9 +41,3 @@ class XcbUtilRenderutil(Package): depends_on('libxcb@1.4:') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcb-util-wm/package.py b/var/spack/repos/builtin/packages/xcb-util-wm/package.py index ef3db06aec1ca492273f36ebe244edc8b496d8c8..c5dfe65423bfadd8f20901371337b8857de77ba6 100644 --- a/var/spack/repos/builtin/packages/xcb-util-wm/package.py +++ b/var/spack/repos/builtin/packages/xcb-util-wm/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbUtilWm(Package): +class XcbUtilWm(AutotoolsPackage): """The XCB util modules provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. These experimental libraries provide convenience functions @@ -41,9 +41,3 @@ class XcbUtilWm(Package): depends_on('libxcb@1.4:') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcb-util/package.py b/var/spack/repos/builtin/packages/xcb-util/package.py index 820592a31972c6f5c88c712821ec871e12002f85..6dcfbb6447347a05d07bcbc5d2dc664322993f91 100644 --- a/var/spack/repos/builtin/packages/xcb-util/package.py +++ b/var/spack/repos/builtin/packages/xcb-util/package.py @@ -25,7 +25,7 @@ from spack import * -class XcbUtil(Package): +class XcbUtil(AutotoolsPackage): """The XCB util modules provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. These experimental libraries provide convenience functions @@ -41,9 +41,3 @@ class XcbUtil(Package): depends_on('libxcb@1.4:') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xclipboard/package.py b/var/spack/repos/builtin/packages/xclipboard/package.py index d9af19da719b7f879871c6e10e6999879cb4cb54..309a09bd7622be891c2c084de22b0babeeb4c964 100644 --- a/var/spack/repos/builtin/packages/xclipboard/package.py +++ b/var/spack/repos/builtin/packages/xclipboard/package.py @@ -25,7 +25,7 @@ from spack import * -class Xclipboard(Package): +class Xclipboard(AutotoolsPackage): """xclipboard is used to collect and display text selections that are sent to the CLIPBOARD by other clients. It is typically used to save CLIPBOARD selections for later use. It stores each CLIPBOARD @@ -45,9 +45,3 @@ class Xclipboard(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xclock/package.py b/var/spack/repos/builtin/packages/xclock/package.py index 5bd38826db23b51296915bc911a50f3f8b43ed1f..0ec33e78de7c20ea5fc79b49402604a157504564 100644 --- a/var/spack/repos/builtin/packages/xclock/package.py +++ b/var/spack/repos/builtin/packages/xclock/package.py @@ -25,7 +25,7 @@ from spack import * -class Xclock(Package): +class Xclock(AutotoolsPackage): """xclock is the classic X Window System clock utility. It displays the time in analog or digital form, continuously updated at a frequency which may be specified by the user.""" @@ -46,9 +46,3 @@ class Xclock(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcmiscproto/package.py b/var/spack/repos/builtin/packages/xcmiscproto/package.py index 2b15d1b3e7771d34a2bae691da4e24ca69dcd2f4..c31b19f04be781d4fb0dd6d61fb830fb5d8c5ad0 100644 --- a/var/spack/repos/builtin/packages/xcmiscproto/package.py +++ b/var/spack/repos/builtin/packages/xcmiscproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xcmiscproto(Package): +class Xcmiscproto(AutotoolsPackage): """XC-MISC Extension. This extension defines a protocol that provides Xlib two ways to query @@ -38,8 +38,3 @@ class Xcmiscproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xcmsdb/package.py b/var/spack/repos/builtin/packages/xcmsdb/package.py index 4d12e3a843ab2240a7c584aa9f27d50055ba7e16..74e1f6267f0687da4fb7162dc592926ac5af3780 100644 --- a/var/spack/repos/builtin/packages/xcmsdb/package.py +++ b/var/spack/repos/builtin/packages/xcmsdb/package.py @@ -25,7 +25,7 @@ from spack import * -class Xcmsdb(Package): +class Xcmsdb(AutotoolsPackage): """xcmsdb is used to load, query, or remove Device Color Characterization data stored in properties on the root window of the screen as specified in section 7, Device Color Characterization, of the @@ -40,9 +40,3 @@ class Xcmsdb(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcompmgr/package.py b/var/spack/repos/builtin/packages/xcompmgr/package.py index fc5bbb4b9c695de326d7b51d4b329fd61f3e532f..1c0771e38dd8e4938b38fa8ec6e30f206edc8cf1 100644 --- a/var/spack/repos/builtin/packages/xcompmgr/package.py +++ b/var/spack/repos/builtin/packages/xcompmgr/package.py @@ -25,7 +25,7 @@ from spack import * -class Xcompmgr(Package): +class Xcompmgr(AutotoolsPackage): """xcompmgr is a sample compositing manager for X servers supporting the XFIXES, DAMAGE, RENDER, and COMPOSITE extensions. It enables basic eye-candy effects.""" @@ -43,9 +43,3 @@ class Xcompmgr(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xconsole/package.py b/var/spack/repos/builtin/packages/xconsole/package.py index f86fe753b6a4d3d4f688f1adbb0176d07fe1fce1..eabd5a48edafe34d6fdc932123ff3773ad113057 100644 --- a/var/spack/repos/builtin/packages/xconsole/package.py +++ b/var/spack/repos/builtin/packages/xconsole/package.py @@ -25,7 +25,7 @@ from spack import * -class Xconsole(Package): +class Xconsole(AutotoolsPackage): """xconsole displays in a X11 window the messages which are usually sent to /dev/console.""" @@ -42,9 +42,3 @@ class Xconsole(Package): depends_on('xproto@7.0.17:') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xcursorgen/package.py b/var/spack/repos/builtin/packages/xcursorgen/package.py index 4e43844646cdbacc6df4f58f99dc46b19b51e3ad..8098723fc8e40ab7b8b284d06bd6abfbd73bddca 100644 --- a/var/spack/repos/builtin/packages/xcursorgen/package.py +++ b/var/spack/repos/builtin/packages/xcursorgen/package.py @@ -25,7 +25,7 @@ from spack import * -class Xcursorgen(Package): +class Xcursorgen(AutotoolsPackage): """xcursorgen prepares X11 cursor sets for use with libXcursor.""" homepage = "http://cgit.freedesktop.org/xorg/app/xcursorgen" @@ -39,9 +39,3 @@ class Xcursorgen(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xdbedizzy/package.py b/var/spack/repos/builtin/packages/xdbedizzy/package.py index 7a8f97401f5f2e15b5a4b5666419da997f8eab53..61ad98dc6177aab287e6e60b004ffb88fb55aff3 100644 --- a/var/spack/repos/builtin/packages/xdbedizzy/package.py +++ b/var/spack/repos/builtin/packages/xdbedizzy/package.py @@ -25,7 +25,7 @@ from spack import * -class Xdbedizzy(Package): +class Xdbedizzy(AutotoolsPackage): """xdbedizzy is a demo of the X11 Double Buffer Extension (DBE) creating a double buffered spinning scene.""" @@ -39,9 +39,3 @@ class Xdbedizzy(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xditview/package.py b/var/spack/repos/builtin/packages/xditview/package.py index 3fececd12e36de5b93a2286dd98f1331b008111e..4f5384b81c9b97bc8da87b2724c0b0f621cc8245 100644 --- a/var/spack/repos/builtin/packages/xditview/package.py +++ b/var/spack/repos/builtin/packages/xditview/package.py @@ -25,7 +25,7 @@ from spack import * -class Xditview(Package): +class Xditview(AutotoolsPackage): """xditview displays ditroff output on an X display.""" homepage = "http://cgit.freedesktop.org/xorg/app/xditview" @@ -40,9 +40,3 @@ class Xditview(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xdm/package.py b/var/spack/repos/builtin/packages/xdm/package.py index d42ced9a57916a841494a127d65fda21b7ab066a..384077e55682937def497b85276ad4c552c3c28b 100644 --- a/var/spack/repos/builtin/packages/xdm/package.py +++ b/var/spack/repos/builtin/packages/xdm/package.py @@ -25,7 +25,7 @@ from spack import * -class Xdm(Package): +class Xdm(AutotoolsPackage): """X Display Manager / XDMCP server.""" homepage = "http://cgit.freedesktop.org/xorg/app/xdm" @@ -46,9 +46,3 @@ class Xdm(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xdpyinfo/package.py b/var/spack/repos/builtin/packages/xdpyinfo/package.py index c69af3b357b7739950b15c1b1243205e41fc74d8..f3838999eb6368c019f42cadaa7c6c39cbfa5e44 100644 --- a/var/spack/repos/builtin/packages/xdpyinfo/package.py +++ b/var/spack/repos/builtin/packages/xdpyinfo/package.py @@ -25,7 +25,7 @@ from spack import * -class Xdpyinfo(Package): +class Xdpyinfo(AutotoolsPackage): """xdpyinfo is a utility for displaying information about an X server. It is used to examine the capabilities of a server, the predefined @@ -46,9 +46,3 @@ class Xdpyinfo(Package): depends_on('xproto@7.0.22:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xdriinfo/package.py b/var/spack/repos/builtin/packages/xdriinfo/package.py index 7548175f6f909f33a58adc557e6c66266cd3b103..9545f7707d9d6ec621dd0a7515a86ef317861e6a 100644 --- a/var/spack/repos/builtin/packages/xdriinfo/package.py +++ b/var/spack/repos/builtin/packages/xdriinfo/package.py @@ -25,7 +25,7 @@ from spack import * -class Xdriinfo(Package): +class Xdriinfo(AutotoolsPackage): """xdriinfo - query configuration information of X11 DRI drivers.""" homepage = "http://cgit.freedesktop.org/xorg/app/xdriinfo" @@ -44,9 +44,3 @@ class Xdriinfo(Package): depends_on('glproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xedit/package.py b/var/spack/repos/builtin/packages/xedit/package.py index da5f28809f5ef5b78d7baf53419095f1035dffe1..73aca40a3b43cc7c791936a582aeb1cac7231d56 100644 --- a/var/spack/repos/builtin/packages/xedit/package.py +++ b/var/spack/repos/builtin/packages/xedit/package.py @@ -25,7 +25,7 @@ from spack import * -class Xedit(Package): +class Xedit(AutotoolsPackage): """Xedit is a simple text editor for X.""" homepage = "https://cgit.freedesktop.org/xorg/app/xedit" @@ -40,9 +40,3 @@ class Xedit(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index 9f3ad8a4dce8386fa24c69cd95a918f839e9920d..bd28a9eec6c7c67978b979eab72af3a63688f7ea 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -25,21 +25,17 @@ from spack import * -class XercesC(Package): +class XercesC(AutotoolsPackage): """Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 - APIs. - """ + APIs.""" homepage = "https://xerces.apache.org/xerces-c" url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.4.tar.bz2" + version('3.1.4', 'd04ae9d8b2dee2157c6db95fa908abfd') - def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--disable-network") - make("clean") - make() - make("install") + def configure_args(self): + return ['--disable-network'] diff --git a/var/spack/repos/builtin/packages/xev/package.py b/var/spack/repos/builtin/packages/xev/package.py index 5727d4e428717b735cec7516fe2d5f8f53b1cf2c..79ff7b08a72bf8305b849fd2c2098f44090d8f6a 100644 --- a/var/spack/repos/builtin/packages/xev/package.py +++ b/var/spack/repos/builtin/packages/xev/package.py @@ -25,7 +25,7 @@ from spack import * -class Xev(Package): +class Xev(AutotoolsPackage): """xev creates a window and then asks the X server to send it X11 events whenever anything happens to the window (such as it being moved, resized, typed in, clicked in, etc.). You can also attach it to an @@ -45,9 +45,3 @@ class Xev(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xextproto/package.py b/var/spack/repos/builtin/packages/xextproto/package.py index 9c1c123527d3823a6501ef0fef8025eec5cc3d8f..012a023e72048de8f322206bf60fa15e06c8a266 100644 --- a/var/spack/repos/builtin/packages/xextproto/package.py +++ b/var/spack/repos/builtin/packages/xextproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xextproto(Package): +class Xextproto(AutotoolsPackage): """X Protocol Extensions.""" homepage = "http://cgit.freedesktop.org/xorg/proto/xextproto" @@ -37,8 +37,3 @@ class Xextproto(Package): depends_on('util-macros', type='build') parallel = False - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xeyes/package.py b/var/spack/repos/builtin/packages/xeyes/package.py index cfea92fda37461d63f3a989ca13bc447a47b9b18..599b08544b1ac4ceb35fa4ad9843629f63988df1 100644 --- a/var/spack/repos/builtin/packages/xeyes/package.py +++ b/var/spack/repos/builtin/packages/xeyes/package.py @@ -25,7 +25,7 @@ from spack import * -class Xeyes(Package): +class Xeyes(AutotoolsPackage): """xeyes - a follow the mouse X demo, using the X SHAPE extension""" homepage = "http://cgit.freedesktop.org/xorg/app/xeyes" @@ -41,9 +41,3 @@ class Xeyes(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xf86bigfontproto/package.py b/var/spack/repos/builtin/packages/xf86bigfontproto/package.py index 6c1dc8f37d9b665951199e3c1378a3b0c6346052..5a2e10a7ba648a80ac1fddb116cbf77f7fd3f137 100644 --- a/var/spack/repos/builtin/packages/xf86bigfontproto/package.py +++ b/var/spack/repos/builtin/packages/xf86bigfontproto/package.py @@ -25,15 +25,10 @@ from spack import * -class Xf86bigfontproto(Package): +class Xf86bigfontproto(AutotoolsPackage): """X.org XF86BigFontProto protocol headers.""" homepage = "https://cgit.freedesktop.org/xorg/proto/xf86bigfontproto" url = "https://www.x.org/archive/individual/proto/xf86bigfontproto-1.2.0.tar.gz" version('1.2.0', '91b0733ff4cbe55808d96073258aa3d1') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xf86dga/package.py b/var/spack/repos/builtin/packages/xf86dga/package.py index 8add6fbca7e8ef965c20b898f5dd93223074b282..1bd2feaaa386f4bb508fa3e96121adc9dfca9e56 100644 --- a/var/spack/repos/builtin/packages/xf86dga/package.py +++ b/var/spack/repos/builtin/packages/xf86dga/package.py @@ -25,7 +25,7 @@ from spack import * -class Xf86dga(Package): +class Xf86dga(AutotoolsPackage): """dga is a simple test client for the XFree86-DGA extension.""" homepage = "http://cgit.freedesktop.org/xorg/app/xf86dga" @@ -38,9 +38,3 @@ class Xf86dga(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xf86dgaproto/package.py b/var/spack/repos/builtin/packages/xf86dgaproto/package.py index 05b64c9534c7931134c5819028efc3fb34988a9b..3c92582a3a38221a5228a645e52674ed1cf2b645 100644 --- a/var/spack/repos/builtin/packages/xf86dgaproto/package.py +++ b/var/spack/repos/builtin/packages/xf86dgaproto/package.py @@ -25,15 +25,10 @@ from spack import * -class Xf86dgaproto(Package): +class Xf86dgaproto(AutotoolsPackage): """X.org XF86DGAProto protocol headers.""" homepage = "https://cgit.freedesktop.org/xorg/proto/xf86dgaproto" url = "https://www.x.org/archive/individual/proto/xf86dgaproto-2.1.tar.gz" version('2.1', '1fe79dc07857ad3e1fb8b8f2bdd70d1b') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xf86driproto/package.py b/var/spack/repos/builtin/packages/xf86driproto/package.py index 655d1bc60ba1a4f3ab4d64379f6c18b81e645fea..8378eb9e5e9a3da4ea1eb83c36823a98c3354e79 100644 --- a/var/spack/repos/builtin/packages/xf86driproto/package.py +++ b/var/spack/repos/builtin/packages/xf86driproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xf86driproto(Package): +class Xf86driproto(AutotoolsPackage): """XFree86 Direct Rendering Infrastructure Extension. This extension defines a protocol to allow user applications to access @@ -39,8 +39,3 @@ class Xf86driproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xf86miscproto/package.py b/var/spack/repos/builtin/packages/xf86miscproto/package.py index 4b7e27907710d423f2e9bd4aa1635adca80d884e..4368eed32655afe42cb2649e6fb132e5252c19c3 100644 --- a/var/spack/repos/builtin/packages/xf86miscproto/package.py +++ b/var/spack/repos/builtin/packages/xf86miscproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xf86miscproto(Package): +class Xf86miscproto(AutotoolsPackage): """This package includes the protocol definitions of the "XFree86-Misc" extension to the X11 protocol. The "XFree86-Misc" extension is supported by the XFree86 X server and versions of the Xorg X server @@ -35,8 +35,3 @@ class Xf86miscproto(Package): url = "https://www.x.org/archive/individual/proto/xf86miscproto-0.9.3.tar.gz" version('0.9.3', 'c6432f04f84929c94fa05b3a466c489d') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xf86rushproto/package.py b/var/spack/repos/builtin/packages/xf86rushproto/package.py index bdd192970b6b79774435f9b8bc451e9ae463c961..05b9afa40a1d30e109db9bbb0f01b2f39961ec27 100644 --- a/var/spack/repos/builtin/packages/xf86rushproto/package.py +++ b/var/spack/repos/builtin/packages/xf86rushproto/package.py @@ -25,15 +25,10 @@ from spack import * -class Xf86rushproto(Package): +class Xf86rushproto(AutotoolsPackage): """X.org XF86RushProto protocol headers.""" homepage = "https://cgit.freedesktop.org/xorg/proto/xf86rushproto" url = "https://www.x.org/archive/individual/proto/xf86rushproto-1.1.2.tar.gz" version('1.1.2', '6a6389473332ace01146cccfef228576') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py b/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py index ece389f9e60cb043c9c71f22981660b5fcf188ae..aaf1db44729bf6dc2b3e8632dc15131897e65123 100644 --- a/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py +++ b/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xf86vidmodeproto(Package): +class Xf86vidmodeproto(AutotoolsPackage): """XFree86 Video Mode Extension. This extension defines a protocol for dynamically configuring modelines @@ -38,8 +38,3 @@ class Xf86vidmodeproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xfd/package.py b/var/spack/repos/builtin/packages/xfd/package.py index 669cd83bf5901fe1ae04c922a54516463846ae6b..b7d1282b2789828d92c18341219f5a3b1de58053 100644 --- a/var/spack/repos/builtin/packages/xfd/package.py +++ b/var/spack/repos/builtin/packages/xfd/package.py @@ -25,7 +25,7 @@ from spack import * -class Xfd(Package): +class Xfd(AutotoolsPackage): """xfd - display all the characters in a font using either the X11 core protocol or libXft2.""" @@ -44,9 +44,3 @@ class Xfd(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xfindproxy/package.py b/var/spack/repos/builtin/packages/xfindproxy/package.py index e4b83433c4eb26ea11726356e064a460cff80218..af767be8a1a033de1ca0b1115a61af914f3334d2 100644 --- a/var/spack/repos/builtin/packages/xfindproxy/package.py +++ b/var/spack/repos/builtin/packages/xfindproxy/package.py @@ -25,7 +25,7 @@ from spack import * -class Xfindproxy(Package): +class Xfindproxy(AutotoolsPackage): """xfindproxy is used to locate available X11 proxy services. It utilizes the Proxy Management Protocol to communicate with a proxy @@ -45,9 +45,3 @@ class Xfindproxy(Package): depends_on('xproxymanagementprotocol', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xfontsel/package.py b/var/spack/repos/builtin/packages/xfontsel/package.py index 772ff8d5705181129d56284b20adfcd655c6f246..ca14f1460c1f73d605a91bb671d903c06e33bef9 100644 --- a/var/spack/repos/builtin/packages/xfontsel/package.py +++ b/var/spack/repos/builtin/packages/xfontsel/package.py @@ -25,7 +25,7 @@ from spack import * -class Xfontsel(Package): +class Xfontsel(AutotoolsPackage): """xfontsel application provides a simple way to display the X11 core protocol fonts known to your X server, examine samples of each, and retrieve the X Logical Font Description ("XLFD") full name for a font.""" @@ -42,9 +42,3 @@ class Xfontsel(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xfs/package.py b/var/spack/repos/builtin/packages/xfs/package.py index 72429dee90e50a06c767316aa25d2fce5afa234e..e5a71e4a278a64f2857bacdb2479fa1534336628 100644 --- a/var/spack/repos/builtin/packages/xfs/package.py +++ b/var/spack/repos/builtin/packages/xfs/package.py @@ -25,7 +25,7 @@ from spack import * -class Xfs(Package): +class Xfs(AutotoolsPackage): """X Font Server.""" homepage = "http://cgit.freedesktop.org/xorg/app/xfs" @@ -40,9 +40,3 @@ class Xfs(Package): depends_on('xtrans', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xfsinfo/package.py b/var/spack/repos/builtin/packages/xfsinfo/package.py index b31ad1c1e05fa7a585b8c26f153c7601c59640b9..9913537995e0043de24db6369806c52c666f8c41 100644 --- a/var/spack/repos/builtin/packages/xfsinfo/package.py +++ b/var/spack/repos/builtin/packages/xfsinfo/package.py @@ -25,7 +25,7 @@ from spack import * -class Xfsinfo(Package): +class Xfsinfo(AutotoolsPackage): """xfsinfo is a utility for displaying information about an X font server. It is used to examine the capabilities of a server, the predefined values for various parameters used in communicating between @@ -42,9 +42,3 @@ class Xfsinfo(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xfwp/package.py b/var/spack/repos/builtin/packages/xfwp/package.py index 5f073a880686e2239af0b60aaf101892fd4baa77..c199b50f6cf6cbd26d38abea9f5f207f51f7fb0c 100644 --- a/var/spack/repos/builtin/packages/xfwp/package.py +++ b/var/spack/repos/builtin/packages/xfwp/package.py @@ -25,7 +25,7 @@ from spack import * -class Xfwp(Package): +class Xfwp(AutotoolsPackage): """xfwp proxies X11 protocol connections, such as through a firewall.""" homepage = "http://cgit.freedesktop.org/xorg/app/xfwp" @@ -40,11 +40,5 @@ class Xfwp(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - # FIXME: fails with the error message: - # io.c:1039:7: error: implicit declaration of function 'swab' - - make() - make('install') + # FIXME: fails with the error message: + # io.c:1039:7: error: implicit declaration of function 'swab' diff --git a/var/spack/repos/builtin/packages/xgamma/package.py b/var/spack/repos/builtin/packages/xgamma/package.py index b8abec293a17557f6cb7f800071a19cb19515188..845f2a54e362087bf5d89670fc6594568edb821b 100644 --- a/var/spack/repos/builtin/packages/xgamma/package.py +++ b/var/spack/repos/builtin/packages/xgamma/package.py @@ -25,7 +25,7 @@ from spack import * -class Xgamma(Package): +class Xgamma(AutotoolsPackage): """xgamma allows X users to query and alter the gamma correction of a monitor via the X video mode extension (XFree86-VidModeExtension).""" @@ -40,9 +40,3 @@ class Xgamma(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xgc/package.py b/var/spack/repos/builtin/packages/xgc/package.py index 608e6e0360d71b19cc53018c29a121dd979866b7..23ba36809e5feaaa319e681610c51554f5caadbc 100644 --- a/var/spack/repos/builtin/packages/xgc/package.py +++ b/var/spack/repos/builtin/packages/xgc/package.py @@ -25,7 +25,7 @@ from spack import * -class Xgc(Package): +class Xgc(AutotoolsPackage): """xgc is an X11 graphics demo that shows various features of the X11 core protocol graphics primitives.""" @@ -41,9 +41,3 @@ class Xgc(Package): depends_on('bison', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xhost/package.py b/var/spack/repos/builtin/packages/xhost/package.py index f01c481ee7ee98f8519fccb9e10222f947a1bd2b..3928593611d1e57c0fafc1be3634d1b9e48a1811 100644 --- a/var/spack/repos/builtin/packages/xhost/package.py +++ b/var/spack/repos/builtin/packages/xhost/package.py @@ -25,7 +25,7 @@ from spack import * -class Xhost(Package): +class Xhost(AutotoolsPackage): """xhost is used to manage the list of host names or user names allowed to make connections to the X server.""" @@ -41,9 +41,3 @@ class Xhost(Package): depends_on('xproto@7.0.22:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xineramaproto/package.py b/var/spack/repos/builtin/packages/xineramaproto/package.py index baededbb253b5806e79890cce06d2fcdf36ea2d2..0a3374b1b6cccad0ce8918f9f714d6f3604c08d6 100644 --- a/var/spack/repos/builtin/packages/xineramaproto/package.py +++ b/var/spack/repos/builtin/packages/xineramaproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xineramaproto(Package): +class Xineramaproto(AutotoolsPackage): """X Xinerama Extension. This is an X extension that allows multiple physical screens controlled @@ -38,8 +38,3 @@ class Xineramaproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xinit/package.py b/var/spack/repos/builtin/packages/xinit/package.py index 9f3bc092297795060c02afa21245ce51622cc159..8bf7227cc8f90bcdb3aaab2f36a3d48107996304 100644 --- a/var/spack/repos/builtin/packages/xinit/package.py +++ b/var/spack/repos/builtin/packages/xinit/package.py @@ -25,7 +25,7 @@ from spack import * -class Xinit(Package): +class Xinit(AutotoolsPackage): """The xinit program is used to start the X Window System server and a first client program on systems that are not using a display manager such as xdm.""" @@ -40,9 +40,3 @@ class Xinit(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xinput/package.py b/var/spack/repos/builtin/packages/xinput/package.py index 3c4fb35503d4b99ce60f06b794e045aedb08b1a9..b512d864958e7aad3c59877d477ab2b40b8a7948 100644 --- a/var/spack/repos/builtin/packages/xinput/package.py +++ b/var/spack/repos/builtin/packages/xinput/package.py @@ -25,7 +25,7 @@ from spack import * -class Xinput(Package): +class Xinput(AutotoolsPackage): """xinput is a utility to configure and test XInput devices.""" homepage = "http://cgit.freedesktop.org/xorg/app/xinput" @@ -42,9 +42,3 @@ class Xinput(Package): depends_on('inputproto@2.1.99.1:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xkbcomp/package.py b/var/spack/repos/builtin/packages/xkbcomp/package.py index e6e8875fa7a34d42c7c251118722537a2a40a228..315c49a22d2418c5eeeb32055dfb9c59d131e629 100644 --- a/var/spack/repos/builtin/packages/xkbcomp/package.py +++ b/var/spack/repos/builtin/packages/xkbcomp/package.py @@ -25,7 +25,7 @@ from spack import * -class Xkbcomp(Package): +class Xkbcomp(AutotoolsPackage): """The X Keyboard (XKB) Extension essentially replaces the core protocol definition of a keyboard. The extension makes it possible to specify clearly and explicitly most aspects of keyboard behaviour on a per-key @@ -45,9 +45,3 @@ class Xkbcomp(Package): depends_on('bison', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xkbdata/package.py b/var/spack/repos/builtin/packages/xkbdata/package.py index fc84631e36929bf96794a34bad7702c80c5e96c0..c67e047d71cc6c8b1732a8e7b21f3eb24520cf3c 100644 --- a/var/spack/repos/builtin/packages/xkbdata/package.py +++ b/var/spack/repos/builtin/packages/xkbdata/package.py @@ -25,7 +25,7 @@ from spack import * -class Xkbdata(Package): +class Xkbdata(AutotoolsPackage): """The XKB data files for the various keyboard models, layouts, and locales.""" @@ -35,9 +35,3 @@ class Xkbdata(Package): version('1.0.1', 'a7e0fbc9cc84c621243c777694388064') depends_on('xkbcomp', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xkbevd/package.py b/var/spack/repos/builtin/packages/xkbevd/package.py index 462d989db2ebf36377d5004b8599e9c0f31fda4f..8793a3a38bd362bc7480772141ea0a4fb94cf943 100644 --- a/var/spack/repos/builtin/packages/xkbevd/package.py +++ b/var/spack/repos/builtin/packages/xkbevd/package.py @@ -25,7 +25,7 @@ from spack import * -class Xkbevd(Package): +class Xkbevd(AutotoolsPackage): """XKB event daemon demo.""" homepage = "http://cgit.freedesktop.org/xorg/app/xkbevd" @@ -39,9 +39,3 @@ class Xkbevd(Package): depends_on('bison', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xkbprint/package.py b/var/spack/repos/builtin/packages/xkbprint/package.py index dc92ac412648b3498469f7ae306565175b1951ba..100d4e44361df3df8b25f3bc575aa9669d526229 100644 --- a/var/spack/repos/builtin/packages/xkbprint/package.py +++ b/var/spack/repos/builtin/packages/xkbprint/package.py @@ -25,7 +25,7 @@ from spack import * -class Xkbprint(Package): +class Xkbprint(AutotoolsPackage): """xkbprint generates a printable or encapsulated PostScript description of an XKB keyboard description.""" @@ -40,9 +40,3 @@ class Xkbprint(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xkbutils/package.py b/var/spack/repos/builtin/packages/xkbutils/package.py index a4c6c9757807dc836d7748e4edbab29589bfc768..eef24a01455d62024e420b1deac4230f54252537 100644 --- a/var/spack/repos/builtin/packages/xkbutils/package.py +++ b/var/spack/repos/builtin/packages/xkbutils/package.py @@ -25,7 +25,7 @@ from spack import * -class Xkbutils(Package): +class Xkbutils(AutotoolsPackage): """xkbutils is a collection of small utilities utilizing the XKeyboard (XKB) extension to the X11 protocol.""" @@ -42,9 +42,3 @@ class Xkbutils(Package): depends_on('inputproto', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xkeyboard-config/package.py b/var/spack/repos/builtin/packages/xkeyboard-config/package.py index 3ad7ea197c87e39ad79548c6b39e5cb1c2609ec6..d7ae34e1e63990d67f1cd3f552cd161dd82af984 100644 --- a/var/spack/repos/builtin/packages/xkeyboard-config/package.py +++ b/var/spack/repos/builtin/packages/xkeyboard-config/package.py @@ -25,7 +25,7 @@ from spack import * -class XkeyboardConfig(Package): +class XkeyboardConfig(AutotoolsPackage): """This project provides a consistent, well-structured, frequently released, open source database of keyboard configuration data. The project is targeted to XKB-based systems.""" @@ -49,9 +49,3 @@ class XkeyboardConfig(Package): # gmsgfmt # perl@5.8.1: # perl XML::Parser - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xkill/package.py b/var/spack/repos/builtin/packages/xkill/package.py index 061d756eec59afd7a117137241c39018f6851c4d..e73fa3b9a29b839b86f11e3527a9248fafdc384a 100644 --- a/var/spack/repos/builtin/packages/xkill/package.py +++ b/var/spack/repos/builtin/packages/xkill/package.py @@ -25,7 +25,7 @@ from spack import * -class Xkill(Package): +class Xkill(AutotoolsPackage): """xkill is a utility for forcing the X server to close connections to clients. This program is very dangerous, but is useful for aborting programs that have displayed undesired windows on a user's screen.""" @@ -41,9 +41,3 @@ class Xkill(Package): depends_on('xproto@7.0.22:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xload/package.py b/var/spack/repos/builtin/packages/xload/package.py index 2fc91043b5010b9a64a7cd0cd4f59ea0ded83326..412c0aa0c43e2f862fa342f8acc754e4e9a7dcc9 100644 --- a/var/spack/repos/builtin/packages/xload/package.py +++ b/var/spack/repos/builtin/packages/xload/package.py @@ -25,7 +25,7 @@ from spack import * -class Xload(Package): +class Xload(AutotoolsPackage): """xload displays a periodically updating histogram of the system load average.""" @@ -42,9 +42,3 @@ class Xload(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xlogo/package.py b/var/spack/repos/builtin/packages/xlogo/package.py index 77f5bd3639caf684c6b431e838e2d5061b2b2b8c..8e1250cc69cd8cd084c02f077dfbe4d772c1fd7d 100644 --- a/var/spack/repos/builtin/packages/xlogo/package.py +++ b/var/spack/repos/builtin/packages/xlogo/package.py @@ -25,7 +25,7 @@ from spack import * -class Xlogo(Package): +class Xlogo(AutotoolsPackage): """The xlogo program simply displays the X Window System logo.""" homepage = "http://cgit.freedesktop.org/xorg/app/xlogo" @@ -45,9 +45,3 @@ class Xlogo(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xlsatoms/package.py b/var/spack/repos/builtin/packages/xlsatoms/package.py index 8722b57c8c1efe85a69247c712392643a372fff8..5f0dc8adc7cd1e90e9001aff5565a8f7d59979c4 100644 --- a/var/spack/repos/builtin/packages/xlsatoms/package.py +++ b/var/spack/repos/builtin/packages/xlsatoms/package.py @@ -25,7 +25,7 @@ from spack import * -class Xlsatoms(Package): +class Xlsatoms(AutotoolsPackage): """xlsatoms lists the interned atoms defined on an X11 server.""" homepage = "http://cgit.freedesktop.org/xorg/app/xlsatoms" @@ -38,9 +38,3 @@ class Xlsatoms(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xlsclients/package.py b/var/spack/repos/builtin/packages/xlsclients/package.py index 3714de27069b6eecaaae11d9e604514313314f7d..fb232a1d0f5ceb352b20566bd1b3bbd4ffe0337c 100644 --- a/var/spack/repos/builtin/packages/xlsclients/package.py +++ b/var/spack/repos/builtin/packages/xlsclients/package.py @@ -25,7 +25,7 @@ from spack import * -class Xlsclients(Package): +class Xlsclients(AutotoolsPackage): """xlsclients is a utility for listing information about the client applications running on a X11 server.""" @@ -39,9 +39,3 @@ class Xlsclients(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xlsfonts/package.py b/var/spack/repos/builtin/packages/xlsfonts/package.py index 011ca5aa0e78f1c51c4cc9aaeef90a39f00bd679..61696a5010f89b89f98ab6cf78fd00c2c31698b1 100644 --- a/var/spack/repos/builtin/packages/xlsfonts/package.py +++ b/var/spack/repos/builtin/packages/xlsfonts/package.py @@ -25,7 +25,7 @@ from spack import * -class Xlsfonts(Package): +class Xlsfonts(AutotoolsPackage): """xlsfonts lists fonts available from an X server via the X11 core protocol.""" @@ -39,9 +39,3 @@ class Xlsfonts(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xmag/package.py b/var/spack/repos/builtin/packages/xmag/package.py index 27843299c8647ab8e1f567211a69c17eaf9f4023..65eb9e636be4f8f04bb137d7943764480f7f5c4b 100644 --- a/var/spack/repos/builtin/packages/xmag/package.py +++ b/var/spack/repos/builtin/packages/xmag/package.py @@ -25,7 +25,7 @@ from spack import * -class Xmag(Package): +class Xmag(AutotoolsPackage): """xmag displays a magnified snapshot of a portion of an X11 screen.""" homepage = "http://cgit.freedesktop.org/xorg/app/xmag" @@ -40,9 +40,3 @@ class Xmag(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xman/package.py b/var/spack/repos/builtin/packages/xman/package.py index 629a457edc0a9a3004de2fa784bca1922fae8e72..0a3bf893eee9638e5b6e0aa4b9c36e4ba5df5bda 100644 --- a/var/spack/repos/builtin/packages/xman/package.py +++ b/var/spack/repos/builtin/packages/xman/package.py @@ -25,7 +25,7 @@ from spack import * -class Xman(Package): +class Xman(AutotoolsPackage): """xman is a graphical manual page browser using the Athena Widgets (Xaw) toolkit.""" @@ -40,9 +40,3 @@ class Xman(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xmessage/package.py b/var/spack/repos/builtin/packages/xmessage/package.py index 9b2ee5102ef5dd71aed759842703b4acf16dc3dc..7481713c1b047c3380ca0374dcd6dc127119de8f 100644 --- a/var/spack/repos/builtin/packages/xmessage/package.py +++ b/var/spack/repos/builtin/packages/xmessage/package.py @@ -25,7 +25,7 @@ from spack import * -class Xmessage(Package): +class Xmessage(AutotoolsPackage): """xmessage displays a message or query in a window. The user can click on an "okay" button to dismiss it or can select one of several buttons to answer a question. xmessage can also exit after a specified time.""" @@ -40,9 +40,3 @@ class Xmessage(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xmh/package.py b/var/spack/repos/builtin/packages/xmh/package.py index cdde63e1494567ba9bb70fc6bc9b1217c647d14a..1c7bc8a3469e85ba60dbbff3ffc25986dd5a28b2 100644 --- a/var/spack/repos/builtin/packages/xmh/package.py +++ b/var/spack/repos/builtin/packages/xmh/package.py @@ -25,7 +25,7 @@ from spack import * -class Xmh(Package): +class Xmh(AutotoolsPackage): """The xmh program provides a graphical user interface to the MH Message Handling System. To actually do things with your mail, it makes calls to the MH package.""" @@ -43,9 +43,3 @@ class Xmh(Package): depends_on('xbitmaps@1.1.0:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xmlto/package.py b/var/spack/repos/builtin/packages/xmlto/package.py index 0dbc81de32cd6549f365d7ea2504eadd6282d157..2ed392b9b86e3eae3c0651b866e8d67f2783099c 100644 --- a/var/spack/repos/builtin/packages/xmlto/package.py +++ b/var/spack/repos/builtin/packages/xmlto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xmlto(Package): +class Xmlto(AutotoolsPackage): """Utility xmlto is a simple shell script for converting XML files to various formats. It serves as easy to use command line frontend to make fine output without remembering many long options and searching for the syntax of the @@ -38,9 +38,3 @@ class Xmlto(Package): # FIXME: missing a lot of dependencies depends_on('libxslt') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xmodmap/package.py b/var/spack/repos/builtin/packages/xmodmap/package.py index abe40dbb43793e998de8061656696377a3396ab9..323a16cbe8bdcdb159fc89d11ac34dab00387f27 100644 --- a/var/spack/repos/builtin/packages/xmodmap/package.py +++ b/var/spack/repos/builtin/packages/xmodmap/package.py @@ -25,7 +25,7 @@ from spack import * -class Xmodmap(Package): +class Xmodmap(AutotoolsPackage): """The xmodmap program is used to edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms. It is usually run from the user's @@ -42,9 +42,3 @@ class Xmodmap(Package): depends_on('xproto@7.0.25:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xmore/package.py b/var/spack/repos/builtin/packages/xmore/package.py index 8f8ccd713830ff0d32c7941ad89c75775ec3040f..bb1f0ada276b834d661d9650295b4c38f0958eb7 100644 --- a/var/spack/repos/builtin/packages/xmore/package.py +++ b/var/spack/repos/builtin/packages/xmore/package.py @@ -25,7 +25,7 @@ from spack import * -class Xmore(Package): +class Xmore(AutotoolsPackage): """xmore - plain text display program for the X Window System.""" homepage = "http://cgit.freedesktop.org/xorg/app/xmore" @@ -38,9 +38,3 @@ class Xmore(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xorg-cf-files/package.py b/var/spack/repos/builtin/packages/xorg-cf-files/package.py index c7b22d904fb71568392da829467eb91edd8114c6..a203911d0eb80480e12bfe4e87d51ffdcea9adec 100644 --- a/var/spack/repos/builtin/packages/xorg-cf-files/package.py +++ b/var/spack/repos/builtin/packages/xorg-cf-files/package.py @@ -25,7 +25,7 @@ from spack import * -class XorgCfFiles(Package): +class XorgCfFiles(AutotoolsPackage): """The xorg-cf-files package contains the data files for the imake utility, defining the known settings for a wide variety of platforms (many of which have not been verified or tested in over a decade), and for many of the @@ -37,8 +37,3 @@ class XorgCfFiles(Package): version('1.0.6', 'c0ce98377c70d95fb48e1bd856109bf8') depends_on('pkg-config@0.9.0:', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xorg-docs/package.py b/var/spack/repos/builtin/packages/xorg-docs/package.py index 5c320bba7b9979c5f01bc32cb2dd8d39d40f8094..7bee98859da7d5fc0c75a211b483df77bc84690f 100644 --- a/var/spack/repos/builtin/packages/xorg-docs/package.py +++ b/var/spack/repos/builtin/packages/xorg-docs/package.py @@ -25,7 +25,7 @@ from spack import * -class XorgDocs(Package): +class XorgDocs(AutotoolsPackage): """This package provides miscellaneous documentation for the X Window System that doesn't better fit into other packages. @@ -40,9 +40,3 @@ class XorgDocs(Package): depends_on('util-macros', type='build') depends_on('xorg-sgml-doctools@1.8:', type='build') depends_on('xmlto', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xorg-gtest/package.py b/var/spack/repos/builtin/packages/xorg-gtest/package.py index 6978d610d32c28cbd0f0f9e0c92c764821c23c3f..ede26149e1fd50fdd7480f4616049f6d4a9e17c4 100644 --- a/var/spack/repos/builtin/packages/xorg-gtest/package.py +++ b/var/spack/repos/builtin/packages/xorg-gtest/package.py @@ -25,7 +25,7 @@ from spack import * -class XorgGtest(Package): +class XorgGtest(AutotoolsPackage): """Provides a Google Test environment for starting and stopping a X server for testing purposes.""" @@ -43,9 +43,3 @@ class XorgGtest(Package): # TODO: may be missing evemu package? # TODO: what is the difference between xorg-gtest and googletest packages? - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xorg-server/package.py b/var/spack/repos/builtin/packages/xorg-server/package.py index 9d9b49f9c26c44b56a286281e5f39a18aca1f4ad..fcc4918a02c36e2e4fef0a517a1acb93718bd54a 100644 --- a/var/spack/repos/builtin/packages/xorg-server/package.py +++ b/var/spack/repos/builtin/packages/xorg-server/package.py @@ -25,7 +25,7 @@ from spack import * -class XorgServer(Package): +class XorgServer(AutotoolsPackage): """X.Org Server is the free and open source implementation of the display server for the X Window System stewarded by the X.Org Foundation.""" @@ -100,9 +100,3 @@ class XorgServer(Package): # LIBUDEV="libudev >= 143" # LIBSELINUX="libselinux >= 2.0.86" # LIBDBUS="dbus-1 >= 1.0" - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py b/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py index c2e5797efa965e618b9174b73acff9fae4f6a565..c9a5d4fd80fb608600490d7bf882c9e778320564 100644 --- a/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py +++ b/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py @@ -25,7 +25,7 @@ from spack import * -class XorgSgmlDoctools(Package): +class XorgSgmlDoctools(AutotoolsPackage): """This package provides a common set of SGML entities and XML/CSS style sheets used in building/formatting the documentation provided in other X.Org packages.""" @@ -37,9 +37,3 @@ class XorgSgmlDoctools(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xphelloworld/package.py b/var/spack/repos/builtin/packages/xphelloworld/package.py index 6d445d69bed9f1332f442bd9e6491ffd764821f0..ce593e746bfbd04566b91812f9f7851332bab1ef 100644 --- a/var/spack/repos/builtin/packages/xphelloworld/package.py +++ b/var/spack/repos/builtin/packages/xphelloworld/package.py @@ -25,7 +25,7 @@ from spack import * -class Xphelloworld(Package): +class Xphelloworld(AutotoolsPackage): """Xprint sample applications.""" homepage = "http://cgit.freedesktop.org/xorg/app/xphelloworld" @@ -46,9 +46,3 @@ class Xphelloworld(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xplsprinters/package.py b/var/spack/repos/builtin/packages/xplsprinters/package.py index 55de272a337483bca8dc62d4d0e71b5f10513b94..b8fdb084721419d5f1d5297b33f57ce7ef069f54 100644 --- a/var/spack/repos/builtin/packages/xplsprinters/package.py +++ b/var/spack/repos/builtin/packages/xplsprinters/package.py @@ -25,7 +25,7 @@ from spack import * -class Xplsprinters(Package): +class Xplsprinters(AutotoolsPackage): """List Xprint printers.""" homepage = "http://cgit.freedesktop.org/xorg/app/xplsprinters" @@ -39,9 +39,3 @@ class Xplsprinters(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xpr/package.py b/var/spack/repos/builtin/packages/xpr/package.py index 669693e084210c39b21cbb4b427922229fc30777..6e933e0994e50a66caa346648a7f0fc64fe258ef 100644 --- a/var/spack/repos/builtin/packages/xpr/package.py +++ b/var/spack/repos/builtin/packages/xpr/package.py @@ -25,7 +25,7 @@ from spack import * -class Xpr(Package): +class Xpr(AutotoolsPackage): """xpr takes as input a window dump file produced by xwd and formats it for output on various types of printers.""" @@ -40,9 +40,3 @@ class Xpr(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xprehashprinterlist/package.py b/var/spack/repos/builtin/packages/xprehashprinterlist/package.py index 4578c3c1918f329a817a2b7c9a2aad829a8667c4..3f7de96c123d47b73000636be9c84b8a6ba3e727 100644 --- a/var/spack/repos/builtin/packages/xprehashprinterlist/package.py +++ b/var/spack/repos/builtin/packages/xprehashprinterlist/package.py @@ -25,7 +25,7 @@ from spack import * -class Xprehashprinterlist(Package): +class Xprehashprinterlist(AutotoolsPackage): """Rehash list of Xprint printers.""" homepage = "http://cgit.freedesktop.org/xorg/app/xprehashprinterlist" @@ -38,9 +38,3 @@ class Xprehashprinterlist(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xprop/package.py b/var/spack/repos/builtin/packages/xprop/package.py index 0e1a591bcbf197ae861f81dc0a85860f544d65e2..ece50c92052877b0f5029fe7187061ad008e6549 100644 --- a/var/spack/repos/builtin/packages/xprop/package.py +++ b/var/spack/repos/builtin/packages/xprop/package.py @@ -25,7 +25,7 @@ from spack import * -class Xprop(Package): +class Xprop(AutotoolsPackage): """xprop is a command line tool to display and/or set window and font properties of an X server.""" @@ -39,9 +39,3 @@ class Xprop(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py index 67074a69939c05dd0198b98407cb796c6c7f0031..9e1b6d44742c497780d5a782c049ff65eff519e3 100644 --- a/var/spack/repos/builtin/packages/xproto/package.py +++ b/var/spack/repos/builtin/packages/xproto/package.py @@ -25,7 +25,7 @@ from spack import * -class Xproto(Package): +class Xproto(AutotoolsPackage): """X Window System Core Protocol. This package provides the headers and specification documents defining @@ -42,8 +42,3 @@ class Xproto(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py b/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py index e5bfcb8cbcbde9243ad84a79813b4805ff72e157..cec6a13f5f8292e4f0ed21495db234e1e630234b 100644 --- a/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py +++ b/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py @@ -25,7 +25,7 @@ from spack import * -class Xproxymanagementprotocol(Package): +class Xproxymanagementprotocol(AutotoolsPackage): """The Proxy Management Protocol is an ICE based protocol that provides a way for application servers to easily locate proxy services available to them.""" @@ -34,8 +34,3 @@ class Xproxymanagementprotocol(Package): url = "https://www.x.org/archive/individual/proto/xproxymanagementprotocol-1.0.3.tar.gz" version('1.0.3', 'c4ab05a6174b4e9b6ae5b7cfbb6d718e') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xrandr/package.py b/var/spack/repos/builtin/packages/xrandr/package.py index 35e21c60477dcf63d5b4a9d05f5354d13b8d6516..6fdc4da4febd57da2a479e5373dc91b6b38464c8 100644 --- a/var/spack/repos/builtin/packages/xrandr/package.py +++ b/var/spack/repos/builtin/packages/xrandr/package.py @@ -25,7 +25,7 @@ from spack import * -class Xrandr(Package): +class Xrandr(AutotoolsPackage): """xrandr - primitive command line interface to X11 Resize, Rotate, and Reflect (RandR) extension.""" @@ -41,9 +41,3 @@ class Xrandr(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xrdb/package.py b/var/spack/repos/builtin/packages/xrdb/package.py index 93847a19a0bf8c799c5c981227d21f226f2fc5b8..c0374e7056d46f5700258d62f8b8935589b4839b 100644 --- a/var/spack/repos/builtin/packages/xrdb/package.py +++ b/var/spack/repos/builtin/packages/xrdb/package.py @@ -25,7 +25,7 @@ from spack import * -class Xrdb(Package): +class Xrdb(AutotoolsPackage): """xrdb - X server resource database utility.""" homepage = "http://cgit.freedesktop.org/xorg/app/xrdb" @@ -39,9 +39,3 @@ class Xrdb(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xrefresh/package.py b/var/spack/repos/builtin/packages/xrefresh/package.py index f99810beea80653e1912e4e5c255de3432fc411d..3a2c47b08655a2b8eacbb8267fcb5a19eb7653be 100644 --- a/var/spack/repos/builtin/packages/xrefresh/package.py +++ b/var/spack/repos/builtin/packages/xrefresh/package.py @@ -25,7 +25,7 @@ from spack import * -class Xrefresh(Package): +class Xrefresh(AutotoolsPackage): """xrefresh - refresh all or part of an X screen.""" homepage = "http://cgit.freedesktop.org/xorg/app/xrefresh" @@ -38,9 +38,3 @@ class Xrefresh(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xrx/package.py b/var/spack/repos/builtin/packages/xrx/package.py index 4457c2f16469ee1161689dd6e6cbbc633878abdc..eae7b76768f1457211bd603d369f3eca4cabdd9c 100644 --- a/var/spack/repos/builtin/packages/xrx/package.py +++ b/var/spack/repos/builtin/packages/xrx/package.py @@ -25,7 +25,7 @@ from spack import * -class Xrx(Package): +class Xrx(AutotoolsPackage): """The remote execution (RX) service specifies a MIME format for invoking applications remotely, for example via a World Wide Web browser. This RX format specifies a syntax for listing network services required by @@ -49,9 +49,3 @@ class Xrx(Package): depends_on('xproxymanagementprotocol', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xscope/package.py b/var/spack/repos/builtin/packages/xscope/package.py index cf33c9767ea14c7516b68031511df6618a46e6f2..04f00a5f5d2b3c315a263640d33b15a0a7e3e880 100644 --- a/var/spack/repos/builtin/packages/xscope/package.py +++ b/var/spack/repos/builtin/packages/xscope/package.py @@ -25,7 +25,7 @@ from spack import * -class Xscope(Package): +class Xscope(AutotoolsPackage): """XSCOPE -- a program to monitor X11/Client conversations.""" homepage = "http://cgit.freedesktop.org/xorg/app/xscope" @@ -37,9 +37,3 @@ class Xscope(Package): depends_on('xtrans', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xset/package.py b/var/spack/repos/builtin/packages/xset/package.py index 462bea8cfe892c903922243611aad274e4f2afb7..5ca84431fd628c62ebcb3e1a3bfb2e79c8067bda 100644 --- a/var/spack/repos/builtin/packages/xset/package.py +++ b/var/spack/repos/builtin/packages/xset/package.py @@ -25,7 +25,7 @@ from spack import * -class Xset(Package): +class Xset(AutotoolsPackage): """User preference utility for X.""" homepage = "http://cgit.freedesktop.org/xorg/app/xset" @@ -39,9 +39,3 @@ class Xset(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xsetmode/package.py b/var/spack/repos/builtin/packages/xsetmode/package.py index f05fd0f123b87c32b9d3e7c5111ac2f0fedec006..8d39de26a456177686e0f73f6c8add3586312d49 100644 --- a/var/spack/repos/builtin/packages/xsetmode/package.py +++ b/var/spack/repos/builtin/packages/xsetmode/package.py @@ -25,7 +25,7 @@ from spack import * -class Xsetmode(Package): +class Xsetmode(AutotoolsPackage): """Set the mode for an X Input device.""" homepage = "http://cgit.freedesktop.org/xorg/app/xsetmode" @@ -38,9 +38,3 @@ class Xsetmode(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xsetpointer/package.py b/var/spack/repos/builtin/packages/xsetpointer/package.py index e9bf2fc9fe2f07bd9f8804cd92f8d545790b1b3b..194ef186ae28c0529a55327ec6f5a9bc63088f68 100644 --- a/var/spack/repos/builtin/packages/xsetpointer/package.py +++ b/var/spack/repos/builtin/packages/xsetpointer/package.py @@ -25,7 +25,7 @@ from spack import * -class Xsetpointer(Package): +class Xsetpointer(AutotoolsPackage): """Set an X Input device as the main pointer.""" homepage = "http://cgit.freedesktop.org/xorg/app/xsetpointer" @@ -39,9 +39,3 @@ class Xsetpointer(Package): depends_on('inputproto@1.4:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xsetroot/package.py b/var/spack/repos/builtin/packages/xsetroot/package.py index 3e62d41e9b2216f7c83e5421592218d5d7062f66..8be0625ff1a4f81b2df48a84e2e52cab19d94b6e 100644 --- a/var/spack/repos/builtin/packages/xsetroot/package.py +++ b/var/spack/repos/builtin/packages/xsetroot/package.py @@ -25,7 +25,7 @@ from spack import * -class Xsetroot(Package): +class Xsetroot(AutotoolsPackage): """xsetroot - root window parameter setting utility for X.""" homepage = "http://cgit.freedesktop.org/xorg/app/xsetroot" @@ -41,9 +41,3 @@ class Xsetroot(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xsm/package.py b/var/spack/repos/builtin/packages/xsm/package.py index 9d9c8963657376ed45e05f7955a3b61f783d7671..4d91dae142217a42bd0d035012f620ccdd34ee1e 100644 --- a/var/spack/repos/builtin/packages/xsm/package.py +++ b/var/spack/repos/builtin/packages/xsm/package.py @@ -25,7 +25,7 @@ from spack import * -class Xsm(Package): +class Xsm(AutotoolsPackage): """X Session Manager.""" homepage = "http://cgit.freedesktop.org/xorg/app/xsm" @@ -41,9 +41,3 @@ class Xsm(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xstdcmap/package.py b/var/spack/repos/builtin/packages/xstdcmap/package.py index bb19bdff1ae5a2f308b7515542971508ca53ce93..8c3a081ae76fab834d58fc9326c3e49dbc178b51 100644 --- a/var/spack/repos/builtin/packages/xstdcmap/package.py +++ b/var/spack/repos/builtin/packages/xstdcmap/package.py @@ -25,7 +25,7 @@ from spack import * -class Xstdcmap(Package): +class Xstdcmap(AutotoolsPackage): """The xstdcmap utility can be used to selectively define standard colormap properties. It is intended to be run from a user's X startup script to create standard colormap definitions in order to facilitate sharing of @@ -42,9 +42,3 @@ class Xstdcmap(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xterm/package.py b/var/spack/repos/builtin/packages/xterm/package.py new file mode 100644 index 0000000000000000000000000000000000000000..f4212021e952150bdc9a5fa435316da36b6edf67 --- /dev/null +++ b/var/spack/repos/builtin/packages/xterm/package.py @@ -0,0 +1,55 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Xterm(AutotoolsPackage): + """The xterm program is a terminal emulator for the X Window System. It + provides DEC VT102 and Tektronix 4014 compatible terminals for programs + that can't use the window system directly.""" + + homepage = "http://invisible-island.net/xterm/" + url = "http://invisible-island.net/xterm/xterm-327.tgz" + + version('327', '3c32e931adcad44e64e57892e75d9e02') + + depends_on('libxft') + depends_on('fontconfig') + depends_on('libxaw') + depends_on('libxmu') + depends_on('libxt') + depends_on('libx11') + depends_on('libxinerama') + depends_on('libxpm') + depends_on('libice') + depends_on('freetype') + depends_on('libxrender') + depends_on('libxext') + depends_on('libsm') + depends_on('libxcb') + depends_on('libxau') + depends_on('bzip2') + + depends_on('pkg-config', type='build') diff --git a/var/spack/repos/builtin/packages/xtrans/package.py b/var/spack/repos/builtin/packages/xtrans/package.py index ed46059d9d5f5c06638bf3bf57bfada6bcce5532..62f74b8cec0b26824534ccf801ea539fe9d2c067 100644 --- a/var/spack/repos/builtin/packages/xtrans/package.py +++ b/var/spack/repos/builtin/packages/xtrans/package.py @@ -25,7 +25,7 @@ from spack import * -class Xtrans(Package): +class Xtrans(AutotoolsPackage): """xtrans is a library of code that is shared among various X packages to handle network protocol transport in a modular fashion, allowing a single place to add new transport types. It is used by the X server, @@ -38,8 +38,3 @@ class Xtrans(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make('install') diff --git a/var/spack/repos/builtin/packages/xtrap/package.py b/var/spack/repos/builtin/packages/xtrap/package.py index 405ec2f8485cefefe11e2055e2be90a7c2a85551..4a899b5111b310af1149983fa5633be87cf1ceda 100644 --- a/var/spack/repos/builtin/packages/xtrap/package.py +++ b/var/spack/repos/builtin/packages/xtrap/package.py @@ -25,7 +25,7 @@ from spack import * -class Xtrap(Package): +class Xtrap(AutotoolsPackage): """XTrap sample clients.""" homepage = "http://cgit.freedesktop.org/xorg/app/xtrap" @@ -38,9 +38,3 @@ class Xtrap(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xts/package.py b/var/spack/repos/builtin/packages/xts/package.py index c3993cf3913d961e40a131132471b7a4de1ae8b8..9dd3e4a05ceaab585acba579efc36385e4b2e59e 100644 --- a/var/spack/repos/builtin/packages/xts/package.py +++ b/var/spack/repos/builtin/packages/xts/package.py @@ -25,7 +25,7 @@ from spack import * -class Xts(Package): +class Xts(AutotoolsPackage): """This is a revamped version of X Test Suite (XTS) which removes some of the ugliness of building and running the tests.""" @@ -50,11 +50,5 @@ class Xts(Package): depends_on('xset', type='build') depends_on('xdpyinfo', type='build') - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - # FIXME: Crashes during compilation - # error: redeclaration of enumerator 'XawChainTop' - - make() - make('install') + # FIXME: Crashes during compilation + # error: redeclaration of enumerator 'XawChainTop' diff --git a/var/spack/repos/builtin/packages/xvidtune/package.py b/var/spack/repos/builtin/packages/xvidtune/package.py index ac5352df5f584656f108dea81f3924ca3f78d4ea..42dbc23aa009673ecbfebb23a88f9806e6fba3f0 100644 --- a/var/spack/repos/builtin/packages/xvidtune/package.py +++ b/var/spack/repos/builtin/packages/xvidtune/package.py @@ -25,7 +25,7 @@ from spack import * -class Xvidtune(Package): +class Xvidtune(AutotoolsPackage): """xvidtune is a client interface to the X server video mode extension (XFree86-VidModeExtension).""" @@ -42,9 +42,3 @@ class Xvidtune(Package): depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xvinfo/package.py b/var/spack/repos/builtin/packages/xvinfo/package.py index 359f1f23deab158710d0849040ed95886da9cc3a..f7a275f452f09ca49c83732354030ae696527516 100644 --- a/var/spack/repos/builtin/packages/xvinfo/package.py +++ b/var/spack/repos/builtin/packages/xvinfo/package.py @@ -25,7 +25,7 @@ from spack import * -class Xvinfo(Package): +class Xvinfo(AutotoolsPackage): """xvinfo prints out the capabilities of any video adaptors associated with the display that are accessible through the X-Video extension.""" @@ -40,9 +40,3 @@ class Xvinfo(Package): depends_on('xproto@7.0.25:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xwd/package.py b/var/spack/repos/builtin/packages/xwd/package.py index d1f9ee1dfbf5ba5b8a8019bb4c04867eaf899633..9016e17915cf842226f22c0aba1baf2d8b858d37 100644 --- a/var/spack/repos/builtin/packages/xwd/package.py +++ b/var/spack/repos/builtin/packages/xwd/package.py @@ -25,7 +25,7 @@ from spack import * -class Xwd(Package): +class Xwd(AutotoolsPackage): """xwd - dump an image of an X window.""" homepage = "http://cgit.freedesktop.org/xorg/app/xwd" @@ -39,9 +39,3 @@ class Xwd(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xwininfo/package.py b/var/spack/repos/builtin/packages/xwininfo/package.py index bba97ca6710659e99fba91cba347b61dfc35072d..61aa86bf461a0b4d4163affc0affe939b6e71bfa 100644 --- a/var/spack/repos/builtin/packages/xwininfo/package.py +++ b/var/spack/repos/builtin/packages/xwininfo/package.py @@ -25,7 +25,7 @@ from spack import * -class Xwininfo(Package): +class Xwininfo(AutotoolsPackage): """xwininfo prints information about windows on an X server. Various information is displayed depending on which options are selected.""" @@ -40,9 +40,3 @@ class Xwininfo(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xwud/package.py b/var/spack/repos/builtin/packages/xwud/package.py index a30d55b7c68f6c99e15fc3ea5664831349945eec..9294156e161c56b40dd10a2e7076a10b632fef74 100644 --- a/var/spack/repos/builtin/packages/xwud/package.py +++ b/var/spack/repos/builtin/packages/xwud/package.py @@ -25,7 +25,7 @@ from spack import * -class Xwud(Package): +class Xwud(AutotoolsPackage): """xwud allows X users to display in a window an image saved in a specially formatted dump file, such as produced by xwd.""" @@ -39,9 +39,3 @@ class Xwud(Package): depends_on('xproto@7.0.17:', type='build') depends_on('pkg-config@0.9.0:', type='build') depends_on('util-macros', type='build') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/xz/package.py b/var/spack/repos/builtin/packages/xz/package.py index 8b0609f50e11c64f285b5db19fdc2cf975b11fc1..839f5130582876c5a3cef48907819e340d06acf7 100644 --- a/var/spack/repos/builtin/packages/xz/package.py +++ b/var/spack/repos/builtin/packages/xz/package.py @@ -25,21 +25,15 @@ from spack import * -class Xz(Package): +class Xz(AutotoolsPackage): """XZ Utils is free general-purpose data compression software with high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.""" homepage = "http://tukaani.org/xz/" url = "http://tukaani.org/xz/xz-5.2.0.tar.bz2" + list_url = "http://tukaani.org/xz/old.html" - version('5.2.0', '867cc8611760240ebf3440bd6e170bb9') + version('5.2.3', '1592e7ca3eece099b03b35f4d9179e7c') version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - if self.run_tests: - make('check') - make('install') + version('5.2.0', '867cc8611760240ebf3440bd6e170bb9') diff --git a/var/spack/repos/builtin/packages/yasm/package.py b/var/spack/repos/builtin/packages/yasm/package.py index f14bdbcee7198ae411651e425424920a2343c851..e42ea6a5a77407ae2d2af4c78d9be769f28ca9b1 100644 --- a/var/spack/repos/builtin/packages/yasm/package.py +++ b/var/spack/repos/builtin/packages/yasm/package.py @@ -25,7 +25,7 @@ from spack import * -class Yasm(Package): +class Yasm(AutotoolsPackage): """Yasm is a complete rewrite of the NASM-2.11.06 assembler. It supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes and outputs binary, ELF32 and ELF64 @@ -34,8 +34,3 @@ class Yasm(Package): url = "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" version('1.3.0', 'fc9e586751ff789b34b1f21d572d96af') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/zeromq/package.py b/var/spack/repos/builtin/packages/zeromq/package.py index cafd3c21252b0d915d06f2c213cc7308354e4b33..51fff7222d42ed34a9bbfa9fac1fa77ea4f59d15 100644 --- a/var/spack/repos/builtin/packages/zeromq/package.py +++ b/var/spack/repos/builtin/packages/zeromq/package.py @@ -25,7 +25,7 @@ from spack import * -class Zeromq(Package): +class Zeromq(AutotoolsPackage): """ The ZMQ networking/concurrency library and core API """ homepage = "http://zguide.zeromq.org/" url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz" @@ -40,8 +40,5 @@ class Zeromq(Package): depends_on("libsodium") depends_on("libsodium@:1.0.3", when='@:4.1.2') - def install(self, spec, prefix): - configure("--with-libsodium", "--prefix=%s" % prefix) - - make() - make("install") + def configure_args(self): + return ['--with-libsodium'] diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py index ea758e01889f30b4bbdd9e525a1231e01e74a5cf..05b9bb8deda98a207a6a4c4d339b08fd7fee0255 100644 --- a/var/spack/repos/builtin/packages/zlib/package.py +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -40,7 +40,15 @@ class Zlib(AutotoolsPackage): variant('pic', default=True, description='Produce position-independent code (for shared libs)') + variant('shared', default=True, + description='Enables the build of shared libraries.') def setup_environment(self, spack_env, run_env): if '+pic' in self.spec: spack_env.set('CFLAGS', self.compiler.pic_flag) + + def configure_args(self): + config_args = [] + if '+shared' not in self.spec: + config_args.append('--static') + return config_args diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py index a70d307be93b10c513088790ed6e4b96d492f24f..7b9c485966d4cd44e5767354e415b36ff2247547 100644 --- a/var/spack/repos/builtin/packages/zsh/package.py +++ b/var/spack/repos/builtin/packages/zsh/package.py @@ -25,7 +25,7 @@ from spack import * -class Zsh(Package): +class Zsh(AutotoolsPackage): """Zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added. @@ -37,9 +37,3 @@ class Zsh(Package): version('5.1.1', checksum='8ba28a9ef82e40c3a271602f18343b2f') depends_on("pcre") - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/repos/builtin/packages/zstd/package.py b/var/spack/repos/builtin/packages/zstd/package.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e34591f77f5d89c96b532669f408be821183c3 --- /dev/null +++ b/var/spack/repos/builtin/packages/zstd/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Zstd(Package): + """Zstandard, or zstd as short version, is a fast lossless compression + algorithm, targeting real-time compression scenarios at zlib-level and + better compression ratios.""" + + homepage = "http://facebook.github.io/zstd/" + url = "https://github.com/facebook/zstd/archive/v1.1.2.tar.gz" + + version('1.1.2', '4c57a080d194bdaac83f2d3251fc7ffc') + + def install(self, spec, prefix): + make() + if self.run_tests: + make('test') + make('install', 'PREFIX={0}'.format(prefix))