From a37828bafba2f594e54e0e7487df909fdeac4c8f Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 8 Oct 2014 21:59:47 -0700 Subject: Packages for gcc and its dependencies. --- var/spack/packages/gcc/package.py | 43 ++++++++++++++++++++++++++++++++++++++ var/spack/packages/gmp/package.py | 40 +++++++++++++++++++++++++++++++++++ var/spack/packages/mpc/package.py | 42 +++++++++++++++++++++++++++++++++++++ var/spack/packages/mpfr/package.py | 38 +++++++++++++++++++++++++++++++++ 4 files changed, 163 insertions(+) create mode 100644 var/spack/packages/gcc/package.py create mode 100644 var/spack/packages/gmp/package.py create mode 100644 var/spack/packages/mpc/package.py create mode 100644 var/spack/packages/mpfr/package.py (limited to 'var') diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py new file mode 100644 index 0000000000..bb5fee8192 --- /dev/null +++ b/var/spack/packages/gcc/package.py @@ -0,0 +1,43 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/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 General Public License (as published by +# the Free Software Foundation) version 2.1 dated 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 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 Gcc(Package): + """The GNU Compiler Collection includes front ends for C, C++, + Objective-C, Fortran, and Java.""" + homepage = "https://gcc.gnu.org" + url = "http://www.netgull.com/gcc/releases/gcc-4.9.1/gcc-4.9.1.tar.bz2" + + version('4.9.1', 'fddf71348546af523353bd43d34919c1') + + depends_on("mpc") + depends_on("mpfr") + depends_on("gmp") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix, + "--disable-multilib") + make() + make("install") diff --git a/var/spack/packages/gmp/package.py b/var/spack/packages/gmp/package.py new file mode 100644 index 0000000000..d6af821b34 --- /dev/null +++ b/var/spack/packages/gmp/package.py @@ -0,0 +1,40 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/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 General Public License (as published by +# the Free Software Foundation) version 2.1 dated 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 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 Gmp(Package): + """GMP is a free library for arbitrary precision arithmetic, + operating on signed integers, rational numbers, and + floating-point numbers.""" + homepage = "https://gmplib.org" + url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2" + + version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470') + version('6.0.0' , '6ef5869ae735db9995619135bd856b84') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/packages/mpc/package.py b/var/spack/packages/mpc/package.py new file mode 100644 index 0000000000..6fbfca3007 --- /dev/null +++ b/var/spack/packages/mpc/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/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 General Public License (as published by +# the Free Software Foundation) version 2.1 dated 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 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 Mpc(Package): + """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" + + version('1.0.2', '68fadff3358fb3e7976c7a398a0af4c3') + + depends_on("gmp") + depends_on("mpfr") + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/packages/mpfr/package.py b/var/spack/packages/mpfr/package.py new file mode 100644 index 0000000000..62dac63206 --- /dev/null +++ b/var/spack/packages/mpfr/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/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 General Public License (as published by +# the Free Software Foundation) version 2.1 dated 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 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 Mpfr(Package): + """The MPFR library is a C library for multiple-precision + floating-point computations with correct rounding.""" + homepage = "http://www.mpfr.org" + url = "http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2" + + version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From b97ee67a4b8ddddf9af8a93c3e8292e34d507467 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 5 Nov 2014 09:54:43 -0800 Subject: Working GCC package. --- lib/spack/llnl/util/filesystem.py | 23 +++++++++++++++-- var/spack/packages/gcc/package.py | 53 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 71 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index dc722297ec..6a04d98a18 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -22,8 +22,9 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -__all__ = ['install', 'expand_user', 'working_dir', 'touch', 'mkdirp', - 'join_path', 'ancestor', 'can_access', 'filter_file', 'change_sed_delimiter'] +__all__ = ['set_install_permissions', 'install', 'expand_user', 'working_dir', + 'touch', 'mkdirp', 'force_remove', 'join_path', 'ancestor', + 'can_access', 'filter_file', 'change_sed_delimiter'] import os import sys @@ -127,10 +128,19 @@ def change_sed_delimiter(old_delim, new_delim, *filenames): filter_file(double_quoted, '"%s"' % repl, f) +def set_install_permissions(path): + """Set appropriate permissions on the installed file.""" + if os.path.isdir(path): + os.chmod(path, 0755) + else: + os.chmod(path, 0644) + + def install(src, dest): """Manually install a file to a particular location.""" tty.info("Installing %s to %s" % (src, dest)) shutil.copy(src, dest) + set_install_permissions(dest) def expand_user(path): @@ -152,6 +162,15 @@ def mkdirp(*paths): raise OSError(errno.EEXIST, "File alredy exists", path) +def force_remove(*paths): + """Remove files without printing errors. Like rm -f, does NOT + remove directories.""" + for path in paths: + try: + os.remove(path) + except OSError, e: + pass + @contextmanager def working_dir(dirname, **kwargs): if kwargs.get('create', False): diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py index bb5fee8192..e1f1084c96 100644 --- a/var/spack/packages/gcc/package.py +++ b/var/spack/packages/gcc/package.py @@ -24,20 +24,67 @@ ############################################################################## from spack import * +from contextlib import closing +from glob import glob + class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, and Java.""" homepage = "https://gcc.gnu.org" - url = "http://www.netgull.com/gcc/releases/gcc-4.9.1/gcc-4.9.1.tar.bz2" - version('4.9.1', 'fddf71348546af523353bd43d34919c1') + list_url = 'http://mirrors.kernel.org/gnu/gcc/' + list_depth = 2 + + version('4.9.2', '4df8ee253b7f3863ad0b86359cd39c43', + url="http://mirrors.kernel.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2") + version('4.9.1', 'fddf71348546af523353bd43d34919c1', + url="http://mirrors.kernel.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2") depends_on("mpc") depends_on("mpfr") depends_on("gmp") + depends_on("libelf") + def install(self, spec, prefix): + # libjava/configure needs a minor fix to install into spack paths. + filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) + + # Rest of install is straightforward. configure("--prefix=%s" % prefix, - "--disable-multilib") + "--libdir=%s/lib64" % prefix, + "--disable-multilib", + "--enable-languages=c,c++,fortran,java,objc,go", + "--enable-lto", + "--with-quad") make() make("install") + + self.write_rpath_specs() + + + @property + def spec_dir(self): + # e.g. lib64/gcc/x86_64-unknown-linux-gnu/4.9.2 + spec_dir = glob("%s/lib64/gcc/*/*" % self.prefix) + return spec_dir[0] if spec_dir else None + + + 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.""" + if not self.spec_dir: + tty.warn("Could not install specs for %s." % self.spec.format('$_$@')) + return + + gcc = Executable(join_path(self.prefix.bin, 'gcc')) + lines = gcc('-dumpspecs', return_output=True).split("\n") + for i, line in enumerate(lines): + if line.startswith("*link:"): + specs_file = join_path(self.spec_dir, 'specs') + with closing(open(specs_file, 'w')) as out: + out.write(lines[i] + "\n") + out.write("-rpath %s/lib:%s/lib64 \\\n" + % (self.prefix, self.prefix)) + out.write(lines[i+1] + "\n") + set_install_permissions(specs_file) -- cgit v1.2.3-70-g09d2 From d78ece658b0b139604998886a788acc11e661b14 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 7 Nov 2014 00:13:52 -0800 Subject: Change to faster gcc mirror that allows spidering. --- var/spack/packages/gcc/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py index e1f1084c96..da0debd5dc 100644 --- a/var/spack/packages/gcc/package.py +++ b/var/spack/packages/gcc/package.py @@ -32,13 +32,13 @@ class Gcc(Package): Objective-C, Fortran, and Java.""" homepage = "https://gcc.gnu.org" - list_url = 'http://mirrors.kernel.org/gnu/gcc/' + list_url = 'http://open-source-box.org/gcc/' list_depth = 2 version('4.9.2', '4df8ee253b7f3863ad0b86359cd39c43', - url="http://mirrors.kernel.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2") + url="http://open-source-box.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2") version('4.9.1', 'fddf71348546af523353bd43d34919c1', - url="http://mirrors.kernel.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2") + url="http://open-source-box.org/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2") depends_on("mpc") depends_on("mpfr") -- cgit v1.2.3-70-g09d2 From 57076f6ca4ae37cf2d0cc91fa7b4de688df1be1c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 8 Nov 2014 11:42:54 -0800 Subject: URL parsing improvements --- lib/spack/env/cc | 10 ++++- lib/spack/spack/spec.py | 5 ++- lib/spack/spack/test/url_extrapolate.py | 38 ++++++++++++++----- lib/spack/spack/url.py | 67 ++++++++++++++++++--------------- var/spack/packages/jpeg/package.py | 2 +- var/spack/packages/openmpi/package.py | 6 +-- 6 files changed, 81 insertions(+), 47 deletions(-) (limited to 'var') diff --git a/lib/spack/env/cc b/lib/spack/env/cc index f68cb0b2cd..19ca31cace 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -275,9 +275,15 @@ for dir in "${libraries[@]}"; do args+=("-L$dir"); done for lib in "${libs[@]}"; do args+=("-l$lib"); done if [ "$mode" = ccld ]; then - for dir in "${rpaths[@]}"; do args+=("-Wl,-rpath=$dir"); done + for dir in "${rpaths[@]}"; do + args+=("-Wl,-rpath") + args+=("-Wl,$dir"); + done elif [ "$mode" = ld ]; then - for dir in "${rpaths[@]}"; do args+=("-rpath=$dir"); done + for dir in "${rpaths[@]}"; do + args+=("-rpath") + args+=("$dir"); + done fi # diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index a0ab38c049..570bb1191c 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1096,8 +1096,9 @@ class Spec(object): def __contains__(self, spec): - """True if this spec has any dependency that satisfies the supplied - spec.""" + """True if this spec satisfis the provided spec, or if any dependency + does. If the spec has no name, then we parse this one first. + """ spec = self._autospec(spec) for s in self.traverse(): if s.satisfies(spec): diff --git a/lib/spack/spack/test/url_extrapolate.py b/lib/spack/spack/test/url_extrapolate.py index c30ff1f009..71aa249e49 100644 --- a/lib/spack/spack/test/url_extrapolate.py +++ b/lib/spack/spack/test/url_extrapolate.py @@ -34,15 +34,35 @@ from spack.test.mock_packages_test import * class UrlExtrapolateTest(MockPackagesTest): - def test_known_version(self): - d = spack.db.get('dyninst') - - self.assertEqual( - d.url_for_version('8.2'), 'http://www.paradyn.org/release8.2/DyninstAPI-8.2.tgz') + def test_libelf_version(self): + base = "http://www.mr511.de/software/libelf-0.8.13.tar.gz" + self.assertEqual(url.substitute_version(base, '0.8.13'), base) + self.assertEqual(url.substitute_version(base, '0.8.12'), + "http://www.mr511.de/software/libelf-0.8.12.tar.gz") + self.assertEqual(url.substitute_version(base, '0.3.1'), + "http://www.mr511.de/software/libelf-0.3.1.tar.gz") + self.assertEqual(url.substitute_version(base, '1.3.1b'), + "http://www.mr511.de/software/libelf-1.3.1b.tar.gz") + + + def test_libdwarf_version(self): + base = "http://www.prevanders.net/libdwarf-20130729.tar.gz" + self.assertEqual(url.substitute_version(base, '20130729'), base) + self.assertEqual(url.substitute_version(base, '8.12'), + "http://www.prevanders.net/libdwarf-8.12.tar.gz") + + + def test_dyninst_version(self): + # Dyninst has a version twice in the URL. + base = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz" + self.assertEqual(url.substitute_version(base, '8.1.2'), base) self.assertEqual( - d.url_for_version('8.1.2'), 'http://www.paradyn.org/release8.1.2/DyninstAPI-8.1.2.tgz') + url.substitute_version(base, '8.2'), + "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.2/DyninstAPI-8.2.tgz") + self.assertEqual( - d.url_for_version('8.1.1'), 'http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz') + url.substitute_version(base, '8.3.1'), + "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.3.1/DyninstAPI-8.3.1.tgz") def test_extrapolate_version(self): @@ -59,8 +79,8 @@ class UrlExtrapolateTest(MockPackagesTest): # 8.2 matches both the release8.2 component and the DyninstAPI-8.2 component. # Extrapolation should replace both with the new version. # TODO: figure out a consistent policy for this. - # self.assertEqual( - # d.url_for_version('8.2.3'), 'http://www.paradyn.org/release8.2.3/DyninstAPI-8.2.3.tgz') + self.assertEqual( + d.url_for_version('8.2.3'), 'http://www.paradyn.org/release8.2.3/DyninstAPI-8.2.3.tgz') def test_with_package(self): diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index a0410131b0..1c0c0d2438 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -57,27 +57,6 @@ from spack.version import Version # "path" seemed like the most generic term. # -class UrlParseError(spack.error.SpackError): - """Raised when the URL module can't parse something correctly.""" - def __init__(self, msg, path): - super(UrlParseError, self).__init__(msg) - self.path = path - - -class UndetectableVersionError(UrlParseError): - """Raised when we can't parse a version from a string.""" - def __init__(self, path): - super(UndetectableVersionError, self).__init__( - "Couldn't detect version in: " + path, path) - - -class UndetectableNameError(UrlParseError): - """Raised when we can't parse a package name from a string.""" - def __init__(self, path): - super(UndetectableNameError, self).__init__( - "Couldn't parse package name in: " + path, path) - - def find_list_url(url): """Finds a good list URL for the supplied URL. This depends on the site. By default, just assumes that a good list URL is the @@ -98,7 +77,7 @@ def find_list_url(url): return os.path.dirname(url) -def parse_version_string_with_indices(path): +def parse_version_offset(path): """Try to extract a version string from a filename or URL. This is taken largely from Homebrew's Version class.""" @@ -112,6 +91,7 @@ def parse_version_string_with_indices(path): # Take basename to avoid including parent dirs in version name # Remember the offset of the stem in the full path. stem = os.path.basename(path) + offset = len(path) - len(stem) version_types = [ # GitHub tarballs, e.g. v1.2.3 @@ -172,13 +152,13 @@ def parse_version_string_with_indices(path): # e.g. http://www.ijg.org/files/jpegsrc.v8d.tar.gz (r'\.v(\d+[a-z]?)', stem)] - for vtype in version_types: + for i, vtype in enumerate(version_types): regex, match_string = vtype[:2] match = re.search(regex, match_string) if match and match.group(1) is not None: version = match.group(1) - start = path.index(version) - return version, start, start+len(version) + start = offset + match.start(1) + return version, start, len(version) raise UndetectableVersionError(path) @@ -187,11 +167,11 @@ def parse_version(path): """Given a URL or archive name, extract a version from it and return a version object. """ - ver, start, end = parse_version_string_with_indices(path) + ver, start, l = parse_version_offset(path) return Version(ver) -def parse_name(path, ver=None): +def parse_name_offset(path, ver=None): if ver is None: ver = parse_version(path) @@ -207,10 +187,16 @@ def parse_name(path, ver=None): for nt in ntypes: match = re.search(nt, path) if match: - return match.group(1) + name = match.group(1) + return name, match.start(1), len(name) raise UndetectableNameError(path) +def parse_name(path, ver=None): + name, start, l = parse_name_offset(path, ver) + return name + + def parse_name_and_version(path): ver = parse_version(path) name = parse_name(path, ver) @@ -231,8 +217,8 @@ 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. """ - ver, start, end = parse_version_string_with_indices(path) - return path[:start] + str(new_version) + path[end:] + ver, start, l = parse_version_offset(path) + return path[:start] + str(new_version) + path[(start+l):] def wildcard_version(path): @@ -266,3 +252,24 @@ def wildcard_version(path): # Put it all back together with original name matches intact. return ''.join(name_parts) + '.' + ext + + +class UrlParseError(spack.error.SpackError): + """Raised when the URL module can't parse something correctly.""" + def __init__(self, msg, path): + super(UrlParseError, self).__init__(msg) + self.path = path + + +class UndetectableVersionError(UrlParseError): + """Raised when we can't parse a version from a string.""" + def __init__(self, path): + super(UndetectableVersionError, self).__init__( + "Couldn't detect version in: " + path, path) + + +class UndetectableNameError(UrlParseError): + """Raised when we can't parse a package name from a string.""" + def __init__(self, path): + super(UndetectableNameError, self).__init__( + "Couldn't parse package name in: " + path, path) diff --git a/var/spack/packages/jpeg/package.py b/var/spack/packages/jpeg/package.py index b34fd5cb2d..bb5b77e01c 100644 --- a/var/spack/packages/jpeg/package.py +++ b/var/spack/packages/jpeg/package.py @@ -5,7 +5,7 @@ class Jpeg(Package): homepage = "http://www.ijg.org" url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz" - version('9', 'b397211ddfd506b92cd5e02a22ac924d') + version('9a', 'b397211ddfd506b92cd5e02a22ac924d') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py index 1ef8a8f000..7e84cbaf65 100644 --- a/var/spack/packages/openmpi/package.py +++ b/var/spack/packages/openmpi/package.py @@ -13,9 +13,9 @@ class Openmpi(Package): version('1.8.2', 'ab538ed8e328079d566fc797792e016e', url='http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.2.tar.gz') - version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475', url = "http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2") + patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") patch('llnl-platforms.patch', when="@1.6.5") @@ -27,8 +27,8 @@ class Openmpi(Package): # TODO: use variants for this, e.g. +lanl, +llnl, etc. # use this for LANL builds, but for LLNL builds, we need: # "--with-platform=contrib/platform/llnl/optimized" - if self.version == ver("1.6.5"): - confg_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") + if self.version == ver("1.6.5") and '+lanl' in spec: + config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") # TODO: Spack should make it so that you can't actually find # these compilers if they're "disabled" for the current -- cgit v1.2.3-70-g09d2