summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAndrey Prokopenko <andrey.prok@gmail.com>2017-06-23 09:52:57 -0400
committerAdam J. Stewart <ajstewart426@gmail.com>2017-06-23 08:52:57 -0500
commit811ea4f465438c285478665fa967c0a12b8c7691 (patch)
tree62ecfbba0d5ff0d165fe5c00e85bd2b696b2add5 /var
parent3e087f2e25ee82ea7fafe2a144991703c5825911 (diff)
downloadspack-811ea4f465438c285478665fa967c0a12b8c7691.tar.gz
spack-811ea4f465438c285478665fa967c0a12b8c7691.tar.bz2
spack-811ea4f465438c285478665fa967c0a12b8c7691.tar.xz
spack-811ea4f465438c285478665fa967c0a12b8c7691.zip
ninja-fortran: a Fortran-capable fork of ninja build tool (#4539)
* ninja-fortran: a Fortran-capable fork of ninja build tool * Use url_for_version for clarity * Clean ninja-fortran * Cleanup in the original ninja package
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ninja-fortran/package.py49
-rw-r--r--var/spack/repos/builtin/packages/ninja/package.py11
2 files changed, 54 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/ninja-fortran/package.py b/var/spack/repos/builtin/packages/ninja-fortran/package.py
new file mode 100644
index 0000000000..9b733cee6c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ninja-fortran/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# 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
+
+
+class NinjaFortran(Package):
+ """ 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"
+
+ version('1.7.2', '3982f508c415c0abaca34cb5e92e711a')
+
+ extends('python')
+
+ def url_for_version(self, version):
+ url = 'https://github.com/Kitware/ninja/archive/v{0}.gcc0ea.kitware.dyndep-1.tar.gz'
+ return url.format(version)
+
+ def install(self, spec, prefix):
+ python('configure.py', '--bootstrap')
+
+ mkdir(prefix.bin)
+ install('ninja', prefix.bin)
+ install_tree('misc', join_path(prefix, 'misc'))
+ with working_dir(prefix.bin):
+ os.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 dcd00576dd..87da2913fd 100644
--- a/var/spack/repos/builtin/packages/ninja/package.py
+++ b/var/spack/repos/builtin/packages/ninja/package.py
@@ -38,9 +38,8 @@ class Ninja(Package):
def install(self, spec, prefix):
python('configure.py', '--bootstrap')
- cp = which('cp')
-
- bindir = os.path.join(prefix, 'bin/')
- mkdir(bindir)
- cp('-a', 'ninja', bindir)
- cp('-a', 'misc', prefix)
+ mkdir(prefix.bin)
+ install('ninja', prefix.bin)
+ install_tree('misc', join_path(prefix, 'misc'))
+ with working_dir(prefix.bin):
+ os.symlink('ninja', 'ninja-build')