diff options
-rw-r--r-- | lib/spack/spack/cmd/compiler.py | 15 | ||||
-rw-r--r-- | lib/spack/spack/compilers/__init__.py | 43 | ||||
-rw-r--r-- | lib/spack/spack/test/__init__.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/test/cmd/test_compiler_cmd.py | 81 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/armadillo/package.py | 67 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/arpack/package.py | 40 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ferret/package.py | 103 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 7 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openmpi/package.py | 7 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/superlu/package.py | 54 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/tmux/package.py | 17 |
11 files changed, 386 insertions, 50 deletions
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 030aa77c30..c95045ef85 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -69,7 +69,7 @@ def setup_parser(subparser): help="Configuration scope to read from.") -def compiler_add(args): +def compiler_find(args): """Search either $PATH or a list of paths OR MODULES for compilers and add them to Spack's configuration.""" paths = args.add_paths @@ -78,7 +78,6 @@ def compiler_add(args): compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) if c.spec not in spack.compilers.all_compilers(scope=args.scope)] - if compilers: spack.compilers.add_compilers_to_config(compilers, scope=args.scope) n = len(compilers) @@ -93,7 +92,6 @@ def compiler_add(args): def compiler_remove(args): cspec = CompilerSpec(args.compiler_spec) compilers = spack.compilers.compilers_for_spec(cspec, scope=args.scope) - if not compilers: tty.die("No compilers match spec %s" % cspec) elif not args.all and len(compilers) > 1: @@ -137,9 +135,10 @@ def compiler_list(args): def compiler(parser, args): - action = { 'add' : compiler_add, - 'remove' : compiler_remove, - 'rm' : compiler_remove, - 'info' : compiler_info, - 'list' : compiler_list } + action = {'add' : compiler_find, + 'find' : compiler_find, + 'remove' : compiler_remove, + 'rm' : compiler_remove, + 'info' : compiler_info, + 'list' : compiler_list } action[args.compiler_command](args) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 4b546c2cbf..ae72b743b2 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -52,6 +52,7 @@ from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' _path_instance_vars = ['cc', 'cxx', 'f77', 'fc'] _other_instance_vars = ['modules', 'operating_system'] +_cache_config_file = [] # TODO: customize order in config file if platform.system() == 'Darwin': @@ -79,9 +80,7 @@ def _to_dict(compiler): if compiler.alias: d['alias'] = compiler.alias - return { - 'compiler': d - } + return {'compiler': d} def get_compiler_config(scope=None): @@ -99,7 +98,6 @@ def get_compiler_config(scope=None): # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. -# if (isinstance(arch, basestring) or arch == my_arch) and arch not in config: if not config: if scope is None: # We know no compilers were configured in any scope. @@ -112,8 +110,11 @@ def get_compiler_config(scope=None): if not site_config: init_compiler_config() config = spack.config.get_config('compilers', scope=scope) - - return config + return config + elif config: + return config + else: + return [] # Return empty list which we will later append to. def add_compilers_to_config(compilers, scope=None): @@ -126,7 +127,8 @@ def add_compilers_to_config(compilers, scope=None): compiler_config = get_compiler_config(scope) for compiler in compilers: compiler_config.append(_to_dict(compiler)) - + global _cache_config_file + _cache_config_file = compiler_config spack.config.update_config('compilers', compiler_config, scope) @@ -139,15 +141,17 @@ def remove_compiler_from_config(compiler_spec, scope=None): - scope: configuration scope to modify. """ compiler_config = get_compiler_config(scope) - matches = [(a,c) for (a,c) in compiler_config.items() if c['spec'] == compiler_spec] - if len(matches) == 1: - del compiler_config[matches[0][0]] - else: + config_length = len(compiler_config) + + filtered_compiler_config = [comp for comp in compiler_config + if spack.spec.CompilerSpec(comp['compiler']['spec']) != compiler_spec] + # Need a better way for this + global _cache_config_file + _cache_config_file = filtered_compiler_config # Update the cache for changes + if len(filtered_compiler_config) == config_length: # No items removed CompilerSpecInsufficientlySpecificError(compiler_spec) + spack.config.update_config('compilers', filtered_compiler_config, scope) - spack.config.update_config('compilers', compiler_config, scope) - -_cache_config_file = {} def all_compilers_config(scope=None): """Return a set of specs for all the compiler versions currently @@ -155,14 +159,13 @@ def all_compilers_config(scope=None): """ # Get compilers for this architecture. global _cache_config_file #Create a cache of the config file so we don't load all the time. - if not _cache_config_file: _cache_config_file = get_compiler_config(scope) return _cache_config_file - else: return _cache_config_file + def all_compilers(scope=None): # Return compiler specs from the merged config. return [spack.spec.CompilerSpec(s['compiler']['spec']) @@ -181,7 +184,7 @@ def default_compiler(): return sorted(versions)[-1] -def find_compilers(): +def find_compilers(*paths): """Return a list of compilers found in the suppied paths. This invokes the find_compilers() method for each operating system associated with the host platform, and appends @@ -190,11 +193,11 @@ def find_compilers(): # Find compilers for each operating system class oss = all_os_classes() compiler_lists = [] - for os in oss: - compiler_lists.extend(os.find_compilers()) - + for o in oss: + compiler_lists.extend(o.find_compilers(*paths)) return compiler_lists + def supported_compilers(): """Return a set of names of compilers supported by Spack. diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 97f142e746..fb91f24721 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -40,7 +40,7 @@ test_names = ['architecture', 'versions', 'url_parse', 'url_substitution', 'pack 'cc', 'link_tree', 'spec_yaml', 'optional_deps', 'make_executable', 'configure_guess', 'lock', 'database', 'namespace_trie', 'yaml', 'sbang', 'environment', 'cmd.find', - 'cmd.uninstall', 'cmd.test_install'] + 'cmd.uninstall', 'cmd.test_install', 'cmd.test_compiler_cmd'] def list_tests(): diff --git a/lib/spack/spack/test/cmd/test_compiler_cmd.py b/lib/spack/spack/test/cmd/test_compiler_cmd.py new file mode 100644 index 0000000000..d89814154b --- /dev/null +++ b/lib/spack/spack/test/cmd/test_compiler_cmd.py @@ -0,0 +1,81 @@ +import os +import shutil +from tempfile import mkdtemp + +from llnl.util.filesystem import set_executable, mkdirp + +import spack.spec +import spack.cmd.compiler +import spack.compilers +from spack.version import Version +from spack.test.mock_packages_test import * + +test_version = '4.5-spacktest' + +class MockArgs(object): + def __init__(self, add_paths=[], scope=None, compiler_spec=None, all=None): + self.add_paths = add_paths + self.scope = scope + self.compiler_spec = compiler_spec + self.all = all + + +def make_mock_compiler(): + """Make a directory containing a fake, but detectable compiler.""" + mock_compiler_dir = mkdtemp() + bin_dir = os.path.join(mock_compiler_dir, 'bin') + mkdirp(bin_dir) + + gcc_path = os.path.join(bin_dir, 'gcc') + gxx_path = os.path.join(bin_dir, 'g++') + gfortran_path = os.path.join(bin_dir, 'gfortran') + + with open(gcc_path, 'w') as f: + f.write("""\ +#!/bin/sh + +for arg in "$@"; do + if [ "$arg" = -dumpversion ]; then + echo '%s' + fi +done +""" % test_version) + + # Create some mock compilers in the temporary directory + set_executable(gcc_path) + shutil.copy(gcc_path, gxx_path) + shutil.copy(gcc_path, gfortran_path) + + return mock_compiler_dir + + +class CompilerCmdTest(MockPackagesTest): + """ Test compiler commands for add and remove """ + + + def test_compiler_remove(self): + args = MockArgs(all=True, compiler_spec='gcc@4.5.0') + spack.cmd.compiler.compiler_remove(args) + compilers = spack.compilers.all_compilers() + self.assertTrue(spack.spec.CompilerSpec("gcc@4.5.0") not in compilers) + + + def test_compiler_add(self): + # compilers available by default. + old_compilers = set(spack.compilers.all_compilers()) + + # add our new compiler and find again. + compiler_dir = make_mock_compiler() + + try: + args = MockArgs(add_paths=[compiler_dir]) + spack.cmd.compiler.compiler_find(args) + + # ensure new compiler is in there + new_compilers = set(spack.compilers.all_compilers()) + new_compiler = new_compilers - old_compilers + self.assertTrue(new_compiler) + self.assertTrue(new_compiler.pop().version == Version(test_version)) + + finally: + shutil.rmtree(compiler_dir, ignore_errors=True) diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py new file mode 100644 index 0000000000..b3e5994e30 --- /dev/null +++ b/var/spack/repos/builtin/packages/armadillo/package.py @@ -0,0 +1,67 @@ +############################################################################## +# 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 Armadillo(Package): + """Armadillo is a high quality linear algebra library (matrix maths) + for the C++ language, aiming towards a good balance between speed and + ease of use.""" + + homepage = "http://arma.sourceforge.net/" + url = "http://sourceforge.net/projects/arma/files/armadillo-7.200.1.tar.xz" + + version('7.200.1', 'ed86d6df0058979e107502e1fe3e469e') + + variant('hdf5', default=False, description='Include HDF5 support') + + depends_on('arpack') + depends_on('blas') + depends_on('lapack') + depends_on('superlu@5.2:') + depends_on('hdf5', when='+hdf5') + + def install(self, spec, prefix): + cmake_args = [ + # ARPACK support + '-DARPACK_LIBRARY={0}/libarpack.a'.format( + spec['arpack'].prefix.lib), + # BLAS support + '-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_shared_lib), + # LAPACK support + '-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_shared_lib), + # SuperLU support + '-DSuperLU_INCLUDE_DIR={0}'.format(spec['superlu'].prefix.include), + '-DSuperLU_LIBRARY={0}/libsuperlu.a'.format( + spec['superlu'].prefix.lib64), + # HDF5 support + '-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF') + ] + + cmake_args.extend(std_cmake_args) + cmake('.', *cmake_args) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/arpack/package.py b/var/spack/repos/builtin/packages/arpack/package.py index 75158776fe..91b5f06a4a 100644 --- a/var/spack/repos/builtin/packages/arpack/package.py +++ b/var/spack/repos/builtin/packages/arpack/package.py @@ -24,12 +24,12 @@ ############################################################################## from spack import * import os -import shutil + class Arpack(Package): """A collection of Fortran77 subroutines designed to solve large scale - eigenvalue problems. - """ + eigenvalue problems.""" + homepage = "http://www.caam.rice.edu/software/ARPACK/" url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz" @@ -39,27 +39,35 @@ class Arpack(Package): depends_on('lapack') def patch(self): - # Filter the cray makefile to make a spack one. - shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc') makefile = FileFilter('ARmake.inc') - # Be sure to use Spack F77 wrapper - makefile.filter('^FC.*', 'FC = f77') - makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g') + # Section 1: Paths and Libraries + + # Change the build directory + makefile.filter('^home.*', 'home = %s' % os.getcwd()) + + # Use external BLAS/LAPACK + makefile.filter('^BLASdir.*', + 'BLASdir = %s' % self.spec['blas'].prefix) + makefile.filter('^LAPACKdir.*', + 'LAPACKdir = %s' % self.spec['lapack'].prefix) + + # Do not include the platform in the library name + makefile.filter('^PLAT.*', 'PLAT = ') + makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = $(home)/libarpack.a') - # Set up some variables. - makefile.filter('^PLAT.*', 'PLAT = ') - makefile.filter('^home.*', 'home = %s' % os.getcwd()) - makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) - makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) + # Section 2: Compilers - # build the library in our own prefix. - makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd()) + # Be sure to use the Spack compiler wrapper + makefile.filter('^FC.*', 'FC = {0}'.format(os.environ['F77'])) + makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g -fPIC') + if not which('ranlib'): + makefile.filter('^RANLIB.*', 'RANLIB = touch') def install(self, spec, prefix): with working_dir('SRC'): make('all') - mkdirp(prefix.lib) + mkdir(prefix.lib) install('libarpack.a', prefix.lib) diff --git a/var/spack/repos/builtin/packages/ferret/package.py b/var/spack/repos/builtin/packages/ferret/package.py new file mode 100644 index 0000000000..15ddfcee16 --- /dev/null +++ b/var/spack/repos/builtin/packages/ferret/package.py @@ -0,0 +1,103 @@ +############################################################################## +# 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 Ferret(Package): + """Ferret is an interactive computer visualization and analysis environment + designed to meet the needs of oceanographers and meteorologists + analyzing large and complex gridded data sets.""" + homepage = "http://ferret.noaa.gov/Ferret/" + url = "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz" + + version('6.96', '51722027c864369f41bab5751dfff8cc', + url="ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz") + + depends_on("hdf5~mpi~fortran") + depends_on("netcdf~mpi") + depends_on("netcdf-fortran") + depends_on("readline") + depends_on("zlib") + + def patch(self): + hdf5_prefix = self.spec['hdf5'].prefix + netcdff_prefix = self.spec['netcdf-fortran'].prefix + readline_prefix = self.spec['readline'].prefix + libz_prefix = self.spec['zlib'].prefix + + filter_file(r'^BUILDTYPE.+', + 'BUILDTYPE = x86_64-linux', + 'FERRET/site_specific.mk') + filter_file(r'^INSTALL_FER_DIR.+', + 'INSTALL_FER_DIR = %s' % self.spec.prefix, + 'FERRET/site_specific.mk') + filter_file(r'^HDF5_DIR.+', + 'HDF5_DIR = %s' % hdf5_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^NETCDF4_DIR.+', + 'NETCDF4_DIR = %s' % netcdff_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^READLINE_DIR.+', + 'READLINE_DIR = %s' % readline_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^LIBZ_DIR.+', + 'LIBZ_DIR = %s' % libz_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^JAVA_HOME.+', + ' ', + 'FERRET/site_specific.mk') + filter_file(r'-lm', + '-lgfortran -lm', + 'FERRET/platform_specific.mk.x86_64-linux') + + def install(self, spec, prefix): + hdf5_prefix = spec['hdf5'].prefix + netcdff_prefix = spec['netcdf-fortran'].prefix + netcdf_prefix = spec['netcdf'].prefix + libz_prefix = spec['zlib'].prefix + ln = which('ln') + ln('-sf', + hdf5_prefix + '/lib', + hdf5_prefix + '/lib64') + ln('-sf', + netcdff_prefix + '/lib', + netcdff_prefix + '/lib64') + ln('-sf', + netcdf_prefix + '/lib/libnetcdf.a', + netcdff_prefix + '/lib/libnetcdf.a') + ln('-sf', + netcdf_prefix + '/lib/libnetcdf.la', + netcdff_prefix + '/lib/libnetcdf.la') + ln('-sf', + libz_prefix + '/lib', + libz_prefix + '/lib64') + os.environ['LDFLAGS'] = '-lquadmath' + with working_dir('FERRET', create=False): + os.environ['LD_X11'] = '-L/usr/lib/X11 -lX11' + os.environ['HOSTTYPE'] = 'x86_64-linux' + make(parallel=False) + make("install") diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 22e49daaa7..d09ebd6739 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -48,6 +48,13 @@ class Openblas(Package): patch('make.patch') def install(self, spec, prefix): + # As of 06/2016 there is no mechanism to specify that packages which + # depends on Blas/Lapack need C or/and Fortran symbols. For now + # require both. + if self.compiler.f77 is None: + raise InstallError('OpenBLAS requires both C and Fortran ', + 'compilers!') + # Configure fails to pick up fortran from FC=/abs/path/to/f77, but # works fine with FC=/abs/path/to/gfortran. # When mixing compilers make sure that diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 0638628a6c..be3d1342fc 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -121,6 +121,13 @@ class Openmpi(Package): return 'verbs' def install(self, spec, prefix): + # As of 06/2016 there is no mechanism to specify that packages which + # depends on MPI need C or/and Fortran implementation. For now + # require both. + if (self.compiler.f77 is None) or (self.compiler.fc is None): + raise InstallError('OpenMPI requires both C and Fortran ', + 'compilers!') + config_args = ["--prefix=%s" % prefix, "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py new file mode 100644 index 0000000000..c634c1d1ba --- /dev/null +++ b/var/spack/repos/builtin/packages/superlu/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 Superlu(Package): + """SuperLU is a general purpose library for the direct solution of large, + sparse, nonsymmetric systems of linear equations on high performance + machines. SuperLU is designed for sequential machines.""" + + homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu" + url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz" + + version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447') + + depends_on('blas') + + def install(self, spec, prefix): + cmake_args = [ + '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', + # BLAS support + '-Denable_blaslib=OFF', + '-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_shared_lib) + ] + + cmake_args.extend(std_cmake_args) + + with working_dir('spack-build', create=True): + cmake('..', *cmake_args) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py index c46425c0d3..573ee38a79 100644 --- a/var/spack/repos/builtin/packages/tmux/package.py +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -24,26 +24,33 @@ ############################################################################## from spack import * + class Tmux(Package): """tmux is a terminal multiplexer. What is a terminal multiplexer? It lets - you switch easily between several programs in one terminal, detach them (they - keep running in the background) and reattach them to a different terminal. And - do a lot more. + you switch easily between several programs in one terminal, detach them + (they keep running in the background) and reattach them to a different + terminal. And do a lot more. """ homepage = "http://tmux.github.io" - url = "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz" + url = "https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz" version('1.9a', 'b07601711f96f1d260b390513b509a2d') version('2.1', '74a2855695bccb51b6e301383ad4818c') + version('2.2', 'bd95ee7205e489c62c616bb7af040099') depends_on('libevent') depends_on('ncurses') def install(self, spec, prefix): + pkg_config_path = ':'.join([ + spec['libevent'].prefix, + spec['ncurses'].prefix + ]) + configure( "--prefix=%s" % prefix, - "PKG_CONFIG_PATH=%s:%s" % (spec['libevent'].prefix, spec['ncurses'].prefix)) + "PKG_CONFIG_PATH=%s" % pkg_config_path) make() make("install") |