summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-08-08 13:33:24 -0500
committerbecker33 <becker33@llnl.gov>2017-08-08 11:33:24 -0700
commit97958d8347fd031b3f46d33fc9246a98f2b59ec3 (patch)
tree64becfc75b2212c10d65ad1959b7d8b325556405 /var
parent48f0e9592e67c29606e4167ba8d9cd503df8b64a (diff)
downloadspack-97958d8347fd031b3f46d33fc9246a98f2b59ec3.tar.gz
spack-97958d8347fd031b3f46d33fc9246a98f2b59ec3.tar.bz2
spack-97958d8347fd031b3f46d33fc9246a98f2b59ec3.tar.xz
spack-97958d8347fd031b3f46d33fc9246a98f2b59ec3.zip
Add latest version of Ninja (#4987)
* Add latest version of Ninja * Re-add symlinks, add latest version of ninja-fortran
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ninja-fortran/package.py36
-rw-r--r--var/spack/repos/builtin/packages/ninja/package.py34
2 files changed, 53 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/ninja-fortran/package.py b/var/spack/repos/builtin/packages/ninja-fortran/package.py
index 9b733cee6c..349b60bae9 100644
--- a/var/spack/repos/builtin/packages/ninja-fortran/package.py
+++ b/var/spack/repos/builtin/packages/ninja-fortran/package.py
@@ -23,27 +23,45 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class NinjaFortran(Package):
- """ A Fortran capable fork of ninja """
+ """A Fortran capable fork of ninja."""
+
homepage = "https://github.com/Kitware/ninja"
- url = "https://github.com/Kitware/ninja/archive/v1.7.2.gcc0ea.kitware.dyndep-1.tar.gz"
+ url = "https://github.com/Kitware/ninja/archive/v1.7.2.gaad58.kitware.dyndep-1.tar.gz"
+
+ # Each version is a fork off of a specific commit of ninja
+ # Hashes don't sort properly, so manually set newest version
+ version('1.7.2.gaad58', 'eb51b042b9dbaf8ecd79a6fb24de1320', preferred=True)
+ version('1.7.2.gcc0ea', '3982f508c415c0abaca34cb5e92e711a')
+ version('1.7.1.g7ca7f', '187a8d15c1e20e5e9b00c5c3f227ca8a')
- version('1.7.2', '3982f508c415c0abaca34cb5e92e711a')
+ depends_on('python', type=('build', 'run'))
- extends('python')
+ phases = ['configure', 'install']
def url_for_version(self, version):
- url = 'https://github.com/Kitware/ninja/archive/v{0}.gcc0ea.kitware.dyndep-1.tar.gz'
+ url = 'https://github.com/Kitware/ninja/archive/v{0}.kitware.dyndep-1.tar.gz'
return url.format(version)
- def install(self, spec, prefix):
+ def configure(self, spec, prefix):
python('configure.py', '--bootstrap')
+ @run_after('configure')
+ @on_package_attributes(run_tests=True)
+ def test(self):
+ ninja = Executable('./ninja')
+ ninja('-j{0}'.format(make_jobs), 'ninja_test')
+ ninja_test = Executable('./ninja_test')
+ ninja_test()
+
+ def install(self, spec, prefix):
mkdir(prefix.bin)
install('ninja', prefix.bin)
- install_tree('misc', join_path(prefix, 'misc'))
+ install_tree('misc', prefix.misc)
+
+ # Some distros like Fedora install a 'ninja-build' executable
+ # instead of 'ninja'. Install both for uniformity.
with working_dir(prefix.bin):
- os.symlink('ninja', 'ninja-build')
+ symlink('ninja', 'ninja-build')
diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py
index 28aa36c465..7a53ae684c 100644
--- a/var/spack/repos/builtin/packages/ninja/package.py
+++ b/var/spack/repos/builtin/packages/ninja/package.py
@@ -23,23 +23,41 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class Ninja(Package):
- """ A small, fast Make alternative """
- homepage = "https://martine.github.io/ninja/"
- url = "https://github.com/martine/ninja/archive/v1.6.0.tar.gz"
+ """Ninja is a small build system with a focus on speed. It differs from
+ other build systems in two major respects: it is designed to have its input
+ files generated by a higher-level build system, and it is designed to run
+ builds as fast as possible."""
+ homepage = "https://ninja-build.org/"
+ url = "https://github.com/ninja-build/ninja/archive/v1.7.2.tar.gz"
+
+ version('1.7.2', '7b482218757acbaeac4d4d54a3cd94e1')
version('1.6.0', '254133059f2da79d8727f654d7198f43')
- extends('python')
+ depends_on('python', type=('build', 'run'))
- def install(self, spec, prefix):
+ phases = ['configure', 'install']
+
+ def configure(self, spec, prefix):
python('configure.py', '--bootstrap')
+ @run_after('configure')
+ @on_package_attributes(run_tests=True)
+ def test(self):
+ ninja = Executable('./ninja')
+ ninja('-j{0}'.format(make_jobs), 'ninja_test')
+ ninja_test = Executable('./ninja_test')
+ ninja_test()
+
+ def install(self, spec, prefix):
mkdir(prefix.bin)
install('ninja', prefix.bin)
- install_tree('misc', join_path(prefix, 'misc'))
+ install_tree('misc', prefix.misc)
+
+ # Some distros like Fedora install a 'ninja-build' executable
+ # instead of 'ninja'. Install both for uniformity.
with working_dir(prefix.bin):
- os.symlink('ninja', 'ninja-build')
+ symlink('ninja', 'ninja-build')