diff options
24 files changed, 566 insertions, 277 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 3dc83f9b92..879beb2476 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -434,7 +434,7 @@ executables and other custom archive types), you can add .. code-block:: python version('8.2.1', '4136d7b4c04df68b686570afa26988ac', - url='http://example.com/foo-8.2.1-special-version.tar.gz', 'expand=False') + url='http://example.com/foo-8.2.1-special-version.tar.gz', expand=False) When ``expand`` is set to ``False``, Spack sets the current working directory to the directory containing the downloaded archive before it diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 4cf65222ae..36c91f6670 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -101,7 +101,7 @@ class Clang(Compiler): ver = match.group(1) + '-apple' else: # Normal clang compiler versions are left as-is - match = re.search(r'^clang version ([^ )]+)', output) + match = re.search(r'clang version ([^ )]+)', output) if match: ver = match.group(1) diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py deleted file mode 100644 index 8723f7244d..0000000000 --- a/lib/spack/spack/test/operating_system.py +++ /dev/null @@ -1,75 +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 -############################################################################## -""" Test checks if the operating_system class is created correctly and that -the functions are using the correct operating_system. Also checks whether -the operating_system correctly uses the compiler_strategy -""" -import unittest -from spack.platforms.cray_xc import CrayXc -from spack.platforms.linux import Linux -from spack.platforms.darwin import Darwin -from spack.operating_system.linux_distro import LinuxDistro -from spack.operating_system.cnl import ComputeNodeLinux - - -class TestOperatingSystem(unittest.TestCase): - - def setUp(self): - cray_xc = CrayXc() - linux = Linux() - darwin = Darwin() - self.cray_operating_sys = cray_xc.operating_system('front_os') - self.cray_default_os = cray_xc.operating_system('default_os') - self.cray_back_os = cray_xc.operating_system('back_os') - self.darwin_operating_sys = darwin.operating_system('default_os') - self.linux_operating_sys = linux.operating_system('default_os') - - def test_cray_front_end_operating_system(self): - self.assertIsInstance(self.cray_operating_sys, LinuxDistro) - - def test_cray_front_end_compiler_strategy(self): - self.assertEquals(self.cray_operating_sys.compiler_strategy, "PATH") - - def test_cray_back_end_operating_system(self): - self.assertIsInstance(self.cray_back_os, ComputeNodeLinux) - - def test_cray_back_end_compiler_strategy(self): - self.assertEquals(self.cray_back_os.compiler_strategy, "MODULES") - - def test_linux_operating_system(self): - self.assertIsInstance(self.linux_operating_sys, LinuxDistro) - - def test_linux_compiler_strategy(self): - self.assertEquals(self.linux_operating_sys.compiler_strategy, "PATH") - - def test_cray_front_end_compiler_list(self): - """ Operating systems will now be in charge of finding compilers. - So, depending on which operating system you want to build for - or which operating system you are on, then you could detect - compilers in a certain way. Cray linux environment on the front - end is just a regular linux distro whereas the Cray linux compute - node is a stripped down version which modules are important - """ - self.assertEquals(True, False) diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index e41cd0d471..ffc82313a5 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -21,6 +21,8 @@ changed=($(git diff --name-only --find-renames develop... -- '*.py')) changed+=($(git diff --name-only --find-renames --cached -- '*.py')) # Add changed files that are unstaged changed+=($(git diff --name-only --find-renames -- '*.py')) +# Add new files that are untracked +changed+=($(git ls-files --exclude-standard --other -- '*.py')) # Ensure that each file in the array is unique changed=($(printf '%s\n' "${changed[@]}" | sort -u)) diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py index b0ccba1009..61d4cc0cb4 100644 --- a/var/spack/repos/builtin/packages/ImageMagick/package.py +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -26,29 +26,14 @@ from spack import * class Imagemagick(Package): - """ImageMagick is a image processing library""" - homepage = "http://www.imagemagic.org" - - # ------------------------------------------------------------------------- - # 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") + """ImageMagick is a software suite to create, edit, compose, + or convert bitmap images.""" + + homepage = "http://www.imagemagick.org" + url = "https://github.com/ImageMagick/ImageMagick/archive/7.0.2-7.tar.gz" + + version('7.0.2-7', 'c59cdc8df50e481b2bd1afe09ac24c08') + version('7.0.2-6', 'aa5689129c39a5146a3212bf5f26d478') depends_on('jpeg') depends_on('libtool', type='build') @@ -56,8 +41,14 @@ class Imagemagick(Package): depends_on('freetype') depends_on('fontconfig') depends_on('libtiff') + depends_on('ghostscript') + + def url_for_version(self, version): + return "https://github.com/ImageMagick/ImageMagick/archive/{0}.tar.gz".format(version) def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure('--prefix={0}'.format(prefix)) + make() - make("install") + make('check') + make('install') diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py index 7400c3a56c..a2f04e5b35 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -34,7 +34,11 @@ class Cdo(Package): version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2') + variant('mpi', default=True) + depends_on('netcdf') + depends_on('netcdf+mpi', when='+mpi') + depends_on('netcdf~mpi', when='~mpi') def install(self, spec, prefix): configure('--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 915a0a1881..3be3948b59 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -36,6 +36,9 @@ class Gcc(Package): variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") + variant('piclibs', + default=False, + description="Build PIC versions of libgfortran.a and libstdc++.a") depends_on("mpfr") depends_on("gmp") @@ -53,6 +56,8 @@ class Gcc(Package): else: provides('golang', when='@4.7.1:') + patch('piclibs.patch', when='+piclibs') + def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', diff --git a/var/spack/repos/builtin/packages/gcc/piclibs.patch b/var/spack/repos/builtin/packages/gcc/piclibs.patch new file mode 100644 index 0000000000..0ecb793067 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/piclibs.patch @@ -0,0 +1,62 @@ +diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in +index 62b9f7a..7666fdb 100644 +--- a/libgfortran/Makefile.in ++++ b/libgfortran/Makefile.in +@@ -357,11 +357,11 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CPP = @CPP@ +-CPPFLAGS = @CPPFLAGS@ ++CPPFLAGS = @CPPFLAGS@ -fPIC + CYGPATH_W = @CYGPATH_W@ +-DEFS = @DEFS@ ++DEFS = @DEFS@ -fPIC + DEPDIR = @DEPDIR@ + DSYMUTIL = @DSYMUTIL@ + DUMPBIN = @DUMPBIN@ +@@ -371,7 +371,7 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FC = @FC@ +-FCFLAGS = @FCFLAGS@ ++FCFLAGS = @FCFLAGS@ -fPIC + FGREP = @FGREP@ + FPU_HOST_HEADER = @FPU_HOST_HEADER@ + GREP = @GREP@ +diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in +index bede542..9b3e442 100644 +--- a/libstdc++-v3/Makefile.in ++++ b/libstdc++-v3/Makefile.in +@@ -115,7 +115,7 @@ CC = @CC@ + CCODECVT_CC = @CCODECVT_CC@ + CCOLLATE_CC = @CCOLLATE_CC@ + CCTYPE_CC = @CCTYPE_CC@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CLOCALE_CC = @CLOCALE_CC@ + CLOCALE_H = @CLOCALE_H@ + CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@ +@@ -124,7 +124,7 @@ CMESSAGES_H = @CMESSAGES_H@ + CMONEY_CC = @CMONEY_CC@ + CNUMERIC_CC = @CNUMERIC_CC@ + CPP = @CPP@ +-CPPFLAGS = @CPPFLAGS@ ++CPPFLAGS = @CPPFLAGS@ -fPIC + CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@ + CPU_OPT_BITS_RANDOM = @CPU_OPT_BITS_RANDOM@ + CPU_OPT_EXT_RANDOM = @CPU_OPT_EXT_RANDOM@ +@@ -139,7 +139,7 @@ CYGPATH_W = @CYGPATH_W@ + C_INCLUDE_DIR = @C_INCLUDE_DIR@ + DBLATEX = @DBLATEX@ + DEBUG_FLAGS = @DEBUG_FLAGS@ +-DEFS = @DEFS@ ++DEFS = @DEFS@ -fPIC + DOT = @DOT@ + DOXYGEN = @DOXYGEN@ + DSYMUTIL = @DSYMUTIL@ +-- +2.8.3 + diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index c22b90088e..f63ebac0c1 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -26,16 +26,20 @@ from spack import * class Ghostscript(Package): - """an interpreter for the PostScript language and for PDF. """ + """An interpreter for the PostScript language and for PDF.""" + homepage = "http://ghostscript.com/" - url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.18.tar.gz" + url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.18.tar.gz" version('9.18', '33a47567d7a591c00a253caddd12a88a') parallel = False + depends_on('libtiff') + def install(self, spec, prefix): - configure("--prefix=%s" % prefix, "--enable-shared") + configure('--prefix={0}'.format(prefix), + '--with-system-libtiff') make() - make("install") + make('install') diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 536ce69236..6ccaa11c90 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -24,6 +24,8 @@ ############################################################################## from spack import * +import os +import sys class Julia(Package): @@ -33,31 +35,42 @@ class Julia(Package): version('master', git='https://github.com/JuliaLang/julia.git', branch='master') + version('release-0.5', + git='https://github.com/JuliaLang/julia.git', branch='release-0.5') version('release-0.4', git='https://github.com/JuliaLang/julia.git', branch='release-0.4') version('0.4.6', 'd88db18c579049c23ab8ef427ccedf5d', preferred=True) version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') + # TODO: Split these out into jl-hdf5, jl-mpi packages etc. + variant("cxx", default=False, description="Prepare for Julia Cxx package") + variant("hdf5", default=False, description="Install Julia HDF5 package") + variant("mpi", default=False, description="Install Julia MPI package") + variant("plot", default=False, + description="Install Julia plotting packages") + variant("python", default=False, + description="Install Julia Python package") + patch('gc.patch', when='@0.4:0.4.5') - patch('gc.patch', when='@release-0.4') patch('openblas.patch', when='@0.4:0.4.5') + variant('binutils', default=sys.platform != 'darwin', + description="Build via binutils") + # Build-time dependencies: - # depends_on("awk", type='build') - # depends_on("m4", type='build') - # depends_on("pkg-config", type='build') + # depends_on("awk") + depends_on("m4", type="build") + # depends_on("pkg-config") # Combined build-time and run-time dependencies: - depends_on("binutils", type=nolink) - depends_on("cmake @2.8:", type=nolink) - depends_on("git", type=nolink) - depends_on("openssl", type=nolink) - depends_on("python @2.7:2.999", type=nolink) - - # I think that Julia requires the dependencies above, but it - # builds fine (on my system) without these. We should enable them - # as necessary. + # (Yes, these are run-time dependencies used by Julia's package manager.) + depends_on("binutils", when='+binutils') + depends_on("cmake @2.8:") + depends_on("curl") + depends_on("git") # I think Julia @0.5: doesn't use git any more + depends_on("openssl") + depends_on("python @2.7:2.999") # Run-time dependencies: # depends_on("arpack") @@ -93,10 +106,15 @@ class Julia(Package): # USE_SYSTEM_LIBGIT2=0 # Run-time dependencies for Julia packages: - depends_on("hdf5", type='run') - depends_on("mpi", type='run') + depends_on("hdf5", when="+hdf5", type="run") + depends_on("mpi", when="+mpi", type="run") + depends_on("py-matplotlib", when="+plot", type="run") def install(self, spec, prefix): + # Julia needs git tags + if os.path.isfile(".git/shallow"): + git = which("git") + git("fetch", "--unshallow") # Explicitly setting CC, CXX, or FC breaks building libuv, one # of Julia's dependencies. This might be a Darwin-specific # problem. Given how Spack sets up compilers, Julia should @@ -107,12 +125,109 @@ class Julia(Package): # "CXX=c++", # "FC=fc", # "USE_SYSTEM_ARPACK=1", + "override USE_SYSTEM_CURL=1", # "USE_SYSTEM_FFTW=1", # "USE_SYSTEM_GMP=1", # "USE_SYSTEM_MPFR=1", # "USE_SYSTEM_PCRE=1", "prefix=%s" % prefix] + if "+cxx" in spec: + if "@master" not in spec: + raise InstallError( + "Variant +cxx requires the @master version of Julia") + options += [ + "BUILD_LLVM_CLANG=1", + "LLVM_ASSERTIONS=1", + "USE_LLVM_SHLIB=1"] with open('Make.user', 'w') as f: f.write('\n'.join(options) + '\n') make() make("install") + + # Julia's package manager needs a certificate + curl = which("curl") + cacert_file = join_path(prefix, "etc", "curl", "cacert.pem") + curl("--create-dirs", + "--output", cacert_file, + "https://curl.haxx.se/ca/cacert.pem") + + # Put Julia's compiler cache into a private directory + cachedir = join_path(prefix, "var", "julia", "cache") + mkdirp(cachedir) + + # Store Julia packages in a private directory + pkgdir = join_path(prefix, "var", "julia", "pkg") + mkdirp(pkgdir) + + # Configure Julia + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + if "@master" in spec or "@release-0.5" in spec: + # This is required for versions @0.5: + juliarc.write( + '# Point package manager to working certificates\n') + juliarc.write('LibGit2.set_ssl_cert_locations("%s")\n' % + cacert_file) + juliarc.write('\n') + juliarc.write('# Put compiler cache into a private directory\n') + juliarc.write('empty!(Base.LOAD_CACHE_PATH)\n') + juliarc.write('unshift!(Base.LOAD_CACHE_PATH, "%s")\n' % cachedir) + juliarc.write('\n') + juliarc.write('# Put Julia packages into a private directory\n') + juliarc.write('ENV["JULIA_PKGDIR"] = "%s"\n' % pkgdir) + juliarc.write('\n') + + # Install some commonly used packages + julia = Executable(join_path(prefix.bin, "julia")) + julia("-e", 'Pkg.init(); Pkg.update()') + + # Install HDF5 + if "+hdf5" in spec: + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + juliarc.write('# HDF5\n') + juliarc.write('push!(Libdl.DL_LOAD_PATH, "%s")\n' % + spec["hdf5"].prefix.lib) + juliarc.write('\n') + julia("-e", 'Pkg.add("HDF5"); using HDF5') + julia("-e", 'Pkg.add("JLD"); using JLD') + + # Install MPI + if "+mpi" in spec: + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + juliarc.write('# MPI\n') + juliarc.write('ENV["JULIA_MPI_C_COMPILER"] = "%s"\n' % + join_path(spec["mpi"].prefix.bin, "mpicc")) + juliarc.write('ENV["JULIA_MPI_Fortran_COMPILER"] = "%s"\n' % + join_path(spec["mpi"].prefix.bin, "mpifort")) + juliarc.write('\n') + julia("-e", 'Pkg.add("MPI"); using MPI') + + # Install Python + if "+python" in spec or "+plot" in spec: + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + juliarc.write('# Python\n') + juliarc.write('ENV["PYTHON"] = "%s"\n' % spec["python"].prefix) + juliarc.write('\n') + # Python's OpenSSL package installer complains: + # Error: PREFIX too long: 166 characters, but only 128 allowed + # Error: post-link failed for: openssl-1.0.2g-0 + julia("-e", 'Pkg.add("PyCall"); using PyCall') + + if "+plot" in spec: + julia("-e", 'Pkg.add("PyPlot"); using PyPlot') + julia("-e", 'Pkg.add("Colors"); using Colors') + # These require maybe Gtk and ImageMagick + julia("-e", 'Pkg.add("Plots"); using Plots') + julia("-e", 'Pkg.add("PlotRecipes"); using PlotRecipes') + julia("-e", 'Pkg.add("UnicodePlots"); using UnicodePlots') + julia("-e", """\ +using Plots +using UnicodePlots +unicodeplots() +plot(x->sin(x)*cos(x), linspace(0, 2pi)) +""") + + julia("-e", 'Pkg.status()') diff --git a/var/spack/repos/builtin/packages/mercurial/package.py b/var/spack/repos/builtin/packages/mercurial/package.py new file mode 100644 index 0000000000..e51069662f --- /dev/null +++ b/var/spack/repos/builtin/packages/mercurial/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 Mercurial(Package): + """Mercurial is a free, distributed source control management tool.""" + homepage = "https://www.mercurial-scm.org" + url = "https://www.mercurial-scm.org/release/mercurial-3.9.tar.gz" + + version('3.9' , 'e2b355da744e94747daae3a5339d28a0') + version('3.8.4', 'cec2c3db688cb87142809089c6ae13e9') + version('3.8.3', '97aced7018614eeccc9621a3dea35fda') + version('3.8.2', 'c38daa0cbe264fc621dc3bb05933b0b3') + version('3.8.1', '172a8c588adca12308c2aca16608d7f4') + + depends_on("python @2.6:2.7.999") + depends_on("py-docutils", type="build") + + def install(self, spec, prefix): + make('PREFIX=%s' % prefix, 'install') diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 17124a0572..54caf0e7e1 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -28,12 +28,14 @@ from spack import * class Mvapich2(Package): """MVAPICH2 is an MPI implementation for Infiniband networks.""" homepage = "http://mvapich.cse.ohio-state.edu/" - url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2b.tar.gz" - - version('2.2b', '5651e8b7a72d7c77ca68da48f3a5d108') - version('2.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2') - version('2.0', '9fbb68a4111a8b6338e476dc657388b4') - version('1.9', '5dc58ed08fd3142c260b70fe297e127c') + url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2rc2.tar.gz" + + version('2.2rc2', 'f9082ffc3b853ad1b908cf7f169aa878') + version('2.2b', '5651e8b7a72d7c77ca68da48f3a5d108') + version('2.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2') + version('2.1', '0095ceecb19bbb7fb262131cb9c2cdd6') + version('2.0', '9fbb68a4111a8b6338e476dc657388b4') + version('1.9', '5dc58ed08fd3142c260b70fe297e127c') patch('ad_lustre_rwcontig_open_source.patch', when='@1.9') diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py index 16d72b4593..a25d69d9f6 100644 --- a/var/spack/repos/builtin/packages/nco/package.py +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -36,8 +36,11 @@ class Nco(Package): # See "Compilation Requirements" at: # http://nco.sourceforge.net/#bld + variant('mpi', default=True) depends_on('netcdf') + depends_on('netcdf+mpi', when='+mpi') + depends_on('netcdf~mpi', when='~mpi') depends_on('antlr@2.7.7+cxx') # (required for ncap2) depends_on('gsl') # (desirable for ncap2) depends_on('udunits2') # (allows dimensional unit transformations) diff --git a/var/spack/repos/builtin/packages/opencoarrays/package.py b/var/spack/repos/builtin/packages/opencoarrays/package.py new file mode 100644 index 0000000000..0003157985 --- /dev/null +++ b/var/spack/repos/builtin/packages/opencoarrays/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 Opencoarrays(CMakePackage): + """ + OpenCoarrays is an open-source software project that produces an + application binary interface (ABI) supporting coarray Fortran (CAF) + compilers, an application programming interface (API) that supports users + of non-CAF compilers, and an associated compiler wrapper and program + launcher. + """ + + homepage = "http://www.opencoarrays.org/" + url = "https://github.com/sourceryinstitute/opencoarrays/releases/download/1.6.2/OpenCoarrays-1.6.2.tar.gz" + + version('1.6.2', '5a4da993794f3e04ea7855a6678981ba') + + depends_on('cmake', type='build') + depends_on('mpi') + + provides('coarrays') + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + args = std_cmake_args + args.append("-DCMAKE_C_COMPILER=%s" % self.spec['mpi'].mpicc) + args.append("-DCMAKE_Fortran_COMPILER=%s" % self.spec['mpi'].mpifc) + cmake('..', *args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 6f306ab0f9..a2236e682b 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -32,10 +32,10 @@ class Pcre(Package): homepage = "http://www.pcre.org""" url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2" - version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97') + version('8.39', 'e3fca7650a0556a2647821679d81f585') version('8.38', '00aabbfe56d5a48b270f999b508c5ad2') - patch("intel.patch") + patch("intel.patch", when='@8.38') variant('utf', default=True, description='Enable support for UTF-8/16/32, ' diff --git a/var/spack/repos/builtin/packages/py-cycler/package.py b/var/spack/repos/builtin/packages/py-cycler/package.py new file mode 100644 index 0000000000..16da057f21 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cycler/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 PyCycler(Package): + """Composable style cycles.""" + + homepage = "http://matplotlib.org/cycler/" + url = "https://github.com/matplotlib/cycler/archive/v0.10.0.tar.gz" + + version('0.10.0', '83dd0df7810e838b59e4dd9fa6e2d198') + + extends('python') + + depends_on('py-setuptools', type='build') + depends_on('py-six', type=nolink) + + def install(self, spec, prefix): + setup_py('install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index c454a47ec3..0b8ff4715d 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -27,55 +27,73 @@ import os class PyMatplotlib(Package): - """Python plotting package.""" + """matplotlib is a python 2D plotting library which produces publication + quality figures in a variety of hardcopy formats and interactive + environments across platforms.""" + homepage = "https://pypi.python.org/pypi/matplotlib" url = "https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.2.tar.gz" - version('1.4.2', '7d22efb6cce475025733c50487bd8898') + version('1.5.1', 'f51847d8692cb63df64cd0bd0304fd20') version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267') + version('1.4.2', '7d22efb6cce475025733c50487bd8898') - variant('gui', default=False, description='Enable GUI') + variant('gui', default=False, description='Enable GUI') variant('ipython', default=False, description='Enable ipython support') + # Python 2.7, 3.4, or 3.5 extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') - depends_on('py-setuptools', type='build') + # Required dependencies + depends_on('py-numpy@1.6:', type=nolink) + depends_on('py-setuptools', type='build') + depends_on('py-dateutil@1.1:', type=nolink) + depends_on('py-pyparsing', type=nolink) + depends_on('libpng@1.2:') + depends_on('py-pytz', type=nolink) + depends_on('freetype@2.3:') + depends_on('py-cycler@0.9:', type=nolink) + + # Optional GUI framework + depends_on('tk@8.3:', when='+gui') # not 8.6.0 or 8.6.1 + depends_on('qt', when='+gui') depends_on('py-pyside', when='+gui', type=nolink) - depends_on('py-ipython', when='+ipython', type=nolink) - depends_on('py-pyparsing', type=nolink) - depends_on('py-six', type=nolink) - depends_on('py-dateutil', type=nolink) - depends_on('py-pytz', type=nolink) - depends_on('py-nose', type=nolink) - depends_on('py-numpy', type=nolink) - depends_on('py-mock', type=nolink) - depends_on('py-pbr', type=nolink) - depends_on('py-funcsigs', type=nolink) + # TODO: Add more GUI dependencies + # Optional external programs + # ffmpeg/avconv or mencoder + depends_on('ImageMagick') + + # Optional dependencies + depends_on('py-pillow', type=nolink) depends_on('pkg-config', type='build') - depends_on('freetype') - depends_on('qt', when='+gui') - depends_on('bzip2') - depends_on('tcl', when='+gui') - depends_on('tk', when='+gui') - depends_on('qhull') + depends_on('py-ipython', when='+ipython') + + # Testing dependencies + depends_on('py-nose') # type='test' + depends_on('py-mock') # type='test' + + # Required libraries that ship with matplotlib + # depends_on('agg@2.4:') + depends_on('qhull@2012.1:') + # depends_on('ttconv') + depends_on('py-six@1.9.0:', type=nolink) def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) + setup_py('build') + setup_py('install', '--prefix={0}'.format(prefix)) - if str(self.version) in ['1.4.2', '1.4.3']: - # hack to fix configuration file + if '+gui' in spec: + # Set backend in matplotlib configuration file config_file = None for p, d, f in os.walk(prefix.lib): for file in f: if file.find('matplotlibrc') != -1: config_file = join_path(p, 'matplotlibrc') - print config_file - if config_file is None: - raise InstallError('could not find config file') - filter_file(r'backend : pyside', - 'backend : Qt4Agg', - config_file) - filter_file(r'#backend.qt4 : PyQt4', - 'backend.qt4 : PySide', - config_file) + if not config_file: + raise InstallError('Could not find matplotlibrc') + + kwargs = {'ignore_absent': False, 'backup': False, 'string': False} + rc = FileFilter(config_file) + rc.filter('^backend.*', 'backend : Qt4Agg', **kwargs) + rc.filter('^#backend.qt4.*', 'backend.qt4 : PySide', **kwargs) diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py index 1cb3e4745f..e575864fab 100644 --- a/var/spack/repos/builtin/packages/py-pyside/package.py +++ b/var/spack/repos/builtin/packages/py-pyside/package.py @@ -31,13 +31,16 @@ class PyPyside(Package): homepage = "https://pypi.python.org/pypi/pyside" url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz" - version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') + version('1.2.4', '3cb7174c13bd45e3e8f77638926cb8c0') # rpath problems + version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d', preferred=True) depends_on('cmake', type='build') extends('python') depends_on('py-setuptools', type='build') - depends_on('qt@:4') + depends_on('qt@4.5:4.9') + depends_on('libxml2@2.6.32:') + depends_on('libxslt@1.1.19:') def patch(self): """Undo PySide RPATH handling and add Spack RPATH.""" @@ -58,12 +61,23 @@ class PyPyside(Package): # PySide tries to patch ELF files to remove RPATHs # Disable this and go with the one we set. - filter_file( - r'^\s*rpath_cmd\(pyside_path, srcpath\)', - r'#rpath_cmd(pyside_path, srcpath)', - 'pyside_postinstall.py') + if self.spec.satisfies('@1.2.4:'): + rpath_file = 'setup.py' + else: + rpath_file = 'pyside_postinstall.py' + + filter_file(r'(^\s*)(rpath_cmd\(.*\))', r'\1#\2', rpath_file) + + # TODO: rpath handling for PySide 1.2.4 still doesn't work. + # PySide can't find the Shiboken library, even though it comes + # bundled with it and is installed in the same directory. + + # PySide does not provide official support for + # Python 3.5, but it should work fine + filter_file("'Programming Language :: Python :: 3.4'", + "'Programming Language :: Python :: 3.4',\r\n " + "'Programming Language :: Python :: 3.5'", + "setup.py") def install(self, spec, prefix): - python('setup.py', 'install', - '--prefix=%s' % prefix, - '--jobs=%s' % make_jobs) + setup_py('install', '--prefix=%s' % prefix, '--jobs=%s' % make_jobs) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index c4e6754969..57783b0542 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -133,6 +133,8 @@ class Python(Package): # TODO: Once better testing support is integrated, add the following tests # https://wiki.python.org/moin/TkInter # + # Note: Only works if ForwardX11Trusted is enabled, i.e. `ssh -Y` + # # if '+tk' in spec: # env['TK_LIBRARY'] = join_path(spec['tk'].prefix.lib, # 'tk{0}'.format(spec['tk'].version.up_to(2))) diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py index 2733d8b652..462a681ad9 100644 --- a/var/spack/repos/builtin/packages/qhull/package.py +++ b/var/spack/repos/builtin/packages/qhull/package.py @@ -37,16 +37,13 @@ class Qhull(Package): homepage = "http://www.qhull.org" - version('7.2.0', 'e6270733a826a6a7c32b796e005ec3dc', + version('2015.2', 'e6270733a826a6a7c32b796e005ec3dc', url="http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz") - version('1.0', 'd0f978c0d8dfb2e919caefa56ea2953c', + version('2012.1', 'd0f978c0d8dfb2e919caefa56ea2953c', url="http://www.qhull.org/download/qhull-2012.1-src.tgz") - # https://github.com/qhull/qhull/pull/5 - patch('qhull-iterator.patch', when='@1.0') - - depends_on('cmake', type='build') + depends_on('cmake@2.6:', type='build') def install(self, spec, prefix): with working_dir('spack-build', create=True): diff --git a/var/spack/repos/builtin/packages/qhull/qhull-iterator.patch b/var/spack/repos/builtin/packages/qhull/qhull-iterator.patch deleted file mode 100644 index 88e931d84f..0000000000 --- a/var/spack/repos/builtin/packages/qhull/qhull-iterator.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 93f4b306c54bb5be7724dcc19c6e747b62ac76dd Mon Sep 17 00:00:00 2001 -From: Ben Boeckel <mathstuf@gmail.com> -Date: Thu, 28 May 2015 11:12:25 -0400 -Subject: [PATCH] iterator: use the header - -Standard libraries are doing funky things with inline namespaces which -make these declarations impossible to get right. Just include the -header. ---- - src/libqhullcpp/QhullIterator.h | 3 +-- - src/libqhullcpp/QhullLinkedList.h | 5 +---- - 2 files changed, 2 insertions(+), 6 deletions(-) - -diff --git a/src/libqhullcpp/QhullIterator.h b/src/libqhullcpp/QhullIterator.h -index 9dde894..49f3a3b 100644 ---- a/src/libqhullcpp/QhullIterator.h -+++ b/src/libqhullcpp/QhullIterator.h -@@ -14,10 +14,9 @@ extern "C" { - } - - #include <assert.h> -+#include <iterator> - #include <string> - #include <vector> --//! Avoid dependence on <iterator> --namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; } - - namespace orgQhull { - -diff --git a/src/libqhullcpp/QhullLinkedList.h b/src/libqhullcpp/QhullLinkedList.h -index d828ac6..00b9008 100644 ---- a/src/libqhullcpp/QhullLinkedList.h -+++ b/src/libqhullcpp/QhullLinkedList.h -@@ -9,10 +9,7 @@ - #ifndef QHULLLINKEDLIST_H - #define QHULLLINKEDLIST_H - --namespace std { -- struct bidirectional_iterator_tag; -- struct random_access_iterator_tag; --}//std -+#include <iterator> - - #include "QhullError.h" - extern "C" { diff --git a/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch b/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch new file mode 100644 index 0000000000..e6a27d5fab --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch @@ -0,0 +1,17 @@ +--- a/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:34:44.517184658 -0500 ++++ b/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:36:42.371995567 -0500 +@@ -262,10 +262,10 @@ + m_buttonsMap[BTN_TR2] = QGamepadManager::ButtonR2; + m_buttonsMap[BTN_THUMB] = m_buttonsMap[BTN_THUMBL] = QGamepadManager::ButtonL3; + m_buttonsMap[BTN_THUMBR] = QGamepadManager::ButtonR3; +- m_buttonsMap[BTN_TRIGGER_HAPPY1] = QGamepadManager::ButtonLeft; +- m_buttonsMap[BTN_TRIGGER_HAPPY2] = QGamepadManager::ButtonRight; +- m_buttonsMap[BTN_TRIGGER_HAPPY3] = QGamepadManager::ButtonUp; +- m_buttonsMap[BTN_TRIGGER_HAPPY4] = QGamepadManager::ButtonDown; ++ m_buttonsMap[0x2c0] = QGamepadManager::ButtonLeft; ++ m_buttonsMap[0x2c1] = QGamepadManager::ButtonRight; ++ m_buttonsMap[0x2c2] = QGamepadManager::ButtonUp; ++ m_buttonsMap[0x2c3] = QGamepadManager::ButtonDown; + + if (m_productId) + m_backend->saveSettings(m_productId, QVariant()); diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 4239fa292b..436702fa4e 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -29,7 +29,11 @@ import os class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" homepage = 'http://qt.io' + url = 'http://download.qt.io/archive/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz' + list_url = 'http://download.qt.io/archive/qt/' + list_depth = 4 + version('5.7.0', '9a46cce61fc64c20c3ac0a0e0fa41b42') version('5.5.1', '59f0216819152b77536cf660b015d784') version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5') version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6') @@ -40,17 +44,18 @@ class Qt(Package): # Add patch for compile issues with qt3 found with use in the # OpenSpeedShop project - variant('krellpatch', default=False, - description="Build with openspeedshop based patch.") + variant('krellpatch', default=False, description="Build with openspeedshop based patch.") variant('mesa', default=False, description="Depend on mesa.") variant('gtk', default=False, description="Build with gtkplus.") patch('qt3krell.patch', when='@3.3.8b+krellpatch') + # https://github.com/xboxdrv/xboxdrv/issues/188 + patch('btn_trigger_happy.patch', when='@5.7.0:') + # Use system openssl for security. # depends_on("openssl") - depends_on("glib") depends_on("gtkplus", when='+gtk') depends_on("libxml2") depends_on("zlib") @@ -73,29 +78,33 @@ class Qt(Package): depends_on("libxcb") def url_for_version(self, version): - url = "http://download.qt.io/archive/qt/" + # URL keeps getting more complicated with every release + url = self.list_url + + if version >= Version('4.0'): + url += version.up_to(2) + '/' + else: + url += version.up_to(1) + '/' + + if version >= Version('4.8'): + url += str(version) + '/' if version >= Version('5'): - url += "%s/%s/single/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version, version) - elif version >= Version('4.8'): - url += "%s/%s/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version, version) - elif version >= Version('4.6'): - url += "%s/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version) - elif version >= Version('4.0'): - url += "%s/qt-x11-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version) - elif version >= Version('3'): - url += "%s/qt-x11-free-%s.tar.gz" % \ - (version.up_to(1), version) + url += 'single/' + + url += 'qt-' + + if version >= Version('4.6'): + url += 'everywhere-' elif version >= Version('2.1'): - url += "%s/qt-x11-%s.tar.gz" % \ - (version.up_to(1), version) - else: - url += "%s/qt-%s.tar.gz" % \ - (version.up_to(1), version) + url += 'x11-' + + if version >= Version('4.0'): + url += 'opensource-src-' + elif version >= Version('3'): + url += 'free-' + + url += str(version) + '.tar.gz' return url @@ -107,27 +116,34 @@ class Qt(Package): def patch(self): if self.spec.satisfies('@4'): - qmake_conf = 'mkspecs/common/g++-base.conf' - qmake_unix_conf = 'mkspecs/common/g++-unix.conf' - elif self.spec.satisfies('@5'): - qmake_conf = 'qtbase/mkspecs/common/g++-base.conf' - qmake_unix_conf = 'qtbase/mkspecs/common/g++-unix.conf' - else: - return - - # Fix qmake compilers in the default mkspec - filter_file(r'^QMAKE_COMPILER *=.*$', - 'QMAKE_COMPILER = cc', qmake_conf) - filter_file(r'^QMAKE_CC *=.*$', - 'QMAKE_CC = cc', qmake_conf) - filter_file(r'^QMAKE_CXX *=.*$', - 'QMAKE_CXX = c++', qmake_conf) - filter_file(r'^QMAKE_LFLAGS_NOUNDEF *\+?=.*$', - 'QMAKE_LFLAGS_NOUNDEF =', qmake_unix_conf) + # Fix qmake compilers in the default mkspec + filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', + 'mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', + 'mkspecs/common/g++-base.conf') + + # Necessary to build with GCC 6 and other modern compilers + # http://stackoverflow.com/questions/10354371/ + filter_file('(^QMAKE_CXXFLAGS .*)', r'\1 -std=gnu++98', + 'mkspecs/common/gcc-base.conf') + + filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', + 'mkspecs/common/g++-unix.conf') + elif self.spec.satisfies('@5:'): + # Fix qmake compilers in the default mkspec + filter_file('^QMAKE_COMPILER .*', 'QMAKE_COMPILER = cc', + 'qtbase/mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', + 'qtbase/mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', + 'qtbase/mkspecs/common/g++-base.conf') + + filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', + 'qtbase/mkspecs/common/g++-unix.conf') @property def common_config_args(self): - config_args = [ + return [ '-prefix', self.prefix, '-v', '-opensource', @@ -144,19 +160,12 @@ class Qt(Package): '-no-nis' ] - if '+gtk' in self.spec: - config_args.append('-gtkstyle') - else: - config_args.append('-no-gtkstyle') - - return config_args - # Don't disable all the database drivers, but should # really get them into spack at some point. @when('@3') def configure(self): - # An user report that this was necessary to link Qt3 on ubuntu + # A user reported that this was necessary to link Qt3 on ubuntu os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib' configure('-prefix', self.prefix, '-v', @@ -169,18 +178,27 @@ class Qt(Package): def configure(self): configure('-fast', '-no-webkit', + '{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'), *self.common_config_args) - @when('@5') + @when('@5.0:5.6') def configure(self): configure('-no-eglfs', '-no-directfb', '-qt-xcb', - # If someone wants to get a webkit build working, be my - # guest! + '{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'), '-skip', 'qtwebkit', *self.common_config_args) + @when('@5.7:') + def configure(self): + configure('-no-eglfs', + '-no-directfb', + '-qt-xcb', + '{0}-gtk'.format('' if '+gtk' in self.spec else '-no'), + '-skip', 'webengine', + *self.common_config_args) + def install(self, spec, prefix): self.configure() make() diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index 2eaff0a240..634d934938 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -37,16 +37,31 @@ class Qthreads(Package): either full or empty, and a thread can wait for any word to attain either state.""" homepage = "http://www.cs.sandia.gov/qthreads/" - url = "https://qthreads.googlecode.com/files/qthread-1.10.tar.bz2" - version('1.10', '5af8c8bbe88c2a6d45361643780d1671') + # Google Code has stopped serving tarballs + # We assume the tarballs will soon be available on Github instead + # url = "https://qthreads.googlecode.com/files/qthread-1.10.tar.bz2" + # version('1.10', '5af8c8bbe88c2a6d45361643780d1671') - patch("ldflags.patch") + # Temporarily install from a git branch + url = "https://github.com/Qthreads/qthreads" + version("1.10", + git="https://github.com/Qthreads/qthreads", + branch="release-1.10") + + # patch("ldflags.patch") patch("restrict.patch") patch("trap.patch") + depends_on("autoconf", type="build") + depends_on("hwloc") + def install(self, spec, prefix): + autogen = Executable("./autogen.sh") + autogen() configure("--prefix=%s" % prefix, - "--enable-guard-pages") + "--enable-guard-pages", + "--with-topology=hwloc", + "--with-hwloc=%s" % spec["hwloc"].prefix) make() make("install") |