diff options
-rw-r--r-- | lib/spack/spack/fetch_strategy.py | 19 | ||||
-rw-r--r-- | var/spack/packages/ImageMagick/package.py | 24 | ||||
-rw-r--r-- | var/spack/packages/clang/package.py | 5 | ||||
-rw-r--r-- | var/spack/packages/llvm/package.py | 14 |
4 files changed, 40 insertions, 22 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index a71f3a1531..48313e2b37 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -41,6 +41,7 @@ in order to build it. They need to define the following methods: Archive a source directory, e.g. for creating a mirror. """ import os +import sys import re import shutil from functools import wraps @@ -141,13 +142,19 @@ class URLFetchStrategy(FetchStrategy): tty.msg("Trying to fetch from %s" % self.url) + curl_args = ['-O', # save file to disk + '-f', # fail on >400 errors + '-D', '-', # print out HTML headers + '-L', self.url,] + + if sys.stdout.isatty(): + curl_args.append('-#') # status bar when using a tty + else: + curl_args.append('-sS') # just errors when not. + # Run curl but grab the mime type from the http headers - headers = spack.curl('-#', # status bar - '-O', # save file to disk - '-f', # fail on >400 errors - '-D', '-', # print out HTML headers - '-L', self.url, - return_output=True, fail_on_error=False) + headers = spack.curl( + *curl_args, return_output=True, fail_on_error=False) if spack.curl.returncode != 0: # clean up archive on failure. diff --git a/var/spack/packages/ImageMagick/package.py b/var/spack/packages/ImageMagick/package.py index 657b9255a3..753ea80ca6 100644 --- a/var/spack/packages/ImageMagick/package.py +++ b/var/spack/packages/ImageMagick/package.py @@ -3,18 +3,32 @@ from spack import * class Imagemagick(Package): """ImageMagick is a image processing library""" homepage = "http://www.imagemagic.org" - url = "http://www.imagemagick.org/download/ImageMagick-6.8.9-10.tar.gz" - version('6.9.0-0', '2cf094cb86ec518fa5bc669ce2d21613') - version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c') - version('6.8.9-9', 'e63fed3e3550851328352c708f800676') + #------------------------------------------------------------------------- + # ImageMagick does not keep around anything but *-10 versions, so + # this URL may change. If you want the bleeding edge, you can + # uncomment it and see if it works but you may need to try to + # fetch a newer version (-6, -7, -8, -9, etc.) or you can stick + # wtih the older, stable, archived -10 versions below. + # + # TODO: would be nice if spack had a way to recommend avoiding a + # TODO: bleeding edge version, but not comment it out. + # ------------------------------------------------------------------------- + # version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b', + # url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2") + + #------------------------------------------------------------------------- + # *-10 versions are archived, so these versions should fetch reliably. + # ------------------------------------------------------------------------- + version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', + url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") depends_on('libtool') depends_on('jpeg') depends_on('libpng') depends_on('freetype') depends_on('fontconfig') -# depends_on('libtiff') + depends_on('libtiff') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/packages/clang/package.py b/var/spack/packages/clang/package.py index b0097bd126..4f10385dbd 100644 --- a/var/spack/packages/clang/package.py +++ b/var/spack/packages/clang/package.py @@ -29,11 +29,10 @@ class Clang(Package): Objective C and Objective C++ front-end for the LLVM compiler. """ homepage = "http://clang.llvm.org" - url = "http://llvm.org/releases/3.4.2/cfe-3.4.2.src.tar.gz" + list_url = "http://llvm.org/releases/download.html" depends_on("llvm") - - version('3.4.2', '87945973b7c73038871c5f849a818588') + version('3.4.2', '87945973b7c73038871c5f849a818588', url='http://llvm.org/releases/3.4.2/cfe-3.4.2.src.tar.xz') def install(self, spec, prefix): env['CXXFLAGS'] = self.compiler.cxx11_flag diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index 69354a5c90..9d2be690bb 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -32,15 +32,13 @@ class Llvm(Package): it is the full name of the project. """ homepage = "http://llvm.org/" - url = "http://llvm.org/releases/3.4.2/llvm-3.4.2.src.tar.gz" + list_url = "http://llvm.org/releases/download.html" - version('3.4.2', 'a20669f75967440de949ac3b1bad439c') - version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', - url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') - version('2.9', '793138412d2af2c7c7f54615f8943771', - url='http://llvm.org/releases/2.9/llvm-2.9.tgz') - version('2.8', '220d361b4d17051ff4bb21c64abe05ba', - url='http://llvm.org/releases/2.8/llvm-2.8.tgz') + version('3.5.1', '2d3d8004f38852aa679e5945b8ce0b14', url='http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz') + version('3.4.2', 'a20669f75967440de949ac3b1bad439c', url='http://llvm.org/releases/3.4.2/llvm-3.4.2.src.tar.gz') + version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') + version('2.9', '793138412d2af2c7c7f54615f8943771', url='http://llvm.org/releases/2.9/llvm-2.9.tgz') + version('2.8', '220d361b4d17051ff4bb21c64abe05ba', url='http://llvm.org/releases/2.8/llvm-2.8.tgz') def install(self, spec, prefix): env['CXXFLAGS'] = self.compiler.cxx11_flag |