summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.flake811
-rw-r--r--.gitignore5
-rw-r--r--.mailmap76
-rw-r--r--.travis.yml53
-rw-r--r--README.md20
-rwxr-xr-xbin/sbang8
-rwxr-xr-xbin/spack35
-rw-r--r--etc/spack/defaults/config.yaml68
-rw-r--r--etc/spack/defaults/darwin/packages.yaml18
-rw-r--r--etc/spack/defaults/packages.yaml2
-rw-r--r--lib/spack/docs/.gitignore1
-rw-r--r--lib/spack/docs/Makefile42
-rw-r--r--lib/spack/docs/_gh_pages_redirect/.nojekyll0
-rw-r--r--lib/spack/docs/_gh_pages_redirect/index.html10
-rw-r--r--lib/spack/docs/basic_usage.rst1387
-rw-r--r--lib/spack/docs/basic_usage_tutorial.rst1253
-rw-r--r--lib/spack/docs/build_settings.rst168
-rw-r--r--lib/spack/docs/command_index.in7
-rw-r--r--lib/spack/docs/conf.py69
-rw-r--r--lib/spack/docs/config_yaml.rst149
-rw-r--r--lib/spack/docs/configuration.rst468
-rw-r--r--lib/spack/docs/contribution_guide.rst522
-rw-r--r--lib/spack/docs/developer_guide.rst220
-rw-r--r--lib/spack/docs/features.rst51
-rw-r--r--lib/spack/docs/getting_started.rst1117
-rw-r--r--lib/spack/docs/index.rst41
-rw-r--r--lib/spack/docs/mirrors.rst141
-rw-r--r--lib/spack/docs/module_file_support.rst682
-rw-r--r--lib/spack/docs/module_file_tutorial.rst982
-rw-r--r--lib/spack/docs/package_tutorial.rst463
-rw-r--r--lib/spack/docs/packaging_guide.rst1642
-rw-r--r--lib/spack/docs/packaging_tutorial/0.package.py64
-rw-r--r--lib/spack/docs/packaging_tutorial/1.package.py49
-rw-r--r--lib/spack/docs/packaging_tutorial/2.package.py21
-rw-r--r--lib/spack/docs/packaging_tutorial/3.package.py17
-rw-r--r--lib/spack/docs/packaging_tutorial/4.package.py26
-rw-r--r--lib/spack/docs/workflows.rst1198
-rwxr-xr-xlib/spack/env/cc65
l---------lib/spack/env/clang/gfortran1
-rw-r--r--lib/spack/external/distro.py1049
-rw-r--r--lib/spack/llnl/util/filesystem.py258
-rw-r--r--lib/spack/llnl/util/lang.py16
-rw-r--r--lib/spack/llnl/util/lock.py142
-rw-r--r--lib/spack/llnl/util/tty/log.py238
-rw-r--r--lib/spack/spack/__init__.py185
-rw-r--r--lib/spack/spack/abi.py5
-rw-r--r--lib/spack/spack/architecture.py17
-rw-r--r--lib/spack/spack/build_environment.py286
-rw-r--r--lib/spack/spack/build_systems/__init__.py0
-rw-r--r--lib/spack/spack/build_systems/autotools.py183
-rw-r--r--lib/spack/spack/build_systems/cmake.py143
-rw-r--r--lib/spack/spack/build_systems/makefile.py77
-rw-r--r--lib/spack/spack/cmd/__init__.py20
-rw-r--r--lib/spack/spack/cmd/arch.py14
-rw-r--r--lib/spack/spack/cmd/bootstrap.py2
-rw-r--r--lib/spack/spack/cmd/build.py (renamed from lib/spack/spack/schema/targets.py)33
-rw-r--r--lib/spack/spack/cmd/checksum.py2
-rw-r--r--lib/spack/spack/cmd/common/arguments.py91
-rw-r--r--lib/spack/spack/cmd/compiler.py21
-rw-r--r--lib/spack/spack/cmd/config.py9
-rw-r--r--lib/spack/spack/cmd/configure.py90
-rw-r--r--lib/spack/spack/cmd/create.py245
-rw-r--r--lib/spack/spack/cmd/deactivate.py3
-rw-r--r--lib/spack/spack/cmd/debug.py100
-rw-r--r--lib/spack/spack/cmd/diy.py72
-rw-r--r--lib/spack/spack/cmd/extensions.py8
-rw-r--r--lib/spack/spack/cmd/find.py70
-rw-r--r--lib/spack/spack/cmd/flake8.py184
-rw-r--r--lib/spack/spack/cmd/graph.py46
-rw-r--r--lib/spack/spack/cmd/info.py18
-rw-r--r--lib/spack/spack/cmd/install.py302
-rw-r--r--lib/spack/spack/cmd/list.py138
-rw-r--r--lib/spack/spack/cmd/location.py5
-rw-r--r--lib/spack/spack/cmd/md5.py15
-rw-r--r--lib/spack/spack/cmd/module.py13
-rw-r--r--lib/spack/spack/cmd/package-list.py99
-rw-r--r--lib/spack/spack/cmd/purge.py10
-rw-r--r--lib/spack/spack/cmd/reindex.py4
-rw-r--r--lib/spack/spack/cmd/setup.py114
-rw-r--r--lib/spack/spack/cmd/spec.py39
-rw-r--r--lib/spack/spack/cmd/test-install.py245
-rw-r--r--lib/spack/spack/cmd/test.py2
-rw-r--r--lib/spack/spack/cmd/uninstall.py95
-rw-r--r--lib/spack/spack/cmd/url_parse.py (renamed from lib/spack/spack/cmd/url-parse.py)0
-rw-r--r--lib/spack/spack/compiler.py32
-rw-r--r--lib/spack/spack/compilers/__init__.py47
-rw-r--r--lib/spack/spack/compilers/clang.py129
-rw-r--r--lib/spack/spack/compilers/gcc.py9
-rw-r--r--lib/spack/spack/compilers/intel.py16
-rw-r--r--lib/spack/spack/compilers/nag.py10
-rw-r--r--lib/spack/spack/compilers/pgi.py8
-rw-r--r--lib/spack/spack/concretize.py91
-rw-r--r--lib/spack/spack/config.py215
-rw-r--r--lib/spack/spack/database.py237
-rw-r--r--lib/spack/spack/directives.py22
-rw-r--r--lib/spack/spack/directory_layout.py13
-rw-r--r--lib/spack/spack/environment.py19
-rw-r--r--lib/spack/spack/error.py37
-rw-r--r--lib/spack/spack/fetch_strategy.py162
-rw-r--r--lib/spack/spack/file_cache.py7
-rw-r--r--lib/spack/spack/graph.py133
-rw-r--r--lib/spack/spack/hooks/__init__.py14
-rw-r--r--lib/spack/spack/hooks/licensing.py5
-rw-r--r--lib/spack/spack/hooks/module_file_generation.py (renamed from lib/spack/spack/hooks/dotkit.py)10
-rw-r--r--lib/spack/spack/hooks/sbang.py12
-rw-r--r--lib/spack/spack/mirror.py72
-rw-r--r--lib/spack/spack/modules.py405
-rw-r--r--lib/spack/spack/multimethod.py12
-rw-r--r--lib/spack/spack/operating_systems/linux_distro.py11
-rw-r--r--lib/spack/spack/operating_systems/mac_os.py2
-rw-r--r--lib/spack/spack/package.py889
-rw-r--r--lib/spack/spack/patch.py118
-rw-r--r--lib/spack/spack/platforms/cray.py116
-rw-r--r--lib/spack/spack/platforms/darwin.py6
-rw-r--r--lib/spack/spack/platforms/linux.py5
-rw-r--r--lib/spack/spack/preferred_packages.py6
-rw-r--r--lib/spack/spack/provider_index.py21
-rw-r--r--lib/spack/spack/repository.py46
-rw-r--r--lib/spack/spack/schema/compilers.py36
-rw-r--r--lib/spack/spack/schema/config.py67
-rw-r--r--lib/spack/spack/schema/mirrors.py8
-rw-r--r--lib/spack/spack/schema/modules.py23
-rw-r--r--lib/spack/spack/schema/packages.py8
-rw-r--r--lib/spack/spack/schema/repos.py8
-rw-r--r--lib/spack/spack/spec.py419
-rw-r--r--lib/spack/spack/stage.py262
-rw-r--r--lib/spack/spack/store.py75
-rw-r--r--lib/spack/spack/test/__init__.py43
-rw-r--r--lib/spack/spack/test/cc.py68
-rw-r--r--lib/spack/spack/test/cmd/find.py2
-rw-r--r--lib/spack/spack/test/cmd/install.py (renamed from lib/spack/spack/test/cmd/test_install.py)71
-rw-r--r--lib/spack/spack/test/cmd/module.py2
-rw-r--r--lib/spack/spack/test/cmd/uninstall.py4
-rw-r--r--lib/spack/spack/test/concretize_preferences.py7
-rw-r--r--lib/spack/spack/test/config.py362
-rw-r--r--lib/spack/spack/test/data/sourceme_parameters.sh7
-rw-r--r--lib/spack/spack/test/database.py156
-rw-r--r--lib/spack/spack/test/directory_layout.py25
-rw-r--r--lib/spack/spack/test/environment.py44
-rw-r--r--lib/spack/spack/test/git_fetch.py13
-rw-r--r--lib/spack/spack/test/hg_fetch.py13
-rw-r--r--lib/spack/spack/test/install.py15
-rw-r--r--lib/spack/spack/test/library_list.py111
-rw-r--r--lib/spack/spack/test/lock.py223
-rw-r--r--lib/spack/spack/test/mirror.py7
-rw-r--r--lib/spack/spack/test/mock_database.py29
-rw-r--r--lib/spack/spack/test/mock_packages_test.py60
-rw-r--r--lib/spack/spack/test/modules.py432
-rw-r--r--lib/spack/spack/test/operating_system.py75
-rw-r--r--lib/spack/spack/test/provider_index.py2
-rw-r--r--lib/spack/spack/test/spack_yaml.py (renamed from lib/spack/spack/test/yaml.py)18
-rw-r--r--lib/spack/spack/test/spec_dag.py68
-rw-r--r--lib/spack/spack/test/spec_syntax.py54
-rw-r--r--lib/spack/spack/test/stage.py210
-rw-r--r--lib/spack/spack/test/svn_fetch.py13
-rw-r--r--lib/spack/spack/test/tally_plugin.py4
-rw-r--r--lib/spack/spack/test/versions.py4
-rw-r--r--lib/spack/spack/url.py6
-rw-r--r--lib/spack/spack/util/compression.py8
-rw-r--r--lib/spack/spack/util/crypto.py21
-rw-r--r--lib/spack/spack/util/environment.py18
-rw-r--r--lib/spack/spack/util/executable.py94
-rw-r--r--lib/spack/spack/util/path.py72
-rw-r--r--lib/spack/spack/util/pattern.py18
-rw-r--r--lib/spack/spack/util/spack_yaml.py15
-rw-r--r--lib/spack/spack/util/web.py11
-rw-r--r--lib/spack/spack/version.py128
-rw-r--r--share/spack/csh/convert-pyext.sh5
-rwxr-xr-xshare/spack/qa/changed_files31
-rwxr-xr-xshare/spack/qa/check_dependencies96
-rwxr-xr-xshare/spack/qa/run-doc-tests41
-rwxr-xr-xshare/spack/qa/run-flake884
-rwxr-xr-xshare/spack/qa/run-flake8-tests29
-rwxr-xr-xshare/spack/qa/run-unit-tests42
-rwxr-xr-xshare/spack/setup-env.sh6
-rw-r--r--var/spack/repos/builtin.mock/packages/develop-test/package.py37
-rw-r--r--var/spack/repos/builtin.mock/packages/externalvirtual/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/othervirtual/package.py (renamed from lib/spack/spack/hooks/tclmodule.py)16
-rw-r--r--var/spack/repos/builtin/packages/ImageMagick/package.py40
-rw-r--r--var/spack/repos/builtin/packages/R/package.py2
-rw-r--r--var/spack/repos/builtin/packages/abinit/package.py175
-rw-r--r--var/spack/repos/builtin/packages/adios/adios_1100.patch29
-rw-r--r--var/spack/repos/builtin/packages/adios/package.py130
-rw-r--r--var/spack/repos/builtin/packages/ant/package.py44
-rw-r--r--var/spack/repos/builtin/packages/antlr/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ape/package.py7
-rw-r--r--var/spack/repos/builtin/packages/applewmproto/package.py46
-rw-r--r--var/spack/repos/builtin/packages/appres/package.py50
-rw-r--r--var/spack/repos/builtin/packages/armadillo/package.py15
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/package.py38
-rw-r--r--var/spack/repos/builtin/packages/asciidoc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/astyle/package.py28
-rw-r--r--var/spack/repos/builtin/packages/atk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/atlas/package.py39
-rw-r--r--var/spack/repos/builtin/packages/atompaw/package.py63
-rw-r--r--var/spack/repos/builtin/packages/autoconf/package.py13
-rw-r--r--var/spack/repos/builtin/packages/bamtools/package.py45
-rw-r--r--var/spack/repos/builtin/packages/bash-completion/package.py64
-rw-r--r--var/spack/repos/builtin/packages/bazel/cc_configure.patch28
-rw-r--r--var/spack/repos/builtin/packages/bazel/fix_env_handling.patch119
-rw-r--r--var/spack/repos/builtin/packages/bazel/link.patch133
-rw-r--r--var/spack/repos/builtin/packages/bazel/package.py89
-rw-r--r--var/spack/repos/builtin/packages/bdftopcf/package.py50
-rw-r--r--var/spack/repos/builtin/packages/bedtools2/package.py43
-rw-r--r--var/spack/repos/builtin/packages/beforelight/package.py50
-rw-r--r--var/spack/repos/builtin/packages/bigreqsproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py4
-rw-r--r--var/spack/repos/builtin/packages/bitmap/package.py51
-rw-r--r--var/spack/repos/builtin/packages/bliss/Makefile.spack.patch62
-rw-r--r--var/spack/repos/builtin/packages/bliss/package.py50
-rw-r--r--var/spack/repos/builtin/packages/blitz/package.py11
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py89
-rw-r--r--var/spack/repos/builtin/packages/bpp-core/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-phyl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-seq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-suite/package.py5
-rw-r--r--var/spack/repos/builtin/packages/cairo/package.py13
-rw-r--r--var/spack/repos/builtin/packages/caliper/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cantera/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cask/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cbtf-argonavis/package.py7
-rw-r--r--var/spack/repos/builtin/packages/cbtf-krell/package.py28
-rw-r--r--var/spack/repos/builtin/packages/cbtf-lanl/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cbtf/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cdd/Makefile.spack.patch22
-rw-r--r--var/spack/repos/builtin/packages/cdd/package.py52
-rw-r--r--var/spack/repos/builtin/packages/cddlib/package.py58
-rw-r--r--var/spack/repos/builtin/packages/cdo/package.py83
-rw-r--r--var/spack/repos/builtin/packages/cereal/package.py1
-rw-r--r--var/spack/repos/builtin/packages/cfitsio/package.py9
-rw-r--r--var/spack/repos/builtin/packages/cgal/package.py92
-rw-r--r--var/spack/repos/builtin/packages/charm/mpi.patch19
-rw-r--r--var/spack/repos/builtin/packages/charm/package.py190
-rw-r--r--var/spack/repos/builtin/packages/charm/strictpass.patch16
-rw-r--r--var/spack/repos/builtin/packages/cityhash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/clhep/darwin/CLHEP.patch11
-rw-r--r--var/spack/repos/builtin/packages/clhep/package.py81
-rw-r--r--var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch23
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py61
-rw-r--r--var/spack/repos/builtin/packages/compiz/package.py63
-rw-r--r--var/spack/repos/builtin/packages/compositeproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/constype/package.py47
-rw-r--r--var/spack/repos/builtin/packages/converge/package.py69
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py74
-rw-r--r--var/spack/repos/builtin/packages/cryptopp/package.py9
-rw-r--r--var/spack/repos/builtin/packages/cube/package.py17
-rw-r--r--var/spack/repos/builtin/packages/cuda/package.py2
-rw-r--r--var/spack/repos/builtin/packages/curl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/daal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/damageproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/darshan-runtime/package.py65
-rw-r--r--var/spack/repos/builtin/packages/darshan-util/package.py41
-rw-r--r--var/spack/repos/builtin/packages/datamash/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py162
-rw-r--r--var/spack/repos/builtin/packages/dmxproto/package.py46
-rw-r--r--var/spack/repos/builtin/packages/dri2proto/package.py19
-rw-r--r--var/spack/repos/builtin/packages/dri3proto/package.py46
-rw-r--r--var/spack/repos/builtin/packages/dyninst/package.py52
-rw-r--r--var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch11
-rw-r--r--var/spack/repos/builtin/packages/dyninst/stat_dysect.patch96
-rw-r--r--var/spack/repos/builtin/packages/editres/package.py48
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py14
-rw-r--r--var/spack/repos/builtin/packages/elk/package.py6
-rw-r--r--var/spack/repos/builtin/packages/elpa/package.py31
-rw-r--r--var/spack/repos/builtin/packages/encodings/package.py50
-rw-r--r--var/spack/repos/builtin/packages/environment-modules/package.py33
-rw-r--r--var/spack/repos/builtin/packages/espresso/package.py7
-rw-r--r--var/spack/repos/builtin/packages/etsf_io/package.py67
-rw-r--r--var/spack/repos/builtin/packages/everytrace-example/package.py43
-rw-r--r--var/spack/repos/builtin/packages/everytrace/package.py52
-rw-r--r--var/spack/repos/builtin/packages/evieext/package.py45
-rw-r--r--var/spack/repos/builtin/packages/exodusii/cmake-exodus.patch9
-rw-r--r--var/spack/repos/builtin/packages/exodusii/exodus-cmake.patch12
-rw-r--r--var/spack/repos/builtin/packages/exodusii/package.py61
-rw-r--r--var/spack/repos/builtin/packages/expat/package.py17
-rw-r--r--var/spack/repos/builtin/packages/extrae/package.py10
-rw-r--r--var/spack/repos/builtin/packages/fenics/hdf5~cxx-detection.patch11
-rw-r--r--var/spack/repos/builtin/packages/fenics/package.py37
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py37
-rw-r--r--var/spack/repos/builtin/packages/fftw/pfft-3.3.4.patch865
-rw-r--r--var/spack/repos/builtin/packages/fftw/pfft-3.3.5.patch858
-rw-r--r--var/spack/repos/builtin/packages/fish/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fixesproto/package.py46
-rw-r--r--var/spack/repos/builtin/packages/flint/package.py66
-rw-r--r--var/spack/repos/builtin/packages/font-adobe-100dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-adobe-75dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-adobe-utopia-100dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-adobe-utopia-75dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-adobe-utopia-type1/package.py51
-rw-r--r--var/spack/repos/builtin/packages/font-alias/package.py49
-rw-r--r--var/spack/repos/builtin/packages/font-arabic-misc/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-bh-100dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-bh-75dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-bh-lucidatypewriter-100dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-bh-lucidatypewriter-75dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-bh-ttf/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-bh-type1/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-bitstream-100dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-bitstream-75dpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-bitstream-speedo/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-bitstream-type1/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-cronyx-cyrillic/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-cursor-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-daewoo-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-dec-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-ibm-type1/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-isas-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-jis-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-micro-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-misc-cyrillic/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-misc-ethiopic/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-misc-meltho/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-misc-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-mutt-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-schumacher-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-screen-cyrillic/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-sony-misc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-sun-misc/package.py52
-rw-r--r--var/spack/repos/builtin/packages/font-util/package.py43
-rw-r--r--var/spack/repos/builtin/packages/font-winitzki-cyrillic/package.py53
-rw-r--r--var/spack/repos/builtin/packages/font-xfree86-type1/package.py52
-rw-r--r--var/spack/repos/builtin/packages/fontcacheproto/package.py39
-rw-r--r--var/spack/repos/builtin/packages/fontconfig/package.py11
-rw-r--r--var/spack/repos/builtin/packages/fontsproto/package.py42
-rw-r--r--var/spack/repos/builtin/packages/fonttosfnt/package.py47
-rw-r--r--var/spack/repos/builtin/packages/fslsfonts/package.py46
-rw-r--r--var/spack/repos/builtin/packages/fstobdf/package.py50
-rw-r--r--var/spack/repos/builtin/packages/gcc/gcc-backport.patch138
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py30
-rw-r--r--var/spack/repos/builtin/packages/gcc/piclibs.patch62
-rw-r--r--var/spack/repos/builtin/packages/gccmakedep/package.py42
-rw-r--r--var/spack/repos/builtin/packages/gconf/package.py51
-rw-r--r--var/spack/repos/builtin/packages/gdal/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gdb/package.py18
-rw-r--r--var/spack/repos/builtin/packages/geant4/package.py85
-rw-r--r--var/spack/repos/builtin/packages/ghostscript-fonts/package.py37
-rw-r--r--var/spack/repos/builtin/packages/ghostscript/package.py12
-rw-r--r--var/spack/repos/builtin/packages/git-lfs/package.py53
-rw-r--r--var/spack/repos/builtin/packages/git/package.py23
-rw-r--r--var/spack/repos/builtin/packages/glew/package.py (renamed from var/spack/repos/builtin/packages/icu/package.py)37
-rw-r--r--var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch16
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py23
-rw-r--r--var/spack/repos/builtin/packages/globus_toolkit/package.py40
-rw-r--r--var/spack/repos/builtin/packages/glproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/gmake/package.py42
-rw-r--r--var/spack/repos/builtin/packages/gmp/package.py23
-rw-r--r--var/spack/repos/builtin/packages/gmsh/package.py10
-rw-r--r--var/spack/repos/builtin/packages/go-bootstrap/package.py56
-rw-r--r--var/spack/repos/builtin/packages/go/package.py57
-rw-r--r--var/spack/repos/builtin/packages/gobject-introspection/package.py51
-rw-r--r--var/spack/repos/builtin/packages/gource/package.py63
-rw-r--r--var/spack/repos/builtin/packages/gperf/package.py6
-rw-r--r--var/spack/repos/builtin/packages/grackle/Make.mach.template71
-rw-r--r--var/spack/repos/builtin/packages/grackle/package.py89
-rw-r--r--var/spack/repos/builtin/packages/grandr/package.py45
-rw-r--r--var/spack/repos/builtin/packages/graphlib/package.py5
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py19
-rw-r--r--var/spack/repos/builtin/packages/grib-api/package.py80
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py23
-rw-r--r--var/spack/repos/builtin/packages/gsl/package.py1
-rw-r--r--var/spack/repos/builtin/packages/gtkplus/package.py1
-rw-r--r--var/spack/repos/builtin/packages/h5hut/package.py70
-rw-r--r--var/spack/repos/builtin/packages/hadoop/package.py53
-rw-r--r--var/spack/repos/builtin/packages/harfbuzz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hdf/package.py30
-rw-r--r--var/spack/repos/builtin/packages/hdf5-blosc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py69
-rw-r--r--var/spack/repos/builtin/packages/hepmc/package.py55
-rw-r--r--var/spack/repos/builtin/packages/heppdt/package.py48
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit-externals/package.py39
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit/package.py55
-rw-r--r--var/spack/repos/builtin/packages/hpl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hpx5/package.py5
-rw-r--r--var/spack/repos/builtin/packages/hsakmt/package.py41
-rw-r--r--var/spack/repos/builtin/packages/htop/package.py41
-rw-r--r--var/spack/repos/builtin/packages/hwloc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/hypre/package.py19
-rw-r--r--var/spack/repos/builtin/packages/ibmisc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/iceauth/package.py48
-rw-r--r--var/spack/repos/builtin/packages/ico/package.py49
-rw-r--r--var/spack/repos/builtin/packages/icu4c/package.py24
-rw-r--r--var/spack/repos/builtin/packages/imake/package.py43
-rw-r--r--var/spack/repos/builtin/packages/inputproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/intel-gpu-tools/package.py67
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py132
-rw-r--r--var/spack/repos/builtin/packages/intel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ipopt/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ipp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/itstool/package.py44
-rw-r--r--var/spack/repos/builtin/packages/jansson/package.py37
-rw-r--r--var/spack/repos/builtin/packages/jdk/package.py32
-rw-r--r--var/spack/repos/builtin/packages/jemalloc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jsoncpp/package.py49
-rw-r--r--var/spack/repos/builtin/packages/julia/package.py150
-rw-r--r--var/spack/repos/builtin/packages/kbproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/launchmon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lbxproxy/package.py58
-rw-r--r--var/spack/repos/builtin/packages/libapplewm/package.py54
-rw-r--r--var/spack/repos/builtin/packages/libarchive/package.py20
-rw-r--r--var/spack/repos/builtin/packages/libcerf/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libdmx/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libdrm/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libelf/package.py17
-rw-r--r--var/spack/repos/builtin/packages/libemos/package.py52
-rw-r--r--var/spack/repos/builtin/packages/libfontenc/package.py46
-rw-r--r--var/spack/repos/builtin/packages/libfs/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libgd/package.py35
-rw-r--r--var/spack/repos/builtin/packages/libice/package.py45
-rw-r--r--var/spack/repos/builtin/packages/libiconv/gets.patch13
-rw-r--r--var/spack/repos/builtin/packages/libiconv/package.py19
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py104
-rw-r--r--var/spack/repos/builtin/packages/libjpeg-turbo/package.py19
-rw-r--r--var/spack/repos/builtin/packages/liblbxutil/package.py51
-rw-r--r--var/spack/repos/builtin/packages/libmesh/package.py42
-rw-r--r--var/spack/repos/builtin/packages/liboldx/package.py45
-rw-r--r--var/spack/repos/builtin/packages/libpciaccess/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libpng/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libpthread-stubs/package.py16
-rw-r--r--var/spack/repos/builtin/packages/libquo/package.py68
-rw-r--r--var/spack/repos/builtin/packages/libsigsegv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess1187
-rw-r--r--var/spack/repos/builtin/packages/libsm/package.py47
-rw-r--r--var/spack/repos/builtin/packages/libsodium/package.py10
-rw-r--r--var/spack/repos/builtin/packages/libsplash/package.py64
-rw-r--r--var/spack/repos/builtin/packages/libtiff/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libuuid/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libwebsockets/package.py40
-rw-r--r--var/spack/repos/builtin/packages/libwindowswm/package.py53
-rw-r--r--var/spack/repos/builtin/packages/libx11/package.py51
-rw-r--r--var/spack/repos/builtin/packages/libxau/package.py21
-rw-r--r--var/spack/repos/builtin/packages/libxaw/package.py52
-rw-r--r--var/spack/repos/builtin/packages/libxaw3d/package.py50
-rw-r--r--var/spack/repos/builtin/packages/libxc/package.py21
-rw-r--r--var/spack/repos/builtin/packages/libxcb/package.py25
-rw-r--r--var/spack/repos/builtin/packages/libxcomposite/package.py48
-rw-r--r--var/spack/repos/builtin/packages/libxcursor/package.py48
-rw-r--r--var/spack/repos/builtin/packages/libxdamage/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxdmcp/package.py45
-rw-r--r--var/spack/repos/builtin/packages/libxevie/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxext/package.py47
-rw-r--r--var/spack/repos/builtin/packages/libxfixes/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxfont/package.py54
-rw-r--r--var/spack/repos/builtin/packages/libxfont2/package.py54
-rw-r--r--var/spack/repos/builtin/packages/libxfontcache/package.py48
-rw-r--r--var/spack/repos/builtin/packages/libxft/package.py52
-rw-r--r--var/spack/repos/builtin/packages/libxi/package.py48
-rw-r--r--var/spack/repos/builtin/packages/libxinerama/package.py48
-rw-r--r--var/spack/repos/builtin/packages/libxkbfile/package.py46
-rw-r--r--var/spack/repos/builtin/packages/libxkbui/package.py47
-rw-r--r--var/spack/repos/builtin/packages/libxml2/package.py16
-rw-r--r--var/spack/repos/builtin/packages/libxmu/package.py51
-rw-r--r--var/spack/repos/builtin/packages/libxp/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxpm/package.py14
-rw-r--r--var/spack/repos/builtin/packages/libxpresent/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxprintapputil/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxprintutil/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxrandr/package.py50
-rw-r--r--var/spack/repos/builtin/packages/libxrender/package.py46
-rw-r--r--var/spack/repos/builtin/packages/libxres/package.py48
-rw-r--r--var/spack/repos/builtin/packages/libxscrnsaver/package.py48
-rw-r--r--var/spack/repos/builtin/packages/libxshmfence/package.py18
-rw-r--r--var/spack/repos/builtin/packages/libxstream/package.py50
-rw-r--r--var/spack/repos/builtin/packages/libxt/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxtrap/package.py58
-rw-r--r--var/spack/repos/builtin/packages/libxtst/package.py59
-rw-r--r--var/spack/repos/builtin/packages/libxv/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxvmc/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxxf86dga/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxxf86misc/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libxxf86vm/package.py49
-rw-r--r--var/spack/repos/builtin/packages/listres/package.py49
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py155
-rw-r--r--var/spack/repos/builtin/packages/lmod/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lndir/package.py44
-rw-r--r--var/spack/repos/builtin/packages/lrslib/Makefile.spack.patch60
-rw-r--r--var/spack/repos/builtin/packages/lrslib/package.py61
-rw-r--r--var/spack/repos/builtin/packages/lua-luafilesystem/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lua/package.py6
-rw-r--r--var/spack/repos/builtin/packages/luit/package.py51
-rw-r--r--var/spack/repos/builtin/packages/lulesh/package.py55
-rw-r--r--var/spack/repos/builtin/packages/lulesh/remove_defaults.patch60
-rw-r--r--var/spack/repos/builtin/packages/lz4/package.py45
-rw-r--r--var/spack/repos/builtin/packages/lzma/package.py41
-rw-r--r--var/spack/repos/builtin/packages/lzo/package.py13
-rw-r--r--var/spack/repos/builtin/packages/m4/package.py6
-rw-r--r--var/spack/repos/builtin/packages/magics/no_hardcoded_python.patch5
-rw-r--r--var/spack/repos/builtin/packages/magics/package.py115
-rw-r--r--var/spack/repos/builtin/packages/magics/resolve_isnan_ambiguity.patch73
-rw-r--r--var/spack/repos/builtin/packages/makedepend/package.py44
-rw-r--r--var/spack/repos/builtin/packages/matio/package.py23
-rw-r--r--var/spack/repos/builtin/packages/maven/package.py41
-rw-r--r--var/spack/repos/builtin/packages/mbedtls/package.py1
-rw-r--r--var/spack/repos/builtin/packages/mercurial/package.py69
-rw-r--r--var/spack/repos/builtin/packages/mesa/package.py44
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py157
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py73
-rw-r--r--var/spack/repos/builtin/packages/mkfontdir/package.py47
-rw-r--r--var/spack/repos/builtin/packages/mkfontscale/package.py48
-rw-r--r--var/spack/repos/builtin/packages/mkl/package.py58
-rw-r--r--var/spack/repos/builtin/packages/moab/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mpc/package.py6
-rw-r--r--var/spack/repos/builtin/packages/mpfr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py116
-rw-r--r--var/spack/repos/builtin/packages/mpip/package.py44
-rw-r--r--var/spack/repos/builtin/packages/mpir/package.py62
-rw-r--r--var/spack/repos/builtin/packages/mrnet/package.py11
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py21
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py22
-rw-r--r--var/spack/repos/builtin/packages/mxml/package.py5
-rw-r--r--var/spack/repos/builtin/packages/nag/package.py6
-rw-r--r--var/spack/repos/builtin/packages/nano/package.py (renamed from var/spack/repos/builtin/packages/xorg-util-macros/package.py)13
-rw-r--r--var/spack/repos/builtin/packages/nauty/package.py89
-rw-r--r--var/spack/repos/builtin/packages/ncdu/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ncl/package.py233
-rw-r--r--var/spack/repos/builtin/packages/ncl/spack_ncl.patch30
-rw-r--r--var/spack/repos/builtin/packages/nco/package.py19
-rw-r--r--var/spack/repos/builtin/packages/ncurses/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ncview/package.py15
-rw-r--r--var/spack/repos/builtin/packages/netcdf/package.py49
-rw-r--r--var/spack/repos/builtin/packages/netlib-lapack/package.py47
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py46
-rw-r--r--var/spack/repos/builtin/packages/nettle/package.py11
-rw-r--r--var/spack/repos/builtin/packages/nmap/package.py37
-rw-r--r--var/spack/repos/builtin/packages/nwchem/package.py170
-rw-r--r--var/spack/repos/builtin/packages/oce/package.py5
-rw-r--r--var/spack/repos/builtin/packages/oce/sierra.patch45
-rw-r--r--var/spack/repos/builtin/packages/oclock/package.py50
-rw-r--r--var/spack/repos/builtin/packages/octopus/package.py19
-rw-r--r--var/spack/repos/builtin/packages/opari2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/openblas/openblas_icc.patch253
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py55
-rw-r--r--var/spack/repos/builtin/packages/opencoarrays/package.py51
-rw-r--r--var/spack/repos/builtin/packages/opencv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/openjpeg/package.py15
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py48
-rw-r--r--var/spack/repos/builtin/packages/openscenegraph/package.py77
-rw-r--r--var/spack/repos/builtin/packages/openspeedshop/package.py525
-rw-r--r--var/spack/repos/builtin/packages/openssl/package.py23
-rw-r--r--var/spack/repos/builtin/packages/opium/package.py10
-rw-r--r--var/spack/repos/builtin/packages/panda/package.py45
-rw-r--r--var/spack/repos/builtin/packages/pango/package.py2
-rw-r--r--var/spack/repos/builtin/packages/papi/package.py1
-rw-r--r--var/spack/repos/builtin/packages/parallel/package.py3
-rw-r--r--var/spack/repos/builtin/packages/paraver/package.py6
-rw-r--r--var/spack/repos/builtin/packages/parmetis/package.py20
-rw-r--r--var/spack/repos/builtin/packages/patchelf/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pcre/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pdt/package.py15
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py27
-rw-r--r--var/spack/repos/builtin/packages/pexsi/make.inc79
-rw-r--r--var/spack/repos/builtin/packages/pexsi/package.py103
-rw-r--r--var/spack/repos/builtin/packages/pfft/package.py64
-rw-r--r--var/spack/repos/builtin/packages/pgi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/piranha/package.py73
-rw-r--r--var/spack/repos/builtin/packages/pixman/package.py23
-rw-r--r--var/spack/repos/builtin/packages/pkg-config/package.py18
-rw-r--r--var/spack/repos/builtin/packages/plumed/package.py56
-rw-r--r--var/spack/repos/builtin/packages/pngwriter/package.py58
-rw-r--r--var/spack/repos/builtin/packages/polymake/package.py57
-rw-r--r--var/spack/repos/builtin/packages/porta/Makefile.spack.patch23
-rw-r--r--var/spack/repos/builtin/packages/porta/package.py44
-rw-r--r--var/spack/repos/builtin/packages/presentproto/package.py42
-rw-r--r--var/spack/repos/builtin/packages/printproto/package.py43
-rw-r--r--var/spack/repos/builtin/packages/proxymngr/package.py52
-rw-r--r--var/spack/repos/builtin/packages/psi4/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-3to2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-SQLAlchemy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-alabaster/package.py43
-rw-r--r--var/spack/repos/builtin/packages/py-argcomplete/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-astroid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-astropy/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-autopep8/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-babel/package.py45
-rw-r--r--var/spack/repos/builtin/packages/py-basemap/package.py78
-rw-r--r--var/spack/repos/builtin/packages/py-beautifulsoup4/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-biopython/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-blessings/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-bottleneck/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cclib/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-cffi/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-configparser/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-coverage/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-csvkit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cycler/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-cython/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dask/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dateutil/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dbf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-decorator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-docutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-emcee/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-enum34/package.py45
-rw-r--r--var/spack/repos/builtin/packages/py-epydoc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-flake8/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-funcsigs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-genshi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-gnuplot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-h5py/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-imagesize/package.py43
-rw-r--r--var/spack/repos/builtin/packages/py-iminuit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ipython/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jdcal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jinja2/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-lockfile/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-logilab-common/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-macs2/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-mako/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-markupsafe/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-matplotlib/package.py106
-rw-r--r--var/spack/repos/builtin/packages/py-mccabe/package.py53
-rw-r--r--var/spack/repos/builtin/packages/py-mistune/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mock/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mpi4py/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mpmath/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mysqldb1/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-nestle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-netcdf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-networkx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-nose/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-numexpr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-numpy/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-openpyxl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ordereddict/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-pandas/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pbr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pep8/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-periodictable/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pexpect/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-phonopy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pil/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pillow/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-ply/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pmw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-prettytable/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-proj/package.py52
-rw-r--r--var/spack/repos/builtin/packages/py-protobuf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pudb/package.py44
-rw-r--r--var/spack/repos/builtin/packages/py-py/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-py2cairo/package.py44
-rw-r--r--var/spack/repos/builtin/packages/py-py2neo/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-pychecker/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycodestyle/package.py52
-rw-r--r--var/spack/repos/builtin/packages/py-pycparser/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pydatalog/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyelftools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyflakes/package.py52
-rw-r--r--var/spack/repos/builtin/packages/py-pygments/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pygobject/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-introspection-1.patch35
-rw-r--r--var/spack/repos/builtin/packages/py-pygtk/package.py44
-rw-r--r--var/spack/repos/builtin/packages/py-pylint/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pypar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyparsing/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyside/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-pytables/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pytest/package.py43
-rw-r--r--var/spack/repos/builtin/packages/py-python-daemon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pytz/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-pyyaml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-restview/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-rpy2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scientificpython/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-image/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-learn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scipy/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-setuptools/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-shiboken/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-six/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-sncosmo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-snowballstemmer/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-rtd-theme/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-storm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-symengine/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-sympy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tappy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tuiview/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-twisted/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2py3k/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-urwid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-virtualenv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-wcsaxes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-wheel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-xlrd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-xpyb/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-yapf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-yt/package.py78
-rw-r--r--var/spack/repos/builtin/packages/python/ncurses.patch11
-rw-r--r--var/spack/repos/builtin/packages/python/package.py33
-rw-r--r--var/spack/repos/builtin/packages/qhull/package.py17
-rw-r--r--var/spack/repos/builtin/packages/qhull/qhull-iterator.patch45
-rw-r--r--var/spack/repos/builtin/packages/qt-creator/package.py46
-rw-r--r--var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch17
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py214
-rw-r--r--var/spack/repos/builtin/packages/qt/qt4-corewlan-new-osx.patch16
-rw-r--r--var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch31
-rw-r--r--var/spack/repos/builtin/packages/qt/qt4-pcre-include-conflict.patch16
-rw-r--r--var/spack/repos/builtin/packages/qthreads/ldflags.patch11
-rw-r--r--var/spack/repos/builtin/packages/qthreads/package.py16
-rw-r--r--var/spack/repos/builtin/packages/r-datatable/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-stringi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/raja/package.py7
-rw-r--r--var/spack/repos/builtin/packages/randrproto/package.py46
-rw-r--r--var/spack/repos/builtin/packages/recordproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/rendercheck/package.py48
-rw-r--r--var/spack/repos/builtin/packages/renderproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/resourceproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/rgb/package.py51
-rw-r--r--var/spack/repos/builtin/packages/root/math_uint.patch115
-rw-r--r--var/spack/repos/builtin/packages/root/package.py89
-rw-r--r--var/spack/repos/builtin/packages/root/root6-60606-mathmore.patch29
-rw-r--r--var/spack/repos/builtin/packages/rstart/package.py49
-rw-r--r--var/spack/repos/builtin/packages/samtools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sbt/package.py18
-rw-r--r--var/spack/repos/builtin/packages/scons/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scorep/package.py8
-rw-r--r--var/spack/repos/builtin/packages/screen/package.py3
-rw-r--r--var/spack/repos/builtin/packages/scripts/package.py45
-rw-r--r--var/spack/repos/builtin/packages/scrnsaverproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/sdl2/package.py45
-rw-r--r--var/spack/repos/builtin/packages/sdl2_image/package.py43
-rw-r--r--var/spack/repos/builtin/packages/sessreg/package.py51
-rw-r--r--var/spack/repos/builtin/packages/setxkbmap/package.py48
-rw-r--r--var/spack/repos/builtin/packages/showfont/package.py47
-rw-r--r--var/spack/repos/builtin/packages/silo/package.py3
-rw-r--r--var/spack/repos/builtin/packages/slepc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/smproxy/package.py49
-rw-r--r--var/spack/repos/builtin/packages/spark/package.py75
-rw-r--r--var/spack/repos/builtin/packages/sqlite/package.py13
-rw-r--r--var/spack/repos/builtin/packages/star-ccm-plus/package.py78
-rw-r--r--var/spack/repos/builtin/packages/stat/package.py23
-rw-r--r--var/spack/repos/builtin/packages/sublime-text/package.py59
-rw-r--r--var/spack/repos/builtin/packages/subversion/package.py3
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py19
-rw-r--r--var/spack/repos/builtin/packages/sundials/package.py10
-rw-r--r--var/spack/repos/builtin/packages/superlu-dist/package.py21
-rw-r--r--var/spack/repos/builtin/packages/superlu-mt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/superlu/package.py2
-rw-r--r--var/spack/repos/builtin/packages/swiftsim/package.py24
-rw-r--r--var/spack/repos/builtin/packages/symengine/package.py113
-rw-r--r--var/spack/repos/builtin/packages/sympol/lrs_mp_close.patch10
-rw-r--r--var/spack/repos/builtin/packages/sympol/package.py48
-rw-r--r--var/spack/repos/builtin/packages/szip/package.py25
-rw-r--r--var/spack/repos/builtin/packages/tar/package.py9
-rw-r--r--var/spack/repos/builtin/packages/taskd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tau/package.py21
-rw-r--r--var/spack/repos/builtin/packages/tethex/package.py49
-rw-r--r--var/spack/repos/builtin/packages/texlive/package.py8
-rw-r--r--var/spack/repos/builtin/packages/tmux/package.py5
-rw-r--r--var/spack/repos/builtin/packages/transset/package.py46
-rw-r--r--var/spack/repos/builtin/packages/trapproto/package.py39
-rw-r--r--var/spack/repos/builtin/packages/tree/package.py27
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py129
-rw-r--r--var/spack/repos/builtin/packages/turbomole/package.py16
-rw-r--r--var/spack/repos/builtin/packages/twm/package.py56
-rw-r--r--var/spack/repos/builtin/packages/uberftp/package.py44
-rw-r--r--var/spack/repos/builtin/packages/util-macros/package.py41
-rw-r--r--var/spack/repos/builtin/packages/veclibfort/package.py70
-rw-r--r--var/spack/repos/builtin/packages/videoproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/viewres/package.py48
-rw-r--r--var/spack/repos/builtin/packages/vim/package.py9
-rw-r--r--var/spack/repos/builtin/packages/visit/package.py43
-rw-r--r--var/spack/repos/builtin/packages/vizglow/package.py58
-rw-r--r--var/spack/repos/builtin/packages/vtk/gcc.patch21
-rw-r--r--var/spack/repos/builtin/packages/vtk/package.py87
-rw-r--r--var/spack/repos/builtin/packages/wannier90/make.sys7
-rw-r--r--var/spack/repos/builtin/packages/wannier90/package.py116
-rw-r--r--var/spack/repos/builtin/packages/windowswmproto/package.py44
-rw-r--r--var/spack/repos/builtin/packages/x11perf/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xauth/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xbacklight/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xbiff/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xbitmaps/package.py43
-rw-r--r--var/spack/repos/builtin/packages/xcalc/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xcb-demo/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xcb-proto/package.py12
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-cursor/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-errors/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-image/package.py52
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-keysyms/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-renderutil/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-wm/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xcb-util/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xclipboard/package.py53
-rw-r--r--var/spack/repos/builtin/packages/xclock/package.py54
-rw-r--r--var/spack/repos/builtin/packages/xcmiscproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/xcmsdb/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xcompmgr/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xconsole/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xcursor-themes/package.py53
-rw-r--r--var/spack/repos/builtin/packages/xcursorgen/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xdbedizzy/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xditview/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xdm/package.py54
-rw-r--r--var/spack/repos/builtin/packages/xdpyinfo/package.py54
-rw-r--r--var/spack/repos/builtin/packages/xdriinfo/package.py52
-rw-r--r--var/spack/repos/builtin/packages/xedit/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xerces-c/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xev/package.py53
-rw-r--r--var/spack/repos/builtin/packages/xextproto/package.py42
-rw-r--r--var/spack/repos/builtin/packages/xeyes/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xf86bigfontproto/package.py39
-rw-r--r--var/spack/repos/builtin/packages/xf86dga/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xf86dgaproto/package.py39
-rw-r--r--var/spack/repos/builtin/packages/xf86driproto/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xf86miscproto/package.py42
-rw-r--r--var/spack/repos/builtin/packages/xf86rushproto/package.py39
-rw-r--r--var/spack/repos/builtin/packages/xf86vidmodeproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/xfd/package.py52
-rw-r--r--var/spack/repos/builtin/packages/xfindproxy/package.py53
-rw-r--r--var/spack/repos/builtin/packages/xfontsel/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xfs/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xfsinfo/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xfwp/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xgamma/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xgc/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xhost/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xineramaproto/package.py45
-rw-r--r--var/spack/repos/builtin/packages/xinit/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xinput/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xkbcomp/package.py53
-rw-r--r--var/spack/repos/builtin/packages/xkbdata/package.py43
-rw-r--r--var/spack/repos/builtin/packages/xkbevd/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xkbprint/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xkbutils/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xkeyboard-config/package.py57
-rw-r--r--var/spack/repos/builtin/packages/xkill/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xload/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xlogo/package.py53
-rw-r--r--var/spack/repos/builtin/packages/xlsatoms/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xlsclients/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xlsfonts/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xmag/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xman/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xmessage/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xmh/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xmlto/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xmodmap/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xmore/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xorg-cf-files/package.py44
-rw-r--r--var/spack/repos/builtin/packages/xorg-docs/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xorg-gtest/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xorg-server/package.py108
-rw-r--r--var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py45
-rw-r--r--var/spack/repos/builtin/packages/xphelloworld/package.py54
-rw-r--r--var/spack/repos/builtin/packages/xplsprinters/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xpr/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xprehashprinterlist/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xprop/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xproto/package.py25
-rw-r--r--var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py41
-rw-r--r--var/spack/repos/builtin/packages/xrandr/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xrdb/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xrefresh/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xrootd/package.py52
-rw-r--r--var/spack/repos/builtin/packages/xrx/package.py57
-rw-r--r--var/spack/repos/builtin/packages/xscope/package.py45
-rw-r--r--var/spack/repos/builtin/packages/xset/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xsetmode/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xsetpointer/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xsetroot/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xsm/package.py49
-rw-r--r--var/spack/repos/builtin/packages/xstdcmap/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xtrans/package.py45
-rw-r--r--var/spack/repos/builtin/packages/xtrap/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xts/package.py60
-rw-r--r--var/spack/repos/builtin/packages/xvidtune/package.py50
-rw-r--r--var/spack/repos/builtin/packages/xvinfo/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xwd/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xwininfo/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xwud/package.py47
-rw-r--r--var/spack/repos/builtin/packages/xz/package.py7
-rw-r--r--var/spack/repos/builtin/packages/zeromq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/zlib/package.py10
-rw-r--r--var/spack/repos/builtin/packages/zoltan/package.py115
-rw-r--r--var/spack/repos/builtin/packages/zsh/package.py8
878 files changed, 43939 insertions, 8050 deletions
diff --git a/.flake8 b/.flake8
index b178a2da57..023f392952 100644
--- a/.flake8
+++ b/.flake8
@@ -5,8 +5,10 @@
# rationale is.
#
# Let people line things up nicely:
+# - E129: visually indented line with same indent as next logical line
# - E221: multiple spaces before operator
-# - E241: multiple spaces after ‘,’
+# - E241: multiple spaces after ','
+# - E272: multiple spaces before keyword
#
# Let people use terse Python features:
# - E731 : lambda expressions
@@ -15,9 +17,10 @@
# - F403: disable wildcard import
#
# These are required to get the package.py files to test clean.
-# - F821: undefined name (needed for cmake, configure, etc.)
-# - F999: name name be undefined or undefined from star imports.
+# - F405: `name` may be undefined, or undefined from star imports: `module`
+# - F821: undefined name `name` (needed for cmake, configure, etc.)
+# - F999: syntax error in doctest
#
[flake8]
-ignore = E129,E221,E241,E272,E731,F403,F821,F999,F405
+ignore = E129,E221,E241,E272,E731,F403,F405,F821,F999
max-line-length = 79
diff --git a/.gitignore b/.gitignore
index b1215f0c7e..a451f9e14e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/db
/var/spack/stage
/var/spack/cache
/var/spack/repos/*/index.yaml
@@ -12,6 +13,10 @@
/etc/spackconfig
/share/spack/dotkit
/share/spack/modules
+/share/spack/lmod
/TAGS
+*.swp
/htmlcov
.coverage
+#*
+.#*
diff --git a/.mailmap b/.mailmap
index 39ec183241..df0a82a197 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,20 +1,56 @@
-Todd Gamblin <tgamblin@llnl.gov> George Todd Gamblin <gamblin2@llnl.gov>
-Todd Gamblin <tgamblin@llnl.gov> Todd Gamblin <gamblin2@llnl.gov>
-Adam Moody <moody20@llnl.gov> Adam T. Moody <moody20@llnl.gov>
-Alfredo Gimenez <gimenez1@llnl.gov> Alfredo Gimenez <alfredo.gimenez@gmail.com>
-David Boehme <boehme3@llnl.gov> David Boehme <boehme3@sierra324.llnl.gov>
-David Boehme <boehme3@llnl.gov> David Boehme <boehme3@sierra648.llnl.gov>
-Kevin Brandstatter <kjbrandstatter@gmail.com> Kevin Brandstatter <kbrandst@hawk.iit.edu>
-Luc Jaulmes <luc.jaulmes@bsc.es> Luc Jaulmes <jaulmes1@llnl.gov>
-Saravan Pantham <saravan.pantham@gmail.com> Saravan Pantham <pantham1@surface86.llnl.gov>
-Tom Scogland <tscogland@llnl.gov> Tom Scogland <scogland1@llnl.gov>
-Tom Scogland <tscogland@llnl.gov> Tom Scogland <tom.scogland@gmail.com>
-Joachim Protze <protze@rz.rwth-aachen.de> jprotze <protze@rz.rwth-aachen.de>
-Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@surface86.llnl.gov>
-Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@cab687.llnl.gov>
-Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@cab690.llnl.gov>
-Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@catalyst159.llnl.gov>
-Gregory L. Lee <lee218@llnl.gov> Gregory Lee <lee218@llnl.gov>
-Massimiliano Culpo <massimiliano.culpo@epfl.ch> Massimiliano Culpo <massimiliano.culpo@googlemail.com>
-Massimiliano Culpo <massimiliano.culpo@epfl.ch> alalazo <massimiliano.culpo@googlemail.com>
-Mark Miller <miller86@llnl.gov> miller86 <miller86@llnl.gov>
+Abhinav Bhatele <bhatele@llnl.gov> Abhinav Bhatele <bhatele@gmail.com>
+Adam Moody <moody20@llnl.gov> Adam T. Moody <moody20@llnl.gov>
+Alfredo Gimenez <gimenez1@llnl.gov> Alfredo Gimenez <alfredo.gimenez@gmail.com>
+Alfredo Gimenez <gimenez1@llnl.gov> Alfredo Adolfo Gimenez <alfredo.gimenez@gmail.com>
+Andrew Williams <williamsa89@cardiff.ac.uk> Andrew Williams <andrew@alshain.org.uk>
+Ben Boeckel <ben.boeckel@kitware.com> Ben Boeckel <mathstuf@gmail.com>
+Ben Boeckel <ben.boeckel@kitware.com> Ben Boeckel <mathstuf@users.noreply.github.com>
+Benedikt Hegner <hegner@cern.ch> Benedikt Hegner <benedikt.hegner@cern.ch>
+Brett Viren <bv@bnl.gov> Brett Viren <brett.viren@gmail.com>
+David Boehme <boehme3@llnl.gov> David Boehme <boehme3@sierra324.llnl.gov>
+David Boehme <boehme3@llnl.gov> David Boehme <boehme3@sierra648.llnl.gov>
+David Poliakoff <poliakoff1@llnl.gov> David Poliakoff <david.poliakoff@gmail.com>
+Dhanannjay Deo <dhanannjay.deo@kitware.com> Dhanannjay 'Djay' Deo <dhanannjay.deo@kitware.com>
+Elizabeth Fischer <elizabeth.fischer@columbia.edu> Elizabeth F <elizabeth.fischer@columbia.edu>
+Elizabeth Fischer <elizabeth.fischer@columbia.edu> Elizabeth F <rpf2116@columbia.edu>
+Elizabeth Fischer <elizabeth.fischer@columbia.edu> Elizabeth Fischer <rpf2116@columbia.edu>
+Elizabeth Fischer <elizabeth.fischer@columbia.edu> citibeth <rpf2116@columbia.edu>
+Geoffrey Oxberry <oxberry1@llnl.gov> Geoffrey Oxberry <goxberry@gmail.com>
+Glenn Johnson <glenn-johnson@uiowa.edu> Glenn Johnson <gjohnson@argon-ohpc.hpc.uiowa.edu>
+Glenn Johnson <glenn-johnson@uiowa.edu> Glenn Johnson <glennpj@gmail.com>
+Gregory Becker <becker33@llnl.gov> Gregory Becker <becker33.llnl.gov>
+Gregory Becker <becker33@llnl.gov> becker33 <becker33.llnl.gov>
+Gregory Becker <becker33@llnl.gov> becker33 <becker33@llnl.gov>
+Gregory L. Lee <lee218@llnl.gov> Greg Lee <lee218@llnl.gov>
+Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@cab687.llnl.gov>
+Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@cab690.llnl.gov>
+Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@catalyst159.llnl.gov>
+Gregory L. Lee <lee218@llnl.gov> Gregory L. Lee <lee218@surface86.llnl.gov>
+Gregory L. Lee <lee218@llnl.gov> Gregory Lee <lee218@llnl.gov>
+Ian Lee <lee1001@llnl.gov> Ian Lee <IanLee1521@gmail.com>
+James Wynne III <wynnejr@ornl.gov> James Riley Wynne III <wynnejr@ornl.gov>
+James Wynne III <wynnejr@ornl.gov> James Wynne III <wynnejr@gpujake.com>
+Joachim Protze <protze@rz.rwth-aachen.de> jprotze <protze@rz.rwth-aachen.de>
+Kelly (KT) Thompson <kgt@lanl.gov> <kellyt@MENE.localdomain>
+Kelly (KT) Thompson <kgt@lanl.gov> Kelly Thompson <KineticTheory@users.noreply.github.com>
+Kevin Brandstatter <kjbrandstatter@gmail.com> Kevin Brandstatter <kbrandst@hawk.iit.edu>
+Luc Jaulmes <luc.jaulmes@bsc.es> Luc Jaulmes <jaulmes1@llnl.gov>
+Mario Melara <maamelara@gmail.com> Mario Melara <mamelara@genepool1.nersc.gov>
+Mark Miller <miller86@llnl.gov> miller86 <miller86@llnl.gov>
+Massimiliano Culpo <massimiliano.culpo@epfl.ch> Massimiliano Culpo <massimiliano.culpo@googlemail.com>
+Massimiliano Culpo <massimiliano.culpo@epfl.ch> alalazo <massimiliano.culpo@googlemail.com>
+Mayeul d'Avezac <m.davezac@ucl.ac.uk> Mayeul d'Avezac <mdavezac@gmail.com>
+Mitchell Devlin <mitchell.r.devlin@gmail.com> Mitchell Devlin <devlin@blogin4.lcrc.anl.gov>
+Nicolas Richart <nicolas.richart@epfl.ch> Nicolas <nrichart@users.noreply.github.com>
+Nicolas Richart <nicolas.richart@epfl.ch> Nicolas Richart <nrichart@users.noreply.github.com>
+Peter Scheibel <scheibel1@llnl.gov> scheibelp <scheibel1@llnl.gov>
+Robert D. French <frenchrd@ornl.gov> Robert D. French <robert@robertdfrench.me>
+Robert D. French <frenchrd@ornl.gov> Robert.French <frenchrd@ornl.gov>
+Robert D. French <frenchrd@ornl.gov> robertdfrench <frenchrd@ornl.gov>
+Saravan Pantham <saravan.pantham@gmail.com> Saravan Pantham <pantham1@surface86.llnl.gov>
+Stephen Herbein <sherbein@udel.edu> Stephen Herbein <stephen272@gmail.com>
+Todd Gamblin <tgamblin@llnl.gov> George Todd Gamblin <gamblin2@llnl.gov>
+Todd Gamblin <tgamblin@llnl.gov> Todd Gamblin <gamblin2@llnl.gov>
+Tom Scogland <tscogland@llnl.gov> Tom Scogland <scogland1@llnl.gov>
+Tom Scogland <tscogland@llnl.gov> Tom Scogland <tom.scogland@gmail.com>
+Tzanio Kolev <tzanio@llnl.gov> Tzanio <tzanio@llnl.gov>
diff --git a/.travis.yml b/.travis.yml
index b376a33490..3e8879162c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,27 +1,47 @@
language: python
+# Only build master and develop on push; do not build every branch.
+branches:
+ only:
+ - master
+ - develop
+
+# Construct build matrix
python:
- - "2.6"
- - "2.7"
+ - 2.6
+ - 2.7
+
env:
- - TEST_TYPE=unit
- - TEST_TYPE=flake8
+ - TEST_SUITE=unit CYAML=true
+ - TEST_SUITE=unit CYAML=false
+ - TEST_SUITE=flake8
+ - TEST_SUITE=doc
-# Exclude flake8 from python 2.6
matrix:
exclude:
- - python: "2.6"
- env: TEST_TYPE=flake8
+ - python: 2.6
+ # Flake8 no longer supports Python 2.6
+ env: TEST_SUITE=flake8
# Use new Travis infrastructure (Docker can't sudo yet)
sudo: false
-# Install coveralls to obtain code coverage
+# Docs need graphviz to build
+addons:
+ apt:
+ packages:
+ - graphviz
+ - libyaml-dev
+
+# Install various dependencies
install:
- - "pip install coveralls"
- - "pip install flake8"
+ - pip install coveralls
+ - pip install flake8
+ - pip install sphinx
+ - pip install mercurial
+ - if [[ $CYAML == true ]]; then pip install --global-option "--with-libyaml" pyyaml; fi
-before_install:
+before_script:
# Need this for the git tests to succeed.
- git config --global user.email "spack@example.com"
- git config --global user.name "Test User"
@@ -29,18 +49,13 @@ before_install:
# Need this to be able to compute the list of changed files
- git fetch origin develop:develop
-script:
- # Run unit tests with code coverage plus install libdwarf
- - 'if [ "$TEST_TYPE" = "unit" ]; then share/spack/qa/run-unit-tests; fi'
- # Run flake8 code style checks.
- - 'if [ "$TEST_TYPE" = "flake8" ]; then share/spack/qa/run-flake8; fi'
+script: share/spack/qa/run-$TEST_SUITE-tests
after_success:
- - 'if [ "$TEST_TYPE" = "unit" ] && [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then coveralls; fi'
+ - if [[ $TEST_SUITE == unit && $CYAML == false && $TRAVIS_PYTHON_VERSION == 2.7 ]]; then coveralls; fi
notifications:
email:
- recipients:
- - tgamblin@llnl.gov
+ recipients: tgamblin@llnl.gov
on_success: change
on_failure: always
diff --git a/README.md b/README.md
index 5d5ac7dd39..853e071fc6 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ written in pure Python, and specs allow package authors to write a
single build script for many different builds of the same package.
See the
-[Feature Overview](http://software.llnl.gov/spack/features.html)
+[Feature Overview](http://spack.readthedocs.io/en/latest/features.html)
for examples and highlights.
To install spack and install your first package:
@@ -32,7 +32,7 @@ To install spack and install your first package:
Documentation
----------------
-[**Full documentation**](http://software.llnl.gov/spack) for Spack is
+[**Full documentation**](http://spack.readthedocs.io/) for Spack is
the first place to look.
See also:
@@ -58,22 +58,16 @@ can join it here:
### Contributions
-Contributing to Spack is relatively. Just send us a
+Contributing to Spack is relatively easy. Just send us a
[pull request](https://help.github.com/articles/using-pull-requests/).
When you send your request, make ``develop`` the destination branch on the
[Spack repository](https://github.com/LLNL/spack).
-Before you send a PR, your code should pass the following checks:
-
-* Your contribution will need to pass the `spack test` command.
- Run this before submitting your PR.
-
-* Also run the `share/spack/qa/run-flake8` script to check for PEP8 compliance.
- To encourage contributions and readability by a broad audience,
- Spack uses the [PEP8](https://www.python.org/dev/peps/pep-0008/) coding
- standard with [a few exceptions](https://github.com/LLNL/spack/blob/develop/.flake8).
-
+Your PR must pass Spack's unit tests and documentation tests, and must be
+[PEP 8](https://www.python.org/dev/peps/pep-0008/) compliant.
We enforce these guidelines with [Travis CI](https://travis-ci.org/LLNL/spack).
+To run these tests locally, and for helpful tips on git, see our
+[Contribution Guide](http://spack.readthedocs.io/en/latest/contribution_guide.html).
Spack uses a rough approximation of the [Git
Flow](http://nvie.com/posts/a-successful-git-branching-model/)
diff --git a/bin/sbang b/bin/sbang
index 1ea5f06592..e71074b330 100755
--- a/bin/sbang
+++ b/bin/sbang
@@ -111,8 +111,12 @@ while read line && ((lines < 2)) ; do
done < "$script"
# Invoke any interpreter found, or raise an error if none was found.
-if [ -n "$interpreter" ]; then
- exec $interpreter "$@"
+if [[ -n "$interpreter" ]]; then
+ if [[ "${interpreter##*/}" = "perl" ]]; then
+ exec $interpreter -x "$@"
+ else
+ exec $interpreter "$@"
+ fi
else
echo "error: sbang found no interpreter in $script"
exit 1
diff --git a/bin/spack b/bin/spack
index 9fed11f33b..1f5dec0b3d 100755
--- a/bin/spack
+++ b/bin/spack
@@ -25,9 +25,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import sys
-if not sys.version_info[:2] >= (2, 6):
+if (sys.version_info[0] > 2) or (sys.version_info[:2] < (2, 6)):
v_info = sys.version_info[:3]
- sys.exit("Spack requires Python 2.6 or higher. "
+ sys.exit("Spack requires Python 2.6 or 2.7. "
"This is Python %d.%d.%d." % v_info)
import os
@@ -40,6 +40,16 @@ SPACK_PREFIX = os.path.dirname(os.path.dirname(SPACK_FILE))
# Allow spack libs to be imported in our scripts
SPACK_LIB_PATH = os.path.join(SPACK_PREFIX, "lib", "spack")
sys.path.insert(0, SPACK_LIB_PATH)
+
+# Try to use system YAML if it is available, as it might have libyaml
+# support (for faster loading via C). Load it before anything in
+# lib/spack/external so it will take precedence over Spack's PyYAML.
+try:
+ import yaml
+except ImportError:
+ pass # ignore and use slow yaml
+
+# Add external libs
SPACK_EXTERNAL_LIBS = os.path.join(SPACK_LIB_PATH, "external")
sys.path.insert(0, SPACK_EXTERNAL_LIBS)
@@ -56,8 +66,16 @@ with warnings.catch_warnings():
# Spack, were removed, but shadow system modules that Spack still
# imports. If we leave them, Spack will fail in mysterious ways.
# TODO: more elegant solution for orphaned pyc files.
-orphaned_pyc_files = [os.path.join(SPACK_EXTERNAL_LIBS, n)
- for n in ('functools.pyc', 'ordereddict.pyc')]
+orphaned_pyc_files = [
+ os.path.join(SPACK_EXTERNAL_LIBS, 'functools.pyc'),
+ os.path.join(SPACK_EXTERNAL_LIBS, 'ordereddict.pyc'),
+ os.path.join(SPACK_LIB_PATH, 'spack', 'platforms', 'cray_xc.pyc'),
+ os.path.join(SPACK_LIB_PATH, 'spack', 'cmd', 'package-list.pyc'),
+ os.path.join(SPACK_LIB_PATH, 'spack', 'cmd', 'test-install.pyc'),
+ os.path.join(SPACK_LIB_PATH, 'spack', 'cmd', 'url-parse.pyc'),
+ os.path.join(SPACK_LIB_PATH, 'spack', 'test', 'yaml.pyc')
+]
+
for pyc_file in orphaned_pyc_files:
if not os.path.exists(pyc_file):
continue
@@ -120,7 +138,8 @@ subparsers = parser.add_subparsers(metavar='SUBCOMMAND', dest="command")
import spack.cmd
for cmd in spack.cmd.commands:
module = spack.cmd.get_module(cmd)
- subparser = subparsers.add_parser(cmd, help=module.description)
+ cmd_name = cmd.replace('_', '-')
+ subparser = subparsers.add_parser(cmd_name, help=module.description)
module.setup_parser(subparser)
# Just print help and exit if run with no arguments at all
@@ -153,10 +172,10 @@ def main():
# If the user asked for it, don't check ssl certs.
if args.insecure:
tty.warn("You asked for --insecure. Will NOT check SSL certificates.")
- spack.curl.add_default_arg('-k')
+ spack.insecure = True
# Try to load the particular command asked for and run it
- command = spack.cmd.get_command(args.command)
+ command = spack.cmd.get_command(args.command.replace('-', '_'))
try:
return_val = command(parser, args)
except SpackError as e:
@@ -176,7 +195,7 @@ def main():
if args.profile:
import cProfile
- cProfile.run('main()', sort='tottime')
+ cProfile.run('main()', sort='time')
elif args.pdb:
import pdb
pdb.run('main()')
diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml
new file mode 100644
index 0000000000..4e02d0973d
--- /dev/null
+++ b/etc/spack/defaults/config.yaml
@@ -0,0 +1,68 @@
+# -------------------------------------------------------------------------
+# This is the default spack configuration file.
+#
+# Settings here are versioned with Spack and are intended to provide
+# sensible defaults out of the box. Spack maintainers should edit this
+# file to keep it current.
+#
+# Users can override these settings by editing the following files.
+#
+# Per-spack-instance settings (overrides defaults):
+# $SPACK_ROOT/etc/spack/config.yaml
+#
+# Per-user settings (overrides default and site settings):
+# ~/.spack/config.yaml
+# -------------------------------------------------------------------------
+config:
+ # This is the path to the root of the Spack install tree.
+ # You can use $spack here to refer to the root of the spack instance.
+ install_tree: $spack/opt/spack
+
+
+ # Locations where different types of modules should be installed.
+ module_roots:
+ tcl: $spack/share/spack/modules
+ lmod: $spack/share/spack/lmod
+ dotkit: $spack/share/spack/dotkit
+
+
+ # Temporary locations Spack can try to use for builds.
+ #
+ # Spack will use the first one it finds that exists and is writable.
+ # You can use $tempdir to refer to the system default temp directory
+ # (as returned by tempfile.gettempdir()).
+ #
+ # A value of $spack/var/spack/stage indicates that Spack should run
+ # builds directly inside its install directory without staging them in
+ # temporary space.
+ #
+ # The build stage can be purged with `spack purge --stage`.
+ build_stage:
+ - $tempdir
+ - /nfs/tmp2/$user
+ - $spack/var/spack/stage
+
+
+ # Cache directory already downloaded source tarballs and archived
+ # repositories. This can be purged with `spack purge --downloads`.
+ source_cache: $spack/var/spack/cache
+
+
+ # Cache directory for miscellaneous files, like the package index.
+ # This can be purged with `spack purge --misc-cache`
+ misc_cache: ~/.spack/cache
+
+
+ # If this is false, tools like curl that use SSL will not verify
+ # certifiates. (e.g., curl will use use the -k option)
+ verify_ssl: true
+
+
+ # If set to true, Spack will always check checksums after downloading
+ # archives. If false, Spack skips the checksum step.
+ checksum: true
+
+
+ # If set to true, `spack install` and friends will NOT clean
+ # potentially harmful variables from the build environment. Use wisely.
+ dirty: false
diff --git a/etc/spack/defaults/darwin/packages.yaml b/etc/spack/defaults/darwin/packages.yaml
new file mode 100644
index 0000000000..24a08809db
--- /dev/null
+++ b/etc/spack/defaults/darwin/packages.yaml
@@ -0,0 +1,18 @@
+# -------------------------------------------------------------------------
+# This file controls default concretization preferences for Spack.
+#
+# Settings here are versioned with Spack and are intended to provide
+# sensible defaults out of the box. Spack maintainers should edit this
+# file to keep it current.
+#
+# Users can override these settings by editing the following files.
+#
+# Per-spack-instance settings (overrides defaults):
+# $SPACK_ROOT/etc/spack/packages.yaml
+#
+# Per-user settings (overrides default and site settings):
+# ~/.spack/packages.yaml
+# -------------------------------------------------------------------------
+packages:
+ all:
+ compiler: [clang, gcc, intel]
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml
index 83f9eb7ece..eae7752eee 100644
--- a/etc/spack/defaults/packages.yaml
+++ b/etc/spack/defaults/packages.yaml
@@ -15,7 +15,9 @@
# -------------------------------------------------------------------------
packages:
all:
+ compiler: [gcc, intel, pgi, clang, xl, nag]
providers:
mpi: [openmpi, mpich]
blas: [openblas]
lapack: [openblas]
+ pil: [py-pillow]
diff --git a/lib/spack/docs/.gitignore b/lib/spack/docs/.gitignore
index 26c343d3eb..0bbf78cce0 100644
--- a/lib/spack/docs/.gitignore
+++ b/lib/spack/docs/.gitignore
@@ -1,4 +1,5 @@
package_list.rst
command_index.rst
spack*.rst
+modules.rst
_build
diff --git a/lib/spack/docs/Makefile b/lib/spack/docs/Makefile
index 00203b5b61..bcba423d94 100644
--- a/lib/spack/docs/Makefile
+++ b/lib/spack/docs/Makefile
@@ -2,12 +2,13 @@
#
# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
+SPHINXOPTS = -E
+JOBS ?= $(shell python -c 'import multiprocessing; print multiprocessing.cpu_count()')
+SPHINXBUILD = sphinx-build -j $(JOBS)
PAPER =
BUILDDIR = _build
-export PYTHONPATH = ../../spack
+export PYTHONPATH := ../../spack:$(PYTHONPATH)
APIDOC_FILES = spack*.rst
# Internal variables.
@@ -22,24 +23,6 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
all: html
#
-# This autogenerates a package list.
-#
-package_list:
- spack package-list > package_list.rst
-
-#
-# Generate a command index
-#
-command_index:
- cp command_index.in command_index.rst
- echo >> command_index.rst
- grep -ho '.. _spack-.*:' *rst \
- | perl -pe 's/.. _([^:]*):/ * :ref:`\1`/' \
- | sort >> command_index.rst
-
-custom_targets: package_list command_index
-
-#
# This creates a git repository and commits generated html docs.
# It them pushes the new branch into THIS repository as gh-pages.
#
@@ -58,9 +41,20 @@ gh-pages: _build/html
git push -f $$root master:gh-pages && \
rm -rf .git
+# This version makes gh-pages into a single page that redirects
+# to spack.readthedocs.io
+gh-pages-redirect:
+ root="$$(git rev-parse --show-toplevel)" && \
+ cd _gh_pages_redirect && \
+ rm -rf .git && \
+ git init && \
+ git add . && \
+ git commit -m "Spack Documentation" && \
+ git push -f $$root master:gh-pages && \
+ rm -rf .git
+
upload:
rsync -avz --rsh=ssh --delete _build/html/ cab:/usr/global/web-pages/lc/www/adept/docs/spack
- git push -f origin gh-pages
git push -f github gh-pages
apidoc:
@@ -89,10 +83,10 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
- -rm -f package_list.rst command_index.rst
+ -rm -f package_list.rst command_index.rst modules.rst
-rm -rf $(BUILDDIR)/* $(APIDOC_FILES)
-html: apidoc custom_targets
+html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
diff --git a/lib/spack/docs/_gh_pages_redirect/.nojekyll b/lib/spack/docs/_gh_pages_redirect/.nojekyll
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/spack/docs/_gh_pages_redirect/.nojekyll
diff --git a/lib/spack/docs/_gh_pages_redirect/index.html b/lib/spack/docs/_gh_pages_redirect/index.html
new file mode 100644
index 0000000000..9c456abdaa
--- /dev/null
+++ b/lib/spack/docs/_gh_pages_redirect/index.html
@@ -0,0 +1,10 @@
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; url=http://spack.readthedocs.io/" />
+ </head>
+ <body>
+ <p>
+ This page has moved to <a href="http://spack.readthedocs.io/">http://spack.readthedocs.io/</a>
+ </p>
+ </body>
+</html>
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index a42d941791..03e6d581a4 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -1,57 +1,64 @@
.. _basic-usage:
-Basic usage
-=====================
+===========
+Basic Usage
+===========
The ``spack`` command has many *subcommands*. You'll only need a
small subset of them for typical usage.
+Note that Spack colorizes output. ``less -R`` should be used with
+Spack to maintain this colorization. E.g.:
+.. code-block:: console
+
+ $ spack find | less -R
+
+It is recommended that the following be put in your ``.bashrc`` file:
+
+.. code-block:: sh
+
+ alias less='less -R'
+
+--------------------------
Listing available packages
-------------------------------
+--------------------------
To install software with Spack, you need to know what software is
available. You can see a list of available package names at the
:ref:`package-list` webpage, or using the ``spack list`` command.
-.. _spack-list:
+.. _cmd-spack-list:
+^^^^^^^^^^^^^^
``spack list``
-~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
The ``spack list`` command prints out a list of all of the packages
Spack can install:
.. command-output:: spack list
-The packages are listed by name in alphabetical order. If you specify a
-pattern to match, it will follow this set of rules. A pattern with no
-wildcards, ``*`` or ``?``, will be treated as though it started and ended with
-``*``, so ``util`` is equivalent to ``*util*``. A pattern with no capital
-letters will be treated as case-insensitive. You can also add the ``-i`` flag
-to specify a case insensitive search, or ``-d`` to search the description of
+The packages are listed by name in alphabetical order.
+A pattern to match with no wildcards, ``*`` or ``?``,
+will be treated as though it started and ended with
+``*``, so ``util`` is equivalent to ``*util*``. All patterns will be treated
+as case-insensitive. You can also add the ``-d`` to search the description of
the package in addition to the name. Some examples:
-All packages whose names contain "sql" case insensitive:
+All packages whose names contain "sql":
.. command-output:: spack list sql
-All packages whose names start with a capital M:
-
-.. command-output:: spack list 'M*'
-
-All packages whose names or descriptions contain Documentation:
-
-.. command-output:: spack list -d Documentation
+All packages whose names or descriptions contain documentation:
-All packages whose names contain documentation case insensitive:
+.. command-output:: spack list --search-description documentation
-.. command-output:: spack list -d documentation
-
-.. _spack-info:
+.. _cmd-spack-info:
+^^^^^^^^^^^^^^
``spack info``
-~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
To get more information on a particular package from `spack list`, use
`spack info`. Just supply the name of a package:
@@ -66,10 +73,11 @@ viruses.
:ref:`Dependencies <sec-specs>` and :ref:`virtual dependencies
<sec-virtual-dependencies>` are described in more detail later.
-.. _spack-versions:
+.. _cmd-spack-versions:
+^^^^^^^^^^^^^^^^^^
``spack versions``
-~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^
To see *more* available versions of a package, run ``spack versions``.
For example:
@@ -86,31 +94,32 @@ by scraping it directly from package web pages. Depending on the
package and how its releases are organized, Spack may or may not be
able to find remote versions.
-
+---------------------------
Installing and uninstalling
-------------------------------
+---------------------------
-.. _spack-install:
+.. _cmd-spack-install:
+^^^^^^^^^^^^^^^^^
``spack install``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^
``spack install`` will install any package shown by ``spack list``.
For example, To install the latest version of the ``mpileaks``
package, you might type this:
-.. code-block:: sh
+.. code-block:: console
$ spack install mpileaks
-If `mpileaks` depends on other packages, Spack will install the
+If ``mpileaks`` depends on other packages, Spack will install the
dependencies first. It then fetches the ``mpileaks`` tarball, expands
it, verifies that it was downloaded without errors, builds it, and
installs it in its own directory under ``$SPACK_ROOT/opt``. You'll see
a number of messages from spack, a lot of build output, and a message
that the packages is installed:
-.. code-block:: sh
+.. code-block:: console
$ spack install mpileaks
==> Installing mpileaks
@@ -133,13 +142,14 @@ that the packages is installed:
The last line, with the ``[+]``, indicates where the package is
installed.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
Building a specific version
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
Spack can also build *specific versions* of a package. To do this,
just add ``@`` after the package name, followed by a version:
-.. code-block:: sh
+.. code-block:: console
$ spack install mpich@3.0.4
@@ -158,66 +168,119 @@ two configurations of the same version of a package, one built with boost
This can all be done on the command line using the *spec* syntax.
Spack calls the descriptor used to refer to a particular package
configuration a **spec**. In the commands above, ``mpileaks`` and
-``mpileaks@3.0.4``. We'll talk more about how you can use them to
-customize an installation in :ref:`sec-specs`.
+``mpileaks@3.0.4`` are both valid *specs*. We'll talk more about how
+you can use them to customize an installation in :ref:`sec-specs`.
-.. _spack-uninstall:
+.. _cmd-spack-uninstall:
+^^^^^^^^^^^^^^^^^^^
``spack uninstall``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^
-To uninstall a package, type ``spack uninstall <package>``. This will ask the user for
-confirmation, and in case will completely remove the directory in which the package was installed.
+To uninstall a package, type ``spack uninstall <package>``. This will ask
+the user for confirmation before completely removing the directory
+in which the package was installed.
-.. code-block:: sh
+.. code-block:: console
- spack uninstall mpich
+ $ spack uninstall mpich
If there are still installed packages that depend on the package to be
uninstalled, spack will refuse to uninstall it.
To uninstall a package and every package that depends on it, you may give the
-`--dependents` option.
+``--dependents`` option.
-.. code-block:: sh
+.. code-block:: console
- spack uninstall --dependents mpich
+ $ spack uninstall --dependents mpich
-will display a list of all the packages that depend on `mpich` and, upon confirmation,
-will uninstall them in the right order.
+will display a list of all the packages that depend on ``mpich`` and, upon
+confirmation, will uninstall them in the right order.
-A line like
+A command like
-.. code-block:: sh
+.. code-block:: console
- spack uninstall mpich
+ $ spack uninstall mpich
-may be ambiguous, if multiple ``mpich`` configurations are installed. For example, if both
-``mpich@3.0.2`` and ``mpich@3.1`` are installed, ``mpich`` could refer
-to either one. Because it cannot determine which one to uninstall,
-Spack will ask you either to provide a version number to remove the
-ambiguity or use the ``--all`` option to uninstall all of the matching packages.
+may be ambiguous if multiple ``mpich`` configurations are installed.
+For example, if both ``mpich@3.0.2`` and ``mpich@3.1`` are installed,
+``mpich`` could refer to either one. Because it cannot determine which
+one to uninstall, Spack will ask you either to provide a version number
+to remove the ambiguity or use the ``--all`` option to uninstall all of
+the matching packages.
-You may force uninstall a package with the `--force` option
+You may force uninstall a package with the ``--force`` option
-.. code-block:: sh
+.. code-block:: console
+
+ $ spack uninstall --force mpich
+
+but you risk breaking other installed packages. In general, it is safer to
+remove dependent packages *before* removing their dependencies or use the
+``--dependents`` option.
+
+
+.. _nondownloadable:
+
+^^^^^^^^^^^^^^^^^^^^^^^^^
+Non-Downloadable Tarballs
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The tarballs for some packages cannot be automatically downloaded by
+Spack. This could be for a number of reasons:
+
+#. The author requires users to manually accept a license agreement
+ before downloading (``jdk`` and ``galahad``).
+
+#. The software is proprietary and cannot be downloaded on the open
+ Internet.
+
+To install these packages, one must create a mirror and manually add
+the tarballs in question to it (see :ref:`mirrors`):
+
+#. Create a directory for the mirror. You can create this directory
+ anywhere you like, it does not have to be inside ``~/.spack``:
+
+ .. code-block:: console
+
+ $ mkdir ~/.spack/manual_mirror
+
+#. Register the mirror with Spack by creating ``~/.spack/mirrors.yaml``:
+
+ .. code-block:: yaml
+
+ mirrors:
+ manual: file:///home/me/.spack/manual_mirror
+
+#. Put your tarballs in it. Tarballs should be named
+ ``<package>/<package>-<version>.tar.gz``. For example:
+
+ .. code-block:: console
+
+ $ ls -l manual_mirror/galahad
- spack uninstall --force mpich
+ -rw-------. 1 me me 11657206 Jun 21 19:25 galahad-2.60003.tar.gz
-but you risk breaking other installed packages. In general, it is safer to remove dependent
-packages *before* removing their dependencies or use the `--dependents` option.
+#. Install as usual:
+ .. code-block:: console
+ $ spack install galahad
+
+-------------------------
Seeing installed packages
------------------------------------
+-------------------------
We know that ``spack list`` shows you the names of available packages,
-but how do you figure out which are installed?
+but how do you figure out which are already installed?
-.. _spack-find:
+.. _cmd-spack-find:
+^^^^^^^^^^^^^^
``spack find``
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
``spack find`` shows the *specs* of installed packages. A spec is
like a name, but it has a version, compiler, architecture, and build
@@ -226,7 +289,7 @@ of the same package with different specs.
Running ``spack find`` with no arguments lists installed packages:
-.. code-block:: sh
+.. code-block:: console
$ spack find
==> 74 installed packages.
@@ -265,17 +328,18 @@ only shows the version of installed packages.
``spack find`` can filter the package list based on the package name, spec, or
a number of properties of their installation status. For example, missing
-dependencies of a spec can be shown with ``-m``, packages which were
+dependencies of a spec can be shown with ``--missing``, packages which were
explicitly installed with ``spack install <package>`` can be singled out with
-``-e`` and those which have been pulled in only as dependencies with ``-E``.
+``--explicit`` and those which have been pulled in only as dependencies with
+``--implicit``.
In some cases, there may be different configurations of the *same*
version of a package installed. For example, there are two
-installations of of ``libdwarf@20130729`` above. We can look at them
-in more detail using ``spack find -d``, and by asking only to show
+installations of ``libdwarf@20130729`` above. We can look at them
+in more detail using ``spack find --deps``, and by asking only to show
``libdwarf`` packages:
-.. code-block:: sh
+.. code-block:: console
$ spack find --deps libdwarf
==> 2 installed packages.
@@ -289,25 +353,25 @@ Now we see that the two instances of ``libdwarf`` depend on
*different* versions of ``libelf``: 0.8.12 and 0.8.13. This view can
become complicated for packages with many dependencies. If you just
want to know whether two packages' dependencies differ, you can use
-``spack find -l``:
+``spack find --long``:
-.. code-block:: sh
+.. code-block:: console
- $ spack find -l libdwarf
+ $ spack find --long libdwarf
==> 2 installed packages.
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
libdwarf@20130729-d9b90962 libdwarf@20130729-b52fac98
-Now the ``libwarf`` installs have hashes after their names. These are
+Now the ``libdwarf`` installs have hashes after their names. These are
hashes over all of the dependencies of each package. If the hashes
are the same, then the packages have the same dependency configuration.
If you want to know the path where each package is installed, you can
-use ``spack find -p``:
+use ``spack find --paths``:
-.. code-block:: sh
+.. code-block:: console
- $ spack find -p
+ $ spack find --paths
==> 74 installed packages.
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
ImageMagick@6.8.9-10 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/ImageMagick@6.8.9-10-4df950dd
@@ -322,9 +386,9 @@ use ``spack find -p``:
And, finally, you can restrict your search to a particular package
by supplying its name:
-.. code-block:: sh
+.. code-block:: console
- $ spack find -p libelf
+ $ spack find --paths libelf
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
libelf@0.8.11 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.11
libelf@0.8.12 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.12
@@ -335,7 +399,7 @@ by supplying its name:
package. If you want to find only libelf versions greater than version
0.8.12, you could say:
-.. code-block:: sh
+.. code-block:: console
$ spack find libelf@0.8.12:
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
@@ -344,173 +408,24 @@ package. If you want to find only libelf versions greater than version
Finding just the versions of libdwarf built with a particular version
of libelf would look like this:
-.. code-block:: sh
+.. code-block:: console
- $ spack find -l libdwarf ^libelf@0.8.12
+ $ spack find --long libdwarf ^libelf@0.8.12
==> 1 installed packages.
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
libdwarf@20130729-d9b90962
We can also search for packages that have a certain attribute. For example,
-``spack find -l libdwarf +debug`` will show only installations of libdwarf
-with the 'debug' compile-time option enabled, while ``spack find -l +debug``
-will find every installed package with a 'debug' compile-time option enabled.
+``spack find libdwarf +debug`` will show only installations of libdwarf
+with the 'debug' compile-time option enabled.
The full spec syntax is discussed in detail in :ref:`sec-specs`.
-
-.. _compiler-config:
-
-Compiler configuration
------------------------------------
-
-Spack has the ability to build packages with multiple compilers and
-compiler versions. Spack searches for compilers on your machine
-automatically the first time it is run. It does this by inspecting
-your path.
-
-.. _spack-compilers:
-
-``spack compilers``
-~~~~~~~~~~~~~~~~~~~~~~~
-
-You can see which compilers spack has found by running ``spack
-compilers`` or ``spack compiler list``::
-
- $ spack compilers
- ==> Available compilers
- -- gcc ---------------------------------------------------------
- gcc@4.9.0 gcc@4.8.0 gcc@4.7.0 gcc@4.6.2 gcc@4.4.7
- gcc@4.8.2 gcc@4.7.1 gcc@4.6.3 gcc@4.6.1 gcc@4.1.2
- -- intel -------------------------------------------------------
- intel@15.0.0 intel@14.0.0 intel@13.0.0 intel@12.1.0 intel@10.0
- intel@14.0.3 intel@13.1.1 intel@12.1.5 intel@12.0.4 intel@9.1
- intel@14.0.2 intel@13.1.0 intel@12.1.3 intel@11.1
- intel@14.0.1 intel@13.0.1 intel@12.1.2 intel@10.1
- -- clang -------------------------------------------------------
- clang@3.4 clang@3.3 clang@3.2 clang@3.1
- -- pgi ---------------------------------------------------------
- pgi@14.3-0 pgi@13.2-0 pgi@12.1-0 pgi@10.9-0 pgi@8.0-1
- pgi@13.10-0 pgi@13.1-1 pgi@11.10-0 pgi@10.2-0 pgi@7.1-3
- pgi@13.6-0 pgi@12.8-0 pgi@11.1-0 pgi@9.0-4 pgi@7.0-6
-
-Any of these compilers can be used to build Spack packages. More on
-how this is done is in :ref:`sec-specs`.
-
-.. _spack-compiler-add:
-
-``spack compiler add``
-~~~~~~~~~~~~~~~~~~~~~~~
-
-An alias for ``spack compiler find``.
-
-.. _spack-compiler-find:
-
-``spack compiler find``
-~~~~~~~~~~~~~~~~~~~~~~~
-
-If you do not see a compiler in this list, but you want to use it with
-Spack, you can simply run ``spack compiler find`` with the path to
-where the compiler is installed. For example::
-
- $ spack compiler find /usr/local/tools/ic-13.0.079
- ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml
- intel@13.0.079
-
-Or you can run ``spack compiler find`` with no arguments to force
-auto-detection. This is useful if you do not know where compilers are
-installed, but you know that new compilers have been added to your
-``PATH``. For example, using dotkit, you might do this::
-
- $ module load gcc-4.9.0
- $ spack compiler find
- ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml
- gcc@4.9.0
-
-This loads the environment module for gcc-4.9.0 to add it to
-``PATH``, and then it adds the compiler to Spack.
-
-.. _spack-compiler-info:
-
-``spack compiler info``
-~~~~~~~~~~~~~~~~~~~~~~~
-
-If you want to see specifics on a particular compiler, you can run
-``spack compiler info`` on it::
-
- $ spack compiler info intel@15
- intel@15.0.0:
- cc = /usr/local/bin/icc-15.0.090
- cxx = /usr/local/bin/icpc-15.0.090
- f77 = /usr/local/bin/ifort-15.0.090
- fc = /usr/local/bin/ifort-15.0.090
-
-This shows which C, C++, and Fortran compilers were detected by Spack.
-Notice also that we didn\'t have to be too specific about the
-version. We just said ``intel@15``, and information about the only
-matching Intel compiler was displayed.
-
-
-Manual compiler configuration
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If auto-detection fails, you can manually configure a compiler by
-editing your ``~/.spack/compilers.yaml`` file. You can do this by running
-``spack config edit compilers``, which will open the file in your ``$EDITOR``.
-
-Each compiler configuration in the file looks like this::
-
- ...
- compilers:
- - compiler:
- modules = []
- operating_system: OS
- paths:
- cc: /usr/local/bin/icc-15.0.024-beta
- cxx: /usr/local/bin/icpc-15.0.024-beta
- f77: /usr/local/bin/ifort-15.0.024-beta
- fc: /usr/local/bin/ifort-15.0.024-beta
-
- spec: intel@15.0.0:
-
-For compilers, like ``clang``, that do not support Fortran, put
-``None`` for ``f77`` and ``fc``::
-
- clang@3.3svn:
- cc: /usr/bin/clang
- cxx: /usr/bin/clang++
- f77: None
- fc: None
-
-Once you save the file, the configured compilers will show up in the
-list displayed by ``spack compilers``.
-
-You can also add compiler flags to manually configured compilers. The
-valid flags are ``cflags``, ``cxxflags``, ``fflags``, ``cppflags``,
-``ldflags``, and ``ldlibs``. For example::
-
- ...
- compilers:
- - compiler:
- ...
- intel@15.0.0:
- cc: /usr/local/bin/icc-15.0.024-beta
- cxx: /usr/local/bin/icpc-15.0.024-beta
- f77: /usr/local/bin/ifort-15.0.024-beta
- fc: /usr/local/bin/ifort-15.0.024-beta
- cppflags: -O3 -fPIC
- ...
-
-These flags will be treated by spack as if they were enterred from
-the command line each time this compiler is used. The compiler wrappers
-then inject those flags into the compiler command. Compiler flags
-enterred from the command line will be discussed in more detail in the
-following section.
-
.. _sec-specs:
+--------------------
Specs & dependencies
--------------------------
+--------------------
We know that ``spack install``, ``spack uninstall``, and other
commands take a package name with an optional version specifier. In
@@ -518,10 +433,12 @@ Spack, that descriptor is called a *spec*. Spack uses specs to refer
to a particular build configuration (or configurations) of a package.
Specs are more than a package name and a version; you can use them to
specify the compiler, compiler version, architecture, compile options,
-and dependency options for a build. In this section, we\'ll go over
+and dependency options for a build. In this section, we'll go over
the full syntax of specs.
-Here is an example of a much longer spec than we\'ve seen thus far::
+Here is an example of a much longer spec than we've seen thus far:
+
+.. code-block:: none
mpileaks @1.2:1.4 %gcc@4.7.5 +debug -qt arch=bgq_os ^callpath @1.1 %gcc@4.7.2
@@ -600,7 +517,6 @@ some *other* version of ``mpich``. In general, such a configuration
would likely behave unexpectedly at runtime, and Spack enforces this
to ensure a consistent runtime environment.
-
The point of specs is to abstract this full DAG from Spack users. If
a user does not care about the DAG at all, she can refer to mpileaks
by simply writing ``mpileaks``. If she knows that ``mpileaks``
@@ -616,7 +532,7 @@ of dependencies within a spec is that they appear *after* the root
package. For example, these two specs represent exactly the same
configuration:
-.. code-block:: sh
+.. code-block:: none
mpileaks ^callpath@1.0 ^libelf@0.8.3
mpileaks ^libelf@0.8.3 ^callpath@1.0
@@ -637,8 +553,9 @@ could depend on ``mpich@1.2:`` if it can only build with version
Below are more details about the specifiers that you can add to specs.
+^^^^^^^^^^^^^^^^^
Version specifier
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^
A version specifier comes somewhere after a package name and starts
with ``@``. It can be a single version, e.g. ``@1.0``, ``@3``, or
@@ -660,9 +577,9 @@ policies set for the particular Spack installation.
Details about how versions are compared and how Spack determines if
one version is less than another are discussed in the developer guide.
-
+^^^^^^^^^^^^^^^^^^
Compiler specifier
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^
A compiler specifier comes somewhere after a package name and starts
with ``%``. It tells Spack what compiler(s) a particular package
@@ -679,9 +596,9 @@ name or compiler specifier to their left in the spec.
If the compiler spec is omitted, Spack will choose a default compiler
based on site policies.
-
+^^^^^^^^
Variants
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^
Variants are named options associated with a particular package. They are
optional, as each package must provide default values for each variant it
@@ -689,7 +606,7 @@ makes available. Variants can be specified using
a flexible parameter syntax ``name=<value>``. For example,
``spack install libelf debug=True`` will install libelf build with debug
flags. The names of particular variants available for a package depend on
-what was provided by the package author. ``spack into <package>`` will
+what was provided by the package author. ``spack info <package>`` will
provide information on what build variants are available.
For compatibility with earlier versions, variants which happen to be
@@ -700,7 +617,7 @@ compile time option for the libelf package.
Depending on the package a variant may have any default value. For
``libelf`` here, ``debug`` is ``False`` by default, and we turned it on
-with ``debug=True`` or ``+debug``. If a package is ``True`` by default
+with ``debug=True`` or ``+debug``. If a variant is ``True`` by default
you can turn it off by either adding ``-name`` or ``~name`` to the spec.
There are two syntaxes here because, depending on context, ``~`` and
@@ -733,9 +650,9 @@ variants using the backwards compatibility syntax and uses only ``~``
for disabled boolean variants. We allow ``-`` and spaces on the command
line is provided for convenience and legibility.
-
+^^^^^^^^^^^^^^
Compiler Flags
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
Compiler flags are specified using the same syntax as non-boolean variants,
but fulfill a different purpose. While the function of a variant is set by
@@ -751,32 +668,61 @@ command line. From within python files, the same spec would be specified
handles the quote symbols.
The six compiler flags are injected in the order of implicit make commands
-in gnu autotools. If all flags are set, the order is
-``$cppflags $cflags|$cxxflags $ldflags command $ldlibs`` for C and C++ and
-``$fflags $cppflags $ldflags command $ldlibs`` for fortran.
+in GNU Autotools. If all flags are set, the order is
+``$cppflags $cflags|$cxxflags $ldflags <command> $ldlibs`` for C and C++ and
+``$fflags $cppflags $ldflags <command> $ldlibs`` for Fortran.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Compiler environment variables and additional RPATHs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the exceptional case a compiler requires setting special environment
+variables, like an explicit library load path. These can bet set in an
+extra section in the compiler configuration. The user can also specify
+additional ``RPATHs`` that the compiler will add to all executables
+generated by that compiler. This is useful for forcing certain compilers
+to RPATH their own runtime libraries, so that executables will run
+without the need to set ``LD_LIBRARY_PATH``.
+.. code-block:: yaml
+ compilers:
+ - compiler:
+ spec: gcc@4.9.3
+ paths:
+ cc: /opt/gcc/bin/gcc
+ c++: /opt/gcc/bin/g++
+ f77: /opt/gcc/bin/gfortran
+ fc: /opt/gcc/bin/gfortran
+ environment:
+ set:
+ LD_LIBRARY_PATH : /opt/gcc/lib
+ extra_rpaths:
+ - /path/to/some/compiler/runtime/directory
+ - /path/to/some/other/compiler/runtime/directory
+
+^^^^^^^^^^^^^^^^^^^^^^^
Architecture specifiers
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^
The architecture can be specified by using the reserved
words ``target`` and/or ``os`` (``target=x86-64 os=debian7``). You can also
use the triplet form of platform, operating system and processor.
-.. code-block:: sh
+.. code-block:: console
- spack install libelf arch=cray_xc-CNL10-haswell
+ $ spack install libelf arch=cray-CNL10-haswell
Users on non-Cray systems won't have to worry about specifying the architecture.
Spack will autodetect what kind of operating system is on your machine as well
as the processor. For more information on how the architecture can be
-used on Cray machines, check here :ref:`spack-cray`
-
+used on Cray machines, see :ref:`cray-support`
.. _sec-virtual-dependencies:
+--------------------
Virtual dependencies
--------------------------
+--------------------
The dependence graph for ``mpileaks`` we saw above wasn't *quite*
accurate. ``mpileaks`` uses MPI, which is an interface that has many
@@ -819,27 +765,33 @@ version of a virtual package, e.g. if an application needs MPI-2
functions, it can depend on ``mpi@2:`` to indicate that it needs some
implementation that provides MPI-2 functions.
-
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Constraining virtual packages
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When installing a package that depends on a virtual package, you can
opt to specify the particular provider you want to use, or you can let
-Spack pick. For example, if you just type this::
+Spack pick. For example, if you just type this:
+
+.. code-block:: console
- spack install mpileaks
+ $ spack install mpileaks
Then spack will pick a provider for you according to site policies.
-If you really want a particular version, say mpich, then you could
-run this instead::
+If you really want a particular version, say ``mpich``, then you could
+run this instead:
+
+.. code-block:: console
- spack install mpileaks ^mpich
+ $ spack install mpileaks ^mpich
This forces spack to use some version of ``mpich`` for its
implementation. As always, you can be even more specific and require
-a particular ``mpich`` version::
+a particular ``mpich`` version:
+
+.. code-block:: console
- spack install mpileaks ^mpich@3
+ $ spack install mpileaks ^mpich@3
The ``mpileaks`` package in particular only needs MPI-1 commands, so
any MPI implementation will do. If another package depends on
@@ -848,8 +800,9 @@ any MPI implementation will do. If another package depends on
error. Likewise, if you try to plug in some package that doesn't
provide MPI, Spack will raise an error.
+^^^^^^^^^^^^^^^^^^^^^^^^
Specifying Specs by Hash
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^
Complicated specs can become cumbersome to enter on the command line,
especially when many of the qualifications are necessary to
@@ -863,12 +816,13 @@ to be unique, Spack will replace the reference with the spec to which
it refers. Otherwise, it will prompt for a more qualified hash.
Note that this will not work to reinstall a depencency uninstalled by
-``spack uninstall -f``.
+``spack uninstall --force``.
-.. _spack-providers:
+.. _cmd-spack-providers:
+^^^^^^^^^^^^^^^^^^^
``spack providers``
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^
You can see what packages provide a particular virtual package using
``spack providers``. If you wanted to see what packages provide
@@ -886,653 +840,9 @@ versions are now filtered out.
.. _shell-support:
-Integration with module systems
--------------------------------
-
-.. note::
-
- Environment module support is currently experimental and should not
- be considered a stable feature of Spack. In particular, the
- interface and/or generated module names may change in future
- versions.
-
-Spack provides some integration with
-`Environment Modules <http://modules.sourceforge.net/>`_
-and `Dotkit <https://computing.llnl.gov/?set=jobs&page=dotkit>`_ to make
-it easier to use the packages it installed.
-
-
-
-Installing Environment Modules
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In order to use Spack's generated environment modules, you must have
-installed the *Environment Modules* package. On many Linux
-distributions, this can be installed from the vendor's repository:
-
-.. code-block:: sh
-
- yum install environment-modules # (Fedora/RHEL/CentOS)
- apt-get install environment-modules # (Ubuntu/Debian)
-
-If your Linux distribution does not have
-Environment Modules, you can get it with Spack:
-
-.. code-block:: sh
-
- spack install environment-modules
-
-
-In this case to activate it automatically you need to add the following two
-lines to your ``.bashrc`` profile (or similar):
-
-.. code-block:: sh
-
- MODULES_HOME=`spack location -i environment-modules`
- source ${MODULES_HOME}/Modules/init/bash
-
-If you use a Unix shell other than ``bash``, modify the commands above
-accordingly and source the appropriate file in
-``${MODULES_HOME}/Modules/init/``.
-
-
-.. TODO : Add a similar section on how to install dotkit ?
-
-Spack and module systems
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-You can enable shell support by sourcing some files in the
-``/share/spack`` directory.
-
-For ``bash`` or ``ksh``, run:
-
-.. code-block:: sh
-
- . ${SPACK_ROOT}/share/spack/setup-env.sh
-
-For ``csh`` and ``tcsh`` run:
-
-.. code-block:: csh
-
- setenv SPACK_ROOT /path/to/spack
- source $SPACK_ROOT/share/spack/setup-env.csh
-
-You can put the above code in your ``.bashrc`` or ``.cshrc``, and
-Spack's shell support will be available on the command line.
-
-When you install a package with Spack, it automatically generates a module file
-that lets you add the package to your environment.
-
-Currently, Spack supports the generation of `Environment Modules
-<http://wiki.tcl.tk/12999>`_ and `Dotkit
-<https://computing.llnl.gov/?set=jobs&page=dotkit>`_. Generated
-module files for each of these systems can be found in these
-directories:
-
-.. code-block:: sh
-
- ${SPACK_ROOT}/share/spack/modules
- ${SPACK_ROOT}/share/spack/dotkit
-
-The directories are automatically added to your ``MODULEPATH`` and
-``DK_NODE`` environment variables when you enable Spack's `shell
-support <shell-support_>`_.
-
-
-Using Modules & Dotkits
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If you have shell support enabled you should be able to run either
-``module avail`` or ``use -l spack`` to see what modules/dotkits have
-been installed. Here is sample output of those programs, showing lots
-of installed packages.
-
- .. code-block:: sh
-
- $ module avail
-
- ------- /home/gamblin2/spack/share/spack/modules/linux-debian7-x86_64 --------
- adept-utils@1.0%gcc@4.4.7-5adef8da libelf@0.8.13%gcc@4.4.7
- automaded@1.0%gcc@4.4.7-d9691bb0 libelf@0.8.13%intel@15.0.0
- boost@1.55.0%gcc@4.4.7 mpc@1.0.2%gcc@4.4.7-559607f5
- callpath@1.0.1%gcc@4.4.7-5dce4318 mpfr@3.1.2%gcc@4.4.7
- dyninst@8.1.2%gcc@4.4.7-b040c20e mpich@3.0.4%gcc@4.4.7
- gcc@4.9.1%gcc@4.4.7-93ab98c5 mpich@3.0.4%gcc@4.9.0
- gmp@6.0.0a%gcc@4.4.7 mrnet@4.1.0%gcc@4.4.7-72b7881d
- graphlib@2.0.0%gcc@4.4.7 netgauge@2.4.6%gcc@4.9.0-27912b7b
- launchmon@1.0.1%gcc@4.4.7 stat@2.1.0%gcc@4.4.7-51101207
- libNBC@1.1.1%gcc@4.9.0-27912b7b sundials@2.5.0%gcc@4.9.0-27912b7b
- libdwarf@20130729%gcc@4.4.7-b52fac98
-
- .. code-block:: sh
-
- $ use -l spack
-
- spack ----------
- adept-utils@1.0%gcc@4.4.7-5adef8da - adept-utils @1.0
- automaded@1.0%gcc@4.4.7-d9691bb0 - automaded @1.0
- boost@1.55.0%gcc@4.4.7 - boost @1.55.0
- callpath@1.0.1%gcc@4.4.7-5dce4318 - callpath @1.0.1
- dyninst@8.1.2%gcc@4.4.7-b040c20e - dyninst @8.1.2
- gmp@6.0.0a%gcc@4.4.7 - gmp @6.0.0a
- libNBC@1.1.1%gcc@4.9.0-27912b7b - libNBC @1.1.1
- libdwarf@20130729%gcc@4.4.7-b52fac98 - libdwarf @20130729
- libelf@0.8.13%gcc@4.4.7 - libelf @0.8.13
- libelf@0.8.13%intel@15.0.0 - libelf @0.8.13
- mpc@1.0.2%gcc@4.4.7-559607f5 - mpc @1.0.2
- mpfr@3.1.2%gcc@4.4.7 - mpfr @3.1.2
- mpich@3.0.4%gcc@4.4.7 - mpich @3.0.4
- mpich@3.0.4%gcc@4.9.0 - mpich @3.0.4
- netgauge@2.4.6%gcc@4.9.0-27912b7b - netgauge @2.4.6
- sundials@2.5.0%gcc@4.9.0-27912b7b - sundials @2.5.0
-
-The names here should look familiar, they're the same ones from
-``spack find``. You *can* use the names here directly. For example,
-you could type either of these commands to load the callpath module:
-
-.. code-block:: sh
-
- use callpath@1.0.1%gcc@4.4.7-5dce4318
-
-.. code-block:: sh
-
- module load callpath@1.0.1%gcc@4.4.7-5dce4318
-
-Neither of these is particularly pretty, easy to remember, or
-easy to type. Luckily, Spack has its own interface for using modules
-and dotkits. You can use the same spec syntax you're used to:
-
- ========================= ==========================
- Environment Modules Dotkit
- ========================= ==========================
- ``spack load <spec>`` ``spack use <spec>``
- ``spack unload <spec>`` ``spack unuse <spec>``
- ========================= ==========================
-
-And you can use the same shortened names you use everywhere else in
-Spack. For example, this will add the ``mpich`` package built with
-``gcc`` to your path:
-
-.. code-block:: sh
-
- $ spack install mpich %gcc@4.4.7
-
- # ... wait for install ...
-
- $ spack use mpich %gcc@4.4.7
- Prepending: mpich@3.0.4%gcc@4.4.7 (ok)
- $ which mpicc
- ~/src/spack/opt/linux-debian7-x86_64/gcc@4.4.7/mpich@3.0.4/bin/mpicc
-
-Or, similarly with modules, you could type:
-
-.. code-block:: sh
-
- $ spack load mpich %gcc@4.4.7
-
-These commands will add appropriate directories to your ``PATH``,
-``MANPATH``, ``CPATH``, and ``LD_LIBRARY_PATH``. When you no longer want to use
-a package, you can type unload or unuse similarly:
-
-.. code-block:: sh
-
- $ spack unload mpich %gcc@4.4.7 # modules
- $ spack unuse mpich %gcc@4.4.7 # dotkit
-
-.. note::
-
- These ``use``, ``unuse``, ``load``, and ``unload`` subcommands are
- only available if you have enabled Spack's shell support *and* you
- have dotkit or modules installed on your machine.
-
-Ambiguous module names
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-If a spec used with load/unload or use/unuse is ambiguous (i.e. more
-than one installed package matches it), then Spack will warn you:
-
-.. code-block:: sh
-
- $ spack load libelf
- ==> Error: Multiple matches for spec libelf. Choose one:
- libelf@0.8.13%gcc@4.4.7 arch=linux-debian7-x86_64
- libelf@0.8.13%intel@15.0.0 arch=linux-debian7-x86_64
-
-You can either type the ``spack load`` command again with a fully
-qualified argument, or you can add just enough extra constraints to
-identify one package. For example, above, the key differentiator is
-that one ``libelf`` is built with the Intel compiler, while the other
-used ``gcc``. You could therefore just type:
-
-.. code-block:: sh
-
- $ spack load libelf %intel
-
-To identify just the one built with the Intel compiler.
-
-Module files generation and customization
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Environment Modules and Dotkit files are generated when packages are installed,
-and are placed in the following directories under the Spack root:
-
-.. code-block:: sh
-
- ${SPACK_ROOT}/share/spack/modules
- ${SPACK_ROOT}/share/spack/dotkit
-
-The content that gets written in each module file can be customized in two ways:
-
- 1. overriding part of the ``spack.Package`` API within a ``package.py``
- 2. writing dedicated configuration files
-
-Override ``Package`` API
-^^^^^^^^^^^^^^^^^^^^^^^^
-There are currently two methods in ``spack.Package`` that may affect the content
-of module files:
-
-.. code-block:: python
-
- def setup_environment(self, spack_env, run_env):
- """Set up the compile and runtime environments for a package."""
- pass
-
-
-Recursive Modules
-``````````````````
-
-In some cases, it is desirable to load not just a module, but also all
-the modules it depends on. This is not required for most modules
-because Spack builds binaries with RPATH support. However, not all
-packages use RPATH to find their dependencies: this can be true in
-particular for Python extensions, which are currently *not* built with
-RPATH.
-
-Modules may be loaded recursively with the ``load`` command's
-``--dependencies`` or ``-r`` argument:
-
-.. code-block:: sh
-
- $ spack load --dependencies <spec> ...
-
-More than one spec may be placed on the command line here.
-
-Module Commands for Shell Scripts
-``````````````````````````````````
-
-Although Spack is flexible, the ``module`` command is much faster.
-This could become an issue when emitting a series of ``spack load``
-commands inside a shell script. By adding the ``--shell`` flag,
-``spack module find`` may also be used to generate code that can be
-cut-and-pasted into a shell script. For example:
-
-.. code-block:: sh
-
- $ spack module find tcl --dependencies --shell py-numpy git
- # bzip2@1.0.6%gcc@4.9.3=linux-x86_64
- module load bzip2-1.0.6-gcc-4.9.3-ktnrhkrmbbtlvnagfatrarzjojmkvzsx
- # ncurses@6.0%gcc@4.9.3=linux-x86_64
- module load ncurses-6.0-gcc-4.9.3-kaazyneh3bjkfnalunchyqtygoe2mncv
- # zlib@1.2.8%gcc@4.9.3=linux-x86_64
- module load zlib-1.2.8-gcc-4.9.3-v3ufwaahjnviyvgjcelo36nywx2ufj7z
- # sqlite@3.8.5%gcc@4.9.3=linux-x86_64
- module load sqlite-3.8.5-gcc-4.9.3-a3eediswgd5f3rmto7g3szoew5nhehbr
- # readline@6.3%gcc@4.9.3=linux-x86_64
- module load readline-6.3-gcc-4.9.3-se6r3lsycrwxyhreg4lqirp6xixxejh3
- # python@3.5.1%gcc@4.9.3=linux-x86_64
- module load python-3.5.1-gcc-4.9.3-5q5rsrtjld4u6jiicuvtnx52m7tfhegi
- # py-setuptools@20.5%gcc@4.9.3=linux-x86_64
- module load py-setuptools-20.5-gcc-4.9.3-4qr2suj6p6glepnedmwhl4f62x64wxw2
- # py-nose@1.3.7%gcc@4.9.3=linux-x86_64
- module load py-nose-1.3.7-gcc-4.9.3-pwhtjw2dvdvfzjwuuztkzr7b4l6zepli
- # openblas@0.2.17%gcc@4.9.3+shared=linux-x86_64
- module load openblas-0.2.17-gcc-4.9.3-pw6rmlom7apfsnjtzfttyayzc7nx5e7y
- # py-numpy@1.11.0%gcc@4.9.3+blas+lapack=linux-x86_64
- module load py-numpy-1.11.0-gcc-4.9.3-mulodttw5pcyjufva4htsktwty4qd52r
- # curl@7.47.1%gcc@4.9.3=linux-x86_64
- module load curl-7.47.1-gcc-4.9.3-ohz3fwsepm3b462p5lnaquv7op7naqbi
- # autoconf@2.69%gcc@4.9.3=linux-x86_64
- module load autoconf-2.69-gcc-4.9.3-bkibjqhgqm5e3o423ogfv2y3o6h2uoq4
- # cmake@3.5.0%gcc@4.9.3~doc+ncurses+openssl~qt=linux-x86_64
- module load cmake-3.5.0-gcc-4.9.3-x7xnsklmgwla3ubfgzppamtbqk5rwn7t
- # expat@2.1.0%gcc@4.9.3=linux-x86_64
- module load expat-2.1.0-gcc-4.9.3-6pkz2ucnk2e62imwakejjvbv6egncppd
- # git@2.8.0-rc2%gcc@4.9.3+curl+expat=linux-x86_64
- module load git-2.8.0-rc2-gcc-4.9.3-3bib4hqtnv5xjjoq5ugt3inblt4xrgkd
-
-The script may be further edited by removing unnecessary modules.
-This script may be directly executed in bash via
-
-.. code-block :: sh
-
- source <( spack module find tcl --dependencies --shell py-numpy git )
-
-
-Regenerating Module files
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. code-block:: python
-
- def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
- """Set up the environment of packages that depend on this one"""
- pass
-
-As briefly stated in the comments, the first method lets you customize the
-module file content for the package you are currently writing, the second
-allows for modifications to your dependees module file. In both cases one
-needs to fill ``run_env`` with the desired list of environment modifications.
-
-Example : ``builtin/packages/python/package.py``
-""""""""""""""""""""""""""""""""""""""""""""""""
-
-The ``python`` package that comes with the ``builtin`` Spack repository
-overrides ``setup_dependent_environment`` in the following way:
-
-.. code-block:: python
-
- def setup_dependent_environment(self, spack_env, run_env, extension_spec):
- # ...
- if extension_spec.package.extends(self.spec):
- run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir))
-
-to insert the appropriate ``PYTHONPATH`` modifications in the module
-files of python packages.
-
-Configuration files
-^^^^^^^^^^^^^^^^^^^
-
-Another way of modifying the content of module files is writing a
-``modules.yaml`` configuration file. Following usual Spack conventions, this
-file can be placed either at *site* or *user* scope.
-
-The default site configuration reads:
-
- .. literalinclude:: ../../../etc/spack/modules.yaml
- :language: yaml
-
-It basically inspects the installation prefixes for the
-existence of a few folders and, if they exist, it prepends a path to a given
-list of environment variables.
-
-For each module system that can be enabled a finer configuration is possible:
-
-.. code-block:: yaml
-
- modules:
- tcl:
- # contains environment modules specific customizations
- dotkit:
- # contains dotkit specific customizations
-
-The structure under the ``tcl`` and ``dotkit`` keys is almost equal, and will
-be showcased in the following by some examples.
-
-Select module files by spec constraints
-"""""""""""""""""""""""""""""""""""""""
-Using spec syntax it's possible to have different customizations for different
-groups of module files.
-
-Considering :
-
-.. code-block:: yaml
-
- modules:
- tcl:
- all: # Default addition for every package
- environment:
- set:
- BAR: 'bar'
- ^openmpi:: # A double ':' overrides previous rules
- environment:
- set:
- BAR: 'baz'
- zlib:
- environment:
- prepend_path:
- LD_LIBRARY_PATH: 'foo'
- zlib%gcc@4.8:
- environment:
- unset:
- - FOOBAR
-
-what will happen is that:
-
- - every module file will set ``BAR=bar``
- - unless the associated spec satisfies ``^openmpi`` in which case ``BAR=baz``
- - any spec that satisfies ``zlib`` will additionally prepend ``foo`` to ``LD_LIBRARY_PATH``
- - any spec that satisfies ``zlib%gcc@4.8`` will additionally unset ``FOOBAR``
-
-.. note::
- Order does matter
- The modifications associated with the ``all`` keyword are always evaluated
- first, no matter where they appear in the configuration file. All the other
- spec constraints are instead evaluated top to bottom.
-
-Filter modifications out of module files
-""""""""""""""""""""""""""""""""""""""""
-
-Modifications to certain environment variables in module files are generated by
-default. Suppose you would like to avoid having ``CPATH`` and ``LIBRARY_PATH``
-modified by your dotkit modules. Then :
-
-.. code-block:: yaml
-
- modules:
- dotkit:
- all:
- filter:
- environment_blacklist: ['CPATH', 'LIBRARY_PATH'] # Exclude changes to any of these variables
-
-will generate dotkit module files that will not contain modifications to either
-``CPATH`` or ``LIBRARY_PATH`` and environment module files that instead will
-contain those modifications.
-
-Autoload dependencies
-"""""""""""""""""""""
-
-The following lines in ``modules.yaml``:
-
-.. code-block:: yaml
-
- modules:
- tcl:
- all:
- autoload: 'direct'
-
-will produce environment module files that will automatically load their direct
-dependencies.
-
-.. note::
- Allowed values for ``autoload`` statements
- Allowed values for ``autoload`` statements are either ``none``, ``direct``
- or ``all``. In ``tcl`` configuration it is possible to use the option
- ``prerequisites`` that accepts the same values and will add ``prereq``
- statements instead of automatically loading other modules.
-
-Blacklist or whitelist the generation of specific module files
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-Sometimes it is desirable not to generate module files, a common use case being
-not providing the users with software built using the system compiler.
-
-A configuration file like:
-
-.. code-block:: yaml
-
- modules:
- tcl:
- whitelist: ['gcc', 'llvm'] # Whitelist will have precedence over blacklist
- blacklist: ['%gcc@4.4.7'] # Assuming gcc@4.4.7 is the system compiler
-
-will skip module file generation for anything that satisfies ``%gcc@4.4.7``,
-with the exception of specs that satisfy ``gcc`` or ``llvm``.
-
-Customize the naming scheme and insert conflicts
-""""""""""""""""""""""""""""""""""""""""""""""""
-
-A configuration file like:
-
-.. code-block:: yaml
-
- modules:
- tcl:
- naming_scheme: '{name}/{version}-{compiler.name}-{compiler.version}'
- all:
- conflict: ['{name}', 'intel/14.0.1']
-
-will create module files that will conflict with ``intel/14.0.1`` and with the
-base directory of the same module, effectively preventing the possibility to
-load two or more versions of the same software at the same time.
-
-.. note::
- Tokens available for the naming scheme
- currently only the tokens shown in the example are available to construct
- the naming scheme
-
-.. note::
- The ``conflict`` option is ``tcl`` specific
-
-Regenerating module files
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Sometimes you may need to regenerate the modules files. For example,
-if newer, fancier module support is added to Spack at some later date,
-you may want to regenerate all the modules to take advantage of these
-new features.
-
-.. _spack-module:
-
-``spack module refresh``
-""""""""""""""""""""""""
-
-Running ``spack module refresh`` will remove the
-``share/spack/modules`` and ``share/spack/dotkit`` directories, then
-regenerate all module and dotkit files from scratch:
-
-.. code-block:: sh
-
- $ spack module refresh
- ==> Regenerating tcl module files.
- ==> Regenerating dotkit module files.
-
-
-.. _extensions:
-
-Filesystem Views
--------------------------------
-
-.. Maybe this is not the right location for this documentation.
-
-The Spack installation area allows for many package installation trees
-to coexist and gives the user choices as to what versions and variants
-of packages to use. To use them, the user must rely on a way to
-aggregate a subset of those packages. The section on Environment
-Modules gives one good way to do that which relies on setting various
-environment variables. An alternative way to aggregate is through
-**filesystem views**.
-
-A filesystem view is a single directory tree which is the union of the
-directory hierarchies of the individual package installation trees
-that have been included. The files of the view's installed packages
-are brought into the view by symbolic or hard links back to their
-location in the original Spack installation area. As the view is
-formed, any clashes due to a file having the exact same path in its
-package installation tree are handled in a first-come-first-served
-basis and a warning is printed. Packages and their dependencies can
-be both added and removed. During removal, empty directories will be
-purged. These operations can be limited to pertain to just the
-packages listed by the user or to exclude specific dependencies and
-they allow for software installed outside of Spack to coexist inside
-the filesystem view tree.
-
-By its nature, a filesystem view represents a particular choice of one
-set of packages among all the versions and variants that are available
-in the Spack installation area. It is thus equivalent to the
-directory hiearchy that might exist under ``/usr/local``. While this
-limits a view to including only one version/variant of any package, it
-provides the benefits of having a simpler and traditional layout which
-may be used without any particular knowledge that its packages were
-built by Spack.
-
-Views can be used for a variety of purposes including:
-
-- A central installation in a traditional layout, eg ``/usr/local`` maintained over time by the sysadmin.
-- A self-contained installation area which may for the basis of a top-level atomic versioning scheme, eg ``/opt/pro`` vs ``/opt/dev``.
-- Providing an atomic and monolithic binary distribution, eg for delivery as a single tarball.
-- Producing ephemeral testing or developing environments.
-
-Using Filesystem Views
-~~~~~~~~~~~~~~~~~~~~~~
-
-A filesystem view is created and packages are linked in by the ``spack
-view`` command's ``symlink`` and ``hardlink`` sub-commands. The
-``spack view remove`` command can be used to unlink some or all of the
-filesystem view.
-
-The following example creates a filesystem view based
-on an installed ``cmake`` package and then removes from the view the
-files in the ``cmake`` package while retaining its dependencies.
-
-.. code-block:: sh
-
-
- $ spack view -v symlink myview cmake@3.5.2
- ==> Linking package: "ncurses"
- ==> Linking package: "zlib"
- ==> Linking package: "openssl"
- ==> Linking package: "cmake"
-
- $ ls myview/
- bin doc etc include lib share
-
- $ ls myview/bin/
- captoinfo clear cpack ctest infotocap openssl tabs toe tset
- ccmake cmake c_rehash infocmp ncurses6-config reset tic tput
-
- $ spack view -v -d false rm myview cmake@3.5.2
- ==> Removing package: "cmake"
-
- $ ls myview/bin/
- captoinfo c_rehash infotocap openssl tabs toe tset
- clear infocmp ncurses6-config reset tic tput
-
-
-Limitations of Filesystem Views
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This section describes some limitations that should be considered in
-using filesystems views.
-
-Filesystem views are merely organizational. The binary executable
-programs, shared libraries and other build products found in a view
-are mere links into the "real" Spack installation area. If a view is
-built with symbolic links it requires the Spack-installed package to
-be kept in place. Building a view with hardlinks removes this
-requirement but any internal paths (eg, rpath or ``#!`` interpreter
-specifications) will still require the Spack-installed package files
-to be in place.
-
-.. FIXME: reference the relocation work of Hegner and Gartung.
-
-As described above, when a view is built only a single instance of a
-file may exist in the unified filesystem tree. If more than one
-package provides a file at the same path (relative to its own root)
-then it is the first package added to the view that "wins". A warning
-is printed and it is up to the user to determine if the conflict
-matters.
-
-It is up to the user to assure a consistent view is produced. In
-particular if the user excludes packages, limits the following of
-dependencies or removes packages the view may become inconsistent. In
-particular, if two packages require the same sub-tree of dependencies,
-removing one package (recursively) will remove its dependencies and
-leave the other package broken.
-
-
-
-
-
+---------------------------
Extensions & Python support
-------------------------------------
+---------------------------
Spack's installation model assumes that each package will live in its
own install prefix. However, certain packages are typically installed
@@ -1545,21 +855,22 @@ Spack has support for this type of installation as well. In Spack,
a package that can live inside the prefix of another package is called
an *extension*. Suppose you have Python installed like so:
-.. code-block:: sh
+.. code-block:: console
$ spack find python
==> 1 installed packages.
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
python@2.7.8
-.. _spack-extensions:
+.. _cmd-spack-extensions:
+^^^^^^^^^^^^^^^^^^^^
``spack extensions``
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^
You can find extensions for your Python installation like this:
-.. code-block:: sh
+.. code-block:: console
$ spack extensions python
==> python@2.7.8%gcc@4.4.7 arch=linux-debian7-x86_64-703c7a96
@@ -1584,11 +895,11 @@ You can find extensions for your Python installation like this:
The extensions are a subset of what's returned by ``spack list``, and
they are packages like any other. They are installed into their own
-prefixes, and you can see this with ``spack find -p``:
+prefixes, and you can see this with ``spack find --paths``:
-.. code-block:: sh
+.. code-block:: console
- $ spack find -p py-numpy
+ $ spack find --paths py-numpy
==> 1 installed packages.
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
py-numpy@1.9.1 /g/g21/gamblin2/src/spack/opt/linux-debian7-x86_64/gcc@4.4.7/py-numpy@1.9.1-66733244
@@ -1596,7 +907,7 @@ prefixes, and you can see this with ``spack find -p``:
However, even though this package is installed, you cannot use it
directly when you run ``python``:
-.. code-block:: sh
+.. code-block:: console
$ spack load python
$ python
@@ -1609,8 +920,9 @@ directly when you run ``python``:
ImportError: No module named numpy
>>>
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Extensions & Environment Modules
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are two ways to get ``numpy`` working in Python. The first is
to use :ref:`shell-support`. You can simply ``use`` or ``load`` the
@@ -1619,14 +931,14 @@ in your current shell.
For tcl modules:
-.. code-block:: sh
+.. code-block:: console
$ spack load python
$ spack load py-numpy
or, for dotkit:
-.. code-block:: sh
+.. code-block:: console
$ spack use python
$ spack use py-numpy
@@ -1634,9 +946,9 @@ or, for dotkit:
Now ``import numpy`` will succeed for as long as you keep your current
session open.
-
+^^^^^^^^^^^^^^^^^^^^^
Activating Extensions
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^
It is often desirable to have certain packages *always* available as
part of a Python installation. Spack offers a more permanent solution
@@ -1644,12 +956,13 @@ for this case. Instead of requiring users to load particular
environment modules, you can *activate* the package within the Python
installation:
-.. _spack-activate:
+.. _cmd-spack-activate:
+^^^^^^^^^^^^^^^^^^
``spack activate``
-^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^
-.. code-block:: sh
+.. code-block:: console
$ spack activate py-numpy
==> Activated extension py-setuptools@11.3.1%gcc@4.4.7 arch=linux-debian7-x86_64-3c74eb69 for python@2.7.8%gcc@4.4.7.
@@ -1666,7 +979,7 @@ once all dependencies were activated in the ``python`` installation,
If we run ``spack extensions`` again, we now see the three new
packages listed as activated:
-.. code-block:: sh
+.. code-block:: console
$ spack extensions python
==> python@2.7.8%gcc@4.4.7 arch=linux-debian7-x86_64-703c7a96
@@ -1691,7 +1004,6 @@ packages listed as activated:
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
py-nose@1.3.4 py-numpy@1.9.1 py-setuptools@11.3.1
-
Now, when a user runs python, ``numpy`` will be available for import
*without* the user having to explicitly loaded. ``python@2.7.8`` now
acts like a system Python installation with ``numpy`` installed inside
@@ -1709,50 +1021,56 @@ into the same prefix. Users who want a different version of a package
can still get it by using environment modules, but they will have to
explicitly load their preferred version.
-``spack activate -f``
-^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+``spack activate --force``
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
If, for some reason, you want to activate a package *without* its
-dependencies, you can use ``spack activate -f``:
+dependencies, you can use ``spack activate --force``:
-.. code-block:: sh
+.. code-block:: console
- $ spack activate -f py-numpy
+ $ spack activate --force py-numpy
==> Activated extension py-numpy@1.9.1%gcc@4.4.7 arch=linux-debian7-x86_64-66733244 for python@2.7.8%gcc@4.4.7.
-.. _spack-deactivate:
+.. _cmd-spack-deactivate:
+^^^^^^^^^^^^^^^^^^^^
``spack deactivate``
-^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^
We've seen how activating an extension can be used to set up a default
version of a Python module. Obviously, you may want to change that at
some point. ``spack deactivate`` is the command for this. There are
several variants:
- * ``spack deactivate <extension>`` will deactivate a single
- extension. If another activated extension depends on this one,
- Spack will warn you and exit with an error.
- * ``spack deactivate -f <extension>`` deactivates an extension
- regardless of packages that depend on it.
- * ``spack deactivate -a <extension>`` deactivates an extension and
- all of its dependencies. Use ``-f`` to disregard dependents.
- * ``spack deactivate -a <extendee>`` deactivates *all* activated
- extensions of a package. For example, to deactivate *all* python
- extensions, use::
+* ``spack deactivate <extension>`` will deactivate a single
+ extension. If another activated extension depends on this one,
+ Spack will warn you and exit with an error.
+* ``spack deactivate --force <extension>`` deactivates an extension
+ regardless of packages that depend on it.
+* ``spack deactivate --all <extension>`` deactivates an extension and
+ all of its dependencies. Use ``--force`` to disregard dependents.
+* ``spack deactivate --all <extendee>`` deactivates *all* activated
+ extensions of a package. For example, to deactivate *all* python
+ extensions, use:
+
+ .. code-block:: console
- spack deactivate -a python
+ $ spack deactivate --all python
+-----------------------
Filesystem requirements
---------------------------
+-----------------------
Spack currently needs to be run from a filesystem that supports
``flock`` locking semantics. Nearly all local filesystems and recent
versions of NFS support this, but parallel filesystems may be mounted
without ``flock`` support enabled. You can determine how your
- filesystems are mounted with ``mount -p``. The output for a Lustre
+filesystems are mounted with ``mount -p``. The output for a Lustre
filesystem might look like this:
-.. code-block:: sh
+.. code-block:: console
$ mount -l | grep lscratch
pilsner-mds1-lnet0@o2ib100:/lsd on /p/lscratchd type lustre (rw,nosuid,noauto,_netdev,lazystatfs,flock)
@@ -1764,7 +1082,7 @@ system administrator to enable ``flock``.
This issue typically manifests with the error below:
-.. code-block:: sh
+.. code-block:: console
$ ./spack find
Traceback (most recent call last):
@@ -1773,7 +1091,7 @@ This issue typically manifests with the error below:
File "./spack", line 154,' in main
return_val = command(parser, args)
File "./spack/lib/spack/spack/cmd/find.py", line 170, in find
- specs = set(spack.installed_db.query(**q_args))
+ specs = set(spack.installed_db.query(\**q_args))
File "./spack/lib/spack/spack/database.py", line 551, in query
with self.read_transaction():
File "./spack/lib/spack/spack/database.py", line 598, in __enter__
@@ -1789,155 +1107,18 @@ This issue typically manifests with the error below:
A nicer error message is TBD in future versions of Spack.
-.. _spack-cray:
-
-Spack on Cray
------------------------------
-
-Spack differs slightly when used on a Cray system. The architecture spec
-can differentiate between the front-end and back-end processor and operating system.
-For example, on Edison at NERSC, the back-end target processor
-is \"Ivy Bridge\", so you can specify to use the back-end this way:
-
-.. code-block:: sh
-
- spack install zlib target=ivybridge
-
-You can also use the operating system to build against the back-end:
-
-.. code-block:: sh
-
- spack install zlib os=CNL10
-
-Notice that the name includes both the operating system name and the major
-version number concatenated together.
-
-Alternatively, if you want to build something for the front-end,
-you can specify the front-end target processor. The processor for a login node
-on Edison is \"Sandy bridge\" so we specify on the command line like so:
-
-.. code-block:: sh
-
- spack install zlib target=sandybridge
-
-And the front-end operating system is:
-
-.. code-block:: sh
-
- spack install zlib os=SuSE11
-
-
-
-Cray compiler detection
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Spack can detect compilers using two methods. For the front-end, we treat
-everything the same. The difference lies in back-end compiler detection.
-Back-end compiler detection is made via the Tcl module avail command.
-Once it detects the compiler it writes the appropriate PrgEnv and compiler
-module name to compilers.yaml and sets the paths to each compiler with Cray\'s
-compiler wrapper names (i.e. cc, CC, ftn). During build time, Spack will load
-the correct PrgEnv and compiler module and will call appropriate wrapper.
-
-The compilers.yaml config file will also differ. There is a
-modules section that is filled with the compiler\'s Programming Environment
-and module name. On other systems, this field is empty []::
-
- ...
- - compiler:
- modules:
- - PrgEnv-intel
- - intel/15.0.109
- ...
-
-As mentioned earlier, the compiler paths will look different on a Cray system.
-Since most compilers are invoked using cc, CC and ftn, the paths for each
-compiler are replaced with their respective Cray compiler wrapper names::
-
- ...
- paths:
- cc: cc
- cxx: CC
- f77: ftn
- fc: ftn
- ...
-
-As opposed to an explicit path to the compiler executable. This allows Spack
-to call the Cray compiler wrappers during build time.
-
-For more on compiler configuration, check out :ref:`compiler-config`.
-
-Spack sets the default Cray link type to dynamic, to better match other
-other platforms. Individual packages can enable static linking (which is the
-default outside of Spack on cray systems) using the -static flag.
-
-Setting defaults and using Cray modules
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If you want to use default compilers for each PrgEnv and also be able
-to load cray external modules, you will need to set up a packages.yaml.
-
-Here\'s an example of an external configuration for cray modules:
-
-.. code-block:: yaml
-
- packages:
- mpi:
- modules:
- mpich@7.3.1%gcc@5.2.0 arch=cray_xc-haswell-CNL10: cray-mpich
- mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-haswell-CNL10: cray-mpich
-
-This tells Spack that for whatever package that depends on mpi, load the
-cray-mpich module into the environment. You can then be able to use whatever
-environment variables, libraries, etc, that are brought into the environment
-via module load.
-
-You can set the default compiler that Spack can use for each compiler type.
-If you want to use the Cray defaults, then set them under *all:* in packages.yaml.
-In the compiler field, set the compiler specs in your order of preference.
-Whenever you build with that compiler type, Spack will concretize to that version.
-
-Here is an example of a full packages.yaml used at NERSC
-
-.. code-block:: yaml
-
- packages:
- mpi:
- modules:
- mpich@7.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-mpich
- mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-SuSE11-ivybridge: cray-mpich
- buildable: False
- netcdf:
- modules:
- netcdf@4.3.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-netcdf
- netcdf@4.3.3.1%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-netcdf
- buildable: False
- hdf5:
- modules:
- hdf5@1.8.14%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-hdf5
- hdf5@1.8.14%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-hdf5
- buildable: False
- all:
- compiler: [gcc@5.2.0, intel@16.0.0.109]
-
-Here we tell spack that whenever we want to build with gcc use version 5.2.0 or
-if we want to build with intel compilers, use version 16.0.0.109. We add a spec
-for each compiler type for each cray modules. This ensures that for each
-compiler on our system we can use that external module.
-
-
-For more on external packages check out the section :ref:`sec-external_packages`.
-
+------------
Getting Help
------------------------
+------------
-.. _spack-help:
+.. _cmd-spack-help:
+^^^^^^^^^^^^^^
``spack help``
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
If you don't find what you need here, the ``help`` subcommand will
-print out out a list of *all* of ``spack``'s options and subcommands:
+print out out a list of *all* of spack's options and subcommands:
.. command-output:: spack help
@@ -1946,5 +1127,5 @@ usage information for a particular subcommand:
.. command-output:: spack help install
-Alternately, you can use ``spack -h`` in place of ``spack help``, or
-``spack <subcommand> -h`` to get help on a particular subcommand.
+Alternately, you can use ``spack --help`` in place of ``spack help``, or
+``spack <subcommand> --help`` to get help on a particular subcommand.
diff --git a/lib/spack/docs/basic_usage_tutorial.rst b/lib/spack/docs/basic_usage_tutorial.rst
new file mode 100644
index 0000000000..cf8c654c0f
--- /dev/null
+++ b/lib/spack/docs/basic_usage_tutorial.rst
@@ -0,0 +1,1253 @@
+.. _basics_tutorial:
+
+=========================================
+Basic Installation Tutorial
+=========================================
+
+This tutorial will guide you through the process of installing software
+using Spack. We will first cover the `spack install` command, focusing on
+the power of the spec syntax and the flexibility it gives to users. We
+will also cover the `spack find` command for viewing installed packages
+and the `spack uninstall` command. Finally, we will touch on how Spack
+manages compilers, especially as it relates to using Spack-built
+compilers within Spack. We will include full output from all of the
+commands demonstrated, although we will frequently call attention to only
+small portions of that output (or merely to the fact that it
+succeeded). The provided output is all from a cluster running Red Hat
+Enterprise Linux.
+
+.. _basics-tutorial-install:
+
+----------------
+Installing Spack
+----------------
+
+Spack works out of the box. Simply clone spack and get going.
+
+.. code-block:: console
+
+ becker33:~$ git clone https://github.com/LLNL/spack.git
+ Initialized empty Git repository in /g/g0/becker33/testclone/spack/.git/
+ remote: Counting objects: 47125, done.
+ remote: Compressing objects: 100% (68/68), done.
+ remote: Total 47125 (delta 16), reused 2 (delta 2), pack-reused 47047
+ Receiving objects: 100% (47125/47125), 12.02 MiB | 2.11 MiB/s, done.
+ Resolving deltas: 100% (23044/23044), done.
+ becker33:~$ cd spack
+
+Then add Spack to your path.
+
+.. code-block:: console
+
+ becker33:spack$ export PATH=~/spack/bin/spack:$PATH
+
+You're good to go!
+
+-----------------
+What is in Spack?
+-----------------
+
+The ``spack list`` command shows available packages.
+
+.. code-block:: console
+
+ becker33:spack$ spack list
+ ==> 1016 packages.
+ abinit hwloc piranha r-rjava
+ ack hydra pixman r-rjson
+ activeharmony hypre pkg-config r-rjsonio
+ ...
+
+The ``spack list`` command can also take a query string. Spack
+automatically adds wildcards to both ends of the string. For example,
+we can view all available python packages.
+
+.. code-block:: console
+
+ becker33:spack$ spack list py
+ ==> 129 packages.
+ py-3to2 py-epydoc py-nestle py-pycparser py-six
+ py-alabaster py-flake8 py-netcdf py-pydatalog py-sncosmo
+ py-argcomplete py-funcsigs py-networkx py-pyelftools py-snowballstemmer
+ ...
+
+-------------------
+Installing Packages
+-------------------
+
+Installing a package with Spack is very simple. To install a piece of
+software, simply type ``spack install <package_name>``
+
+.. code-block:: console
+
+ $ spack install libelf
+ ==> Installing libelf
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.13.tar.gz
+ curl: (37) Couldn't open file /g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.13.tar.gz
+ ==> Fetching from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.13.tar.gz failed.
+ ==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.13.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.13-csrt4qxfkhjgn5xg3zjpkir7xdnszl2a/libelf-0.8.13.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.13-csrt4qxfkhjgn5xg3zjpkir7xdnszl2a
+ ==> No patches needed for libelf
+ ==> Building libelf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libelf
+ Fetch: 1.21s. Build: 8.42s. Total: 9.62s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.13-csrt4qxfkhjgn5xg3zjpkir7xdnszl2a
+
+
+Spack's spec syntax is the interface by which we can request specific
+configurations of the package. The ``%`` sigil is used to specify
+compilers.
+
+.. code-block:: console
+
+ $ spack install libelf %intel
+ ==> Installing libelf
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.13.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.13-7wgp32xksatkvw2tbssmehw2t5tnxndj/libelf-0.8.13.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.13-7wgp32xksatkvw2tbssmehw2t5tnxndj
+ ==> No patches needed for libelf
+ ==> Building libelf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libelf
+ Fetch: 0.09s. Build: 50.64s. Total: 50.72s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/intel-16.0.3/libelf-0.8.13-7wgp32xksatkvw2tbssmehw2t5tnxndj
+
+Note that this installation is located separately from the previous
+one. We will discuss this in more detail later, but this is part of what
+allows Spack to support arbitrarily versioned software.
+
+You can check for particular versions before requesting them. We will
+use the ``spack versions`` command to see the available versions, and then
+install a different version of ``libelf``.
+
+.. code-block:: console
+
+ $ spack versions libelf
+ ==> Safe versions (already checksummed):
+ 0.8.13
+ 0.8.12
+ ==> Remote versions (not yet checksummed):
+ 0.8.11
+ 0.8.10
+ 0.8.9
+ 0.8.8
+ 0.8.7
+ 0.8.6
+ 0.8.5
+ 0.8.4
+ 0.8.3
+ 0.8.2
+ 0.8.0
+ 0.7.0
+ 0.6.4
+ 0.5.2
+
+
+The ``@`` sigil is used to specify versions, both of packages and of
+compilers.
+
+.. code-block:: console
+
+ $ spack install libelf @0.8.12
+ ==> Installing libelf
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.12.tar.gz
+ curl: (37) Couldn't open file /g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.12.tar.gz
+ ==> Fetching from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.12.tar.gz failed.
+ ==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.12.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.12-ipggckv6i7h44iryzfa4dwdela32a7fy/libelf-0.8.12.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.12-ipggckv6i7h44iryzfa4dwdela32a7fy
+ ==> No patches needed for libelf
+ ==> Building libelf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libelf
+ Fetch: 1.12s. Build: 7.88s. Total: 9.00s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.12-ipggckv6i7h44iryzfa4dwdela32a7fy
+
+
+
+ $ spack install libelf %intel@15.0.4
+ ==> Installing libelf
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.13.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.13-w33hrejdyqu2j2gggdswitls2zv6kdsi/libelf-0.8.13.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.13-w33hrejdyqu2j2gggdswitls2zv6kdsi
+ ==> No patches needed for libelf
+ ==> Building libelf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libelf
+ Fetch: 0.09s. Build: 55.51s. Total: 55.60s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/intel-15.0.4/libelf-0.8.13-w33hrejdyqu2j2gggdswitls2zv6kdsi
+
+
+The spec syntax also includes compiler flags. Spack accepts ``cppflags``,
+``cflags``, ``cxxflags``, ``fflags``, ``ldflags``, and ``ldlibs``
+parameters. The values of these fields must be escape-quoted with ``\"``
+on the command line. These values are injected into the compile line
+automatically by the Spack compiler wrappers.
+
+.. code-block:: console
+
+ $ spack install libelf @0.8.12 cppflags=\"-O3\"
+ ==> Installing libelf
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.12.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.12-vrv2ttbd34xlfoxy4jwt6qsjrcbalmmw/libelf-0.8.12.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.12-vrv2ttbd34xlfoxy4jwt6qsjrcbalmmw
+ ==> No patches needed for libelf
+ ==> Building libelf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libelf
+ Fetch: 0.04s. Build: 7.95s. Total: 7.99s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.12-vrv2ttbd34xlfoxy4jwt6qsjrcbalmmw
+
+
+The ``spack find`` command is used to query installed packages. Note that
+some packages appear identical with the default output. The ``-l`` flag
+shows the hash of each package, and the ``-f`` flag shows any non-empty
+compiler flags of those packages.
+
+.. code-block:: console
+
+ $ spack find
+ ==> 5 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ libelf@0.8.12
+ libelf@0.8.12
+ libelf@0.8.13
+
+ -- linux-redhat6-x86_64 / intel@15.0.4 --------------------------
+ libelf@0.8.13
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ libelf@0.8.13
+
+
+
+ $ spack find -lf
+ ==> 5 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ ipggckv libelf@0.8.12%gcc
+
+ vrv2ttb libelf@0.8.12%gcc cppflags="-O3"
+
+ csrt4qx libelf@0.8.13%gcc
+
+
+ -- linux-redhat6-x86_64 / intel@15.0.4 --------------------------
+ w33hrej libelf@0.8.13%intel
+
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ 7wgp32x libelf@0.8.13%intel
+
+
+Spack generates a hash for each spec. This hash is a function of the full
+provenance of the package, so any change to the spec affects the
+hash. Spack uses this value to compare specs and to generate unique
+installation directories for every combinatorial version. As we move into
+more complicated packages with software dependencies, we can see that
+Spack reuses existing packages to satisfy a dependency only when the
+existing package's hash matches the desired spec.
+
+.. code-block:: console
+
+ $ spack install libdwarf
+ ==> Installing libdwarf
+ ==> libelf is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.13-csrt4qxfkhjgn5xg3zjpkir7xdnszl2a
+ ==> Can not find version 20160507 in url_list
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libdwarf/libdwarf-20160507.tar.gz
+ curl: (37) Couldn't open file /g/g0/becker33/SC16-spack/spack/var/spack/cache/libdwarf/libdwarf-20160507.tar.gz
+ ==> Fetching from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libdwarf/libdwarf-20160507.tar.gz failed.
+ ==> Trying to fetch from http://www.prevanders.net/libdwarf-20160507.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libdwarf-20160507-yfx6p3g3rkmqvcqbmtb34o6pln7pqvcz/libdwarf-20160507.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libdwarf-20160507-yfx6p3g3rkmqvcqbmtb34o6pln7pqvcz
+ ==> No patches needed for libdwarf
+ ==> Building libdwarf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libdwarf
+ Fetch: 1.56s. Build: 33.59s. Total: 35.15s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libdwarf-20160507-yfx6p3g3rkmqvcqbmtb34o6pln7pqvcz
+
+
+Dependencies can be explicitly requested using the ``^`` sigil. Note that
+the spec syntax is recursive. Anything we could specify about the
+top-level package, we can also specify about a dependency using ``^``.
+
+.. code-block:: console
+
+ $ spack install libdwarf ^libelf @0.8.12 %intel
+ ==> Installing libdwarf
+ ==> Installing libelf
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libelf/libelf-0.8.12.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.12-4blbe3qxqct3ymrfoxxnxysmybvbxay7/libelf-0.8.12.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libelf-0.8.12-4blbe3qxqct3ymrfoxxnxysmybvbxay7
+ ==> No patches needed for libelf
+ ==> Building libelf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libelf
+ Fetch: 0.04s. Build: 52.16s. Total: 52.19s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/intel-16.0.3/libelf-0.8.12-4blbe3qxqct3ymrfoxxnxysmybvbxay7
+ ==> Can not find version 20160507 in url_list
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libdwarf/libdwarf-20160507.tar.gz
+ ################################################################################################################################################################################# 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libdwarf-20160507-csruprgucaujkfkrcywhwou7nbeis5fo/libdwarf-20160507.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libdwarf-20160507-csruprgucaujkfkrcywhwou7nbeis5fo
+ ==> No patches needed for libdwarf
+ ==> Building libdwarf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libdwarf
+ Fetch: 0.40s. Build: 2m 17.29s. Total: 2m 17.69s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/intel-16.0.3/libdwarf-20160507-csruprgucaujkfkrcywhwou7nbeis5fo
+
+
+Packages can also be referred to from the command line by their package
+hash. Using the ``spack find -lf`` command earlier we saw that the hash
+of our optimized installation of libelf (``cppflags=\"-O3\"``) began with
+``vrv2ttb``. We can now explicitly build with that package without typing
+the entire spec, by using the ``/`` sigil to refer to it by hash. As with
+other tools like git, you do not need to specify an *entire* hash on the
+command line. You can specify just enough digits to identify a hash
+uniquely. If a hash prefix is ambiguous (i.e., two or more installed
+packages share the prefix) then spack will report an error.
+
+.. code-block:: console
+
+ $ spack install libdwarf ^/vrv2ttb
+ ==> Installing libdwarf
+ ==> libelf is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.12-vrv2ttbd34xlfoxy4jwt6qsjrcbalmmw
+ ==> Can not find version 20160507 in url_list
+ ==> Trying to fetch from file:///g/g0/becker33/SC16-spack/spack/var/spack/cache/libdwarf/libdwarf-20160507.tar.gz
+ #################################################################################################################################################################################################################################################### 100.0%
+ ==> Staging archive: /g/g0/becker33/SC16-spack/spack/var/spack/stage/libdwarf-20160507-dtg3tgnp7htccoly26gduqlrgvnwcp5t/libdwarf-20160507.tar.gz
+ ==> Created stage in /g/g0/becker33/SC16-spack/spack/var/spack/stage/libdwarf-20160507-dtg3tgnp7htccoly26gduqlrgvnwcp5t
+ ==> No patches needed for libdwarf
+ ==> Building libdwarf [Package]
+ ==> Executing phase : 'install'
+ ==> Successfully installed libdwarf
+ Fetch: 0.96s. Build: 24.03s. Total: 24.99s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libdwarf-20160507-dtg3tgnp7htccoly26gduqlrgvnwcp5t
+
+
+The ``spack find`` command can also take a ``-d`` flag, which can show
+dependency information. Note that each package has a top-level entry,
+even if it also appears as a dependency.
+
+.. code-block:: console
+
+ $ spack find -ldf
+ ==> 9 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ dtg3tgn libdwarf@20160507%gcc
+ vrv2ttb ^libelf@0.8.12%gcc cppflags="-O3"
+
+ yfx6p3g libdwarf@20160507%gcc
+ csrt4qx ^libelf@0.8.13%gcc
+
+ ipggckv libelf@0.8.12%gcc
+
+ vrv2ttb libelf@0.8.12%gcc cppflags="-O3"
+
+ csrt4qx libelf@0.8.13%gcc
+
+
+ -- linux-redhat6-x86_64 / intel@15.0.4 --------------------------
+ w33hrej libelf@0.8.13%intel
+
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ csruprg libdwarf@20160507%intel
+ 4blbe3q ^libelf@0.8.12%intel
+
+ 4blbe3q libelf@0.8.12%intel
+
+ 7wgp32x libelf@0.8.13%intel
+
+
+As we get to more complex packages, full installs will take too long to
+build in the time allotted for this tutorial. Our collaborators at CERN
+have been working on binary caching for Spack, which would allow for very
+fast installs of previously built packages. We are still working out the
+security ramifications of the feature, but it is coming soon.
+
+For now, we will switch to doing "fake" installs. When supplied with the
+``--fake`` flag (primarily used for debugging), Spack computes build
+metadata the same way it normally would, but it does not download the
+source or run the install script for a pacakge. We can use this to
+quickly demonstrate some of the more advanced Spack features in our
+limited tutorial time.
+
+``HDF5`` is an example of a more complicated package, with an MPI
+dependency. If we install it "out of the box," it will build with
+``openmpi``.
+
+.. code-block:: console
+
+ $ spack install --fake hdf5
+ ==> Installing hdf5
+ ==> Installing zlib
+ ==> Building zlib [Package]
+ ==> Successfully installed zlib
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Installing openmpi
+ ==> Installing hwloc
+ ==> Installing libpciaccess
+ ==> Installing util-macros
+ ==> Building util-macros [Package]
+ ==> Successfully installed util-macros
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/util-macros-1.19.0-pc6zhs4cnkmg2cv4et4fizsp6scuvacg
+ ==> Installing libtool
+ ==> Installing m4
+ ==> Installing libsigsegv
+ ==> Building libsigsegv [Package]
+ ==> Successfully installed libsigsegv
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libsigsegv-2.10-q4cok3yber7lhf3jswg6mysg7oi53unh
+ ==> Building m4 [Package]
+ ==> Successfully installed m4
+ Fetch: . Build: 0.23s. Total: 0.23s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> Building libtool [Package]
+ ==> Successfully installed libtool
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libtool-2.4.6-rdx5nkfjwlvcanz5il3ys2pe34j4vxx5
+ ==> Installing pkg-config
+ ==> Building pkg-config [Package]
+ ==> Successfully installed pkg-config
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/pkg-config-0.29.1-wpjnlzahdw6ahkrgmqyeugkj2zhv4tui
+ ==> Building libpciaccess [Package]
+ ==> Successfully installed libpciaccess
+ Fetch: . Build: 0.10s. Total: 0.10s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libpciaccess-0.13.4-m2f6fpm22rpprq2ihkmfx6llf363264m
+ ==> Building hwloc [Package]
+ ==> Successfully installed hwloc
+ Fetch: . Build: 0.23s. Total: 0.23s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hwloc-1.11.4-xpb6hbl2hsze25cgdgfnoppn6rchhzaz
+ ==> Building openmpi [Package]
+ ==> Successfully installed openmpi
+ Fetch: . Build: 0.35s. Total: 0.35s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openmpi-2.0.1-j4cgoq4furxvr73pq72r2qgywgksw3qn
+ ==> Building hdf5 [AutotoolsPackage]
+ ==> Successfully installed hdf5
+ Fetch: . Build: 0.61s. Total: 0.61s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-ezvtnox35albuaxqryuondweyjgeo6es
+
+
+Spack packages can also have variants. Boolean variants can be specified
+using the ``+`` and ``~`` or ``-`` sigils. There are two sigils for
+``False`` to avoid conflicts with shell parsing in different
+situations. Variants (boolean or otherwise) can also be specified using
+the same syntax as compiler flags. Here we can install HDF5 without MPI
+support.
+
+.. code-block:: console
+
+ $ spack install --fake hdf5~mpi
+ ==> Installing hdf5
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Building hdf5 [AutotoolsPackage]
+ ==> Successfully installed hdf5
+ Fetch: . Build: 0.22s. Total: 0.22s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-twppaioxqn6lti4grgopnmhwcq3h2rpw
+
+
+We might also want to install HDF5 with a different MPI
+implementation. While MPI is not a package itself, packages can depend on
+abstract interfaces like MPI. Spack handles these through "virtual
+dependencies." A package, such as HDF5, can depend on the MPI
+interface. Other packages (``openmpi``, ``mpich``, ``mvapich``, etc.)
+provide the MPI interface. Any of these providers can be requested for
+an MPI dependency. For example, we can build HDF5 with MPI support
+provided by mpich by specifying a dependency on ``mpich``. Spack also
+supports versioning of virtual dependencies. A package can depend on the
+MPI interface at version 3, and provider packages specify what version of
+the interface *they* provide. The partial spec ``^mpi@3`` can be safisfied
+by any of several providers.
+
+.. code-block:: console
+
+ $ spack install --fake hdf5+mpi ^mpich
+ ==> Installing hdf5
+ ==> mpich is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpich-3.2-5jlp2ndnsb67txggraglu47vjmayx5za
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Building hdf5 [AutotoolsPackage]
+ ==> Successfully installed hdf5
+ Fetch: . Build: 0.38s. Total: 0.38s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-j36yfw25i6gdd3q4vwlupgkpwic4ua6m
+
+
+We'll do a quick check in on what we have installed so far.
+
+.. code-block:: console
+
+ $ spack find -ldf
+ ==> 22 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ twppaio hdf5@1.10.0-patch1%gcc
+ ayc4jq7 ^zlib@1.2.8%gcc
+
+ j36yfw2 hdf5@1.10.0-patch1%gcc
+ 5jlp2nd ^mpich@3.2%gcc
+ ayc4jq7 ^zlib@1.2.8%gcc
+
+ ezvtnox hdf5@1.10.0-patch1%gcc
+ j4cgoq4 ^openmpi@2.0.1%gcc
+ xpb6hbl ^hwloc@1.11.4%gcc
+ m2f6fpm ^libpciaccess@0.13.4%gcc
+ ayc4jq7 ^zlib@1.2.8%gcc
+
+ xpb6hbl hwloc@1.11.4%gcc
+ m2f6fpm ^libpciaccess@0.13.4%gcc
+
+ dtg3tgn libdwarf@20160507%gcc
+ vrv2ttb ^libelf@0.8.12%gcc cppflags="-O3"
+
+ yfx6p3g libdwarf@20160507%gcc
+ csrt4qx ^libelf@0.8.13%gcc
+
+ ipggckv libelf@0.8.12%gcc
+
+ vrv2ttb libelf@0.8.12%gcc cppflags="-O3"
+
+ csrt4qx libelf@0.8.13%gcc
+
+ m2f6fpm libpciaccess@0.13.4%gcc
+
+ q4cok3y libsigsegv@2.10%gcc
+
+ rdx5nkf libtool@2.4.6%gcc
+
+ qijdzvh m4@1.4.17%gcc
+ q4cok3y ^libsigsegv@2.10%gcc
+
+ 5jlp2nd mpich@3.2%gcc
+
+ j4cgoq4 openmpi@2.0.1%gcc
+ xpb6hbl ^hwloc@1.11.4%gcc
+ m2f6fpm ^libpciaccess@0.13.4%gcc
+
+ wpjnlza pkg-config@0.29.1%gcc
+
+ pc6zhs4 util-macros@1.19.0%gcc
+
+ ayc4jq7 zlib@1.2.8%gcc
+
+
+ -- linux-redhat6-x86_64 / intel@15.0.4 --------------------------
+ w33hrej libelf@0.8.13%intel
+
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ csruprg libdwarf@20160507%intel
+ 4blbe3q ^libelf@0.8.12%intel
+
+ 4blbe3q libelf@0.8.12%intel
+
+ 7wgp32x libelf@0.8.13%intel
+
+
+Spack models the dependencies of packages as a directed acyclic graph
+(DAG). The ``spack find -d`` command shows the tree representation of
+that graph. We can also use the ``spack graph`` command to view the entire
+DAG as a graph.
+
+.. code-block:: console
+
+ $ spack graph hdf5+mpi ^mpich
+ o hdf5
+ |\
+ o | zlib
+ /
+ o mpich
+
+You may also have noticed that there are some packages shown in the
+``spack find -d`` output that we didn't install explicitly. These are
+dependencies that were installed implicitly. A few packages installed
+implicitly are not shown as dependencies in the ``spack find -d``
+output. These are build dependencies. For example, ``libpciaccess`` is a
+dependency of openmpi and requires m4 to build. Spack will build `m4`` as
+part of the installation of ``openmpi``, but it does not become a part of
+the DAG because it is not linked in at run time. Spack handles build
+dependencies differently because of their different (less strict)
+consistency requirements. It is entirely possible to have two packages
+using different versions of a dependency to build, which obviously cannot
+be done with linked dependencies.
+
+``HDF5`` is more complicated than our basic example of libelf and
+libdwarf, but it's still within the realm of software that an experienced
+HPC user could reasonably expect to install given a bit of time. Now
+let's look at a more complicated package.
+
+.. code-block:: console
+
+ $ spack install --fake trilinos
+ ==> Installing trilinos
+ ==> Installing superlu-dist
+ ==> openmpi is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openmpi-2.0.1-j4cgoq4furxvr73pq72r2qgywgksw3qn
+ ==> Installing parmetis
+ ==> openmpi is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openmpi-2.0.1-j4cgoq4furxvr73pq72r2qgywgksw3qn
+ ==> Installing cmake
+ ==> Installing bzip2
+ ==> Building bzip2 [Package]
+ ==> Successfully installed bzip2
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/bzip2-1.0.6-gll2xsahysy7ji5gkmfxwkofdt3mwjhs
+ ==> expat is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/expat-2.2.0-mg5kwd3kluxdgorj32vzbp7aksg3vqej
+ ==> Installing ncurses
+ ==> Building ncurses [Package]
+ ==> Successfully installed ncurses
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/ncurses-6.0-fttg4astvrtq2buey4wq66tnyu7bgj2c
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Installing openssl
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Building openssl [Package]
+ ==> Successfully installed openssl
+ Fetch: . Build: 0.23s. Total: 0.23s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openssl-1.0.2j-kt5xyk2dkho6tzadnqlbnbujmljprylg
+ ==> Installing libarchive
+ ==> Installing lzma
+ ==> Building lzma [Package]
+ ==> Successfully installed lzma
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/lzma-4.32.7-hah2cdo3zbulz6yg5do6dvnfn6en5v5c
+ ==> Installing nettle
+ ==> m4 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> Installing gmp
+ ==> m4 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> Building gmp [AutotoolsPackage]
+ ==> Successfully installed gmp
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gmp-6.1.1-uwn4gfdtq3sywy5uf4f7znrh66oybikf
+ ==> Building nettle [Package]
+ ==> Successfully installed nettle
+ Fetch: . Build: 0.18s. Total: 0.18s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/nettle-3.2-w4ieitifcmrldo4ra7as63apagzf56ja
+ ==> bzip2 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/bzip2-1.0.6-gll2xsahysy7ji5gkmfxwkofdt3mwjhs
+ ==> expat is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/expat-2.2.0-mg5kwd3kluxdgorj32vzbp7aksg3vqej
+ ==> Installing libxml2
+ ==> Installing xz
+ ==> Building xz [Package]
+ ==> Successfully installed xz
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/xz-5.2.2-bxh6cpyqqozazm5okvjqk23sww3gccnf
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Building libxml2 [Package]
+ ==> Successfully installed libxml2
+ Fetch: . Build: 0.35s. Total: 0.35s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libxml2-2.9.4-un323rppyu5qipkegyf7flmymvtmunrx
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Installing lz4
+ ==> Building lz4 [Package]
+ ==> Successfully installed lz4
+ Fetch: . Build: 0.12s. Total: 0.12s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/lz4-131-ivy2fcaw7ywujx74weebdi5bsm7q4vkc
+ ==> openssl is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openssl-1.0.2j-kt5xyk2dkho6tzadnqlbnbujmljprylg
+ ==> xz is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/xz-5.2.2-bxh6cpyqqozazm5okvjqk23sww3gccnf
+ ==> Installing lzo
+ ==> Building lzo [AutotoolsPackage]
+ ==> Successfully installed lzo
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/lzo-2.09-dlgnm74ozo6baactkft5oah2jre2ri2i
+ ==> Building libarchive [Package]
+ ==> Successfully installed libarchive
+ Fetch: . Build: 1.35s. Total: 1.35s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libarchive-3.2.1-biq3kebw7vel7njusill7vv7mjldkqjv
+ ==> xz is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/xz-5.2.2-bxh6cpyqqozazm5okvjqk23sww3gccnf
+ ==> Installing curl
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> openssl is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openssl-1.0.2j-kt5xyk2dkho6tzadnqlbnbujmljprylg
+ ==> Building curl [Package]
+ ==> Successfully installed curl
+ Fetch: . Build: 0.36s. Total: 0.36s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/curl-7.50.3-oze4gqutj4x2isbkcn5ob2bhhxbskod4
+ ==> Building cmake [Package]
+ ==> Successfully installed cmake
+ Fetch: . Build: 1.64s. Total: 1.64s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> Installing metis
+ ==> cmake is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> Building metis [Package]
+ ==> Successfully installed metis
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/metis-5.1.0-ithifyl4xvqbn76js23wsb4tjnztrbdv
+ ==> Building parmetis [Package]
+ ==> Successfully installed parmetis
+ Fetch: . Build: 0.62s. Total: 0.62s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/parmetis-4.0.3-rtg6hml5t6acdcnxomn3l5zfiful4d2t
+ ==> Installing openblas
+ ==> Building openblas [Package]
+ ==> Successfully installed openblas
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> metis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/metis-5.1.0-ithifyl4xvqbn76js23wsb4tjnztrbdv
+ ==> Building superlu-dist [Package]
+ ==> Successfully installed superlu-dist
+ Fetch: . Build: 0.85s. Total: 0.85s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/superlu-dist-5.1.1-25r6jlvkpjnkiuwt2rtbzhk3l3htuxs7
+ ==> cmake is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> Installing glm
+ ==> cmake is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> Building glm [Package]
+ ==> Successfully installed glm
+ Fetch: . Build: 0.12s. Total: 0.12s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/glm-0.9.7.1-7a6oho4aerz7vftxd5ur7lywscht2iry
+ ==> Installing hypre
+ ==> openmpi is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openmpi-2.0.1-j4cgoq4furxvr73pq72r2qgywgksw3qn
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> Building hypre [Package]
+ ==> Successfully installed hypre
+ Fetch: . Build: 0.61s. Total: 0.61s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hypre-2.11.1-lf7hcejiiww5peesh57quda72z67veit
+ ==> metis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/metis-5.1.0-ithifyl4xvqbn76js23wsb4tjnztrbdv
+ ==> Installing netlib-scalapack
+ ==> openmpi is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openmpi-2.0.1-j4cgoq4furxvr73pq72r2qgywgksw3qn
+ ==> cmake is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> Building netlib-scalapack [Package]
+ ==> Successfully installed netlib-scalapack
+ Fetch: . Build: 0.61s. Total: 0.61s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/netlib-scalapack-2.0.2-dvcanz2qq4dfcexznbhbmzbxfj43uz4q
+ ==> Installing suite-sparse
+ ==> Installing tbb
+ ==> Building tbb [Package]
+ ==> Successfully installed tbb
+ Fetch: . Build: 0.12s. Total: 0.12s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/tbb-4.4.4-zawzkkhrmdonbjpj3a5bb6gkgnqlrjeu
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> metis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/metis-5.1.0-ithifyl4xvqbn76js23wsb4tjnztrbdv
+ ==> Building suite-sparse [Package]
+ ==> Successfully installed suite-sparse
+ Fetch: . Build: 0.49s. Total: 0.49s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/suite-sparse-4.5.3-lvur6hriy2j7xfjwh5punp3exwpynzm6
+ ==> openmpi is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openmpi-2.0.1-j4cgoq4furxvr73pq72r2qgywgksw3qn
+ ==> Installing netcdf
+ ==> m4 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> curl is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/curl-7.50.3-oze4gqutj4x2isbkcn5ob2bhhxbskod4
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> hdf5 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-ezvtnox35albuaxqryuondweyjgeo6es
+ ==> Building netcdf [Package]
+ ==> Successfully installed netcdf
+ Fetch: . Build: 0.90s. Total: 0.90s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/netcdf-4.4.1-tcl4zbrmdfrit2cqlaxig6xieu5h552j
+ ==> Installing mumps
+ ==> netlib-scalapack is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/netlib-scalapack-2.0.2-dvcanz2qq4dfcexznbhbmzbxfj43uz4q
+ ==> openmpi is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openmpi-2.0.1-j4cgoq4furxvr73pq72r2qgywgksw3qn
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> Building mumps [Package]
+ ==> Successfully installed mumps
+ Fetch: . Build: 0.74s. Total: 0.74s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mumps-5.0.2-kr5r4nnx5tfcacxnk3ii5dsxbe6pu5fy
+ ==> Installing matio
+ ==> Building matio [Package]
+ ==> Successfully installed matio
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/matio-1.5.2-4zrozucookychlvc4q53omp2zyfk2bed
+ ==> Installing boost
+ ==> bzip2 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/bzip2-1.0.6-gll2xsahysy7ji5gkmfxwkofdt3mwjhs
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> Building boost [Package]
+ ==> Successfully installed boost
+ Fetch: . Build: 0.35s. Total: 0.35s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/boost-1.62.0-je7eqvzt74kezwhh55y5lwt5dy6pnali
+ ==> parmetis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/parmetis-4.0.3-rtg6hml5t6acdcnxomn3l5zfiful4d2t
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> hdf5 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-ezvtnox35albuaxqryuondweyjgeo6es
+ ==> Building trilinos [Package]
+ ==> Successfully installed trilinos
+ Fetch: . Build: 2.63s. Total: 2.63s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/trilinos-12.8.1-uvd6dfd7x4uyvck4awo3r3frudihn4ar
+
+
+Now we're starting to see the power of Spack. Trilinos has 11 top level
+dependecies, many of which have dependencies of their own. Installing
+more complex packages can take days or weeks even for an experienced
+user. Although we've done a fake installation for the tutorial, a real
+installation of trilinos using Spack takes about 3 hours (depending on
+the system), but only 20 seconds of programmer time.
+
+Spack manages constistency of the entire DAG. Every MPI dependency will
+be satisfied by the same configuration of MPI, etc. If we install
+``trilinos`` again specifying a dependency on our previous HDF5 built
+with ``mpich``:
+
+.. code-block:: console
+
+ $ spack install --fake trilinos ^hdf5+mpi ^mpich
+ ==> Installing trilinos
+ ==> Installing superlu-dist
+ ==> mpich is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpich-3.2-5jlp2ndnsb67txggraglu47vjmayx5za
+ ==> metis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/metis-5.1.0-ithifyl4xvqbn76js23wsb4tjnztrbdv
+ ==> Installing parmetis
+ ==> mpich is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpich-3.2-5jlp2ndnsb67txggraglu47vjmayx5za
+ ==> metis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/metis-5.1.0-ithifyl4xvqbn76js23wsb4tjnztrbdv
+ ==> cmake is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> Building parmetis [Package]
+ ==> Successfully installed parmetis
+ Fetch: . Build: 0.38s. Total: 0.38s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/parmetis-4.0.3-43kbtni6p5y446c6qdkybq4htj7ot4zn
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> Building superlu-dist [Package]
+ ==> Successfully installed superlu-dist
+ Fetch: . Build: 0.61s. Total: 0.61s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/superlu-dist-5.1.1-46uuupehmonx5jicc6xnegnud2n5jqyl
+ ==> cmake is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> glm is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/glm-0.9.7.1-7a6oho4aerz7vftxd5ur7lywscht2iry
+ ==> Installing hypre
+ ==> mpich is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpich-3.2-5jlp2ndnsb67txggraglu47vjmayx5za
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> Building hypre [Package]
+ ==> Successfully installed hypre
+ Fetch: . Build: 0.37s. Total: 0.37s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hypre-2.11.1-6ajnyymoivs5apajd7thjisae36jv4lz
+ ==> metis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/metis-5.1.0-ithifyl4xvqbn76js23wsb4tjnztrbdv
+ ==> Installing netlib-scalapack
+ ==> mpich is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpich-3.2-5jlp2ndnsb67txggraglu47vjmayx5za
+ ==> cmake is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/cmake-3.6.1-n2nkknrku6dvuneo3rjumim7axt7n36e
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> Building netlib-scalapack [Package]
+ ==> Successfully installed netlib-scalapack
+ Fetch: . Build: 0.37s. Total: 0.37s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/netlib-scalapack-2.0.2-dayeep27omm26wksd3iqvbu3gezc2eoh
+ ==> suite-sparse is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/suite-sparse-4.5.3-lvur6hriy2j7xfjwh5punp3exwpynzm6
+ ==> Installing netcdf
+ ==> m4 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> curl is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/curl-7.50.3-oze4gqutj4x2isbkcn5ob2bhhxbskod4
+ ==> zlib is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/zlib-1.2.8-ayc4jq7vxuzge5n444gutvskeytfdruh
+ ==> hdf5 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-j36yfw25i6gdd3q4vwlupgkpwic4ua6m
+ ==> Building netcdf [Package]
+ ==> Successfully installed netcdf
+ Fetch: . Build: 0.67s. Total: 0.67s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/netcdf-4.4.1-gfemi4jk4qltvp33xhtpkam7dozbqvhq
+ ==> Installing mumps
+ ==> mpich is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpich-3.2-5jlp2ndnsb67txggraglu47vjmayx5za
+ ==> netlib-scalapack is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/netlib-scalapack-2.0.2-dayeep27omm26wksd3iqvbu3gezc2eoh
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> Building mumps [Package]
+ ==> Successfully installed mumps
+ Fetch: . Build: 0.49s. Total: 0.49s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mumps-5.0.2-w7t5pl3jhhwitfiyer63zj6zv7idkt3m
+ ==> mpich is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpich-3.2-5jlp2ndnsb67txggraglu47vjmayx5za
+ ==> matio is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/matio-1.5.2-4zrozucookychlvc4q53omp2zyfk2bed
+ ==> boost is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/boost-1.62.0-je7eqvzt74kezwhh55y5lwt5dy6pnali
+ ==> parmetis is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/parmetis-4.0.3-43kbtni6p5y446c6qdkybq4htj7ot4zn
+ ==> openblas is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/openblas-0.2.19-bwofa7fhff6od5zn56vy3j4eeyupsqgt
+ ==> hdf5 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-j36yfw25i6gdd3q4vwlupgkpwic4ua6m
+ ==> Building trilinos [Package]
+ ==> Successfully installed trilinos
+ Fetch: . Build: 2.42s. Total: 2.42s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/trilinos-12.8.1-ffwrpxnq7lhiw2abxn2u7ffr4jjsdwep
+
+We see that every package in the trilinos DAG that depends on MPI now
+uses ``mpich``.
+
+.. code-block:: console
+
+ $ spack find -d trilinos
+ ==> 2 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ trilinos@12.8.1
+ ^boost@1.62.0
+ ^bzip2@1.0.6
+ ^zlib@1.2.8
+ ^glm@0.9.7.1
+ ^hdf5@1.10.0-patch1
+ ^mpich@3.2
+ ^hypre@2.11.1
+ ^openblas@0.2.19
+ ^matio@1.5.2
+ ^metis@5.1.0
+ ^mumps@5.0.2
+ ^netlib-scalapack@2.0.2
+ ^netcdf@4.4.1
+ ^curl@7.50.3
+ ^openssl@1.0.2j
+ ^parmetis@4.0.3
+ ^suite-sparse@4.5.3
+ ^tbb@4.4.4
+ ^superlu-dist@5.1.1
+
+ trilinos@12.8.1
+ ^boost@1.62.0
+ ^bzip2@1.0.6
+ ^zlib@1.2.8
+ ^glm@0.9.7.1
+ ^hdf5@1.10.0-patch1
+ ^openmpi@2.0.1
+ ^hwloc@1.11.4
+ ^libpciaccess@0.13.4
+ ^hypre@2.11.1
+ ^openblas@0.2.19
+ ^matio@1.5.2
+ ^metis@5.1.0
+ ^mumps@5.0.2
+ ^netlib-scalapack@2.0.2
+ ^netcdf@4.4.1
+ ^curl@7.50.3
+ ^openssl@1.0.2j
+ ^parmetis@4.0.3
+ ^suite-sparse@4.5.3
+ ^tbb@4.4.4
+ ^superlu-dist@5.1.1
+
+
+As we discussed before, the ``spack find -d`` command shows the
+dependency information as a tree. While that is often sufficient, many
+complicated packages, including trilinos, have dependencies that
+cannot be fully represented as a tree. Again, the ``spack graph``
+command shows the full DAG of the dependency information.
+
+.. code-block:: console
+
+ $ spack graph trilinos
+ o trilinos
+ |\
+ | |\
+ | | |\
+ | | | |\
+ | | | | |\
+ | | | | | |\
+ | | | | | | |\
+ | o | | | | | | netcdf
+ | |\ \ \ \ \ \ \
+ | | |\ \ \ \ \ \ \
+ | | | o | | | | | | curl
+ | | |/| | | | | | |
+ | |/| | | | | | | |
+ | | | o | | | | | | openssl
+ | | |/ / / / / / /
+ | |/| | | | | | |
+ | | o | | | | | | hdf5
+ | |/| | | | | | |
+ | | |/ / / / / /
+ | o | | | | | | zlib
+ | / / / / / /
+ o | | | | | | swig
+ o | | | | | | pcre
+ / / / / / /
+ o | | | | | mpi
+ / / / / /
+ o | | | | matio
+ / / / /
+ o | | | lapack
+ / / /
+ o | | glm
+ / /
+ o | boost
+ /
+ o blas
+
+
+You can control how the output is displayed with a number of options.
+
+The ASCII output from ``spack graph`` can be difficult to parse for
+complicated packages. The output can be changed to the ``graphviz``
+``.dot`` format using the `--dot` flag.
+
+.. code-block:: console
+
+ $ spack graph --dot trilinos | dot -Tpdf trilinos_graph.pdf
+
+.. _basics-tutorial-uninstall:
+
+---------------------
+Uninstalling Packages
+---------------------
+
+Earlier we installed many configurations each of libelf and
+libdwarf. Now we will go through and uninstall some of those packages
+that we didn't really need.
+
+.. code-block:: console
+
+ $ spack find -d libdwarf
+ ==> 3 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ libdwarf@20160507
+ ^libelf@0.8.12
+
+ libdwarf@20160507
+ ^libelf@0.8.13
+
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ libdwarf@20160507
+ ^libelf@0.8.12
+
+ $ spack find libelf
+ ==> 6 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ libelf@0.8.12 libelf@0.8.12 libelf@0.8.13
+
+ -- linux-redhat6-x86_64 / intel@15.0.4 --------------------------
+ libelf@0.8.13
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ libelf@0.8.12 libelf@0.8.13
+
+
+We can uninstall packages by spec using the same syntax as install.
+
+.. code-block:: console
+
+ $ spack uninstall libelf%intel@15.0.4
+ ==> The following packages will be uninstalled :
+
+ -- linux-redhat6-x86_64 / intel@15.0.4 --------------------------
+ w33hrej libelf@0.8.13%intel
+
+
+ ==> Do you want to proceed ? [y/n]
+ y
+ ==> Successfully uninstalled libelf@0.8.13%intel@15.0.4 arch=linux-redhat6-x86_64-w33hrej
+
+
+
+ $ spack find -lf libelf
+ ==> 5 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ ipggckv libelf@0.8.12%gcc
+
+ vrv2ttb libelf@0.8.12%gcc cppflags="-O3"
+
+ csrt4qx libelf@0.8.13%gcc
+
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ 4blbe3q libelf@0.8.12%intel
+
+ 7wgp32x libelf@0.8.13%intel
+
+
+We can uninstall packages by referring only to their hash.
+
+
+We can use either ``-f`` (force) or ``-d`` (remove dependents as well) to
+remove packages that are required by another installed package.
+
+
+ $ spack uninstall /4blb
+ ==> Error: Will not uninstall libelf@0.8.12%intel@16.0.3-4blbe3q
+
+ The following packages depend on it:
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ csruprg libdwarf@20160507%intel
+
+
+ ==> Error: You can use spack uninstall --dependents to uninstall these dependencies as well
+ $ spack uninstall -d /4blb
+ ==> The following packages will be uninstalled :
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ csruprg libdwarf@20160507%intel
+
+ 4blbe3q libelf@0.8.12%intel
+
+
+ ==> Do you want to proceed ? [y/n]
+ y
+ ==> Successfully uninstalled libdwarf@20160507%intel@16.0.3 arch=linux-redhat6-x86_64-csruprg
+ ==> Successfully uninstalled libelf@0.8.12%intel@16.0.3 arch=linux-redhat6-x86_64-4blbe3q
+
+
+Spack will not uninstall packages that are not sufficiently
+specified. The ``-a`` (all) flag can be used to uninstall multiple
+packages at once.
+
+
+ $ spack uninstall trilinos
+ ==> Error: trilinos matches multiple packages:
+
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ ffwrpxn trilinos@12.8.1%gcc+boost~debug+hdf5+hypre+metis+mumps~python+shared+suite-sparse+superlu-dist
+
+ uvd6dfd trilinos@12.8.1%gcc+boost~debug+hdf5+hypre+metis+mumps~python+shared+suite-sparse+superlu-dist
+
+
+ ==> Error: You can either:
+ a) Use a more specific spec, or
+ b) use spack uninstall -a to uninstall ALL matching specs.
+
+
+
+ $ spack uninstall /ffwr
+ ==> The following packages will be uninstalled :
+
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ ffwrpxn trilinos@12.8.1%gcc+boost~debug+hdf5+hypre+metis+mumps~python+shared+suite-sparse+superlu-dist
+
+
+ ==> Do you want to proceed ? [y/n]
+ y
+ ==> Successfully uninstalled trilinos@12.8.1%gcc@4.4.7+boost~debug+hdf5+hypre+metis+mumps~python+shared+suite-sparse+superlu-dist arch=linux-redhat6-x86_64-ffwrpxn
+
+-----------------------------
+Advanced ``spack find`` Usage
+-----------------------------
+
+We will go over some additional uses for the `spack find` command not
+already covered in the :ref:`basics-tutorial-install` and
+:ref:`basics-tutorial-uninstall` sections.
+
+The ``spack find`` command can accept what we call "anonymous specs."
+These are expressions in spec syntax that do not contain a package
+name. For example, `spack find %intel` will return every package built
+with the intel compiler, and ``spack find cppflags=\\"-O3\\"`` will
+return every package which was built with ``cppflags=\\"-O3\\"``.
+
+.. code-block:: console
+
+ $ spack find %intel
+ ==> 1 installed packages.
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ libelf@0.8.13
+
+
+
+ $ spack find cppflags=\"-O3\"
+ ==> 1 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ libelf@0.8.12
+
+
+The ``find`` command can also show which packages were installed
+explicitly (rather than pulled in as a dependency) using the ``-e``
+flag. The ``-E`` flag shows implicit installs only. The ``find`` command can
+also show the path to which a spack package was installed using the ``-p``
+command.
+
+.. code-block:: console
+
+ $ spack find -pe
+ ==> 10 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ hdf5@1.10.0-patch1 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-twppaioxqn6lti4grgopnmhwcq3h2rpw
+ hdf5@1.10.0-patch1 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-j36yfw25i6gdd3q4vwlupgkpwic4ua6m
+ hdf5@1.10.0-patch1 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/hdf5-1.10.0-patch1-ezvtnox35albuaxqryuondweyjgeo6es
+ libdwarf@20160507 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libdwarf-20160507-dtg3tgnp7htccoly26gduqlrgvnwcp5t
+ libdwarf@20160507 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libdwarf-20160507-yfx6p3g3rkmqvcqbmtb34o6pln7pqvcz
+ libelf@0.8.12 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.12-ipggckv6i7h44iryzfa4dwdela32a7fy
+ libelf@0.8.12 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.12-vrv2ttbd34xlfoxy4jwt6qsjrcbalmmw
+ libelf@0.8.13 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/libelf-0.8.13-csrt4qxfkhjgn5xg3zjpkir7xdnszl2a
+ trilinos@12.8.1 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/trilinos-12.8.1-uvd6dfd7x4uyvck4awo3r3frudihn4ar
+
+ -- linux-redhat6-x86_64 / intel@16.0.3 --------------------------
+ libelf@0.8.13 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/intel-16.0.3/libelf-0.8.13-7wgp32xksatkvw2tbssmehw2t5tnxndj
+
+
+---------------------
+Customizing Compilers
+---------------------
+
+
+Spack manages a list of available compilers on the system, detected
+automatically from from the user's ``PATH`` variable. The ``spack
+compilers`` command is an alias for the command ``spack compiler list``.
+
+.. code-block:: console
+
+ $ spack compilers
+ ==> Available compilers
+ -- gcc ----------------------------------------------------------
+ gcc@4.4.7
+
+ -- intel --------------------------------------------------------
+ intel@16.0.3 intel@15.0.1 intel@14.0.0 intel@12.1.3 intel@10.0
+ intel@16.0.2 intel@15.0.0 intel@13.1.1 intel@12.1.2 intel@9.1
+ intel@16.0.1 intel@14.0.4 intel@13.1.0 intel@12.1.0
+ intel@16.0.0 intel@14.0.3 intel@13.0.1 intel@12.0.4
+ intel@15.0.4 intel@14.0.2 intel@13.0.0 intel@11.1
+ intel@15.0.3 intel@14.0.1 intel@12.1.5 intel@10.1
+
+ -- pgi ----------------------------------------------------------
+ pgi@16.5-0 pgi@15.7-0 pgi@14.7-0 pgi@13.2-0 pgi@11.10-0 pgi@9.0-4
+ pgi@16.3-0 pgi@15.5-0 pgi@14.3-0 pgi@13.1-1 pgi@11.1-0 pgi@8.0-1
+ pgi@16.1-0 pgi@15.1-0 pgi@13.10-0 pgi@12.8-0 pgi@10.9-0 pgi@7.1-3
+ pgi@15.10-0 pgi@14.10-0 pgi@13.6-0 pgi@12.1-0 pgi@10.2-0 pgi@7.0-6
+
+The compilers are maintained in a YAML file that can be hand-edited
+for special cases. Spack also has tools to add compilers, and
+compilers built with Spack can be added to the configuration.
+
+.. code-block:: console
+
+ $ spack install --fake gcc@6.1.0
+ ==> Installing gcc
+ ==> gmp is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gmp-6.1.1-uwn4gfdtq3sywy5uf4f7znrh66oybikf
+ ==> Installing isl
+ ==> gmp is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gmp-6.1.1-uwn4gfdtq3sywy5uf4f7znrh66oybikf
+ ==> Building isl [Package]
+ ==> Successfully installed isl
+ Fetch: . Build: 0.19s. Total: 0.19s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/isl-0.14-hs2w7mjjjaakkmbbv5yvfqf7yyzhorl6
+ ==> Installing mpc
+ ==> gmp is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gmp-6.1.1-uwn4gfdtq3sywy5uf4f7znrh66oybikf
+ ==> Installing mpfr
+ ==> gmp is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gmp-6.1.1-uwn4gfdtq3sywy5uf4f7znrh66oybikf
+ ==> Building mpfr [Package]
+ ==> Successfully installed mpfr
+ Fetch: . Build: 0.17s. Total: 0.17s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpfr-3.1.4-7kt5ij437khredfq4bvnyu22t3fmtfvt
+ ==> Building mpc [Package]
+ ==> Successfully installed mpc
+ Fetch: . Build: 0.28s. Total: 0.28s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpc-1.0.3-g5taq6lt3zuy5l2jtggi5lctxnl4la5u
+ ==> Installing binutils
+ ==> m4 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> Installing bison
+ ==> m4 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> Building bison [Package]
+ ==> Successfully installed bison
+ Fetch: . Build: 0.12s. Total: 0.12s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/bison-3.0.4-hkhfysfvq5l6rsns67g2htmkpxauvnwa
+ ==> Installing flex
+ ==> m4 is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/m4-1.4.17-qijdzvhjyybrtwbqm73vykhmkaqro3je
+ ==> bison is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/bison-3.0.4-hkhfysfvq5l6rsns67g2htmkpxauvnwa
+ ==> Building flex [Package]
+ ==> Successfully installed flex
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/flex-2.6.0-qd6d73rdfrozdrsdpimvl4tj7d5ps7qg
+ ==> Building binutils [Package]
+ ==> Successfully installed binutils
+ Fetch: . Build: 0.11s. Total: 0.11s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/binutils-2.27-iq2hry3gvaxszmwwbnll7njgdgaek56o
+ ==> mpfr is already installed in /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/mpfr-3.1.4-7kt5ij437khredfq4bvnyu22t3fmtfvt
+ ==> Building gcc [Package]
+ ==> Successfully installed gcc
+ Fetch: . Build: 0.66s. Total: 0.66s.
+ [+] /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gcc-6.1.0-j5576zbsot2ydljlthjzhsirsesnogvh
+
+
+
+ $ spack find -p gcc
+ ==> 1 installed packages.
+ -- linux-redhat6-x86_64 / gcc@4.4.7 -----------------------------
+ gcc@6.1.0 /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gcc-6.1.0-j5576zbsot2ydljlthjzhsirsesnogvh
+
+
+If we had done a "real" install of gcc, we could add it to our
+configuration now using the `spack compiler add` command, but we would
+also be waiting for it to install. If we run the command now, it will
+return no new compilers.
+
+.. code-block:: console
+
+ $ spack compiler add /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gcc-6.1.0-j5576zbsot2ydljlthjzhsirsesnogvh/bin
+ ==> Found no new compilers
+
+If we had done a real install, the output would have been as follows:
+
+.. code-block:: console
+
+ $ spack compiler add /g/g0/becker33/SC16-spack/spack/opt/spack/linux-redhat6-x86_64/gcc-4.4.7/gcc-6.1.0-j5576zbsot2ydljlthjzhsirsesnogvh/bin
+ ==> Added 1 new compiler to /g/g0/becker33/.spack/linux/compilers.yaml
+ gcc@6.1.0
diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst
new file mode 100644
index 0000000000..60ff26f26f
--- /dev/null
+++ b/lib/spack/docs/build_settings.rst
@@ -0,0 +1,168 @@
+.. _build-settings:
+
+======================================
+Build customization
+======================================
+
+Spack allows you to customize how your software is built through the
+``packages.yaml`` file. Using it, you can make Spack prefer particular
+implementations of virtual dependencies (e.g., compilers, MPI, or BLAS),
+or you can make it prefer to build with particular compilers. You can
+also tell Spack to use *external* installations of certain software.
+
+At a high level, the ``packages.yaml`` file is structured like this:
+
+.. code-block:: yaml
+
+ packages:
+ package1:
+ # settings for package1
+ package2:
+ # settings for package2
+ # ...
+ all:
+ # settings that apply to all packages.
+
+So you can either set build preferences *specifically* for one package,
+or you can specify that certain settings should apply to all packages.
+The types of settings you can customize are described in detail below.
+
+Spack's build defaults are in the default
+``etc/spack/defaults/packages.yaml`` file. You can override them in
+``~/.spack/packages.yaml`` or ``etc/spack/packages.yaml``. For more
+details on how this works, see :ref:`configuration-scopes`
+
+.. _sec-external-packages:
+
+-----------------
+External Packages
+-----------------
+
+Spack can be configured to use externally-installed
+packages rather than building its own packages. This may be desirable
+if machines ship with system packages, such as a customized MPI
+that should be used instead of Spack building its own MPI.
+
+External packages are configured through the ``packages.yaml`` file found
+in a Spack installation's ``etc/spack/`` or a user's ``~/.spack/``
+directory. Here's an example of an external configuration:
+
+.. code-block:: yaml
+
+ packages:
+ openmpi:
+ paths:
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7: /opt/openmpi-1.4.3
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug
+ openmpi@1.6.5%intel@10.1 arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel
+
+This example lists three installations of OpenMPI, one built with gcc,
+one built with gcc and debug information, and another built with Intel.
+If Spack is asked to build a package that uses one of these MPIs as a
+dependency, it will use the the pre-installed OpenMPI in
+the given directory. Packages.yaml can also be used to specify modules
+
+Each ``packages.yaml`` begins with a ``packages:`` token, followed
+by a list of package names. To specify externals, add a ``paths`` or ``modules``
+token under the package name, which lists externals in a
+``spec: /path`` or ``spec: module-name`` format. Each spec should be as
+well-defined as reasonably possible. If a
+package lacks a spec component, such as missing a compiler or
+package version, then Spack will guess the missing component based
+on its most-favored packages, and it may guess incorrectly.
+
+Each package version and compilers listed in an external should
+have entries in Spack's packages and compiler configuration, even
+though the package and compiler may not every be built.
+
+The packages configuration can tell Spack to use an external location
+for certain package versions, but it does not restrict Spack to using
+external packages. In the above example, if an OpenMPI 1.8.4 became
+available Spack may choose to start building and linking with that version
+rather than continue using the pre-installed OpenMPI versions.
+
+To prevent this, the ``packages.yaml`` configuration also allows packages
+to be flagged as non-buildable. The previous example could be modified to
+be:
+
+.. code-block:: yaml
+
+ packages:
+ openmpi:
+ paths:
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7: /opt/openmpi-1.4.3
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug
+ openmpi@1.6.5%intel@10.1 arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel
+ buildable: False
+
+The addition of the ``buildable`` flag tells Spack that it should never build
+its own version of OpenMPI, and it will instead always rely on a pre-built
+OpenMPI. Similar to ``paths``, ``buildable`` is specified as a property under
+a package name.
+
+If an external module is specified as not buildable, then Spack will load the
+external module into the build environment which can be used for linking.
+
+The ``buildable`` does not need to be paired with external packages.
+It could also be used alone to forbid packages that may be
+buggy or otherwise undesirable.
+
+
+.. _concretization-preferences:
+
+--------------------------
+Concretization Preferences
+--------------------------
+
+Spack can be configured to prefer certain compilers, package
+versions, depends_on, and variants during concretization.
+The preferred configuration can be controlled via the
+``~/.spack/packages.yaml`` file for user configuations, or the
+``etc/spack/packages.yaml`` site configuration.
+
+Here's an example packages.yaml file that sets preferred packages:
+
+.. code-block:: yaml
+
+ packages:
+ opencv:
+ compiler: [gcc@4.9]
+ variants: +debug
+ gperftools:
+ version: [2.2, 2.4, 2.3]
+ all:
+ compiler: [gcc@4.4.7, gcc@4.6:, intel, clang, pgi]
+ providers:
+ mpi: [mvapich, mpich, openmpi]
+
+At a high level, this example is specifying how packages should be
+concretized. The opencv package should prefer using gcc 4.9 and
+be built with debug options. The gperftools package should prefer version
+2.2 over 2.4. Every package on the system should prefer mvapich for
+its MPI and gcc 4.4.7 (except for opencv, which overrides this by preferring gcc 4.9).
+These options are used to fill in implicit defaults. Any of them can be overwritten
+on the command line if explicitly requested.
+
+Each packages.yaml file begins with the string ``packages:`` and
+package names are specified on the next level. The special string ``all``
+applies settings to each package. Underneath each package name is
+one or more components: ``compiler``, ``variants``, ``version``,
+or ``providers``. Each component has an ordered list of spec
+``constraints``, with earlier entries in the list being preferred over
+later entries.
+
+Sometimes a package installation may have constraints that forbid
+the first concretization rule, in which case Spack will use the first
+legal concretization rule. Going back to the example, if a user
+requests gperftools 2.3 or later, then Spack will install version 2.4
+as the 2.4 version of gperftools is preferred over 2.3.
+
+An explicit concretization rule in the preferred section will always
+take preference over unlisted concretizations. In the above example,
+xlc isn't listed in the compiler list. Every listed compiler from
+gcc to pgi will thus be preferred over the xlc compiler.
+
+The syntax for the ``provider`` section differs slightly from other
+concretization rules. A provider lists a value that packages may
+``depend_on`` (e.g, mpi) and a list of rules for fulfilling that
+dependency.
diff --git a/lib/spack/docs/command_index.in b/lib/spack/docs/command_index.in
index 94cdf38109..6520352b42 100644
--- a/lib/spack/docs/command_index.in
+++ b/lib/spack/docs/command_index.in
@@ -1,7 +1,6 @@
-.. _command_index:
-
-Command index
-=================
+=============
+Command Index
+=============
This is an alphabetical list of commands with links to the places they
appear in the documentation.
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index f3cb268177..237a062c14 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -1,9 +1,7 @@
+# flake8: noqa
##############################################################################
-# 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.
+# Created by Todd Gamblin, tgamblin@llnl.gov.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
@@ -37,26 +35,85 @@
import sys
import os
+import re
+import shutil
import subprocess
+from glob import glob
+from sphinx.apidoc import main as sphinx_apidoc
+
+# -- Spack customizations -----------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('exts'))
sys.path.insert(0, os.path.abspath('../external'))
+sys.path.append(os.path.abspath('..'))
# Add the Spack bin directory to the path so that we can use its output in docs.
spack_root = '../../..'
os.environ['SPACK_ROOT'] = spack_root
-os.environ['PATH'] += os.pathsep + '$SPACK_ROOT/bin'
+os.environ['PATH'] += '%s%s/bin' % (os.pathsep, spack_root)
+# Get the spack version for use in the docs
spack_version = subprocess.Popen(
[spack_root + '/bin/spack', '-V'],
stderr=subprocess.PIPE).communicate()[1].strip().split('.')
# Set an environment variable so that colify will print output like it would to
# a terminal.
-os.environ['COLIFY_SIZE'] = '25x80'
+os.environ['COLIFY_SIZE'] = '25x120'
+
+#
+# Generate package list using spack command
+#
+with open('package_list.rst', 'w') as plist_file:
+ subprocess.Popen(
+ [spack_root + '/bin/spack', 'list', '--format=rst'], stdout=plist_file)
+
+#
+# Find all the `cmd-spack-*` references and add them to a command index
+#
+command_names = []
+for filename in glob('*rst'):
+ with open(filename) as f:
+ for line in f:
+ match = re.match('.. _(cmd-spack-.*):', line)
+ if match:
+ command_names.append(match.group(1).strip())
+
+shutil.copy('command_index.in', 'command_index.rst')
+with open('command_index.rst', 'a') as index:
+ index.write('\n')
+ for cmd in sorted(command_names):
+ index.write(' * :ref:`%s`\n' % cmd)
+
+
+# Run sphinx-apidoc
+sphinx_apidoc(['-T', '-o', '.', '../spack'])
+os.remove('modules.rst')
+
+#
+# Exclude everything in spack.__all__ from indexing. All of these
+# symbols are imported from elsewhere in spack; their inclusion in
+# __all__ simply allows package authors to use `from spack import *`.
+# Excluding them ensures they're only documented in their "real" module.
+#
+# This also avoids issues where some of these symbols shadow core spack
+# modules. Sphinx will complain about duplicate docs when this happens.
+#
+import fileinput, spack
+handling_spack = False
+for line in fileinput.input('spack.rst', inplace=1):
+ if handling_spack:
+ if not line.startswith(' :noindex:'):
+ print ' :noindex: %s' % ' '.join(spack.__all__)
+ handling_spack = False
+
+ if line.startswith('.. automodule::'):
+ handling_spack = (line == '.. automodule:: spack\n')
+
+ print line,
# Enable todo items
todo_include_todos = True
diff --git a/lib/spack/docs/config_yaml.rst b/lib/spack/docs/config_yaml.rst
new file mode 100644
index 0000000000..7b1a89bc8a
--- /dev/null
+++ b/lib/spack/docs/config_yaml.rst
@@ -0,0 +1,149 @@
+.. _config-yaml:
+
+====================================
+Basics settings
+====================================
+
+Spack's basic configuration options are set in ``config.yaml``. You can
+see the default settings by looking at
+``etc/spack/defaults/config.yaml``:
+
+.. literalinclude:: ../../../etc/spack/defaults/config.yaml
+ :language: yaml
+
+These settings can be overridden in ``etc/spack/config.yaml`` or
+``~/.spack/config.yaml``. See :ref:`configuration-scopes` for details.
+
+.. _config-file-variables:
+
+------------------------------
+Config file variables
+------------------------------
+
+You may notice some variables prefixed with ``$`` in the settings above.
+Spack understands several variables that can be used in values of
+configuration parameters. They are:
+
+ * ``$spack``: path to the prefix of this spack installation
+ * ``$tempdir``: default system temporary directory (as specified in
+ Python's `tempfile.tempdir
+ <https://docs.python.org/2/library/tempfile.html#tempfile.tempdir>`_
+ variable.
+ * ``$user``: name of the current user
+
+Note that, as with shell variables, you can write these as ``$varname``
+or with braces to distinguish the variable from surrounding characters:
+``${varname}``.
+
+--------------------
+``install_tree``
+--------------------
+
+The location where Spack will install packages and their dependencies.
+Default is ``$spack/opt/spack``.
+
+--------------------
+``module_roots``
+--------------------
+
+Controls where Spack installs generated module files. You can customize
+the location for each type of module. e.g.:
+
+.. code-block:: yaml
+
+ module_roots:
+ tcl: $spack/share/spack/modules
+ lmod: $spack/share/spack/lmod
+ dotkit: $spack/share/spack/dotkit
+
+See :ref:`modules` for details.
+
+--------------------
+``build_stage``
+--------------------
+
+Spack is designed to run out of a user home directories, and on many
+systems the home directory a (slow) network filesystem. On most systems,
+building in a temporary filesystem results in faster builds than building
+in the home directory. Usually, there is also more space available in
+the temporary location than in the home directory. So, Spack tries to
+create build stages in temporary space.
+
+By default, Spack's ``build_stage`` is configured like this:
+
+.. code-block:: yaml
+
+ build_stage:
+ - $tempdir
+ - /nfs/tmp2/$user
+ - $spack/var/spack/stage
+
+This is an ordered list of paths that Spack should search when trying to
+find a temporary directory for the build stage. The list is searched in
+order, and Spack will use the first directory to which it has write access.
+See :ref:`config-file-variables` for more on ``$tempdir`` and ``$spack``.
+
+When Spack builds a package, it creates a temporary directory within the
+``build_stage``, and it creates a symbolic link to that directory in
+``$spack/var/spack/stage``. This is used totrack the stage.
+
+After a package is successfully installed, Spack deletes the temporary
+directory it used to build. Unsuccessful builds are not deleted, but you
+can manually purge them with :ref:`spack purge --stage
+<cmd-spack-purge>`.
+
+.. note::
+
+ The last item in the list is ``$spack/var/spack/stage``. If this is the
+ only writable directory in the ``build_stage`` list, Spack will build
+ *directly* in ``$spack/var/spack/stage`` and will not link to temporary
+ space.
+
+--------------------
+``source_cache``
+--------------------
+
+Location to cache downloaded tarballs and repositories. By default these
+are stored in ``$spack/var/spack/cache``. These are stored indefinitely
+by default. Can be purged with :ref:`spack purge --downloads
+<cmd-spack-purge>`.
+
+--------------------
+``misc_cache``
+--------------------
+
+Temporary directory to store long-lived cache files, such as indices of
+packages available in repositories. Defaults to ``~/.spack/cache``. Can
+be purged with :ref:`spack purge --misc-cache <cmd-spack-purge>`.
+
+--------------------
+``verify_ssl``
+--------------------
+
+When set to ``true`` (default) Spack will verify certificates of remote
+hosts when making ``ssl`` connections. Set to ``false`` to disable, and
+tools like ``curl`` will use their ``--insecure`` options. Disabling
+this can expose you to attacks. Use at your own risk.
+
+--------------------
+``checksum``
+--------------------
+
+When set to ``true``, Spack verifies downloaded source code using a
+checksum, and will refuse to build packages that it cannot verify. Set
+to ``false`` to disable these checks. Disabling this can expose you to
+attacks. Use at your own risk.
+
+--------------------
+``dirty``
+--------------------
+
+By default, Spack unsets variables in your environment that can change
+the way packages build. This includes ``LD_LIBRARY_PATH``, ``CPATH``,
+``LIBRARY_PATH``, ``DYLD_LIBRARY_PATH``, and others.
+
+By default, builds are ``clean``, but on some machines, compilers and
+other tools may need custom ``LD_LIBRARY_PATH`` setings to run. You can
+set ``dirty`` to ``true`` to skip the cleaning step and make all builds
+"dirty" by default. Be aware that this will reduce the reproducibility
+of builds.
diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst
index d39c932021..48a4686b84 100644
--- a/lib/spack/docs/configuration.rst
+++ b/lib/spack/docs/configuration.rst
@@ -1,236 +1,252 @@
.. _configuration:
-Configuration
-===================================
-
-.. _temp-space:
-
-Temporary space
-----------------------------
-
-.. warning:: Temporary space configuration will eventually be moved to
- configuration files, but currently these settings are in
- ``lib/spack/spack/__init__.py``
-
-By default, Spack will try to do all of its building in temporary
-space. There are two main reasons for this. First, Spack is designed
-to run out of a user's home directory, and on may systems the home
-directory is network mounted and potentially not a very fast
-filesystem. We create build stages in a temporary directory to avoid
-this. Second, many systems impose quotas on home directories, and
-``/tmp`` or similar directories often have more available space. This
-helps conserve space for installations in users' home directories.
-
-You can customize temporary directories by editing
-``lib/spack/spack/__init__.py``. Specifically, find this part of the file:
-
-.. code-block:: python
-
- # Whether to build in tmp space or directly in the stage_path.
- # If this is true, then spack will make stage directories in
- # a tmp filesystem, and it will symlink them into stage_path.
- use_tmp_stage = True
-
- # Locations to use for staging and building, in order of preference
- # Use a %u to add a username to the stage paths here, in case this
- # is a shared filesystem. Spack will use the first of these paths
- # that it can create.
- tmp_dirs = ['/nfs/tmp2/%u/spack-stage',
- '/var/tmp/%u/spack-stage',
- '/tmp/%u/spack-stage']
-
-The ``use_tmp_stage`` variable controls whether Spack builds
-**directly** inside the ``var/spack/`` directory. Normally, Spack
-will try to find a temporary directory for a build, then it *symlinks*
-that temporary directory into ``var/spack/`` so that you can keep
-track of what temporary directories Spack is using.
-
-The ``tmp_dirs`` variable is a list of paths Spack should search when
-trying to find a temporary directory. They can optionally contain a
-``%u``, which will substitute the current user's name into the path.
-The list is searched in order, and Spack will create a temporary stage
-in the first directory it finds to which it has write access. Add
-more elements to the list to indicate where your own site's temporary
-directory is.
-
-.. _sec-external_packages:
-
-External Packages
-----------------------------
-Spack can be configured to use externally-installed
-packages rather than building its own packages. This may be desirable
-if machines ship with system packages, such as a customized MPI
-that should be used instead of Spack building its own MPI.
-
-External packages are configured through the ``packages.yaml`` file found
-in a Spack installation's ``etc/spack/`` or a user's ``~/.spack/``
-directory. Here's an example of an external configuration:
+==============================
+Configuration Files in Spack
+==============================
+
+Spack has many configuration files. Here is a quick list of them, in
+case you want to skip directly to specific docs:
+
+* :ref:`compilers.yaml <compiler-config>`
+* :ref:`config.yaml <config-yaml>`
+* :ref:`mirrors.yaml <mirrors>`
+* :ref:`modules.yaml <modules>`
+* :ref:`packages.yaml <build-settings>`
+
+-------------------------
+YAML Format
+-------------------------
+
+Spack configuration files are written in YAML. We chose YAML because
+it's human readable, but also versatile in that it supports dictionaries,
+lists, and nested sections. For more details on the format, see `yaml.org
+<http://yaml.org>`_ and `libyaml <http://pyyaml.org/wiki/LibYAML>`_.
+Here is an example ``config.yaml`` file:
+
+.. code-block:: yaml
+
+ config:
+ install_tree: $spack/opt/spack
+ module_roots:
+ lmod: $spack/share/spack/lmod
+ build_stage:
+ - $tempdir
+ - /nfs/tmp2/$user
+
+Each spack configuration files is nested under a top-level section
+corresponding to its name. So, ``config.yaml`` starts with ``config:``,
+and ``mirrors.yaml`` starts with ``mirrors:``, etc.
+
+.. _configuration-scopes:
+
+-------------------------
+Configuration Scopes
+-------------------------
+
+Spack pulls configuration data from files in several directories. There
+are three configuration scopes. From lowest to highest:
+
+1. **defaults**: Stored in ``$(prefix)/etc/spack/defaults/``. These are
+ the "factory" settings. Users should generally not modify the settings
+ here, but should override them in other configuration scopes. The
+ defaults here will change from version to version of Spack.
+
+2. **site**: Stored in ``$(prefix)/etc/spack/``. Settings here affect
+ only *this instance* of Spack, and they override defaults. The site
+ scope can can be used for per-project settings (one spack instance per
+ project) or for site-wide settings on a multi-user machine (e.g., for
+ a common spack instance).
+
+3. **user**: Stored in the home directory: ``~/.spack/``. These settings
+ affect all instances of Spack and take the highest precedence.
+
+Each configuration directory may contain several configuration files,
+such as ``config.yaml``, ``compilers.yaml``, or ``mirrors.yaml``. When
+configurations conflict, settings from higher-precedence scopes override
+lower-precedence settings.
+
+Commands that modify scopes (e.g., ``spack compilers``, ``spack repo``,
+etc.) take a ``--scope=<name>`` parameter that you can use to control
+which scope is modified. By default they modify the highest-precedence
+scope.
+
+.. _platform-scopes:
+
+-------------------------
+Platform-specific scopes
+-------------------------
+
+For each scope above, there can *also* be platform-specific settings.
+For example, on Blue Gene/Q machines, Spack needs to know the location of
+cross-compilers for the compute nodes. This configuration is in
+``etc/spack/defaults/bgq/compilers.yaml``. It will take precedence over
+settings in the ``defaults`` scope, but can still be overridden by
+settings in ``site``, ``site/bgq``, ``user``, or ``user/bgq``. So, the
+full scope precedence is:
+
+1. ``defaults``
+2. ``defaults/<platform>``
+3. ``site``
+4. ``site/<platform>``
+5. ``user``
+6. ``user/<platform>``
+
+You can get the name to use for ``<platform>`` by running ``spack arch
+--platform``.
+
+-------------------------
+Scope precedence
+-------------------------
+
+When spack queries for configuration parameters, it searches in
+higher-precedence scopes first. So, settings in a higher-precedence file
+can override those with the same key in a lower-precedence one. For
+list-valued settings, Spack *prepends* higher-precedence settings to
+lower-precedence settings. Completely ignoring higher-level configuration
+options is supported with the ``::`` notation for keys (see
+:ref:`config-overrides` below).
+
+^^^^^^^^^^^^^^^^^^^^^^^^
+Simple keys
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Let's look at an example of overriding a single key in a Spack file. If
+your configurations look like this:
+
+**defaults** scope:
+
+.. code-block:: yaml
+
+ config:
+ install_tree: $spack/opt/spack
+ module_roots:
+ lmod: $spack/share/spack/lmod
+ build_stage:
+ - $tempdir
+ - /nfs/tmp2/$user
+
+**site** scope:
+
+.. code-block:: yaml
+
+ config:
+ install_tree: /some/other/directory
+
+Spack will only override ``install_tree`` in the ``config`` section, and
+will take the site preferences for other settings. You can see the
+final, combined configuration with the ``spack config get <configtype>``
+command:
+
+.. code-block:: console
+ :emphasize-lines: 3
+
+ $ spack config get config
+ config:
+ install_tree: /some/other/directory
+ module_roots:
+ lmod: $spack/share/spack/lmod
+ build_stage:
+ - $tempdir
+ - /nfs/tmp2/$user
+ $ _
+
+.. _config-overrides:
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+Overriding entire sections
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Above, the site ``config.yaml`` only overrides specific settings in the
+default ``config.yaml``. Sometimes, it is useful to *completely*
+override lower-precedence settings. To do this, you can use *two* colons
+at the end of a key in a configuration file. For example, if the
+**site** ``config.yaml`` above looks like this:
+
+.. code-block:: yaml
+ :emphasize-lines: 1
+
+ config::
+ install_tree: /some/other/directory
+
+Spack will ignore all lower-precedence configuration under the
+``config::`` section:
+
+.. code-block:: console
+
+ $ spack config get config
+ config:
+ install_tree: /some/other/directory
+
+^^^^^^^^^^^^^^^^^^^^^^
+List-valued settings
+^^^^^^^^^^^^^^^^^^^^^^
+
+Let's revisit the ``config.yaml`` example one more time. The
+``build_stage`` setting's value is an ordered list of directories:
+
+**defaults**
.. code-block:: yaml
- packages:
- openmpi:
- paths:
- openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7: /opt/openmpi-1.4.3
- openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug
- openmpi@1.6.5%intel@10.1 arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel
-
-This example lists three installations of OpenMPI, one built with gcc,
-one built with gcc and debug information, and another built with Intel.
-If Spack is asked to build a package that uses one of these MPIs as a
-dependency, it will use the the pre-installed OpenMPI in
-the given directory. Packages.yaml can also be used to specify modules
-
-Each ``packages.yaml`` begins with a ``packages:`` token, followed
-by a list of package names. To specify externals, add a ``paths`` or ``modules``
-token under the package name, which lists externals in a
-``spec: /path`` or ``spec: module-name`` format. Each spec should be as
-well-defined as reasonably possible. If a
-package lacks a spec component, such as missing a compiler or
-package version, then Spack will guess the missing component based
-on its most-favored packages, and it may guess incorrectly.
-
-Each package version and compilers listed in an external should
-have entries in Spack's packages and compiler configuration, even
-though the package and compiler may not every be built.
-
-The packages configuration can tell Spack to use an external location
-for certain package versions, but it does not restrict Spack to using
-external packages. In the above example, if an OpenMPI 1.8.4 became
-available Spack may choose to start building and linking with that version
-rather than continue using the pre-installed OpenMPI versions.
-
-To prevent this, the ``packages.yaml`` configuration also allows packages
-to be flagged as non-buildable. The previous example could be modified to
-be:
+ build_stage:
+ - $tempdir
+ - /nfs/tmp2/$user
+
+Suppose the user configuration adds its *own* list of ``build_stage``
+paths:
+
+**user**
.. code-block:: yaml
- packages:
- openmpi:
- paths:
- openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7: /opt/openmpi-1.4.3
- openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug
- openmpi@1.6.5%intel@10.1 arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel
- buildable: False
+ build_stage:
+ - /lustre-scratch/$user
+ - ~/mystage
+
+Spack will first look at the paths in the site ``config.yaml``, then the
+paths in the user's ``~/.spack/config.yaml``. The list in the
+higher-precedence scope is *prepended* to the defaults. ``spack config
+get config`` shows the result:
-The addition of the ``buildable`` flag tells Spack that it should never build
-its own version of OpenMPI, and it will instead always rely on a pre-built
-OpenMPI. Similar to ``paths``, ``buildable`` is specified as a property under
-a package name.
+.. code-block:: console
+ :emphasize-lines: 7-10
-If an external module is specified as not buildable, then Spack will load the
-external module into the build environment which can be used for linking.
-
-The ``buildable`` does not need to be paired with external packages.
-It could also be used alone to forbid packages that may be
-buggy or otherwise undesirable.
-
-
-Concretization Preferences
---------------------------------
-
-Spack can be configured to prefer certain compilers, package
-versions, depends_on, and variants during concretization.
-The preferred configuration can be controlled via the
-``~/.spack/packages.yaml`` file for user configuations, or the
-``etc/spack/packages.yaml`` site configuration.
-
-
-Here's an example packages.yaml file that sets preferred packages:
-
-.. code-block:: sh
-
- packages:
- opencv:
- compiler: [gcc@4.9]
- variants: +debug
- gperftools:
- version: [2.2, 2.4, 2.3]
- all:
- compiler: [gcc@4.4.7, gcc@4.6:, intel, clang, pgi]
- providers:
- mpi: [mvapich, mpich, openmpi]
-
-
-At a high level, this example is specifying how packages should be
-concretized. The opencv package should prefer using gcc 4.9 and
-be built with debug options. The gperftools package should prefer version
-2.2 over 2.4. Every package on the system should prefer mvapich for
-its MPI and gcc 4.4.7 (except for opencv, which overrides this by preferring gcc 4.9).
-These options are used to fill in implicit defaults. Any of them can be overwritten
-on the command line if explicitly requested.
-
-Each packages.yaml file begins with the string ``packages:`` and
-package names are specified on the next level. The special string ``all``
-applies settings to each package. Underneath each package name is
-one or more components: ``compiler``, ``variants``, ``version``,
-or ``providers``. Each component has an ordered list of spec
-``constraints``, with earlier entries in the list being preferred over
-later entries.
-
-Sometimes a package installation may have constraints that forbid
-the first concretization rule, in which case Spack will use the first
-legal concretization rule. Going back to the example, if a user
-requests gperftools 2.3 or later, then Spack will install version 2.4
-as the 2.4 version of gperftools is preferred over 2.3.
-
-An explicit concretization rule in the preferred section will always
-take preference over unlisted concretizations. In the above example,
-xlc isn't listed in the compiler list. Every listed compiler from
-gcc to pgi will thus be preferred over the xlc compiler.
-
-The syntax for the ``provider`` section differs slightly from other
-concretization rules. A provider lists a value that packages may
-``depend_on`` (e.g, mpi) and a list of rules for fulfilling that
-dependency.
-
-
-Profiling
-------------------
-
-Spack has some limited built-in support for profiling, and can report
-statistics using standard Python timing tools. To use this feature,
-supply ``-p`` to Spack on the command line, before any subcommands.
-
-.. _spack-p:
-
-``spack -p``
-~~~~~~~~~~~~~~~~~
-
-``spack -p`` output looks like this:
-
-.. code-block:: sh
-
- $ spack -p graph dyninst
- o dyninst
- |\
- | |\
- | o | libdwarf
- |/ /
- o | libelf
- /
- o boost
-
- 307670 function calls (305943 primitive calls) in 0.127 seconds
-
- Ordered by: internal time
-
- ncalls tottime percall cumtime percall filename:lineno(function)
- 853 0.021 0.000 0.066 0.000 inspect.py:472(getmodule)
- 51197 0.011 0.000 0.018 0.000 inspect.py:51(ismodule)
- 73961 0.010 0.000 0.010 0.000 {isinstance}
- 1762 0.006 0.000 0.053 0.000 inspect.py:440(getsourcefile)
- 32075 0.006 0.000 0.006 0.000 {hasattr}
- 1760 0.004 0.000 0.004 0.000 {posix.stat}
- 2240 0.004 0.000 0.004 0.000 {posix.lstat}
- 2602 0.004 0.000 0.011 0.000 inspect.py:398(getfile)
- 771 0.004 0.000 0.077 0.000 inspect.py:518(findsource)
- 2656 0.004 0.000 0.004 0.000 {method 'match' of '_sre.SRE_Pattern' objects}
- 30772 0.003 0.000 0.003 0.000 {method 'get' of 'dict' objects}
- ...
-
-The bottom of the output shows the top most time consuming functions,
-slowest on top. The profiling support is from Python's built-in tool,
-`cProfile
-<https://docs.python.org/2/library/profile.html#module-cProfile>`_.
+ $ spack config get config
+ config:
+ install_tree: /some/other/directory
+ module_roots:
+ lmod: $spack/share/spack/lmod
+ build_stage:
+ - /lustre-scratch/$user
+ - ~/mystage
+ - $tempdir
+ - /nfs/tmp2/$user
+ $ _
+
+As in :ref:`config-overrides`, the higher-precedence scope can
+*completely* override the lower-precedence scope using `::`. So if the
+user config looked like this:
+
+**user**
+
+.. code-block:: yaml
+ :emphasize-lines: 1
+
+ build_stage::
+ - /lustre-scratch/$user
+ - ~/mystage
+
+The merged configuration would look like this:
+
+.. code-block:: console
+ :emphasize-lines: 7-8
+
+ $ spack config get config
+ config:
+ install_tree: /some/other/directory
+ module_roots:
+ lmod: $spack/share/spack/lmod
+ build_stage:
+ - /lustre-scratch/$user
+ - ~/mystage
+ $ _
diff --git a/lib/spack/docs/contribution_guide.rst b/lib/spack/docs/contribution_guide.rst
new file mode 100644
index 0000000000..49595fecf8
--- /dev/null
+++ b/lib/spack/docs/contribution_guide.rst
@@ -0,0 +1,522 @@
+.. _contribution-guide:
+
+==================
+Contribution Guide
+==================
+
+This guide is intended for developers or administrators who want to
+contribute a new package, feature, or bugfix to Spack.
+It assumes that you have at least some familiarity with Git VCS and Github.
+The guide will show a few examples of contributing workflows and discuss
+the granularity of pull-requests (PRs). It will also discuss the tests your
+PR must pass in order to be accepted into Spack.
+
+First, what is a PR? Quoting `Bitbucket's tutorials <https://www.atlassian.com/git/tutorials/making-a-pull-request/>`_:
+
+ Pull requests are a mechanism for a developer to notify team members that
+ they have **completed a feature**. The pull request is more than just a
+ notification—it’s a dedicated forum for discussing the proposed feature.
+
+Important is **completed feature**. The changes one proposes in a PR should
+correspond to one feature/bugfix/extension/etc. One can create PRs with
+changes relevant to different ideas, however reviewing such PRs becomes tedious
+and error prone. If possible, try to follow the **one-PR-one-package/feature** rule.
+
+Spack uses a rough approximation of the `Git Flow <http://nvie.com/posts/a-successful-git-branching-model/>`_
+branching model. The develop branch contains the latest contributions, and
+master is always tagged and points to the latest stable release. Therefore, when
+you send your request, make ``develop`` the destination branch on the
+`Spack repository <https://github.com/LLNL/spack>`_.
+
+----------------------
+Continuous Integration
+----------------------
+
+Spack uses `Travis CI <https://travis-ci.org/LLNL/spack>`_ for Continuous Integration
+testing. This means that every time you submit a pull request, a series of tests will
+be run to make sure you didn't accidentally introduce any bugs into Spack. Your PR
+will not be accepted until it passes all of these tests. While you can certainly wait
+for the results of these tests after submitting a PR, we recommend that you run them
+locally to speed up the review process.
+
+If you take a look in ``$SPACK_ROOT/.travis.yml``, you'll notice that we test
+against Python 2.6 and 2.7. We currently perform 3 types of tests:
+
+^^^^^^^^^^
+Unit Tests
+^^^^^^^^^^
+
+Unit tests ensure that core Spack features like fetching or spec resolution are
+working as expected. If your PR only adds new packages or modifies existing ones,
+there's very little chance that your changes could cause the unit tests to fail.
+However, if you make changes to Spack's core libraries, you should run the unit
+tests to make sure you didn't break anything.
+
+Since they test things like fetching from VCS repos, the unit tests require
+`git <https://git-scm.com/>`_, `mercurial <https://www.mercurial-scm.org/>`_,
+and `subversion <https://subversion.apache.org/>`_ to run. Make sure these are
+installed on your system and can be found in your ``PATH``. All of these can be
+installed with Spack or with your system package manager.
+
+To run *all* of the unit tests, use:
+
+.. code-block:: console
+
+ $ spack test
+
+These tests may take several minutes to complete. If you know you are only
+modifying a single Spack feature, you can run a single unit test at a time:
+
+.. code-block:: console
+
+ $ spack test architecture
+
+This allows you to develop iteratively: make a change, test that change, make
+another change, test that change, etc. To get a list of all available unit
+tests, run:
+
+.. command-output:: spack test --list
+
+Unit tests are crucial to making sure bugs aren't introduced into Spack. If you
+are modifying core Spack libraries or adding new functionality, please consider
+adding new unit tests or strengthening existing tests.
+
+.. note::
+
+ There is also a ``run-unit-tests`` script in ``share/spack/qa`` that
+ runs the unit tests. Afterwards, it reports back to Coverage with the
+ percentage of Spack that is covered by unit tests. This script is
+ designed for Travis CI. If you want to run the unit tests yourself, we
+ suggest you use ``spack test``.
+
+^^^^^^^^^^^^
+Flake8 Tests
+^^^^^^^^^^^^
+
+Spack uses `Flake8 <http://flake8.pycqa.org/en/latest/>`_ to test for
+`PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_ conformance. PEP 8 is
+a series of style guides for Python that provide suggestions for everything
+from variable naming to indentation. In order to limit the number of PRs that
+were mostly style changes, we decided to enforce PEP 8 conformance. Your PR
+needs to comply with PEP 8 in order to be accepted.
+
+Testing for PEP 8 compliance is easy. Simply run the ``spack flake8``
+command:
+
+.. code-block:: console
+
+ $ spack flake8
+
+``spack flake8`` has a couple advantages over running ``flake8`` by hand:
+
+#. It only tests files that you have modified since branching off of
+ ``develop``.
+
+#. It works regardless of what directory you are in.
+
+#. It automatically adds approved exemptions from the ``flake8``
+ checks. For example, URLs are often longer than 80 characters, so we
+ exempt them from line length checks. We also exempt lines that start
+ with "homepage", "url", "version", "variant", "depends_on", and
+ "extends" in ``package.py`` files.
+
+More approved flake8 exemptions can be found
+`here <https://github.com/LLNL/spack/blob/develop/.flake8>`_.
+
+If all is well, you'll see something like this:
+
+.. code-block:: console
+
+ $ run-flake8-tests
+ Dependencies found.
+ =======================================================
+ flake8: running flake8 code checks on spack.
+
+ Modified files:
+
+ var/spack/repos/builtin/packages/hdf5/package.py
+ var/spack/repos/builtin/packages/hdf/package.py
+ var/spack/repos/builtin/packages/netcdf/package.py
+ =======================================================
+ Flake8 checks were clean.
+
+However, if you aren't compliant with PEP 8, flake8 will complain:
+
+.. code-block:: console
+
+ var/spack/repos/builtin/packages/netcdf/package.py:26: [F401] 'os' imported but unused
+ var/spack/repos/builtin/packages/netcdf/package.py:61: [E303] too many blank lines (2)
+ var/spack/repos/builtin/packages/netcdf/package.py:106: [E501] line too long (92 > 79 characters)
+ Flake8 found errors.
+
+Most of the error messages are straightforward, but if you don't understand what
+they mean, just ask questions about them when you submit your PR. The line numbers
+will change if you add or delete lines, so simply run ``run-flake8-tests`` again
+to update them.
+
+.. tip::
+
+ Try fixing flake8 errors in reverse order. This eliminates the need for
+ multiple runs of ``flake8`` just to re-compute line numbers and makes it
+ much easier to fix errors directly off of the Travis output.
+
+.. warning::
+
+ Flake8 requires setuptools in order to run. If you installed ``py-flake8``
+ with Spack, make sure to add ``py-setuptools`` to your ``PYTHONPATH``.
+ Otherwise, you will get an error message like:
+
+ .. code-block:: console
+
+ Traceback (most recent call last):
+ File: "/usr/bin/flake8", line 5, in <module>
+ from pkg_resources import load_entry_point
+ ImportError: No module named pkg_resources
+
+^^^^^^^^^^^^^^^^^^^
+Documentation Tests
+^^^^^^^^^^^^^^^^^^^
+
+Spack uses `Sphinx <http://www.sphinx-doc.org/en/stable/>`_ to build its
+documentation. In order to prevent things like broken links and missing imports,
+we added documentation tests that build the documentation and fail if there
+are any warning or error messages.
+
+Building the documentation requires several dependencies, all of which can be
+installed with Spack:
+
+* sphinx
+* graphviz
+* git
+* mercurial
+* subversion
+
+.. warning::
+
+ Sphinx has `several required dependencies <https://github.com/LLNL/spack/blob/develop/var/spack/repos/builtin/packages/py-sphinx/package.py>`_.
+ If you installed ``py-sphinx`` with Spack, make sure to add all of these
+ dependencies to your ``PYTHONPATH``. The easiest way to do this is to run
+ ``spack activate py-sphinx`` so that all of the dependencies are symlinked
+ to a central location. If you see an error message like:
+
+ .. code-block:: console
+
+ Traceback (most recent call last):
+ File: "/usr/bin/flake8", line 5, in <module>
+ from pkg_resources import load_entry_point
+ ImportError: No module named pkg_resources
+
+ that means Sphinx couldn't find setuptools in your ``PYTHONPATH``.
+
+Once all of the dependencies are installed, you can try building the documentation:
+
+.. code-block:: console
+
+ $ cd "$SPACK_ROOT/lib/spack/docs"
+ $ make clean
+ $ make
+
+If you see any warning or error messages, you will have to correct those before
+your PR is accepted.
+
+.. note::
+
+ There is also a ``run-doc-tests`` script in the Quality Assurance directory.
+ The only difference between running this script and running ``make`` by hand
+ is that the script will exit immediately if it encounters an error or warning.
+ This is necessary for Travis CI. If you made a lot of documentation tests, it
+ is much quicker to run ``make`` by hand so that you can see all of the warnings
+ at once.
+
+If you are editing the documentation, you should obviously be running the
+documentation tests. But even if you are simply adding a new package, your
+changes could cause the documentation tests to fail:
+
+.. code-block:: console
+
+ package_list.rst:8745: WARNING: Block quote ends without a blank line; unexpected unindent.
+
+At first, this error message will mean nothing to you, since you didn't edit
+that file. Until you look at line 8745 of the file in question:
+
+.. code-block:: rst
+
+ Description:
+ NetCDF is a set of software libraries and self-describing, machine-
+ independent data formats that support the creation, access, and sharing
+ of array-oriented scientific data.
+
+Our documentation includes :ref:`a list of all Spack packages <package-list>`.
+If you add a new package, its docstring is added to this page. The problem in
+this case was that the docstring looked like:
+
+.. code-block:: python
+
+ class Netcdf(Package):
+ """
+ NetCDF is a set of software libraries and self-describing,
+ machine-independent data formats that support the creation,
+ access, and sharing of array-oriented scientific data.
+ """
+
+Docstrings cannot start with a newline character, or else Sphinx will complain.
+Instead, they should look like:
+
+.. code-block:: python
+
+ class Netcdf(Package):
+ """NetCDF is a set of software libraries and self-describing,
+ machine-independent data formats that support the creation,
+ access, and sharing of array-oriented scientific data."""
+
+Documentation changes can result in much more obfuscated warning messages.
+If you don't understand what they mean, feel free to ask when you submit
+your PR.
+
+-------------
+Git Workflows
+-------------
+
+Spack is still in the beta stages of development. Most of our users run off of
+the develop branch, and fixes and new features are constantly being merged. So
+how do you keep up-to-date with upstream while maintaining your own local
+differences and contributing PRs to Spack?
+
+^^^^^^^^^
+Branching
+^^^^^^^^^
+
+The easiest way to contribute a pull request is to make all of your changes on
+new branches. Make sure your ``develop`` is up-to-date and create a new branch
+off of it:
+
+.. code-block:: console
+
+ $ git checkout develop
+ $ git pull upstream develop
+ $ git branch <descriptive_branch_name>
+ $ git checkout <descriptive_branch_name>
+
+Here we assume that the local ``develop`` branch tracks the upstream develop
+branch of Spack. This is not a requirement and you could also do the same with
+remote branches. But for some it is more convenient to have a local branch that
+tracks upstream.
+
+Normally we prefer that commits pertaining to a package ``<package-name>`` have
+a message ``<package-name>: descriptive message``. It is important to add
+descriptive message so that others, who might be looking at your changes later
+(in a year or maybe two), would understand the rationale behind them.
+
+Now, you can make your changes while keeping the ``develop`` branch pure.
+Edit a few files and commit them by running:
+
+.. code-block:: console
+
+ $ git add <files_to_be_part_of_the_commit>
+ $ git commit --message <descriptive_message_of_this_particular_commit>
+
+Next, push it to your remote fork and create a PR:
+
+.. code-block:: console
+
+ $ git push origin <descriptive_branch_name> --set-upstream
+
+GitHub provides a `tutorial <https://help.github.com/articles/about-pull-requests/>`_
+on how to file a pull request. When you send the request, make ``develop`` the
+destination branch.
+
+If you need this change immediately and don't have time to wait for your PR to
+be merged, you can always work on this branch. But if you have multiple PRs,
+another option is to maintain a Frankenstein branch that combines all of your
+other branches:
+
+.. code-block:: console
+
+ $ git co develop
+ $ git branch <your_modified_develop_branch>
+ $ git checkout <your_modified_develop_branch>
+ $ git merge <descriptive_branch_name>
+
+This can be done with each new PR you submit. Just make sure to keep this local
+branch up-to-date with upstream ``develop`` too.
+
+^^^^^^^^^^^^^^
+Cherry-Picking
+^^^^^^^^^^^^^^
+
+What if you made some changes to your local modified develop branch and already
+committed them, but later decided to contribute them to Spack? You can use
+cherry-picking to create a new branch with only these commits.
+
+First, check out your local modified develop branch:
+
+.. code-block:: console
+
+ $ git checkout <your_modified_develop_branch>
+
+Now, get the hashes of the commits you want from the output of:
+
+.. code-block:: console
+
+ $ git log
+
+Next, create a new branch off of upstream ``develop`` and copy the commits
+that you want in your PR:
+
+.. code-block:: console
+
+ $ git checkout develop
+ $ git pull upstream develop
+ $ git branch <descriptive_branch_name>
+ $ git checkout <descriptive_branch_name>
+ $ git cherry-pick <hash>
+ $ git push origin <descriptive_branch_name> --set-upstream
+
+Now you can create a PR from the web-interface of GitHub. The net result is as
+follows:
+
+#. You patched your local version of Spack and can use it further.
+#. You "cherry-picked" these changes in a stand-alone branch and submitted it
+ as a PR upstream.
+
+Should you have several commits to contribute, you could follow the same
+procedure by getting hashes of all of them and cherry-picking to the PR branch.
+
+.. note::
+
+ It is important that whenever you change something that might be of
+ importance upstream, create a pull request as soon as possible. Do not wait
+ for weeks/months to do this, because:
+
+ #. you might forget why you modified certain files
+ #. it could get difficult to isolate this change into a stand-alone clean PR.
+
+^^^^^^^^
+Rebasing
+^^^^^^^^
+
+Other developers are constantly making contributions to Spack, possibly on the
+same files that your PR changed. If their PR is merged before yours, it can
+create a merge conflict. This means that your PR can no longer be automatically
+merged without a chance of breaking your changes. In this case, you will be
+asked to rebase on top of the latest upstream ``develop``.
+
+First, make sure your develop branch is up-to-date:
+
+.. code-block:: console
+
+ $ git checkout develop
+ $ git pull upstream develop
+
+Now, we need to switch to the branch you submitted for your PR and rebase it
+on top of develop:
+
+.. code-block:: console
+
+ $ git checkout <descriptive_branch_name>
+ $ git rebase develop
+
+Git will likely ask you to resolve conflicts. Edit the file that it says can't
+be merged automatically and resolve the conflict. Then, run:
+
+.. code-block:: console
+
+ $ git add <file_that_could_not_be_merged>
+ $ git rebase --continue
+
+You may have to repeat this process multiple times until all conflicts are resolved.
+Once this is done, simply force push your rebased branch to your remote fork:
+
+.. code-block:: console
+
+ $ git push --force origin <descriptive_branch_name>
+
+^^^^^^^^^^^^^^^^^^^^^^^^^
+Rebasing with cherry-pick
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+You can also perform a rebase using ``cherry-pick``. First, create a temporary
+backup branch:
+
+.. code-block:: console
+
+ $ git checkout <descriptive_branch_name>
+ $ git branch tmp
+
+If anything goes wrong, you can always go back to your ``tmp`` branch.
+Now, look at the logs and save the hashes of any commits you would like to keep:
+
+.. code-block:: console
+
+ $ git log
+
+Next, go back to the original branch and reset it to ``develop``.
+Before doing so, make sure that you local ``develop`` branch is up-to-date
+with upstream:
+
+.. code-block:: console
+
+ $ git checkout develop
+ $ git pull upstream develop
+ $ git checkout <descriptive_branch_name>
+ $ git reset --hard develop
+
+Now you can cherry-pick relevant commits:
+
+.. code-block:: console
+
+ $ git cherry-pick <hash1>
+ $ git cherry-pick <hash2>
+
+Push the modified branch to your fork:
+
+.. code-block:: console
+
+ $ git push --force origin <descriptive_branch_name>
+
+If everything looks good, delete the backup branch:
+
+.. code-block:: console
+
+ $ git branch --delete --force tmp
+
+^^^^^^^^^^^^^^^^^^
+Re-writing History
+^^^^^^^^^^^^^^^^^^
+
+Sometimes you may end up on a branch that has diverged so much from develop
+that it cannot easily be rebased. If the current commits history is more of
+an experimental nature and only the net result is important, you may rewrite
+the history.
+
+First, merge upstream ``develop`` and reset you branch to it. On the branch
+in question, run:
+
+.. code-block:: console
+
+ $ git merge develop
+ $ git reset develop
+
+At this point your branch will point to the same commit as develop and
+thereby the two are indistinguishable. However, all the files that were
+previously modified will stay as such. In other words, you do not lose the
+changes you made. Changes can be reviewed by looking at diffs:
+
+.. code-block:: console
+
+ $ git status
+ $ git diff
+
+The next step is to rewrite the history by adding files and creating commits:
+
+.. code-block:: console
+
+ $ git add <files_to_be_part_of_commit>
+ $ git commit --message <descriptive_message>
+
+After all changed files are committed, you can push the branch to your fork
+and create a PR:
+
+.. code-block:: console
+
+ $ git push origin --set-upstream
diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst
index d28fe4b2a5..5ddbaf2478 100644
--- a/lib/spack/docs/developer_guide.rst
+++ b/lib/spack/docs/developer_guide.rst
@@ -1,7 +1,8 @@
.. _developer_guide:
+===============
Developer Guide
-=====================
+===============
This guide is intended for people who want to work on Spack itself.
If you just want to develop packages, see the :ref:`packaging-guide`.
@@ -11,17 +12,18 @@ It is assumed that you've read the :ref:`basic-usage` and
concepts discussed there. If you're not, we recommend reading those
first.
+--------
Overview
------------------------
+--------
Spack is designed with three separate roles in mind:
- #. **Users**, who need to install software *without* knowing all the
- details about how it is built.
- #. **Packagers** who know how a particular software package is
- built and encode this information in package files.
- #. **Developers** who work on Spack, add new features, and try to
- make the jobs of packagers and users easier.
+#. **Users**, who need to install software *without* knowing all the
+ details about how it is built.
+#. **Packagers** who know how a particular software package is
+ built and encode this information in package files.
+#. **Developers** who work on Spack, add new features, and try to
+ make the jobs of packagers and users easier.
Users could be end users installing software in their home directory,
or administrators installing software to a shared directory on a
@@ -41,9 +43,9 @@ specification.
This gets us to the two key concepts in Spack's software design:
- #. **Specs**: expressions for describing builds of software, and
- #. **Packages**: Python modules that build software according to a
- spec.
+#. **Specs**: expressions for describing builds of software, and
+#. **Packages**: Python modules that build software according to a
+ spec.
A package is a template for building particular software, and a spec
as a descriptor for one or more instances of that template. Users
@@ -63,75 +65,75 @@ building the software off to the package object. The rest of this
document describes all the pieces that come together to make that
happen.
-
+-------------------
Directory Structure
--------------------------
+-------------------
So that you can familiarize yourself with the project, we'll start
-with a high level view of Spack's directory structure::
+with a high level view of Spack's directory structure:
+
+.. code-block:: none
- spack/ <- installation root
- bin/
- spack <- main spack executable
+ spack/ <- installation root
+ bin/
+ spack <- main spack executable
- etc/
- spack/ <- Spack config files.
- Can be overridden by files in ~/.spack.
+ etc/
+ spack/ <- Spack config files.
+ Can be overridden by files in ~/.spack.
- var/
- spack/ <- build & stage directories
- repos/ <- contains package repositories
- builtin/ <- pkg repository that comes with Spack
- repo.yaml <- descriptor for the builtin repository
- packages/ <- directories under here contain packages
- cache/ <- saves resources downloaded during installs
+ var/
+ spack/ <- build & stage directories
+ repos/ <- contains package repositories
+ builtin/ <- pkg repository that comes with Spack
+ repo.yaml <- descriptor for the builtin repository
+ packages/ <- directories under here contain packages
+ cache/ <- saves resources downloaded during installs
- opt/
- spack/ <- packages are installed here
+ opt/
+ spack/ <- packages are installed here
- lib/
- spack/
- docs/ <- source for this documentation
- env/ <- compiler wrappers for build environment
+ lib/
+ spack/
+ docs/ <- source for this documentation
+ env/ <- compiler wrappers for build environment
- external/ <- external libs included in Spack distro
- llnl/ <- some general-use libraries
+ external/ <- external libs included in Spack distro
+ llnl/ <- some general-use libraries
- spack/ <- spack module; contains Python code
- cmd/ <- each file in here is a spack subcommand
- compilers/ <- compiler description files
- test/ <- unit test modules
- util/ <- common code
+ spack/ <- spack module; contains Python code
+ cmd/ <- each file in here is a spack subcommand
+ compilers/ <- compiler description files
+ test/ <- unit test modules
+ util/ <- common code
Spack is designed so that it could live within a `standard UNIX
directory hierarchy <http://linux.die.net/man/7/hier>`_, so ``lib``,
``var``, and ``opt`` all contain a ``spack`` subdirectory in case
Spack is installed alongside other software. Most of the interesting
-parts of Spack live in ``lib/spack``. Files under ``var`` are created
-as needed, so there is no ``var`` directory when you initially clone
-Spack from the repository.
+parts of Spack live in ``lib/spack``.
Spack has *one* directory layout and there is no install process.
-version and the source code. Most Python programs don't look like
-this (they use distutils, ``setup.py``, etc.) but we wanted to make
-Spack *very* easy to use. The simple layout spares users from the
-need to install Spack into a Python environment. Many users don't
-have write access to a Python installation, and installing an entire
-new instance of Python to bootstrap Spack would be very complicated.
+Most Python programs don't look like this (they use distutils, ``setup.py``,
+etc.) but we wanted to make Spack *very* easy to use. The simple layout
+spares users from the need to install Spack into a Python environment.
+Many users don't have write access to a Python installation, and installing
+an entire new instance of Python to bootstrap Spack would be very complicated.
Users should not have to install install a big, complicated package to
use the thing that's supposed to spare them from the details of big,
complicated packages. The end result is that Spack works out of the
box: clone it and add ``bin`` to your PATH and you're ready to go.
-
+--------------
Code Structure
--------------------------
+--------------
This section gives an overview of the various Python modules in Spack,
grouped by functionality.
+^^^^^^^^^^^^^^^^^^^^^^^
Package-related modules
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^
:mod:`spack.package`
Contains the :class:`Package <spack.package.Package>` class, which
@@ -158,9 +160,9 @@ Package-related modules
decorator, which allows :ref:`multimethods <multimethods>` in
packages.
-
+^^^^^^^^^^^^^^^^^^^^
Spec-related modules
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^
:mod:`spack.spec`
Contains :class:`Spec <spack.spec.Spec>` and :class:`SpecParser
@@ -208,9 +210,9 @@ Spec-related modules
Not yet implemented. Should eventually have architecture
descriptions for cross-compiling.
-
+^^^^^^^^^^^^^^^^^
Build environment
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^
:mod:`spack.stage`
Handles creating temporary directories for builds.
@@ -224,15 +226,17 @@ Build environment
Create more implementations of this to change the hierarchy and
naming scheme in ``$spack_prefix/opt``
+^^^^^^^^^^^^^^^^^
Spack Subcommands
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^
:mod:`spack.cmd`
Each module in this package implements a Spack subcommand. See
:ref:`writing commands <writing-commands>` for details.
+^^^^^^^^^^
Unit tests
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^
:mod:`spack.test`
Implements Spack's test suite. Add a module and put its name in
@@ -242,78 +246,100 @@ Unit tests
This is a fake package hierarchy used to mock up packages for
Spack's test suite.
+^^^^^^^^^^^^^
Other Modules
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-:mod:`spack.globals`
- Includes global settings for Spack. the default policy classes for
- things like :ref:`temporary space <temp-space>` and
- :ref:`concretization <concretization-policies>`.
-
-:mod:`spack.tty`
- Basic output functions for all of the messages Spack writes to the
- terminal.
-
-:mod:`spack.color`
- Implements a color formatting syntax used by ``spack.tty``.
+^^^^^^^^^^^^^
:mod:`spack.url`
URL parsing, for deducing names and versions of packages from
tarball URLs.
-:mod:`spack.util`
- In this package are a number of utility modules for the rest of
- Spack.
-
:mod:`spack.error`
:class:`SpackError <spack.error.SpackError>`, the base class for
Spack's exception hierarchy.
+:mod:`llnl.util.tty`
+ Basic output functions for all of the messages Spack writes to the
+ terminal.
-Spec objects
--------------------------
-
-Package objects
--------------------------
+:mod:`llnl.util.tty.color`
+ Implements a color formatting syntax used by ``spack.tty``.
+:mod:`llnl.util`
+ In this package are a number of utility modules for the rest of
+ Spack.
-Most spack commands
-look something like this:
+------------
+Spec objects
+------------
- #. Parse an abstract spec (or specs) from the command line,
- #. *Normalize* the spec based on information in package files,
- #. *Concretize* the spec according to some customizable policies,
- #. Instantiate a package based on the spec, and
- #. Call methods (e.g., ``install()``) on the package object.
+---------------
+Package objects
+---------------
+Most spack commands look something like this:
+#. Parse an abstract spec (or specs) from the command line,
+#. *Normalize* the spec based on information in package files,
+#. *Concretize* the spec according to some customizable policies,
+#. Instantiate a package based on the spec, and
+#. Call methods (e.g., ``install()``) on the package object.
The information in Package files is used at all stages in this
process.
+Conceptually, packages are overloaded. They contain:
-Conceptually, packages are overloaded. They contain
-
+-------------
Stage objects
--------------------------
+-------------
.. _writing-commands:
+----------------
Writing commands
--------------------------
+----------------
+----------
Unit tests
--------------------------
+----------
+------------
Unit testing
--------------------------
-
+------------
+------------------
Developer commands
--------------------------
+------------------
+^^^^^^^^^^^^^
``spack doc``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^
+^^^^^^^^^^^^^^
``spack test``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
+
+---------
+Profiling
+---------
+
+Spack has some limited built-in support for profiling, and can report
+statistics using standard Python timing tools. To use this feature,
+supply ``--profile`` to Spack on the command line, before any subcommands.
+
+.. _spack-p:
+
+^^^^^^^^^^^^^^^^^^^
+``spack --profile``
+^^^^^^^^^^^^^^^^^^^
+
+``spack --profile`` output looks like this:
+
+.. command-output:: spack --profile graph dyninst
+ :ellipsis: 25
+
+The bottom of the output shows the top most time consuming functions,
+slowest on top. The profiling support is from Python's built-in tool,
+`cProfile
+<https://docs.python.org/2/library/profile.html#module-cProfile>`_.
diff --git a/lib/spack/docs/features.rst b/lib/spack/docs/features.rst
index 27a3b4b435..2df1d182d6 100644
--- a/lib/spack/docs/features.rst
+++ b/lib/spack/docs/features.rst
@@ -1,29 +1,32 @@
-Feature overview
-==================
+================
+Feature Overview
+================
This is a high-level overview of features that make Spack different
from other `package managers
<http://en.wikipedia.org/wiki/Package_management_system>`_ and `port
systems <http://en.wikipedia.org/wiki/Ports_collection>`_.
+---------------------------
Simple package installation
-----------------------------
+---------------------------
Installing the default version of a package is simple. This will install
the latest version of the ``mpileaks`` package and all of its dependencies:
-.. code-block:: sh
+.. code-block:: console
$ spack install mpileaks
+--------------------------------
Custom versions & configurations
--------------------------------------------
+--------------------------------
Spack allows installation to be customized. Users can specify the
version, build compiler, compile-time options, and cross-compile
platform, all on the command line.
-.. code-block:: sh
+.. code-block:: console
# Install a particular version by appending @
$ spack install mpileaks@1.1.2
@@ -47,37 +50,39 @@ Users can specify as many or few options as they care about. Spack
will fill in the unspecified values with sensible defaults. The two listed
syntaxes for variants are identical when the value is boolean.
-
+----------------------
Customize dependencies
--------------------------------------
+----------------------
Spack allows *dependencies* of a particular installation to be
customized extensively. Suppose that ``mpileaks`` depends indirectly
on ``libelf`` and ``libdwarf``. Using ``^``, users can add custom
configurations for the dependencies:
-.. code-block:: sh
+.. code-block:: console
# Install mpileaks and link it with specific versions of libelf and libdwarf
$ spack install mpileaks@1.1.2 %gcc@4.7.3 +debug ^libelf@0.8.12 ^libdwarf@20130729+debug
-
+------------------------
Non-destructive installs
--------------------------------------
+------------------------
Spack installs every unique package/dependency configuration into its
own prefix, so new installs will not break existing ones.
+-------------------------------
Packages can peacefully coexist
--------------------------------------
+-------------------------------
Spack avoids library misconfiguration by using ``RPATH`` to link
dependencies. When a user links a library or runs a program, it is
tied to the dependencies it was built with, so there is no need to
manipulate ``LD_LIBRARY_PATH`` at runtime.
+-------------------------
Creating packages is easy
--------------------------------------
+-------------------------
To create a new packages, all Spack needs is a URL for the source
archive. The ``spack create`` command will create a boilerplate
@@ -86,7 +91,7 @@ in pure Python.
For example, this command:
-.. code-block:: sh
+.. code-block:: console
$ spack create http://www.mr511.de/software/libelf-0.8.13.tar.gz
@@ -96,16 +101,26 @@ creates a simple python file:
from spack import *
+
class Libelf(Package):
- homepage = "http://www.example.com/"
+ """FIXME: Put a proper description of your package here."""
+
+ # FIXME: Add a proper url for your package's homepage here.
+ homepage = "http://www.example.com"
url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz"
version('0.8.13', '4136d7b4c04df68b686570afa26988ac')
- def install(self, prefix):
- configure("--prefix=%s" % prefix)
+ # FIXME: Add dependencies if required.
+ # depends_on('foo')
+
+ def install(self, spec, prefix):
+ # FIXME: Modify the configure line to suit your build system here.
+ configure('--prefix={0}'.format(prefix))
+
+ # FIXME: Add logic to build and install here.
make()
- make("install")
+ make('install')
It doesn't take much python coding to get from there to a working
package:
diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst
index 2c5b68ea65..34cbf453e1 100644
--- a/lib/spack/docs/getting_started.rst
+++ b/lib/spack/docs/getting_started.rst
@@ -1,22 +1,48 @@
+.. _getting_started:
+
+===============
Getting Started
-====================
+===============
+
+-------------
+Prerequisites
+-------------
+
+Spack has the following minimum requirements, which must be installed
+before Spack is run:
+
+1. Python 2.6 or 2.7
+2. A C/C++ compiler
+3. The ``git`` and ``curl`` commands.
+
+These requirements can be easily installed on most modern Linux systems;
+on Macintosh, XCode is required. Spack is designed to run on HPC
+platforms like Cray and BlueGene/Q. Not all packages should be expected
+to work on all platforms. A build matrix showing which packages are
+working on which systems is planned but not yet available.
-Download
---------------------
+------------
+Installation
+------------
-Getting spack is easy. You can clone it from the `github repository
+Getting Spack is easy. You can clone it from the `github repository
<https://github.com/llnl/spack>`_ using this command:
-.. code-block:: sh
+.. code-block:: console
$ git clone https://github.com/llnl/spack.git
-This will create a directory called ``spack``. We'll assume that the
-full path to this directory is in the ``SPACK_ROOT`` environment
-variable. Add ``$SPACK_ROOT/bin`` to your path and you're ready to
-go:
+This will create a directory called ``spack``.
+
+^^^^^^^^^^^^^^^^^^^^^^^^
+Add Spack to the Shell
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+We'll assume that the full path to your downloaded Spack directory is
+in the ``SPACK_ROOT`` environment variable. Add ``$SPACK_ROOT/bin``
+to your path and you're ready to go:
-.. code-block:: sh
+.. code-block:: console
$ export PATH=$SPACK_ROOT/bin:$PATH
$ spack install libelf
@@ -24,9 +50,10 @@ go:
For a richer experience, use Spack's `shell support
<http://software.llnl.gov/spack/basic_usage.html#environment-modules>`_:
-.. code-block:: sh
+.. code-block:: console
# For bash users
+ $ export SPACK_ROOT=/path/to/spack
$ . $SPACK_ROOT/share/spack/setup-env.sh
# For tcsh or csh users (note you must set SPACK_ROOT)
@@ -35,21 +62,1075 @@ For a richer experience, use Spack's `shell support
This automatically adds Spack to your ``PATH``.
-Installation
---------------------
+^^^^^^^^^^^^^^^^^
+Clean Environment
+^^^^^^^^^^^^^^^^^
+
+Many packages' installs can be broken by changing environment
+variables. For example, a package might pick up the wrong build-time
+dependencies (most of them not specified) depending on the setting of
+``PATH``. ``GCC`` seems to be particularly vulnerable to these issues.
-You don't need to install Spack; it's ready to run as soon as you
-clone it from git.
+Therefore, it is recommended that Spack users run with a *clean
+environment*, especially for ``PATH``. Only software that comes with
+the system, or that you know you wish to use with Spack, should be
+included. This procedure will avoid many strange build errors.
-You may want to run it out of a prefix other than the git repository
+
+^^^^^^^^^^^^^^^^^^
+Check Installation
+^^^^^^^^^^^^^^^^^^
+
+With Spack installed, you should be able to run some basic Spack
+commands. For example:
+
+.. code-block:: console
+
+ $ spack spec netcdf
+ ...
+ netcdf@4.4.1%gcc@5.3.0~hdf4+mpi arch=linux-SuSE11-x86_64
+ ^curl@7.50.1%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^openssl@system%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^zlib@1.2.8%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^hdf5@1.10.0-patch1%gcc@5.3.0+cxx~debug+fortran+mpi+shared~szip~threadsafe arch=linux-SuSE11-x86_64
+ ^openmpi@1.10.1%gcc@5.3.0~mxm~pmi~psm~psm2~slurm~sqlite3~thread_multiple~tm+verbs+vt arch=linux-SuSE11-x86_64
+ ^m4@1.4.17%gcc@5.3.0+sigsegv arch=linux-SuSE11-x86_64
+ ^libsigsegv@2.10%gcc@5.3.0 arch=linux-SuSE11-x86_64
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+Optional: Alternate Prefix
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+You may want to run Spack out of a prefix other than the git repository
you cloned. The ``spack bootstrap`` command provides this
functionality. To install spack in a new directory, simply type:
-.. code-block:: sh
+.. code-block:: console
- $ spack bootstrap /my/favorite/prefix
+ $ spack bootstrap /my/favorite/prefix
This will install a new spack script in ``/my/favorite/prefix/bin``,
which you can use just like you would the regular spack script. Each
copy of spack installs packages into its own ``$PREFIX/opt``
directory.
+
+
+^^^^^^^^^^
+Next Steps
+^^^^^^^^^^
+
+In theory, Spack doesn't need any additional installation; just
+download and run! But in real life, additional steps are usually
+required before Spack can work in a practical sense. Read on...
+
+
+.. _compiler-config:
+
+----------------------
+Compiler configuration
+----------------------
+
+Spack has the ability to build packages with multiple compilers and
+compiler versions. Spack searches for compilers on your machine
+automatically the first time it is run. It does this by inspecting
+your ``PATH``.
+
+.. _cmd-spack-compilers:
+
+^^^^^^^^^^^^^^^^^^^
+``spack compilers``
+^^^^^^^^^^^^^^^^^^^
+
+You can see which compilers spack has found by running ``spack
+compilers`` or ``spack compiler list``:
+
+.. code-block:: console
+
+ $ spack compilers
+ ==> Available compilers
+ -- gcc ---------------------------------------------------------
+ gcc@4.9.0 gcc@4.8.0 gcc@4.7.0 gcc@4.6.2 gcc@4.4.7
+ gcc@4.8.2 gcc@4.7.1 gcc@4.6.3 gcc@4.6.1 gcc@4.1.2
+ -- intel -------------------------------------------------------
+ intel@15.0.0 intel@14.0.0 intel@13.0.0 intel@12.1.0 intel@10.0
+ intel@14.0.3 intel@13.1.1 intel@12.1.5 intel@12.0.4 intel@9.1
+ intel@14.0.2 intel@13.1.0 intel@12.1.3 intel@11.1
+ intel@14.0.1 intel@13.0.1 intel@12.1.2 intel@10.1
+ -- clang -------------------------------------------------------
+ clang@3.4 clang@3.3 clang@3.2 clang@3.1
+ -- pgi ---------------------------------------------------------
+ pgi@14.3-0 pgi@13.2-0 pgi@12.1-0 pgi@10.9-0 pgi@8.0-1
+ pgi@13.10-0 pgi@13.1-1 pgi@11.10-0 pgi@10.2-0 pgi@7.1-3
+ pgi@13.6-0 pgi@12.8-0 pgi@11.1-0 pgi@9.0-4 pgi@7.0-6
+
+Any of these compilers can be used to build Spack packages. More on
+how this is done is in :ref:`sec-specs`.
+
+.. _spack-compiler-add:
+
+^^^^^^^^^^^^^^^^^^^^^^
+``spack compiler add``
+^^^^^^^^^^^^^^^^^^^^^^
+
+An alias for ``spack compiler find``.
+
+.. _spack-compiler-find:
+
+^^^^^^^^^^^^^^^^^^^^^^^
+``spack compiler find``
+^^^^^^^^^^^^^^^^^^^^^^^
+
+If you do not see a compiler in this list, but you want to use it with
+Spack, you can simply run ``spack compiler find`` with the path to
+where the compiler is installed. For example:
+
+.. code-block:: console
+
+ $ spack compiler find /usr/local/tools/ic-13.0.079
+ ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml
+ intel@13.0.079
+
+Or you can run ``spack compiler find`` with no arguments to force
+auto-detection. This is useful if you do not know where compilers are
+installed, but you know that new compilers have been added to your
+``PATH``. For example, you might load a module, like this:
+
+.. code-block:: console
+
+ $ module load gcc-4.9.0
+ $ spack compiler find
+ ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml
+ gcc@4.9.0
+
+This loads the environment module for gcc-4.9.0 to add it to
+``PATH``, and then it adds the compiler to Spack.
+
+.. _spack-compiler-info:
+
+^^^^^^^^^^^^^^^^^^^^^^^
+``spack compiler info``
+^^^^^^^^^^^^^^^^^^^^^^^
+
+If you want to see specifics on a particular compiler, you can run
+``spack compiler info`` on it:
+
+.. code-block:: console
+
+ $ spack compiler info intel@15
+ intel@15.0.0:
+ paths:
+ cc = /usr/local/bin/icc-15.0.090
+ cxx = /usr/local/bin/icpc-15.0.090
+ f77 = /usr/local/bin/ifort-15.0.090
+ fc = /usr/local/bin/ifort-15.0.090
+ modules = []
+ operating system = centos6
+ ...
+
+This shows which C, C++, and Fortran compilers were detected by Spack.
+Notice also that we didn't have to be too specific about the
+version. We just said ``intel@15``, and information about the only
+matching Intel compiler was displayed.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Manual compiler configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If auto-detection fails, you can manually configure a compiler by
+editing your ``~/.spack/compilers.yaml`` file. You can do this by running
+``spack config edit compilers``, which will open the file in your ``$EDITOR``.
+
+Each compiler configuration in the file looks like this:
+
+.. code-block:: yaml
+
+ compilers:
+ - compiler:
+ modules: []
+ operating_system: centos6
+ paths:
+ cc: /usr/local/bin/icc-15.0.024-beta
+ cxx: /usr/local/bin/icpc-15.0.024-beta
+ f77: /usr/local/bin/ifort-15.0.024-beta
+ fc: /usr/local/bin/ifort-15.0.024-beta
+ spec: intel@15.0.0:
+
+For compilers that do not support Fortran (like ``clang``), put
+``None`` for ``f77`` and ``fc``:
+
+.. code-block:: yaml
+
+ compilers:
+ - compiler:
+ modules: []
+ operating_system: centos6
+ paths:
+ cc: /usr/bin/clang
+ cxx: /usr/bin/clang++
+ f77: None
+ fc: None
+ spec: clang@3.3svn
+
+Once you save the file, the configured compilers will show up in the
+list displayed by ``spack compilers``.
+
+You can also add compiler flags to manually configured compilers. These
+flags should be specified in the ``flags`` section of the compiler
+specification. The valid flags are ``cflags``, ``cxxflags``, ``fflags``,
+``cppflags``, ``ldflags``, and ``ldlibs``. For example:
+
+.. code-block:: yaml
+
+ compilers:
+ - compiler:
+ modules: []
+ operating_system: centos6
+ paths:
+ cc: /usr/bin/gcc
+ cxx: /usr/bin/g++
+ f77: /usr/bin/gfortran
+ fc: /usr/bin/gfortran
+ flags:
+ cflags: -O3 -fPIC
+ cxxflags: -O3 -fPIC
+ cppflags: -O3 -fPIC
+ spec: gcc@4.7.2
+
+These flags will be treated by spack as if they were entered from
+the command line each time this compiler is used. The compiler wrappers
+then inject those flags into the compiler command. Compiler flags
+entered from the command line will be discussed in more detail in the
+following section.
+
+^^^^^^^^^^^^^^^^^^^^^^^
+Build Your Own Compiler
+^^^^^^^^^^^^^^^^^^^^^^^
+
+If you are particular about which compiler/version you use, you might
+wish to have Spack build it for you. For example:
+
+.. code-block:: console
+
+ $ spack install gcc@4.9.3
+
+Once that has finished, you will need to add it to your
+``compilers.yaml`` file. You can then set Spack to use it by default
+by adding the following to your ``packages.yaml`` file:
+
+.. code-block:: yaml
+
+ packages:
+ all:
+ compiler: [gcc@4.9.3]
+
+
+.. tip::
+
+ If you are building your own compiler, some users prefer to have a
+ Spack instance just for that. For example, create a new Spack in
+ ``~/spack-tools`` and then run ``~/spack-tools/bin/spack install
+ gcc@4.9.3``. Once the compiler is built, don't build anything
+ more in that Spack instance; instead, create a new "real" Spack
+ instance, configure Spack to use the compiler you've just built,
+ and then build your application software in the new Spack
+ instance. Following this tip makes it easy to delete all your
+ Spack packages *except* the compiler.
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Compilers Requiring Modules
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Many installed compilers will work regardless of the environment they
+are called with. However, some installed compilers require
+``$LD_LIBRARY_PATH`` or other environment variables to be set in order
+to run; this is typical for Intel and other proprietary compilers.
+
+In such a case, you should tell Spack which module(s) to load in order
+to run the chosen compiler (If the compiler does not come with a
+module file, you might consider making one by hand). Spack will load
+this module into the environment ONLY when the compiler is run, and
+NOT in general for a package's ``install()`` method. See, for
+example, this ``compilers.yaml`` file:
+
+.. code-block:: yaml
+
+ compilers:
+ - compiler:
+ modules: [other/comp/gcc-5.3-sp3]
+ operating_system: SuSE11
+ paths:
+ cc: /usr/local/other/SLES11.3/gcc/5.3.0/bin/gcc
+ cxx: /usr/local/other/SLES11.3/gcc/5.3.0/bin/g++
+ f77: /usr/local/other/SLES11.3/gcc/5.3.0/bin/gfortran
+ fc: /usr/local/other/SLES11.3/gcc/5.3.0/bin/gfortran
+ spec: gcc@5.3.0
+
+Some compilers require special environment settings to be loaded not just
+to run, but also to execute the code they build, breaking packages that
+need to execute code they just compiled. If it's not possible or
+practical to use a better compiler, you'll need to ensure that
+environment settings are preserved for compilers like this (i.e., you'll
+need to load the module or source the compiler's shell script).
+
+By default, Spack tries to ensure that builds are reproducible by
+cleaning the environment before building. If this interferes with your
+compiler settings, you CAN use ``spack install --dirty`` as a workaround.
+Note that this MAY interfere with package builds.
+
+.. _licensed-compilers:
+
+^^^^^^^^^^^^^^^^^^
+Licensed Compilers
+^^^^^^^^^^^^^^^^^^
+
+Some proprietary compilers require licensing to use. If you need to
+use a licensed compiler (eg, PGI), the process is similar to a mix of
+build your own, plus modules:
+
+#. Create a Spack package (if it doesn't exist already) to install
+ your compiler. Follow instructions on installing :ref:`license`.
+
+#. Once the compiler is installed, you should be able to test it by
+ using Spack to load the module it just created, and running simple
+ builds (eg: ``cc helloWorld.c && ./a.out``)
+
+#. Add the newly-installed compiler to ``compilers.yaml`` as shown
+ above.
+
+.. _mixed-toolchains:
+
+^^^^^^^^^^^^^^^^
+Mixed Toolchains
+^^^^^^^^^^^^^^^^
+
+Modern compilers typically come with related compilers for C, C++ and
+Fortran bundled together. When possible, results are best if the same
+compiler is used for all languages.
+
+In some cases, this is not possible. For example, starting with macOS El
+Capitan (10.11), many packages no longer build with GCC, but XCode
+provides no Fortran compilers. The user is therefore forced to use a
+mixed toolchain: XCode-provided Clang for C/C++ and GNU ``gfortran`` for
+Fortran.
+
+#. You need to make sure that command-line tools are installed. To that
+ end run ``$ xcode-select --install``.
+
+#. Run ``$ spack compiler find`` to locate Clang.
+
+#. There are different ways to get ``gfortran`` on macOS. For example, you can
+ install GCC with Spack (``$ spack install gcc``) or with Homebrew
+ (``$ brew install gcc``).
+
+#. The only thing left to do is to edit ``~/.spack/compilers.yaml`` to provide
+ the path to ``gfortran``:
+
+ .. code-block:: yaml
+
+ compilers:
+ darwin-x86_64:
+ clang@7.3.0-apple:
+ cc: /usr/bin/clang
+ cxx: /usr/bin/clang++
+ f77: /path/to/bin/gfortran
+ fc: /path/to/bin/gfortran
+
+ If you used Spack to install GCC, you can get the installation prefix by
+ ``$ spack location -i gcc`` (this will only work if you have a single version
+ of GCC installed). Whereas for Homebrew, GCC is installed in
+ ``/usr/local/Cellar/gcc/x.y.z``.
+
+^^^^^^^^^^^^^^^^^^^^^
+Compiler Verification
+^^^^^^^^^^^^^^^^^^^^^
+
+You can verify that your compilers are configured properly by installing a
+simple package. For example:
+
+.. code-block:: console
+
+ $ spack install zlib%gcc@5.3.0
+
+--------------------------------------
+Vendor-Specific Compiler Configuration
+--------------------------------------
+
+With Spack, things usually "just work" with GCC. Not so for other
+compilers. This section provides details on how to get specific
+compilers working.
+
+^^^^^^^^^^^^^^^
+Intel Compilers
+^^^^^^^^^^^^^^^
+
+Intel compilers are unusual because a single Intel compiler version
+can emulate multiple GCC versions. In order to provide this
+functionality, the Intel compiler needs GCC to be installed.
+Therefore, the following steps are necessary to successfully use Intel
+compilers:
+
+#. Install a version of GCC that implements the desired language
+ features (``spack install gcc``).
+
+#. Tell the Intel compiler how to find that desired GCC. This may be
+ done in one of two ways:
+
+ "By default, the compiler determines which version of ``gcc`` or ``g++``
+ you have installed from the ``PATH`` environment variable.
+
+ If you want use a version of ``gcc`` or ``g++`` other than the default
+ version on your system, you need to use either the ``-gcc-name``
+ or ``-gxx-name`` compiler option to specify the path to the version of
+ ``gcc`` or ``g++`` that you want to use."
+
+ -- `Intel Reference Guide <https://software.intel.com/en-us/node/522750>`_
+
+Intel compilers may therefore be configured in one of two ways with
+Spack: using modules, or using compiler flags.
+
+""""""""""""""""""""""""""
+Configuration with Modules
+""""""""""""""""""""""""""
+
+One can control which GCC is seen by the Intel compiler with modules.
+A module must be loaded both for the Intel Compiler (so it will run)
+and GCC (so the compiler can find the intended GCC). The following
+configuration in ``compilers.yaml`` illustrates this technique:
+
+.. code-block:: yaml
+
+ compilers:
+ - compiler:
+ modules: [gcc-4.9.3, intel-15.0.24]
+ operating_system: centos7
+ paths:
+ cc: /opt/intel-15.0.24/bin/icc-15.0.24-beta
+ cxx: /opt/intel-15.0.24/bin/icpc-15.0.24-beta
+ f77: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
+ fc: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
+ spec: intel@15.0.24.4.9.3
+
+
+.. note::
+
+ The version number on the Intel compiler is a combination of
+ the "native" Intel version number and the GNU compiler it is
+ targeting.
+
+""""""""""""""""""""""""""
+Command Line Configuration
+""""""""""""""""""""""""""
+
+One can also control which GCC is seen by the Intel compiler by adding
+flags to the ``icc`` command:
+
+#. Identify the location of the compiler you just installed:
+
+ .. code-block:: console
+
+ $ spack location --install-dir gcc
+ /home2/rpfische/spack2/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw...
+
+#. Set up ``compilers.yaml``, for example:
+
+ .. code-block:: yaml
+
+ compilers:
+ - compiler:
+ modules: [intel-15.0.24]
+ operating_system: centos7
+ paths:
+ cc: /opt/intel-15.0.24/bin/icc-15.0.24-beta
+ cflags: -gcc-name /home2/rpfische/spack2/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw.../bin/gcc
+ cxx: /opt/intel-15.0.24/bin/icpc-15.0.24-beta
+ cxxflags: -gxx-name /home2/rpfische/spack2/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw.../bin/g++
+ f77: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
+ fc: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
+ fflags: -gcc-name /home2/rpfische/spack2/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw.../bin/gcc
+ spec: intel@15.0.24.4.9.3
+
+
+^^^
+PGI
+^^^
+
+PGI comes with two sets of compilers for C++ and Fortran,
+distinguishable by their names. "Old" compilers:
+
+.. code-block:: yaml
+
+ cc: /soft/pgi/15.10/linux86-64/15.10/bin/pgcc
+ cxx: /soft/pgi/15.10/linux86-64/15.10/bin/pgCC
+ f77: /soft/pgi/15.10/linux86-64/15.10/bin/pgf77
+ fc: /soft/pgi/15.10/linux86-64/15.10/bin/pgf90
+
+"New" compilers:
+
+.. code-block:: yaml
+
+ cc: /soft/pgi/15.10/linux86-64/15.10/bin/pgcc
+ cxx: /soft/pgi/15.10/linux86-64/15.10/bin/pgc++
+ f77: /soft/pgi/15.10/linux86-64/15.10/bin/pgfortran
+ fc: /soft/pgi/15.10/linux86-64/15.10/bin/pgfortran
+
+Older installations of PGI contains just the old compilers; whereas
+newer installations contain the old and the new. The new compiler is
+considered preferable, as some packages
+(``hdf``) will not build with the old compiler.
+
+When auto-detecting a PGI compiler, there are cases where Spack will
+find the old compilers, when you really want it to find the new
+compilers. It is best to check this ``compilers.yaml``; and if the old
+compilers are being used, change ``pgf77`` and ``pgf90`` to
+``pgfortran``.
+
+Other issues:
+
+* There are reports that some packages will not build with PGI,
+ including ``libpciaccess`` and ``openssl``. A workaround is to
+ build these packages with another compiler and then use them as
+ dependencies for PGI-build packages. For example:
+
+ .. code-block:: console
+
+ $ spack install openmpi%pgi ^libpciaccess%gcc
+
+
+* PGI requires a license to use; see :ref:`licensed-compilers` for more
+ information on installation.
+
+.. note::
+
+ It is believed the problem with HDF 4 is that everything is
+ compiled with the ``F77`` compiler, but at some point some Fortran
+ 90 code slipped in there. So compilers that can handle both FORTRAN
+ 77 and Fortran 90 (``gfortran``, ``pgfortran``, etc) are fine. But
+ compilers specific to one or the other (``pgf77``, ``pgf90``) won't
+ work.
+
+
+^^^
+NAG
+^^^
+
+The Numerical Algorithms Group provides a licensed Fortran compiler. Like Clang,
+this requires you to set up a :ref:`mixed-toolchains`. It is recommended to use
+GCC for your C/C++ compilers.
+
+The NAG Fortran compilers are a bit more strict than other compilers, and many
+packages will fail to install with error messages like:
+
+.. code-block:: none
+
+ Error: mpi_comm_spawn_multiple_f90.f90: Argument 3 to MPI_COMM_SPAWN_MULTIPLE has data type DOUBLE PRECISION in reference from MPI_COMM_SPAWN_MULTIPLEN and CHARACTER in reference from MPI_COMM_SPAWN_MULTIPLEA
+
+In order to convince the NAG compiler not to be too picky about calling conventions,
+you can use ``FFLAGS=-mismatch`` and ``FCFLAGS=-mismatch``. This can be done through
+the command line:
+
+.. code-block:: console
+
+ $ spack install openmpi fflags=\"-mismatch\"
+
+Or it can be set permanently in your ``compilers.yaml``:
+
+.. code-block:: yaml
+
+ - compiler:
+ modules: []
+ operating_system: centos6
+ paths:
+ cc: /soft/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/bin/gcc
+ cxx: /soft/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/bin/g++
+ f77: /soft/spack/opt/spack/linux-x86_64/gcc-4.4.7/nag-6.1-jt3h5hwt5myezgqguhfsan52zcskqene/bin/nagfor
+ fc: /soft/spack/opt/spack/linux-x86_64/gcc-4.4.7/nag-6.1-jt3h5hwt5myezgqguhfsan52zcskqene/bin/nagfor
+ flags:
+ fflags: -mismatch
+ spec: nag@6.1
+
+---------------
+System Packages
+---------------
+
+Once compilers are configured, one needs to determine which
+pre-installed system packages, if any, to use in builds. This is
+configured in the file ``~/.spack/packages.yaml``. For example, to use
+an OpenMPI installed in /opt/local, one would use:
+
+.. code-block:: yaml
+
+ packages:
+ openmpi:
+ paths:
+ openmpi@1.10.1: /opt/local
+ buildable: False
+
+In general, Spack is easier to use and more reliable if it builds all of
+its own dependencies. However, there are two packages for which one
+commonly needs to use system versions:
+
+^^^
+MPI
+^^^
+
+On supercomputers, sysadmins have already built MPI versions that take
+into account the specifics of that computer's hardware. Unless you
+know how they were built and can choose the correct Spack variants,
+you are unlikely to get a working MPI from Spack. Instead, use an
+appropriate pre-installed MPI.
+
+If you choose a pre-installed MPI, you should consider using the
+pre-installed compiler used to build that MPI; see above on
+``compilers.yaml``.
+
+^^^^^^^
+OpenSSL
+^^^^^^^
+
+The ``openssl`` package underlies much of modern security in a modern
+OS; an attacker can easily "pwn" any computer on which they can modify SSL.
+Therefore, any ``openssl`` used on a system should be created in a
+"trusted environment" --- for example, that of the OS vendor.
+
+OpenSSL is also updated by the OS vendor from time to time, in
+response to security problems discovered in the wider community. It
+is in everyone's best interest to use any newly updated versions as
+soon as they come out. Modern Linux installations have standard
+procedures for security updates without user involvement.
+
+Spack running at user-level is not a trusted environment, nor do Spack
+users generally keep up-to-date on the latest security holes in SSL. For
+these reasons, a Spack-installed OpenSSL should likely not be trusted.
+
+As long as the system-provided SSL works, you can use it instead. One
+can check if it works by trying to download an ``https://``. For
+example:
+
+.. code-block:: console
+
+ $ curl -O https://github.com/ImageMagick/ImageMagick/archive/7.0.2-7.tar.gz
+
+The recommended way to tell Spack to use the system-supplied OpenSSL is
+to add the following to ``packages.yaml``. Note that the ``@system``
+"version" means "I don't care what version it is, just use what is
+there." This is reasonable for OpenSSL, which has a stable API.
+
+
+.. code-block:: yaml
+
+ packages:
+ openssl:
+ paths:
+ openssl@system: /usr
+ version: [system]
+ buildable: False
+
+
+^^^^^^^^^^^^^
+BLAS / LAPACK
+^^^^^^^^^^^^^
+
+The recommended way to use system-supplied BLAS / LAPACK packages is
+to add the following to ``packages.yaml``:
+
+.. code-block:: yaml
+
+ packages:
+ netlib-lapack:
+ paths:
+ netlib-lapack@system: /usr
+ version: [system]
+ buildable: False
+ all:
+ providers:
+ blas: [netlib-lapack]
+ lapack: [netlib-lapack]
+
+.. note::
+
+ The ``@system`` "version" means "I don't care what version it is,
+ just use what is there." Above we pretend that the system-provided
+ Blas/Lapack is ``netlib-lapack`` only because it is the only BLAS / LAPACK
+ provider which use standard names for libraries (as opposed to, for example,
+ `libopenblas.so`).
+
+ Although we specify external package in ``/usr``, Spack is smart enough not
+ to add ``/usr/lib`` to RPATHs, where it could cause unrelated system
+ libraries to be used instead of their Spack equivalents. ``usr/bin`` will be
+ present in PATH, however it will have lower precedence compared to paths
+ from other dependencies. This ensures that binaries in Spack dependencies
+ are preferred over system binaries.
+
+^^^
+Git
+^^^
+
+Some Spack packages use ``git`` to download, which might not work on
+some computers. For example, the following error was
+encountered on a Macintosh during ``spack install julia-master``:
+
+.. code-block:: console
+
+ ==> Trying to clone git repository:
+ https://github.com/JuliaLang/julia.git
+ on branch master
+ Cloning into 'julia'...
+ fatal: unable to access 'https://github.com/JuliaLang/julia.git/':
+ SSL certificate problem: unable to get local issuer certificate
+
+This problem is related to OpenSSL, and in some cases might be solved
+by installing a new version of ``git`` and ``openssl``:
+
+#. Run ``spack install git``
+#. Add the output of ``spack module loads git`` to your ``.bahsrc``.
+
+If this doesn't work, it is also possible to disable checking of SSL
+certificates by using:
+
+.. code-block:: console
+
+ $ spack --insecure install
+
+Using ``--insecure`` makes Spack disable SSL checking when fetching
+from websites and from git.
+
+.. warning::
+
+ This workaround should be used ONLY as a last resort! Wihout SSL
+ certificate verification, spack and git will download from sites you
+ wouldn't normally trust. The code you download and run may then be
+ compromised! While this is not a major issue for archives that will
+ be checksummed, it is especially problematic when downloading from
+ name Git branches or tags, which relies entirely on trusting a
+ certificate for security (no verification).
+
+-----------------------
+Utilities Configuration
+-----------------------
+
+Although Spack does not need installation *per se*, it does rely on
+other packages to be available on its host system. If those packages
+are out of date or missing, then Spack will not work. Sometimes, an
+appeal to the system's package manager can fix such problems. If not,
+the solution is have Spack install the required packages, and then
+have Spack use them.
+
+For example, if ``curl`` doesn't work, one could use the following steps
+to provide Spack a working ``curl``:
+
+.. code-block:: console
+
+ $ spack install curl
+ $ spack load curl
+
+or alternately:
+
+.. code-block:: console
+
+ $ spack module loads curl >>~/.bashrc
+
+or if environment modules don't work:
+
+.. code-block:: console
+
+ $ export PATH=`spack location --install-dir curl`/bin:$PATH
+
+
+External commands are used by Spack in two places: within core Spack,
+and in the package recipes. The bootstrapping procedure for these two
+cases is somewhat different, and is treated separately below.
+
+^^^^^^^^^^^^^^^^^^^^
+Core Spack Utilities
+^^^^^^^^^^^^^^^^^^^^
+
+Core Spack uses the following packages, mainly to download and unpack
+source code, and to load generated environment modules: ``curl``,
+``env``, ``git``, ``go``, ``hg``, ``svn``, ``tar``, ``unzip``,
+``patch``, ``environment-modules``.
+
+As long as the user's environment is set up to successfully run these
+programs from outside of Spack, they should work inside of Spack as
+well. They can generally be activated as in the ``curl`` example above;
+or some systems might already have an appropriate hand-built
+environment module that may be loaded. Either way works.
+
+A few notes on specific programs in this list:
+
+""""""""""""""""""""""""""
+cURL, git, Mercurial, etc.
+""""""""""""""""""""""""""
+
+Spack depends on cURL to download tarballs, the format that most
+Spack-installed packages come in. Your system's cURL should always be
+able to download unencrypted ``http://``. However, the cURL on some
+systems has problems with SSL-enabled ``https://`` URLs, due to
+outdated / insecure versions of OpenSSL on those systems. This will
+prevent Spack from installing any software requiring ``https://``
+until a new cURL has been installed, using the technique above.
+
+.. warning::
+
+ remember that if you install ``curl`` via Spack that it may rely on a
+ user-space OpenSSL that is not upgraded regularly. It may fall out of
+ date faster than your system OpenSSL.
+
+Some packages use source code control systems as their download method:
+``git``, ``hg``, ``svn`` and occasionally ``go``. If you had to install
+a new ``curl``, then chances are the system-supplied version of these
+other programs will also not work, because they also rely on OpenSSL.
+Once ``curl`` has been installed, you can similarly install the others.
+
+
+.. _InstallEnvironmentModules:
+
+"""""""""""""""""""
+Environment Modules
+"""""""""""""""""""
+
+In order to use Spack's generated environment modules, you must have
+installed one of *Environment Modules* or *Lmod*. On many Linux
+distributions, this can be installed from the vendor's repository. For
+example: ``yum install environment-modules`` (Fedora/RHEL/CentOS). If
+your Linux distribution does not have Environment Modules, you can get it
+with Spack:
+
+#. Consider using system tcl (as long as your system has Tcl version 8.0 or later):
+
+ #) Identify its location using ``which tclsh``
+ #) Identify its version using ``echo 'puts $tcl_version;exit 0' | tclsh``
+ #) Add to ``~/.spack/packages.yaml`` and modify as appropriate:
+
+ .. code-block:: yaml
+
+ packages:
+ tcl:
+ paths:
+ tcl@8.5: /usr
+ version: [8.5]
+ buildable: False
+
+#. Install with:
+
+ .. code-block:: console
+
+ $ spack install environment-modules
+
+#. Activate with the following script (or apply the updates to your
+ ``.bashrc`` file manually):
+
+ .. code-block:: sh
+
+ TMP=`tempfile`
+ echo >$TMP
+ MODULE_HOME=`spack location --install-dir environment-modules`
+ MODULE_VERSION=`ls -1 $MODULE_HOME/Modules | head -1`
+ ${MODULE_HOME}/Modules/${MODULE_VERSION}/bin/add.modules <$TMP
+ cp .bashrc $TMP
+ echo "MODULE_VERSION=${MODULE_VERSION}" > .bashrc
+ cat $TMP >>.bashrc
+
+This adds to your ``.bashrc`` (or similar) files, enabling Environment
+Modules when you log in. Re-load your .bashrc (or log out and in
+again), and then test that the ``module`` command is found with:
+
+.. code-block:: console
+
+ $ module avail
+
+
+^^^^^^^^^^^^^^^^^
+Package Utilities
+^^^^^^^^^^^^^^^^^
+
+Spack may also encounter bootstrapping problems inside a package's
+``install()`` method. In this case, Spack will normally be running
+inside a *sanitized build environment*. This includes all of the
+package's dependencies, but none of the environment Spack inherited
+from the user: if you load a module or modify ``$PATH`` before
+launching Spack, it will have no effect.
+
+In this case, you will likely need to use the ``--dirty`` flag when
+running ``spack install``, causing Spack to **not** sanitize the build
+environment. You are now responsible for making sure that environment
+does not do strange things to Spack or its installs.
+
+Another way to get Spack to use its own version of something is to add
+that something to a package that needs it. For example:
+
+.. code-block:: python
+
+ depends_on('binutils', type='build')
+
+This is considered best practice for some common build dependencies,
+such as ``autotools`` (if the ``autoreconf`` command is needed) and
+``cmake`` --- ``cmake`` especially, because different packages require
+a different version of CMake.
+
+""""""""
+binutils
+""""""""
+
+.. https://groups.google.com/forum/#!topic/spack/i_7l_kEEveI
+
+Sometimes, strange error messages can happen while building a package.
+For example, ``ld`` might crash. Or one receives a message like:
+
+.. code-block:: console
+
+ ld: final link failed: Nonrepresentable section on output
+
+
+or:
+
+.. code-block:: console
+
+ ld: .../_fftpackmodule.o: unrecognized relocation (0x2a) in section `.text'
+
+These problems are often caused by an outdated ``binutils`` on your
+system. Unlike CMake or Autotools, adding ``depends_on('binutils')`` to
+every package is not considered a best practice because every package
+written in C/C++/Fortran would need it. A potential workaround is to
+load a recent ``binutils`` into your environment and use the ``--dirty``
+flag.
+
+
+.. _cray-support:
+
+-------------
+Spack on Cray
+-------------
+
+Spack differs slightly when used on a Cray system. The architecture spec
+can differentiate between the front-end and back-end processor and operating system.
+For example, on Edison at NERSC, the back-end target processor
+is "Ivy Bridge", so you can specify to use the back-end this way:
+
+.. code-block:: console
+
+ $ spack install zlib target=ivybridge
+
+You can also use the operating system to build against the back-end:
+
+.. code-block:: console
+
+ $ spack install zlib os=CNL10
+
+Notice that the name includes both the operating system name and the major
+version number concatenated together.
+
+Alternatively, if you want to build something for the front-end,
+you can specify the front-end target processor. The processor for a login node
+on Edison is "Sandy bridge" so we specify on the command line like so:
+
+.. code-block:: console
+
+ $ spack install zlib target=sandybridge
+
+And the front-end operating system is:
+
+.. code-block:: console
+
+ $ spack install zlib os=SuSE11
+
+^^^^^^^^^^^^^^^^^^^^^^^
+Cray compiler detection
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Spack can detect compilers using two methods. For the front-end, we treat
+everything the same. The difference lies in back-end compiler detection.
+Back-end compiler detection is made via the Tcl module avail command.
+Once it detects the compiler it writes the appropriate PrgEnv and compiler
+module name to compilers.yaml and sets the paths to each compiler with Cray\'s
+compiler wrapper names (i.e. cc, CC, ftn). During build time, Spack will load
+the correct PrgEnv and compiler module and will call appropriate wrapper.
+
+The compilers.yaml config file will also differ. There is a
+modules section that is filled with the compiler's Programming Environment
+and module name. On other systems, this field is empty []:
+
+.. code-block:: yaml
+
+ - compiler:
+ modules:
+ - PrgEnv-intel
+ - intel/15.0.109
+
+As mentioned earlier, the compiler paths will look different on a Cray system.
+Since most compilers are invoked using cc, CC and ftn, the paths for each
+compiler are replaced with their respective Cray compiler wrapper names:
+
+.. code-block:: yaml
+
+ paths:
+ cc: cc
+ cxx: CC
+ f77: ftn
+ fc: ftn
+
+As opposed to an explicit path to the compiler executable. This allows Spack
+to call the Cray compiler wrappers during build time.
+
+For more on compiler configuration, check out :ref:`compiler-config`.
+
+Spack sets the default Cray link type to dynamic, to better match other
+other platforms. Individual packages can enable static linking (which is the
+default outside of Spack on cray systems) using the ``-static`` flag.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Setting defaults and using Cray modules
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If you want to use default compilers for each PrgEnv and also be able
+to load cray external modules, you will need to set up a ``packages.yaml``.
+
+Here's an example of an external configuration for cray modules:
+
+.. code-block:: yaml
+
+ packages:
+ mpi:
+ modules:
+ mpich@7.3.1%gcc@5.2.0 arch=cray_xc-haswell-CNL10: cray-mpich
+ mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-haswell-CNL10: cray-mpich
+
+This tells Spack that for whatever package that depends on mpi, load the
+cray-mpich module into the environment. You can then be able to use whatever
+environment variables, libraries, etc, that are brought into the environment
+via module load.
+
+You can set the default compiler that Spack can use for each compiler type.
+If you want to use the Cray defaults, then set them under ``all:`` in packages.yaml.
+In the compiler field, set the compiler specs in your order of preference.
+Whenever you build with that compiler type, Spack will concretize to that version.
+
+Here is an example of a full packages.yaml used at NERSC
+
+.. code-block:: yaml
+
+ packages:
+ mpi:
+ modules:
+ mpich@7.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-mpich
+ mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-SuSE11-ivybridge: cray-mpich
+ buildable: False
+ netcdf:
+ modules:
+ netcdf@4.3.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-netcdf
+ netcdf@4.3.3.1%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-netcdf
+ buildable: False
+ hdf5:
+ modules:
+ hdf5@1.8.14%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-hdf5
+ hdf5@1.8.14%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-hdf5
+ buildable: False
+ all:
+ compiler: [gcc@5.2.0, intel@16.0.0.109]
+
+Here we tell spack that whenever we want to build with gcc use version 5.2.0 or
+if we want to build with intel compilers, use version 16.0.0.109. We add a spec
+for each compiler type for each cray modules. This ensures that for each
+compiler on our system we can use that external module.
+
+For more on external packages check out the section :ref:`sec-external-packages`.
diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst
index 98ed9ff0fe..65fb995d1e 100644
--- a/lib/spack/docs/index.rst
+++ b/lib/spack/docs/index.rst
@@ -3,8 +3,9 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
+===================
Spack Documentation
-=================================
+===================
Spack is a package management tool designed to support multiple
versions and configurations of software on a wide variety of platforms
@@ -27,7 +28,7 @@ Get spack from the `github repository
<https://github.com/llnl/spack>`_ and install your first
package:
-.. code-block:: sh
+.. code-block:: console
$ git clone https://github.com/llnl/spack.git
$ cd spack/bin
@@ -36,23 +37,47 @@ package:
If you're new to spack and want to start using it, see :doc:`getting_started`,
or refer to the full manual below.
-Table of Contents
----------------------
.. toctree::
:maxdepth: 2
+ :caption: Basics
features
getting_started
basic_usage
- packaging_guide
- mirrors
+ workflows
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Reference Manual
+
configuration
- developer_guide
- command_index
+ config_yaml
+ build_settings
+ mirrors
+ module_file_support
package_list
+ command_index
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Step-by-step
+
+ basic_usage_tutorial
+ module_file_tutorial
+ package_tutorial
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Contributing to Spack
+
+ contribution_guide
+ packaging_guide
+ developer_guide
API Docs <spack>
+
+==================
Indices and tables
==================
diff --git a/lib/spack/docs/mirrors.rst b/lib/spack/docs/mirrors.rst
index 583575a565..87ce3d96a2 100644
--- a/lib/spack/docs/mirrors.rst
+++ b/lib/spack/docs/mirrors.rst
@@ -1,7 +1,8 @@
.. _mirrors:
+=======
Mirrors
-============================
+=======
Some sites may not have access to the internet for fetching packages.
These sites will need a local repository of tarballs from which they
@@ -10,27 +11,29 @@ mirror is a URL that points to a directory, either on the local
filesystem or on some server, containing tarballs for all of Spack's
packages.
-Here's an example of a mirror's directory structure::
-
- mirror/
- cmake/
- cmake-2.8.10.2.tar.gz
- dyninst/
- dyninst-8.1.1.tgz
- dyninst-8.1.2.tgz
- libdwarf/
- libdwarf-20130126.tar.gz
- libdwarf-20130207.tar.gz
- libdwarf-20130729.tar.gz
- libelf/
- libelf-0.8.12.tar.gz
- libelf-0.8.13.tar.gz
- libunwind/
- libunwind-1.1.tar.gz
- mpich/
- mpich-3.0.4.tar.gz
- mvapich2/
- mvapich2-1.9.tgz
+Here's an example of a mirror's directory structure:
+
+.. code-block:: none
+
+ mirror/
+ cmake/
+ cmake-2.8.10.2.tar.gz
+ dyninst/
+ dyninst-8.1.1.tgz
+ dyninst-8.1.2.tgz
+ libdwarf/
+ libdwarf-20130126.tar.gz
+ libdwarf-20130207.tar.gz
+ libdwarf-20130729.tar.gz
+ libelf/
+ libelf-0.8.12.tar.gz
+ libelf-0.8.13.tar.gz
+ libunwind/
+ libunwind-1.1.tar.gz
+ mpich/
+ mpich-3.0.4.tar.gz
+ mvapich2/
+ mvapich2-1.9.tgz
The structure is very simple. There is a top-level directory. The
second level directories are named after packages, and the third level
@@ -49,27 +52,16 @@ contains tarballs for each package, named after each package.
not standardize on a particular compression algorithm, because this
would potentially require expanding and re-compressing each archive.
-.. _spack-mirror:
+.. _cmd-spack-mirror:
+----------------
``spack mirror``
-----------------------------
+----------------
Mirrors are managed with the ``spack mirror`` command. The help for
-``spack mirror`` looks like this::
+``spack mirror`` looks like this:
- $ spack mirror -h
- usage: spack mirror [-h] SUBCOMMAND ...
-
- positional arguments:
- SUBCOMMAND
- create Create a directory to be used as a spack mirror, and fill
- it with package archives.
- add Add a mirror to Spack.
- remove Remove a mirror by name.
- list Print out available mirrors to the console.
-
- optional arguments:
- -h, --help show this help message and exit
+.. command-output:: spack help mirror
The ``create`` command actually builds a mirror by fetching all of its
packages from the internet and checksumming them.
@@ -79,8 +71,9 @@ control the URL(s) from which Spack downloads its packages.
.. _spack-mirror-create:
+-----------------------
``spack mirror create``
-----------------------------
+-----------------------
You can create a mirror using the ``spack mirror create`` command, assuming
you're on a machine where you can access the internet.
@@ -89,8 +82,7 @@ The command will iterate through all of Spack's packages and download
the safe ones into a directory structure like the one above. Here is
what it looks like:
-
-.. code-block:: bash
+.. code-block:: console
$ spack mirror create libelf libdwarf
==> Created new mirror in spack-mirror-2014-06-24
@@ -124,25 +116,31 @@ what it looks like:
Once this is done, you can tar up the ``spack-mirror-2014-06-24`` directory and
copy it over to the machine you want it hosted on.
+^^^^^^^^^^^^^^^^^^^
Custom package sets
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^
Normally, ``spack mirror create`` downloads all the archives it has
checksums for. If you want to only create a mirror for a subset of
packages, you can do that by supplying a list of package specs on the
command line after ``spack mirror create``. For example, this
-command::
+command:
- $ spack mirror create libelf@0.8.12: boost@1.44:
+.. code-block:: console
+
+ $ spack mirror create libelf@0.8.12: boost@1.44:
Will create a mirror for libelf versions greater than or equal to
0.8.12 and boost versions greater than or equal to 1.44.
+^^^^^^^^^^^^
Mirror files
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^
If you have a *very* large number of packages you want to mirror, you
-can supply a file with specs in it, one per line::
+can supply a file with specs in it, one per line:
+
+.. code-block:: console
$ cat specs.txt
libdwarf
@@ -150,7 +148,7 @@ can supply a file with specs in it, one per line::
boost@1.44:
boost@1.39.0
...
- $ spack mirror create -f specs.txt
+ $ spack mirror create --file specs.txt
...
This is useful if there is a specific suite of software managed by
@@ -158,24 +156,27 @@ your site.
.. _spack-mirror-add:
+--------------------
``spack mirror add``
-----------------------------
+--------------------
Once you have a mirror, you need to let spack know about it. This is
relatively simple. First, figure out the URL for the mirror. If it's
-a file, you can use a file URL like this one::
+a file, you can use a file URL like this one:
- file:///Users/gamblin2/spack-mirror-2014-06-24
+.. code-block:: none
+
+ file:///Users/gamblin2/spack-mirror-2014-06-24
That points to the directory on the local filesystem. If it were on a
web server, you could use a URL like this one:
- https://example.com/some/web-hosted/directory/spack-mirror-2014-06-24
+https://example.com/some/web-hosted/directory/spack-mirror-2014-06-24
Spack will use the URL as the root for all of the packages it fetches.
You can tell your Spack installation to use that mirror like this:
-.. code-block:: bash
+.. code-block:: console
$ spack mirror add local_filesystem file:///Users/gamblin2/spack-mirror-2014-06-24
@@ -183,29 +184,38 @@ Each mirror has a name so that you can refer to it again later.
.. _spack-mirror-list:
+---------------------
``spack mirror list``
-----------------------------
+---------------------
+
+To see all the mirrors Spack knows about, run ``spack mirror list``:
-To see all the mirrors Spack knows about, run ``spack mirror list``::
+.. code-block:: console
$ spack mirror list
local_filesystem file:///Users/gamblin2/spack-mirror-2014-06-24
.. _spack-mirror-remove:
+-----------------------
``spack mirror remove``
-----------------------------
+-----------------------
-To remove a mirror by name::
+To remove a mirror by name, run:
+
+.. code-block:: console
$ spack mirror remove local_filesystem
$ spack mirror list
==> No mirrors configured.
+-----------------
Mirror precedence
-----------------------------
+-----------------
+
+Adding a mirror really adds a line in ``~/.spack/mirrors.yaml``:
-Adding a mirror really adds a line in ``~/.spack/mirrors.yaml``::
+.. code-block:: yaml
mirrors:
local_filesystem: file:///Users/gamblin2/spack-mirror-2014-06-24
@@ -217,18 +227,19 @@ search the topmost mirror first and the bottom-most mirror last.
.. _caching:
+-------------------
Local Default Cache
-----------------------------
+-------------------
Spack caches resources that are downloaded as part of installs. The cache is
a valid spack mirror: it uses the same directory structure and naming scheme
as other Spack mirrors (so it can be copied anywhere and referenced with a URL
-like other mirrors). The mirror is maintained locally (within the Spack
-installation directory) at :file:`var/spack/cache/`. It is always enabled (and
-is always searched first when attempting to retrieve files for an installation)
-but can be cleared with :ref:`purge <spack-purge>`; the cache directory can also
-be deleted manually without issue.
+like other mirrors). The mirror is maintained locally (within the Spack
+installation directory) at :file:`var/spack/cache/`. It is always enabled (and
+is always searched first when attempting to retrieve files for an installation)
+but can be cleared with :ref:`purge <cmd-spack-purge>`; the cache directory can also
+be deleted manually without issue.
Caching includes retrieved tarball archives and source control repositories, but
-only resources with an associated digest or commit ID (e.g. a revision number
+only resources with an associated digest or commit ID (e.g. a revision number
for SVN) will be cached.
diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst
new file mode 100644
index 0000000000..f07bd31c2e
--- /dev/null
+++ b/lib/spack/docs/module_file_support.rst
@@ -0,0 +1,682 @@
+.. _modules:
+
+=======
+Modules
+=======
+
+The use of module systems to manage user environment in a controlled way
+is a common practice at HPC centers that is often embraced also by individual
+programmers on their development machines. To support this common practice
+Spack provides integration with `Environment Modules
+<http://modules.sourceforge.net/>`_ , `LMod
+<http://lmod.readthedocs.io/en/latest/>`_ and `Dotkit <https://computing.llnl.gov/?set=jobs&page=dotkit>`_ by:
+
+* generating module files after a successful installation
+* providing commands that can leverage the spec syntax to manipulate modules
+
+In the following you will see how to activate shell support for commands in Spack
+that requires it, and discover what benefits this may bring with respect to deal
+directly with automatically generated module files.
+
+.. note::
+
+ If your machine does not already have a module system installed,
+ we advise you to use either Environment Modules or LMod. See :ref:`InstallEnvironmentModules`
+ for more details.
+
+.. _shell_support:
+
+-------------
+Shell support
+-------------
+
+You can enable shell support by sourcing the appropriate setup file
+in the ``$SPACK_ROOT/share/spack`` directory.
+For ``bash`` or ``ksh`` users:
+
+.. code-block:: console
+
+ $ . ${SPACK_ROOT}/share/spack/setup-env.sh
+
+For ``csh`` and ``tcsh`` instead:
+
+.. code-block:: console
+
+ $ source $SPACK_ROOT/share/spack/setup-env.csh
+
+
+.. note::
+ You can put the source line in your ``.bashrc`` or ``.cshrc`` to
+ have Spack's shell support available on the command line at any login.
+
+
+----------------------------
+Using module files via Spack
+----------------------------
+
+If you have shell support enabled you should be able to run either
+``module avail`` or ``use -l spack`` to see what module/dotkit files have
+been installed. Here is sample output of those programs, showing lots
+of installed packages.
+
+.. code-block:: console
+
+ $ module avail
+
+ ------- /home/gamblin2/spack/share/spack/modules/linux-debian7-x86_64 --------
+ adept-utils@1.0%gcc@4.4.7-5adef8da libelf@0.8.13%gcc@4.4.7
+ automaded@1.0%gcc@4.4.7-d9691bb0 libelf@0.8.13%intel@15.0.0
+ boost@1.55.0%gcc@4.4.7 mpc@1.0.2%gcc@4.4.7-559607f5
+ callpath@1.0.1%gcc@4.4.7-5dce4318 mpfr@3.1.2%gcc@4.4.7
+ dyninst@8.1.2%gcc@4.4.7-b040c20e mpich@3.0.4%gcc@4.4.7
+ gcc@4.9.1%gcc@4.4.7-93ab98c5 mpich@3.0.4%gcc@4.9.0
+ gmp@6.0.0a%gcc@4.4.7 mrnet@4.1.0%gcc@4.4.7-72b7881d
+ graphlib@2.0.0%gcc@4.4.7 netgauge@2.4.6%gcc@4.9.0-27912b7b
+ launchmon@1.0.1%gcc@4.4.7 stat@2.1.0%gcc@4.4.7-51101207
+ libNBC@1.1.1%gcc@4.9.0-27912b7b sundials@2.5.0%gcc@4.9.0-27912b7b
+ libdwarf@20130729%gcc@4.4.7-b52fac98
+
+.. code-block:: console
+
+ $ use -l spack
+
+ spack ----------
+ adept-utils@1.0%gcc@4.4.7-5adef8da - adept-utils @1.0
+ automaded@1.0%gcc@4.4.7-d9691bb0 - automaded @1.0
+ boost@1.55.0%gcc@4.4.7 - boost @1.55.0
+ callpath@1.0.1%gcc@4.4.7-5dce4318 - callpath @1.0.1
+ dyninst@8.1.2%gcc@4.4.7-b040c20e - dyninst @8.1.2
+ gmp@6.0.0a%gcc@4.4.7 - gmp @6.0.0a
+ libNBC@1.1.1%gcc@4.9.0-27912b7b - libNBC @1.1.1
+ libdwarf@20130729%gcc@4.4.7-b52fac98 - libdwarf @20130729
+ libelf@0.8.13%gcc@4.4.7 - libelf @0.8.13
+ libelf@0.8.13%intel@15.0.0 - libelf @0.8.13
+ mpc@1.0.2%gcc@4.4.7-559607f5 - mpc @1.0.2
+ mpfr@3.1.2%gcc@4.4.7 - mpfr @3.1.2
+ mpich@3.0.4%gcc@4.4.7 - mpich @3.0.4
+ mpich@3.0.4%gcc@4.9.0 - mpich @3.0.4
+ netgauge@2.4.6%gcc@4.9.0-27912b7b - netgauge @2.4.6
+ sundials@2.5.0%gcc@4.9.0-27912b7b - sundials @2.5.0
+
+The names here should look familiar, they're the same ones from
+``spack find``. You *can* use the names here directly. For example,
+you could type either of these commands to load the callpath module:
+
+.. code-block:: console
+
+ $ use callpath@1.0.1%gcc@4.4.7-5dce4318
+
+.. code-block:: console
+
+ $ module load callpath@1.0.1%gcc@4.4.7-5dce4318
+
+.. _cmd-spack-load:
+
+^^^^^^^^^^^^^^^^^^^^^^^
+``spack load / unload``
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Neither of these is particularly pretty, easy to remember, or
+easy to type. Luckily, Spack has its own interface for using modules
+and dotkits. You can use the same spec syntax you're used to:
+
+========================= ==========================
+Environment Modules Dotkit
+========================= ==========================
+``spack load <spec>`` ``spack use <spec>``
+``spack unload <spec>`` ``spack unuse <spec>``
+========================= ==========================
+
+And you can use the same shortened names you use everywhere else in
+Spack. For example, this will add the ``mpich`` package built with
+``gcc`` to your path:
+
+.. code-block:: console
+
+ $ spack install mpich %gcc@4.4.7
+
+ # ... wait for install ...
+
+ $ spack use mpich %gcc@4.4.7
+ Prepending: mpich@3.0.4%gcc@4.4.7 (ok)
+ $ which mpicc
+ ~/src/spack/opt/linux-debian7-x86_64/gcc@4.4.7/mpich@3.0.4/bin/mpicc
+
+Or, similarly with modules, you could type:
+
+.. code-block:: console
+
+ $ spack load mpich %gcc@4.4.7
+
+These commands will add appropriate directories to your ``PATH``,
+``MANPATH``, ``CPATH``, and ``LD_LIBRARY_PATH``. When you no longer
+want to use a package, you can type unload or unuse similarly:
+
+.. code-block:: console
+
+ $ spack unload mpich %gcc@4.4.7 # modules
+ $ spack unuse mpich %gcc@4.4.7 # dotkit
+
+.. note::
+
+ These ``use``, ``unuse``, ``load``, and ``unload`` subcommands are
+ only available if you have enabled Spack's shell support *and* you
+ have dotkit or modules installed on your machine.
+
+^^^^^^^^^^^^^^^^^^^^^^
+Ambiguous module names
+^^^^^^^^^^^^^^^^^^^^^^
+
+If a spec used with load/unload or use/unuse is ambiguous (i.e. more
+than one installed package matches it), then Spack will warn you:
+
+.. code-block:: console
+
+ $ spack load libelf
+ ==> Error: Multiple matches for spec libelf. Choose one:
+ libelf@0.8.13%gcc@4.4.7 arch=linux-debian7-x86_64
+ libelf@0.8.13%intel@15.0.0 arch=linux-debian7-x86_64
+
+You can either type the ``spack load`` command again with a fully
+qualified argument, or you can add just enough extra constraints to
+identify one package. For example, above, the key differentiator is
+that one ``libelf`` is built with the Intel compiler, while the other
+used ``gcc``. You could therefore just type:
+
+.. code-block:: console
+
+ $ spack load libelf %intel
+
+To identify just the one built with the Intel compiler.
+
+.. _extensions:
+
+.. _cmd-spack-module-loads:
+
+^^^^^^^^^^^^^^^^^^^^^^
+``spack module loads``
+^^^^^^^^^^^^^^^^^^^^^^
+
+In some cases, it is desirable to load not just a module, but also all
+the modules it depends on. This is not required for most modules
+because Spack builds binaries with RPATH support. However, not all
+packages use RPATH to find their dependencies: this can be true in
+particular for Python extensions, which are currently *not* built with
+RPATH.
+
+Scripts to load modules recursively may be made with the command:
+
+.. code-block:: console
+
+ $ spack module loads --dependencies <spec>
+
+An equivalent alternative is:
+
+.. code-block :: console
+
+ $ source <( spack module loads --dependencies <spec> )
+
+.. warning::
+
+ The ``spack load`` command does not currently accept the
+ ``--dependencies`` flag. Use ``spack module loads`` instead, for
+ now.
+
+.. See #1662
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Module Commands for Shell Scripts
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Although Spack is flexible, the ``module`` command is much faster.
+This could become an issue when emitting a series of ``spack load``
+commands inside a shell script. By adding the ``--shell`` flag,
+``spack module find`` may also be used to generate code that can be
+cut-and-pasted into a shell script. For example:
+
+.. code-block:: console
+
+ $ spack module loads --dependencies py-numpy git
+ # bzip2@1.0.6%gcc@4.9.3=linux-x86_64
+ module load bzip2-1.0.6-gcc-4.9.3-ktnrhkrmbbtlvnagfatrarzjojmkvzsx
+ # ncurses@6.0%gcc@4.9.3=linux-x86_64
+ module load ncurses-6.0-gcc-4.9.3-kaazyneh3bjkfnalunchyqtygoe2mncv
+ # zlib@1.2.8%gcc@4.9.3=linux-x86_64
+ module load zlib-1.2.8-gcc-4.9.3-v3ufwaahjnviyvgjcelo36nywx2ufj7z
+ # sqlite@3.8.5%gcc@4.9.3=linux-x86_64
+ module load sqlite-3.8.5-gcc-4.9.3-a3eediswgd5f3rmto7g3szoew5nhehbr
+ # readline@6.3%gcc@4.9.3=linux-x86_64
+ module load readline-6.3-gcc-4.9.3-se6r3lsycrwxyhreg4lqirp6xixxejh3
+ # python@3.5.1%gcc@4.9.3=linux-x86_64
+ module load python-3.5.1-gcc-4.9.3-5q5rsrtjld4u6jiicuvtnx52m7tfhegi
+ # py-setuptools@20.5%gcc@4.9.3=linux-x86_64
+ module load py-setuptools-20.5-gcc-4.9.3-4qr2suj6p6glepnedmwhl4f62x64wxw2
+ # py-nose@1.3.7%gcc@4.9.3=linux-x86_64
+ module load py-nose-1.3.7-gcc-4.9.3-pwhtjw2dvdvfzjwuuztkzr7b4l6zepli
+ # openblas@0.2.17%gcc@4.9.3+shared=linux-x86_64
+ module load openblas-0.2.17-gcc-4.9.3-pw6rmlom7apfsnjtzfttyayzc7nx5e7y
+ # py-numpy@1.11.0%gcc@4.9.3+blas+lapack=linux-x86_64
+ module load py-numpy-1.11.0-gcc-4.9.3-mulodttw5pcyjufva4htsktwty4qd52r
+ # curl@7.47.1%gcc@4.9.3=linux-x86_64
+ module load curl-7.47.1-gcc-4.9.3-ohz3fwsepm3b462p5lnaquv7op7naqbi
+ # autoconf@2.69%gcc@4.9.3=linux-x86_64
+ module load autoconf-2.69-gcc-4.9.3-bkibjqhgqm5e3o423ogfv2y3o6h2uoq4
+ # cmake@3.5.0%gcc@4.9.3~doc+ncurses+openssl~qt=linux-x86_64
+ module load cmake-3.5.0-gcc-4.9.3-x7xnsklmgwla3ubfgzppamtbqk5rwn7t
+ # expat@2.1.0%gcc@4.9.3=linux-x86_64
+ module load expat-2.1.0-gcc-4.9.3-6pkz2ucnk2e62imwakejjvbv6egncppd
+ # git@2.8.0-rc2%gcc@4.9.3+curl+expat=linux-x86_64
+ module load git-2.8.0-rc2-gcc-4.9.3-3bib4hqtnv5xjjoq5ugt3inblt4xrgkd
+
+The script may be further edited by removing unnecessary modules.
+
+
+^^^^^^^^^^^^^^^
+Module Prefixes
+^^^^^^^^^^^^^^^
+
+On some systems, modules are automatically prefixed with a certain
+string; ``spack module loads`` needs to know about that prefix when it
+issues ``module load`` commands. Add the ``--prefix`` option to your
+``spack module loads`` commands if this is necessary.
+
+For example, consider the following on one system:
+
+.. code-block:: console
+
+ $ module avail
+ linux-SuSE11-x86_64/antlr-2.7.7-gcc-5.3.0-bdpl46y
+
+ $ spack module loads antlr # WRONG!
+ # antlr@2.7.7%gcc@5.3.0~csharp+cxx~java~python arch=linux-SuSE11-x86_64
+ module load antlr-2.7.7-gcc-5.3.0-bdpl46y
+
+ $ spack module loads --prefix linux-SuSE11-x86_64/ antlr
+ # antlr@2.7.7%gcc@5.3.0~csharp+cxx~java~python arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/antlr-2.7.7-gcc-5.3.0-bdpl46y
+
+----------------------------
+Auto-generating Module Files
+----------------------------
+
+Module files are generated by post-install hooks after the successful
+installation of a package. The following table summarizes the essential
+information associated with the different file formats
+that can be generated by Spack:
+
+ +-----------------------------+--------------------+-------------------------------+----------------------+
+ | | **Hook name** | **Default root directory** | **Compatible tools** |
+ +=============================+====================+===============================+======================+
+ | **Dotkit** | ``dotkit`` | share/spack/dotkit | DotKit |
+ +-----------------------------+--------------------+-------------------------------+----------------------+
+ | **TCL - Non-Hierarchical** | ``tcl`` | share/spack/modules | Env. Modules/LMod |
+ +-----------------------------+--------------------+-------------------------------+----------------------+
+ | **Lua - Hierarchical** | ``lmod`` | share/spack/lmod | LMod |
+ +-----------------------------+--------------------+-------------------------------+----------------------+
+
+
+Though Spack ships with sensible defaults for the generation of module files,
+one can customize many aspects of it to accommodate package or site specific needs.
+These customizations are enabled by either:
+
+ 1. overriding certain callback APIs in the Python packages
+ 2. writing specific rules in the ``modules.yaml`` configuration file
+
+The former method fits best cases that are site independent, e.g. injecting variables
+from language interpreters into their extensions. The latter instead permits to
+fine tune the content, naming and creation of module files to meet site specific conventions.
+
+^^^^^^^^^^^^^^^^^^^^
+``Package`` file API
+^^^^^^^^^^^^^^^^^^^^
+
+There are two methods that can be overridden in any ``package.py`` to affect the
+content of generated module files. The first one is:
+
+.. code-block:: python
+
+ def setup_environment(self, spack_env, run_env):
+ """Set up the compile and runtime environments for a package."""
+ pass
+
+and can alter the content of *the same package where it is overridden*
+by adding actions to ``run_env``. The second method is:
+
+.. code-block:: python
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ """Set up the environment of packages that depend on this one"""
+ pass
+
+and has similar effects on module file of dependees. Even in this case
+``run_env`` must be filled with the desired list of environment modifications.
+
+.. note::
+ The ``R`` package and callback APIs
+ A typical example in which overriding both methods prove to be useful
+ is given by the ``R`` package. This package installs libraries and headers
+ in non-standard locations and it is possible to prepend the appropriate directory
+ to the corresponding environment variables:
+
+ ================== =================================
+ LIBRARY_PATH ``self.prefix/rlib/R/lib``
+ LD_LIBRARY_PATH ``self.prefix/rlib/R/lib``
+ CPATH ``self.prefix/rlib/R/include``
+ ================== =================================
+
+ with the following snippet:
+
+ .. literalinclude:: ../../../var/spack/repos/builtin/packages/R/package.py
+ :pyobject: R.setup_environment
+
+ The ``R`` package also knows which environment variable should be modified
+ to make language extensions provided by other packages available, and modifies
+ it appropriately in the override of the second method:
+
+ .. literalinclude:: ../../../var/spack/repos/builtin/packages/R/package.py
+ :lines: 128-129,146-151
+
+.. _modules-yaml:
+
+---------------------------------
+Configuration in ``modules.yaml``
+---------------------------------
+
+The name of the configuration file that controls module generation behavior
+is ``modules.yaml``. The default configuration:
+
+.. literalinclude:: ../../../etc/spack/defaults/modules.yaml
+ :language: yaml
+
+activates generation for ``tcl`` and ``dotkit`` module files and inspects
+the installation folder of each package for the presence of a set of subdirectories
+(``bin``, ``man``, ``share/man``, etc.). If any is found its full path is prepended
+to the environment variables listed below the folder name.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Activation of other systems
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Any other module file generator shipped with Spack can be activated adding it to the
+list under the ``enable`` key in the module file. Currently the only generator that
+is not activated by default is ``lmod``, which produces hierarchical lua module files.
+For each module system that can be enabled a finer configuration is possible.
+
+Directives that are aimed at driving the generation of a particular type of module files
+should be listed under a top level key that corresponds to the generator being
+customized:
+
+.. code-block:: yaml
+
+ modules:
+ enable:
+ - tcl
+ - dotkit
+ - lmod
+ tcl:
+ # contains environment modules specific customizations
+ dotkit:
+ # contains dotkit specific customizations
+ lmod:
+ # contains lmod specific customizations
+
+All these module sections allow for both:
+
+1. global directives that usually affect the whole layout of modules or the naming scheme
+2. directives that affect only a set of packages and modify their content
+
+For the latter point in particular it is possible to use anonymous specs
+to select an appropriate set of packages on which the modifications should be applied.
+
+.. _anonymous_specs:
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Selection by anonymous specs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The procedure to select packages using anonymous specs is a natural
+extension of using them to install packages, the only difference being
+that specs in this case **are not required to have a root package**.
+Consider for instance this snippet:
+
+.. code-block:: yaml
+
+ modules:
+ tcl:
+ # The keyword `all` selects every package
+ all:
+ environment:
+ set:
+ BAR: 'bar'
+ # This anonymous spec selects any package that
+ # depends on openmpi. The double colon at the
+ # end clears the set of rules that matched so far.
+ ^openmpi::
+ environment:
+ set:
+ BAR: 'baz'
+ # Selects any zlib package
+ zlib:
+ environment:
+ prepend_path:
+ LD_LIBRARY_PATH: 'foo'
+ # Selects zlib compiled with gcc@4.8
+ zlib%gcc@4.8:
+ environment:
+ unset:
+ - FOOBAR
+
+During module file generation, the configuration above will instruct
+Spack to set the environment variable ``BAR=bar`` for every module,
+unless the associated spec satisfies ``^openmpi`` in which case ``BAR=baz``.
+In addition in any spec that satisfies ``zlib`` the value ``foo`` will be
+prepended to ``LD_LIBRARY_PATH`` and in any spec that satisfies ``zlib%gcc@4.8``
+the variable ``FOOBAR`` will be unset.
+
+.. note::
+ Order does matter
+ The modifications associated with the ``all`` keyword are always evaluated
+ first, no matter where they appear in the configuration file. All the other
+ spec constraints are instead evaluated top to bottom.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Blacklist or whitelist the generation of specific module files
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Anonymous specs are also used to prevent module files from being written or
+to force them to be written. A common case for that at HPC centers is to hide
+from users all of the software that needs to be built with system compilers.
+Suppose for instance to have ``gcc@4.4.7`` provided by your system. Then
+with a configuration file like this one:
+
+.. code-block:: yaml
+
+ modules:
+ tcl:
+ whitelist: ['gcc', 'llvm'] # Whitelist will have precedence over blacklist
+ blacklist: ['%gcc@4.4.7'] # Assuming gcc@4.4.7 is the system compiler
+
+you will skip the generation of module files for any package that
+is compiled with ``gcc@4.4.7``, with the exception of any ``gcc``
+or any ``llvm`` installation.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Customize the naming scheme
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The names of environment modules generated by spack are not always easy to
+fully comprehend due to the long hash in the name. There are two module
+configuration options to help with that. The first is a global setting to
+adjust the hash length. It can be set anywhere from 0 to 32 and has a default
+length of 7. This is the representation of the hash in the module file name and
+does not affect the size of the package hash. Be aware that the smaller the
+hash length the more likely naming conflicts will occur. The following snippet
+shows how to set hash length in the module file names:
+
+.. code-block:: yaml
+
+ modules:
+ tcl:
+ hash_length: 7
+
+To help make module names more readable, and to help alleviate name conflicts
+with a short hash, one can use the ``suffixes`` option in the modules
+configuration file. This option will add strings to modules that match a spec.
+For instance, the following config options,
+
+.. code-block:: yaml
+
+ modules:
+ tcl:
+ all:
+ suffixes:
+ ^python@2.7.12: 'python-2.7.12'
+ ^openblas: 'openblas'
+
+will add a ``python-2.7.12`` version string to any packages compiled with
+python matching the spec, ``python@2.7.12``. This is useful to know which
+version of python a set of python extensions is associated with. Likewise, the
+``openblas`` string is attached to any program that has openblas in the spec,
+most likely via the ``+blas`` variant specification.
+
+.. note::
+ TCL module files
+ A modification that is specific to ``tcl`` module files is the possibility
+ to change the naming scheme of modules.
+
+ .. code-block:: yaml
+
+ modules:
+ tcl:
+ naming_scheme: '${PACKAGE}/${VERSION}-${COMPILERNAME}-${COMPILERVER}'
+ all:
+ conflict: ['${PACKAGE}', 'intel/14.0.1']
+
+ will create module files that will conflict with ``intel/14.0.1`` and with the
+ base directory of the same module, effectively preventing the possibility to
+ load two or more versions of the same software at the same time. The tokens
+ that are available for use in this directive are the same understood by
+ the ``Spec.format`` method.
+
+
+.. note::
+ LMod hierarchical module files
+ When ``lmod`` is activated Spack will generate a set of hierarchical lua module
+ files that are understood by LMod. The generated hierarchy always contains the
+ three layers ``Core`` / ``Compiler`` / ``MPI`` but can be further extended to
+ any other virtual dependency present in Spack. A case that could be useful in
+ practice is for instance:
+
+ .. code-block:: yaml
+
+ modules:
+ enable:
+ - lmod
+ lmod:
+ core_compilers: ['gcc@4.8']
+ hierarchical_scheme: ['lapack']
+
+ that will generate a hierarchy in which the ``lapack`` layer is treated as the ``mpi``
+ one. This allows a site to build the same libraries or applications against different
+ implementations of ``mpi`` and ``lapack``, and let LMod switch safely from one to the
+ other.
+
+.. warning::
+ Deep hierarchies and ``lmod spider``
+ For hierarchies that are deeper than three layers ``lmod spider`` may have some issues.
+ See `this discussion on the LMod project <https://github.com/TACC/Lmod/issues/114>`_.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Filter out environment modifications
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Modifications to certain environment variables in module files are generated by
+default, for instance by prefix inspections in the default configuration file.
+There are cases though where some of these modifications are unwanted.
+Suppose you need to avoid having ``CPATH`` and ``LIBRARY_PATH``
+modified by your ``dotkit`` modules:
+
+.. code-block:: yaml
+
+ modules:
+ dotkit:
+ all:
+ filter:
+ # Exclude changes to any of these variables
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+
+The configuration above will generate dotkit module files that will not contain
+modifications to either ``CPATH`` or ``LIBRARY_PATH`` and environment module
+files that instead will contain these modifications.
+
+^^^^^^^^^^^^^^^^^^^^^
+Autoload dependencies
+^^^^^^^^^^^^^^^^^^^^^
+
+In some cases it can be useful to have module files directly autoload
+their dependencies. This may be the case for Python extensions, if not
+activated using ``spack activate``:
+
+.. code-block:: yaml
+
+ modules:
+ tcl:
+ ^python:
+ autoload: 'direct'
+
+The configuration file above will produce module files that will
+automatically load their direct dependencies. The allowed values for the
+``autoload`` statement are either ``none``, ``direct`` or ``all``.
+
+.. note::
+ TCL prerequisites
+ In the ``tcl`` section of the configuration file it is possible to use
+ the ``prerequisites`` directive that accepts the same values as
+ ``autoload``. It will produce module files that have a ``prereq``
+ statement instead of automatically loading other modules.
+
+------------------------
+Maintaining Module Files
+------------------------
+
+Spack not only provides great flexibility in the generation of module files
+and in the customization of both their layout and content, but also ships with
+a tool to ease the burden of their maintenance in production environments.
+This tool is the ``spack module`` command:
+
+.. command-output:: spack module --help
+
+.. _cmd-spack-module-refresh:
+
+^^^^^^^^^^^^^^^^^^^^^^^^
+``spack module refresh``
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+The command that regenerates module files to update their content or
+their layout is ``module refresh``:
+
+.. command-output:: spack module refresh --help
+
+A set of packages can be selected using anonymous specs for the optional
+``constraint`` positional argument. The argument ``--module-type`` identifies
+the type of module files to refresh. Optionally the entire tree can be deleted
+before regeneration if the change in layout is radical.
+
+.. _cmd-spack-module-rm:
+
+^^^^^^^^^^^^^^^^^^^
+``spack module rm``
+^^^^^^^^^^^^^^^^^^^
+
+If instead what you need is just to delete a few module files, then the right
+command is ``module rm``:
+
+.. command-output:: spack module rm --help
+
+.. note::
+ We care about your module files!
+ Every modification done on modules
+ that are already existing will ask for a confirmation by default. If
+ the command is used in a script it is possible though to pass the
+ ``-y`` argument, that will skip this safety measure.
diff --git a/lib/spack/docs/module_file_tutorial.rst b/lib/spack/docs/module_file_tutorial.rst
new file mode 100644
index 0000000000..83df756566
--- /dev/null
+++ b/lib/spack/docs/module_file_tutorial.rst
@@ -0,0 +1,982 @@
+.. _module_tutorial:
+
+=============================
+Module Configuration Tutorial
+=============================
+
+This tutorial will guide you through the customization of both
+content and naming of module files generated by Spack.
+
+Starting from the default Spack settings you will add an increasing
+number of directives to the ``modules.yaml`` configuration file to
+satisfy a number of constraints that mimic those that you may encounter
+in a typical production environment at HPC sites.
+
+Even though the focus will be for the most part on customizing
+TCL non-hierarchical module files, everything
+you'll see applies also to other kinds of module files generated by Spack.
+
+The generation of Lua hierarchical
+module files will be addressed at the end of the tutorial,
+and you'll see that with minor modifications
+to an existing ``modules.yaml`` written for TCL
+non-hierarchical modules you'll get almost
+for free the possibility to try a hierarchical layout.
+
+Let's start!
+
+.. _module_file_tutorial_prerequisites:
+
+-------------
+Prerequisites
+-------------
+
+Before proceeding further ensure:
+
+- you have LMod or Environment Modules available
+- have :ref:`shell support <shell_support>` activated in Spack
+
+If you need to install Lmod or Environment module you can refer
+to the documentation :ref:`here <InstallEnvironmentModules>`.
+
+
+^^^^^^^^^^^^^^^^^^
+Add a new compiler
+^^^^^^^^^^^^^^^^^^
+
+Spack automatically scans the environment to search for available
+compilers on first use. On a Ubuntu 14.04 a fresh clone will show
+something like this:
+
+.. code-block:: console
+
+ $ uname -a
+ Linux nuvolari 4.4.0-45-generic #66~14.04.1-Ubuntu SMP Wed Oct 19 15:05:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
+
+ $ spack compilers
+ ==> Available compilers
+ -- gcc ----------------------------------------------------------
+ gcc@4.8
+
+For the purpose of building a limited set of packages with some features
+that will help showcasing the capabilities of
+module customization the first thing we need is to build a new compiler:
+
+.. code-block:: console
+
+ $ spack install gcc@6.2.0
+ # ...
+ # Wait a long time
+ # ...
+
+Then we can use shell support for modules to add it to the list of known compilers:
+
+.. code-block:: console
+
+ # The name of the generated module may vary
+ $ module load gcc-6.2.0-gcc-4.8-twd5nqg
+
+ $ spack compiler add
+ ==> Added 1 new compiler to /home/mculpo/.spack/linux/compilers.yaml
+ gcc@6.2.0
+
+ $ spack compilers
+ ==> Available compilers
+ -- gcc ----------------------------------------------------------
+ gcc@6.2.0 gcc@4.8
+
+Note that the final 7 digits hash at the end of the generated module may vary depending
+on architecture or package version.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Build software that will be used in the tutorial
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Next you should install a few modules that will be used in the tutorial:
+
+.. code-block:: console
+
+ $ spack install netlib-scalapack ^openmpi ^openblas
+ # ...
+
+The packages you need to install are:
+
+- ``netlib-scalapack ^openmpi ^openblas``
+- ``netlib-scalapack ^mpich ^openblas``
+- ``netlib-scalapack ^openmpi ^netlib-lapack``
+- ``netlib-scalapack ^mpich ^netlib-lapack``
+- ``py-scipy ^openblas``
+
+In the end your environment should look something like:
+
+.. code-block:: console
+
+ $ module avail
+
+ ------------------------------------------------------------------------ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64 ------------------------------------------------------------------------
+ binutils-2.27-gcc-4.8-dz3xevw libpciaccess-0.13.4-gcc-6.2.0-eo2siet lzo-2.09-gcc-6.2.0-jcngz72 netlib-scalapack-2.0.2-gcc-6.2.0-wnimqhw python-2.7.12-gcc-6.2.0-qu7rc5p
+ bzip2-1.0.6-gcc-6.2.0-csoc2mq libsigsegv-2.10-gcc-4.8-avb6azw m4-1.4.17-gcc-4.8-iggewke netlib-scalapack-2.0.2-gcc-6.2.0-wojunhq sqlite-3.8.5-gcc-6.2.0-td3zfe7
+ cmake-3.5.2-gcc-6.2.0-6poypqg libsigsegv-2.10-gcc-6.2.0-g3qpmbi m4-1.4.17-gcc-6.2.0-lhgqa6s nettle-3.2-gcc-6.2.0-djdthlh tcl-8.6.5-gcc-4.8-atddxu7
+ curl-7.50.3-gcc-6.2.0-2ffacqm libtool-2.4.6-gcc-6.2.0-kiepac6 mpc-1.0.3-gcc-4.8-lylv7lk openblas-0.2.19-gcc-6.2.0-js33umc util-macros-1.19.0-gcc-6.2.0-uoukuqk
+ expat-2.2.0-gcc-6.2.0-bxqnjar libxml2-2.9.4-gcc-6.2.0-3k4ykbe mpfr-3.1.4-gcc-4.8-bldfx3w openmpi-2.0.1-gcc-6.2.0-s3qbtby xz-5.2.2-gcc-6.2.0-t5lk6in
+ gcc-6.2.0-gcc-4.8-twd5nqg lmod-6.4.5-gcc-4.8-7v7bh7b mpich-3.2-gcc-6.2.0-5n5xoep openssl-1.0.2j-gcc-6.2.0-hibnfda zlib-1.2.8-gcc-4.8-bds4ies
+ gmp-6.1.1-gcc-4.8-uq52e2n lua-5.3.2-gcc-4.8-xozf2hx ncurses-6.0-gcc-4.8-u62fit4 pkg-config-0.29.1-gcc-6.2.0-rslsgcs zlib-1.2.8-gcc-6.2.0-asydrba
+ gmp-6.1.1-gcc-6.2.0-3cfh3hi lua-luafilesystem-1_6_3-gcc-4.8-sbzejlz ncurses-6.0-gcc-6.2.0-7tb426s py-nose-1.3.7-gcc-6.2.0-4gl5c42
+ hwloc-1.11.4-gcc-6.2.0-3ostwel lua-luaposix-33.4.0-gcc-4.8-xf7y2p5 netlib-lapack-3.6.1-gcc-6.2.0-mirer2l py-numpy-1.11.1-gcc-6.2.0-i3rpk4e
+ isl-0.14-gcc-4.8-cq73t5m lz4-131-gcc-6.2.0-cagoem4 netlib-scalapack-2.0.2-gcc-6.2.0-6bqlxqy py-scipy-0.18.1-gcc-6.2.0-e6uljfi
+ libarchive-3.2.1-gcc-6.2.0-2b54aos lzma-4.32.7-gcc-6.2.0-sfmeynw netlib-scalapack-2.0.2-gcc-6.2.0-hpqb3dp py-setuptools-25.2.0-gcc-6.2.0-hkqauaa
+
+------------------------------------------------
+Filter unwanted modifications to the environment
+------------------------------------------------
+
+The non-hierarchical TCL module files that have been generated so far
+follow the default rules for module generation, which are given
+:ref:`here <modules-yaml>` in the reference part of the manual. Taking a
+look at the ``gcc`` module you'll see something like:
+
+.. code-block:: console
+
+ $ module show gcc-6.2.0-gcc-4.8-twd5nqg
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64/gcc-6.2.0-gcc-4.8-twd5nqg:
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ whatis("gcc @6.2.0 ")
+ prepend_path("PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/bin")
+ prepend_path("CMAKE_PREFIX_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/")
+ prepend_path("MANPATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/share/man")
+ prepend_path("PKG_CONFIG_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64/pkgconfig")
+ prepend_path("LIBRARY_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64")
+ prepend_path("LD_LIBRARY_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64")
+ prepend_path("CPATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/include")
+ help([[The GNU Compiler Collection includes front ends for C, C++, Objective-C,
+ Fortran, and Java.
+ ]])
+
+As expected, a few environment variables representing paths will be modified
+by the modules according to the default prefix inspection rules.
+
+Consider now the case that your site has decided that e.g. ``CPATH`` and
+``LIBRARY_PATH`` modifications should not be present in module files. What you can
+do to abide by the rules is to create a configuration file ``~/.spack/modules.yaml``
+with the following content:
+
+.. code-block:: yaml
+
+ modules:
+ tcl:
+ all:
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+
+Next you should regenerate all the module files:
+
+.. code-block:: console
+
+ $ spack module refresh --module-type tcl
+ ==> You are about to regenerate tcl module files for:
+
+ -- linux-Ubuntu14-x86_64 / gcc@4.8 ------------------------------
+ dz3xevw binutils@2.27 uq52e2n gmp@6.1.1 avb6azw libsigsegv@2.10 xozf2hx lua@5.3.2 xf7y2p5 lua-luaposix@33.4.0 lylv7lk mpc@1.0.3 u62fit4 ncurses@6.0 bds4ies zlib@1.2.8
+ twd5nqg gcc@6.2.0 cq73t5m isl@0.14 7v7bh7b lmod@6.4.5 sbzejlz lua-luafilesystem@1_6_3 iggewke m4@1.4.17 bldfx3w mpfr@3.1.4 atddxu7 tcl@8.6.5
+
+ ...
+
+ ==> Do you want to proceed ? [y/n]
+ y
+ ==> Regenerating tcl module files
+
+If you take a look now at the module for ``gcc`` you'll see that the unwanted
+paths have disappeared:
+
+.. code-block:: console
+
+ $ module show gcc-6.2.0-gcc-4.8-twd5nqg
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64/gcc-6.2.0-gcc-4.8-twd5nqg:
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ whatis("gcc @6.2.0 ")
+ prepend_path("PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/bin")
+ prepend_path("CMAKE_PREFIX_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/")
+ prepend_path("MANPATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/share/man")
+ prepend_path("PKG_CONFIG_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64/pkgconfig")
+ prepend_path("LD_LIBRARY_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64")
+ help([[The GNU Compiler Collection includes front ends for C, C++, Objective-C,
+ Fortran, and Java.
+ ]])
+
+----------------------------------------------
+Prevent some module files from being generated
+----------------------------------------------
+
+Another common request at many sites is to avoid exposing software that
+is only needed as an intermediate step when building a newer stack.
+Let's try to prevent the generation of
+module files for anything that is compiled with ``gcc@4.8`` (the OS provided compiler).
+
+To do this you should add a ``blacklist`` keyword to the configuration file:
+
+.. code-block:: yaml
+ :emphasize-lines: 3,4
+
+ modules:
+ tcl:
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+
+and regenerate the module files:
+
+.. code-block:: console
+
+ $ spack module refresh --module-type tcl --delete-tree
+ ==> You are about to regenerate tcl module files for:
+
+ -- linux-Ubuntu14-x86_64 / gcc@4.8 ------------------------------
+ dz3xevw binutils@2.27 uq52e2n gmp@6.1.1 avb6azw libsigsegv@2.10 xozf2hx lua@5.3.2 xf7y2p5 lua-luaposix@33.4.0 lylv7lk mpc@1.0.3 u62fit4 ncurses@6.0 bds4ies zlib@1.2.8
+ twd5nqg gcc@6.2.0 cq73t5m isl@0.14 7v7bh7b lmod@6.4.5 sbzejlz lua-luafilesystem@1_6_3 iggewke m4@1.4.17 bldfx3w mpfr@3.1.4 atddxu7 tcl@8.6.5
+
+ -- linux-Ubuntu14-x86_64 / gcc@6.2.0 ----------------------------
+ csoc2mq bzip2@1.0.6 2b54aos libarchive@3.2.1 sfmeynw lzma@4.32.7 wnimqhw netlib-scalapack@2.0.2 s3qbtby openmpi@2.0.1 hkqauaa py-setuptools@25.2.0
+ 6poypqg cmake@3.5.2 eo2siet libpciaccess@0.13.4 jcngz72 lzo@2.09 6bqlxqy netlib-scalapack@2.0.2 hibnfda openssl@1.0.2j qu7rc5p python@2.7.12
+ 2ffacqm curl@7.50.3 g3qpmbi libsigsegv@2.10 lhgqa6s m4@1.4.17 wojunhq netlib-scalapack@2.0.2 rslsgcs pkg-config@0.29.1 td3zfe7 sqlite@3.8.5
+ bxqnjar expat@2.2.0 kiepac6 libtool@2.4.6 5n5xoep mpich@3.2 hpqb3dp netlib-scalapack@2.0.2 4gl5c42 py-nose@1.3.7 uoukuqk util-macros@1.19.0
+ 3cfh3hi gmp@6.1.1 3k4ykbe libxml2@2.9.4 7tb426s ncurses@6.0 djdthlh nettle@3.2 i3rpk4e py-numpy@1.11.1 t5lk6in xz@5.2.2
+ 3ostwel hwloc@1.11.4 cagoem4 lz4@131 mirer2l netlib-lapack@3.6.1 js33umc openblas@0.2.19 e6uljfi py-scipy@0.18.1 asydrba zlib@1.2.8
+
+ ==> Do you want to proceed ? [y/n]
+ y
+
+ $ module avail
+
+ ------------------------------------------------------------------------ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64 ------------------------------------------------------------------------
+ bzip2-1.0.6-gcc-6.2.0-csoc2mq libsigsegv-2.10-gcc-6.2.0-g3qpmbi ncurses-6.0-gcc-6.2.0-7tb426s openmpi-2.0.1-gcc-6.2.0-s3qbtby sqlite-3.8.5-gcc-6.2.0-td3zfe7
+ cmake-3.5.2-gcc-6.2.0-6poypqg libtool-2.4.6-gcc-6.2.0-kiepac6 netlib-lapack-3.6.1-gcc-6.2.0-mirer2l openssl-1.0.2j-gcc-6.2.0-hibnfda util-macros-1.19.0-gcc-6.2.0-uoukuqk
+ curl-7.50.3-gcc-6.2.0-2ffacqm libxml2-2.9.4-gcc-6.2.0-3k4ykbe netlib-scalapack-2.0.2-gcc-6.2.0-6bqlxqy pkg-config-0.29.1-gcc-6.2.0-rslsgcs xz-5.2.2-gcc-6.2.0-t5lk6in
+ expat-2.2.0-gcc-6.2.0-bxqnjar lz4-131-gcc-6.2.0-cagoem4 netlib-scalapack-2.0.2-gcc-6.2.0-hpqb3dp py-nose-1.3.7-gcc-6.2.0-4gl5c42 zlib-1.2.8-gcc-6.2.0-asydrba
+ gmp-6.1.1-gcc-6.2.0-3cfh3hi lzma-4.32.7-gcc-6.2.0-sfmeynw netlib-scalapack-2.0.2-gcc-6.2.0-wnimqhw py-numpy-1.11.1-gcc-6.2.0-i3rpk4e
+ hwloc-1.11.4-gcc-6.2.0-3ostwel lzo-2.09-gcc-6.2.0-jcngz72 netlib-scalapack-2.0.2-gcc-6.2.0-wojunhq py-scipy-0.18.1-gcc-6.2.0-e6uljfi
+ libarchive-3.2.1-gcc-6.2.0-2b54aos m4-1.4.17-gcc-6.2.0-lhgqa6s nettle-3.2-gcc-6.2.0-djdthlh py-setuptools-25.2.0-gcc-6.2.0-hkqauaa
+ libpciaccess-0.13.4-gcc-6.2.0-eo2siet mpich-3.2-gcc-6.2.0-5n5xoep openblas-0.2.19-gcc-6.2.0-js33umc python-2.7.12-gcc-6.2.0-qu7rc5p
+
+This time it is convenient to pass the option ``--delete-tree`` to the command that
+regenerates the module files to instruct it to delete the existing tree and regenerate
+a new one instead of overwriting the files in the existing directory.
+
+If you pay careful attention you'll see though that we went too far in blacklisting modules:
+the module for ``gcc@6.2.0`` disappeared as it was bootstrapped with ``gcc@4.8``. To specify
+exceptions to the blacklist rules you can use ``whitelist``:
+
+.. code-block:: yaml
+ :emphasize-lines: 3,4
+
+ modules:
+ tcl:
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+
+``whitelist`` rules always have precedence over ``blacklist`` rules. If you regenerate the modules again:
+
+.. code-block:: console
+
+ $ spack module refresh --module-type tcl -y
+
+you'll see that now the module for ``gcc@6.2.0`` has reappeared:
+
+.. code-block:: console
+
+ $ module avail gcc-6.2.0-gcc-4.8-twd5nqg
+
+ ------------------------------------------------------------------------ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64 ------------------------------------------------------------------------
+ gcc-6.2.0-gcc-4.8-twd5nqg
+
+-------------------------
+Change module file naming
+-------------------------
+
+The next step in making module files more user-friendly is to
+improve their naming scheme.
+To reduce the length of the hash or remove it altogether you can
+use the ``hash_length`` keyword in the configuration file:
+
+.. TODO: give reasons to remove hashes if they are not evident enough?
+
+.. code-block:: yaml
+ :emphasize-lines: 3
+
+ modules:
+ tcl:
+ hash_length: 0
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+
+If you try to regenerate the module files now you will get an error:
+
+.. code-block:: console
+
+ $ spack module refresh --module-type tcl --delete-tree -y
+ ==> Error: Name clashes detected in module files:
+
+ file : /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64/netlib-scalapack-2.0.2-gcc-6.2.0
+ spec : netlib-scalapack@2.0.2%gcc@6.2.0~fpic+shared arch=linux-Ubuntu14-x86_64
+ spec : netlib-scalapack@2.0.2%gcc@6.2.0~fpic+shared arch=linux-Ubuntu14-x86_64
+ spec : netlib-scalapack@2.0.2%gcc@6.2.0~fpic+shared arch=linux-Ubuntu14-x86_64
+ spec : netlib-scalapack@2.0.2%gcc@6.2.0~fpic+shared arch=linux-Ubuntu14-x86_64
+
+ ==> Error: Operation aborted
+
+.. note::
+ We try to check for errors upfront!
+ In Spack we check for errors upfront whenever possible, so don't worry about your module files:
+ as a name clash was detected nothing has been changed on disk.
+
+The problem here is that without
+the hashes the four different flavors of ``netlib-scalapack`` map to the same module file
+name. We have the possibility to add suffixes to differentiate them:
+
+.. code-block:: yaml
+ :emphasize-lines: 9-11,14-17
+
+ modules:
+ tcl:
+ hash_length: 0
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ suffixes:
+ '^openblas': openblas
+ '^netlib-lapack': netlib
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+ netlib-scalapack:
+ suffixes:
+ '^openmpi': openmpi
+ '^mpich': mpich
+
+As you can see it is possible to specify rules that applies only to a
+restricted set of packages using :ref:`anonymous specs <anonymous_specs>`.
+Regenerating module files now we obtain:
+
+.. code-block:: console
+
+ $ spack module refresh --module-type tcl --delete-tree -y
+ ==> Regenerating tcl module files
+ $ module avail
+
+ ------------------------------------------------------------------------ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64 ------------------------------------------------------------------------
+ bzip2-1.0.6-gcc-6.2.0 libpciaccess-0.13.4-gcc-6.2.0 mpich-3.2-gcc-6.2.0 openblas-0.2.19-gcc-6.2.0 python-2.7.12-gcc-6.2.0
+ cmake-3.5.2-gcc-6.2.0 libsigsegv-2.10-gcc-6.2.0 ncurses-6.0-gcc-6.2.0 openmpi-2.0.1-gcc-6.2.0 sqlite-3.8.5-gcc-6.2.0
+ curl-7.50.3-gcc-6.2.0 libtool-2.4.6-gcc-6.2.0 netlib-lapack-3.6.1-gcc-6.2.0 openssl-1.0.2j-gcc-6.2.0 util-macros-1.19.0-gcc-6.2.0
+ expat-2.2.0-gcc-6.2.0 libxml2-2.9.4-gcc-6.2.0 netlib-scalapack-2.0.2-gcc-6.2.0-netlib-mpich pkg-config-0.29.1-gcc-6.2.0 xz-5.2.2-gcc-6.2.0
+ gcc-6.2.0-gcc-4.8 lz4-131-gcc-6.2.0 netlib-scalapack-2.0.2-gcc-6.2.0-netlib-openmpi py-nose-1.3.7-gcc-6.2.0 zlib-1.2.8-gcc-6.2.0
+ gmp-6.1.1-gcc-6.2.0 lzma-4.32.7-gcc-6.2.0 netlib-scalapack-2.0.2-gcc-6.2.0-openblas-mpich py-numpy-1.11.1-gcc-6.2.0-openblas
+ hwloc-1.11.4-gcc-6.2.0 lzo-2.09-gcc-6.2.0 netlib-scalapack-2.0.2-gcc-6.2.0-openblas-openmpi py-scipy-0.18.1-gcc-6.2.0-openblas
+ libarchive-3.2.1-gcc-6.2.0 m4-1.4.17-gcc-6.2.0 nettle-3.2-gcc-6.2.0 py-setuptools-25.2.0-gcc-6.2.0
+
+Finally we can set a ``naming_scheme`` to prevent users from loading
+modules that refer to different flavors of the same library/application:
+
+.. code-block:: yaml
+ :emphasize-lines: 4,10,11
+
+ modules:
+ tcl:
+ hash_length: 0
+ naming_scheme: '${PACKAGE}/${VERSION}-${COMPILERNAME}-${COMPILERVER}'
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ conflict:
+ - '${PACKAGE}'
+ suffixes:
+ '^openblas': openblas
+ '^netlib-lapack': netlib
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+ netlib-scalapack:
+ suffixes:
+ '^openmpi': openmpi
+ '^mpich': mpich
+
+The final result should look like:
+
+.. code-block:: console
+
+ $ module avail
+
+ ------------------------------------------------------------------------ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64 ------------------------------------------------------------------------
+ bzip2/1.0.6-gcc-6.2.0 libpciaccess/0.13.4-gcc-6.2.0 mpich/3.2-gcc-6.2.0 openblas/0.2.19-gcc-6.2.0 python/2.7.12-gcc-6.2.0
+ cmake/3.5.2-gcc-6.2.0 libsigsegv/2.10-gcc-6.2.0 ncurses/6.0-gcc-6.2.0 openmpi/2.0.1-gcc-6.2.0 sqlite/3.8.5-gcc-6.2.0
+ curl/7.50.3-gcc-6.2.0 libtool/2.4.6-gcc-6.2.0 netlib-lapack/3.6.1-gcc-6.2.0 openssl/1.0.2j-gcc-6.2.0 util-macros/1.19.0-gcc-6.2.0
+ expat/2.2.0-gcc-6.2.0 libxml2/2.9.4-gcc-6.2.0 netlib-scalapack/2.0.2-gcc-6.2.0-netlib-mpich pkg-config/0.29.1-gcc-6.2.0 xz/5.2.2-gcc-6.2.0
+ gcc/6.2.0-gcc-4.8 lz4/131-gcc-6.2.0 netlib-scalapack/2.0.2-gcc-6.2.0-netlib-openmpi py-nose/1.3.7-gcc-6.2.0 zlib/1.2.8-gcc-6.2.0
+ gmp/6.1.1-gcc-6.2.0 lzma/4.32.7-gcc-6.2.0 netlib-scalapack/2.0.2-gcc-6.2.0-openblas-mpich py-numpy/1.11.1-gcc-6.2.0-openblas
+ hwloc/1.11.4-gcc-6.2.0 lzo/2.09-gcc-6.2.0 netlib-scalapack/2.0.2-gcc-6.2.0-openblas-openmpi (D) py-scipy/0.18.1-gcc-6.2.0-openblas
+ libarchive/3.2.1-gcc-6.2.0 m4/1.4.17-gcc-6.2.0 nettle/3.2-gcc-6.2.0 py-setuptools/25.2.0-gcc-6.2.0
+
+.. note::
+ TCL specific directive
+ The directives ``naming_scheme`` and ``conflict`` are TCL specific and do not apply
+ to the ``dotkit`` or ``lmod`` sections in the configuration file.
+
+------------------------------------
+Add custom environment modifications
+------------------------------------
+
+At many sites it is customary to set an environment variable in a
+package's module file that points to the folder in which the package
+is installed. You can achieve this with Spack by adding an
+``environment`` directive to the configuration file:
+
+.. code-block:: yaml
+ :emphasize-lines: 17-19
+
+ modules:
+ tcl:
+ hash_length: 0
+ naming_scheme: '${PACKAGE}/${VERSION}-${COMPILERNAME}-${COMPILERVER}'
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ conflict:
+ - '${PACKAGE}'
+ suffixes:
+ '^openblas': openblas
+ '^netlib-lapack': netlib
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+ environment:
+ set:
+ '${PACKAGE}_ROOT': '${PREFIX}'
+ netlib-scalapack:
+ suffixes:
+ '^openmpi': openmpi
+ '^mpich': mpich
+
+There are many variable tokens available to use in the ``environment``
+and ``naming_scheme`` directives, such as ``${PACKAGE}``,
+``${VERSION}``, etc. (see the :meth:`~spack.spec.Spec.format` API
+documentation for the complete list).
+
+Regenerating the module files should result in something like:
+
+.. code-block:: console
+ :emphasize-lines: 14
+
+ $ spack module refresh -y --module-type tcl
+ ==> Regenerating tcl module files
+
+ $ module show gcc
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64/gcc/6.2.0-gcc-4.8:
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ whatis("gcc @6.2.0 ")
+ prepend_path("PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/bin")
+ prepend_path("CMAKE_PREFIX_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/")
+ prepend_path("MANPATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/share/man")
+ prepend_path("PKG_CONFIG_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64/pkgconfig")
+ prepend_path("LD_LIBRARY_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64")
+ setenv("GCC_ROOT","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u")
+ conflict("gcc")
+ help([[The GNU Compiler Collection includes front ends for C, C++, Objective-C,
+ Fortran, and Java.
+ ]])
+
+As you see the ``gcc`` module has the environment variable ``GCC_ROOT`` set.
+
+Sometimes it's also useful to apply environment modifications selectively and target
+only certain packages. You can, for instance set the common variables ``CC``, ``CXX``,
+etc. in the ``gcc`` module file and apply other custom modifications to the
+``openmpi`` modules as follows:
+
+.. code-block:: yaml
+ :emphasize-lines: 20-32
+
+ modules:
+ tcl:
+ hash_length: 0
+ naming_scheme: '${PACKAGE}/${VERSION}-${COMPILERNAME}-${COMPILERVER}'
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ conflict:
+ - '${PACKAGE}'
+ suffixes:
+ '^openblas': openblas
+ '^netlib-lapack': netlib
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+ environment:
+ set:
+ '${PACKAGE}_ROOT': '${PREFIX}'
+ gcc:
+ environment:
+ set:
+ CC: gcc
+ CXX: g++
+ FC: gfortran
+ F90: gfortran
+ F77: gfortran
+ openmpi:
+ environment:
+ set:
+ SLURM_MPI_TYPE: pmi2
+ OMPI_MCA_btl_openib_warn_default_gid_prefix: '0'
+ netlib-scalapack:
+ suffixes:
+ '^openmpi': openmpi
+ '^mpich': mpich
+
+This time we will be more selective and regenerate only the ``gcc`` and
+``openmpi`` module files:
+
+.. code-block:: console
+
+ $ spack module refresh -y --module-type tcl gcc
+ ==> Regenerating tcl module files
+
+ $ spack module refresh -y --module-type tcl openmpi
+ ==> Regenerating tcl module files
+
+ $ module show gcc
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64/gcc/6.2.0-gcc-4.8:
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ whatis("gcc @6.2.0 ")
+ prepend_path("PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/bin")
+ prepend_path("CMAKE_PREFIX_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/")
+ prepend_path("MANPATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/share/man")
+ prepend_path("PKG_CONFIG_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64/pkgconfig")
+ prepend_path("LD_LIBRARY_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u/lib64")
+ setenv("GCC_ROOT","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-4.8/gcc-6.2.0-twd5nqg33hrrssqclcfi5k42eccwxz5u")
+ setenv("CC","gcc")
+ setenv("CXX","g++")
+ setenv("F90","gfortran")
+ setenv("FC","gfortran")
+ setenv("F77","gfortran")
+ conflict("gcc")
+ help([[The GNU Compiler Collection includes front ends for C, C++, Objective-C,
+ Fortran, and Java.
+ ]])
+
+ $ module show openmpi
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64/openmpi/2.0.1-gcc-6.2.0:
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ whatis("openmpi @2.0.1 ")
+ prepend_path("PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/openmpi-2.0.1-s3qbtbyh3y5y4gkchmhcuak7th44l53w/bin")
+ prepend_path("CMAKE_PREFIX_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/openmpi-2.0.1-s3qbtbyh3y5y4gkchmhcuak7th44l53w/")
+ prepend_path("LD_LIBRARY_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/openmpi-2.0.1-s3qbtbyh3y5y4gkchmhcuak7th44l53w/lib")
+ prepend_path("PKG_CONFIG_PATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/openmpi-2.0.1-s3qbtbyh3y5y4gkchmhcuak7th44l53w/lib/pkgconfig")
+ prepend_path("MANPATH","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/openmpi-2.0.1-s3qbtbyh3y5y4gkchmhcuak7th44l53w/share/man")
+ setenv("SLURM_MPI_TYPE","pmi2")
+ setenv("OMPI_MCA_BTL_OPENIB_WARN_DEFAULT_GID_PREFIX","0")
+ setenv("OPENMPI_ROOT","/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/openmpi-2.0.1-s3qbtbyh3y5y4gkchmhcuak7th44l53w")
+ conflict("openmpi")
+ help([[The Open MPI Project is an open source Message Passing Interface
+ implementation that is developed and maintained by a consortium of
+ academic, research, and industry partners. Open MPI is therefore able to
+ combine the expertise, technologies, and resources from all across the
+ High Performance Computing community in order to build the best MPI
+ library available. Open MPI offers advantages for system and software
+ vendors, application developers and computer science researchers.
+ ]])
+
+
+---------------------
+Autoload dependencies
+---------------------
+
+Spack can also generate module files that contain code to load the
+dependencies automatically. You can, for instance generate python
+modules that load their dependencies by adding the ``autoload``
+directive and assigning it the value ``direct``:
+
+.. code-block:: yaml
+ :emphasize-lines: 37,38
+
+ modules:
+ tcl:
+ hash_length: 0
+ naming_scheme: '${PACKAGE}/${VERSION}-${COMPILERNAME}-${COMPILERVER}'
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ conflict:
+ - '${PACKAGE}'
+ suffixes:
+ '^openblas': openblas
+ '^netlib-lapack': netlib
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+ environment:
+ set:
+ '${PACKAGE}_ROOT': '${PREFIX}'
+ gcc:
+ environment:
+ set:
+ CC: gcc
+ CXX: g++
+ FC: gfortran
+ F90: gfortran
+ F77: gfortran
+ openmpi:
+ environment:
+ set:
+ SLURM_MPI_TYPE: pmi2
+ OMPI_MCA_btl_openib_warn_default_gid_prefix: '0'
+ netlib-scalapack:
+ suffixes:
+ '^openmpi': openmpi
+ '^mpich': mpich
+ ^python:
+ autoload: 'direct'
+
+and regenerating the module files for every package that depends on ``python``:
+
+.. code-block:: console
+
+ $ spack module refresh -y --module-type tcl ^python
+ ==> Regenerating tcl module files
+
+Now the ``py-scipy`` module will be:
+
+.. code-block:: tcl
+
+ #%Module1.0
+ ## Module file created by spack (https://github.com/LLNL/spack) on 2016-11-02 20:53:21.283547
+ ##
+ ## py-scipy@0.18.1%gcc@6.2.0 arch=linux-Ubuntu14-x86_64-e6uljfi
+ ##
+ module-whatis "py-scipy @0.18.1"
+
+ proc ModulesHelp { } {
+ puts stderr "SciPy (pronounced "Sigh Pie") is a Scientific Library for Python. It"
+ puts stderr "provides many user-friendly and efficient numerical routines such as"
+ puts stderr "routines for numerical integration and optimization."
+ }
+
+ if ![ is-loaded python/2.7.12-gcc-6.2.0 ] {
+ puts stderr "Autoloading python/2.7.12-gcc-6.2.0"
+ module load python/2.7.12-gcc-6.2.0
+ }
+
+ if ![ is-loaded openblas/0.2.19-gcc-6.2.0 ] {
+ puts stderr "Autoloading openblas/0.2.19-gcc-6.2.0"
+ module load openblas/0.2.19-gcc-6.2.0
+ }
+
+ if ![ is-loaded py-numpy/1.11.1-gcc-6.2.0-openblas ] {
+ puts stderr "Autoloading py-numpy/1.11.1-gcc-6.2.0-openblas"
+ module load py-numpy/1.11.1-gcc-6.2.0-openblas
+ }
+
+ prepend-path CMAKE_PREFIX_PATH "/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/py-scipy-0.18.1-e6uljfiffgym4xvj6wveevqxfqnfb3gh/"
+ prepend-path LD_LIBRARY_PATH "/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/py-scipy-0.18.1-e6uljfiffgym4xvj6wveevqxfqnfb3gh/lib"
+ prepend-path PYTHONPATH "/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/py-scipy-0.18.1-e6uljfiffgym4xvj6wveevqxfqnfb3gh/lib/python2.7/site-packages"
+ setenv PY_SCIPY_ROOT "/home/mculpo/wdir/spack/opt/spack/linux-Ubuntu14-x86_64/gcc-6.2.0/py-scipy-0.18.1-e6uljfiffgym4xvj6wveevqxfqnfb3gh"
+ conflict py-scipy
+
+and will contain code to autoload all the dependencies:
+
+.. code-block:: console
+
+ $ module load py-scipy
+ Autoloading python/2.7.12-gcc-6.2.0
+ Autoloading openblas/0.2.19-gcc-6.2.0
+ Autoloading py-numpy/1.11.1-gcc-6.2.0-openblas
+
+-----------------------------
+Lua hierarchical module files
+-----------------------------
+
+In the final part of this tutorial you will modify ``modules.yaml`` to generate
+Lua hierarchical module files. You will see that most of the directives used before
+are also valid in the ``lmod`` context.
+
+^^^^^^^^^^^^^^^^^
+Core/Compiler/MPI
+^^^^^^^^^^^^^^^^^
+
+.. warning::
+ Only LMod supports Lua hierarchical module files
+ For this part of the tutorial you need to be using LMod to
+ manage your environment.
+
+The most common hierarchy is the so called ``Core/Compiler/MPI``. To have an idea
+how a hierarchy is organized you may refer to the
+`Lmod guide <https://www.tacc.utexas.edu/research-development/tacc-projects/lmod/user-guide/module-hierarchy>`_.
+Since ``lmod`` is not enabled by default, you need to add it to the list of
+enabled module file generators. The other things you need to do are:
+
+- change the ``tcl`` tag to ``lmod``
+- remove ``tcl`` specific directives (``naming_scheme`` and ``conflict``)
+- set which compilers are considered ``core``
+- remove the ``mpi`` related suffixes (as they will be substituted by hierarchies)
+
+After modifications the configuration file will be:
+
+.. code-block:: yaml
+ :emphasize-lines: 2-6
+
+ modules:
+ enable::
+ - lmod
+ lmod:
+ core_compilers:
+ - 'gcc@4.8'
+ hash_length: 0
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ all:
+ suffixes:
+ '^openblas': openblas
+ '^netlib-lapack': netlib
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+ environment:
+ set:
+ '${PACKAGE}_ROOT': '${PREFIX}'
+ gcc:
+ environment:
+ set:
+ CC: gcc
+ CXX: g++
+ FC: gfortran
+ F90: gfortran
+ F77: gfortran
+ openmpi:
+ environment:
+ set:
+ SLURM_MPI_TYPE: pmi2
+ OMPI_MCA_btl_openib_warn_default_gid_prefix: '0'
+
+
+.. note::
+ The double colon
+ The double colon after ``enable`` is intentional and it serves the
+ purpose of overriding the default list of enabled generators so
+ that only ``lmod`` will be active (see :ref:`the reference
+ manual <config-overrides>` for a more detailed explanation of
+ config scopes).
+
+The directive ``core_compilers`` accepts a list of compilers : everything built
+using these compilers will create a module in the ``Core`` part of the hierarchy. It is
+common practice to put the OS provided compilers in the list and only build common utilities
+and other compilers in ``Core``.
+
+If you regenerate the module files
+
+.. code-block:: console
+
+ $ spack module refresh --module-type lmod --delete-tree -y
+
+and update ``MODULEPATH`` to point to the ``Core`` folder, and
+list the available modules, you'll see:
+
+.. code-block:: console
+
+ $ module unuse /home/mculpo/wdir/spack/share/spack/modules/linux-Ubuntu14-x86_64
+ $ module use /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/Core
+ $ module avail
+
+ ----------------------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/Core -----------------------------------------------------------------------
+ gcc/6.2.0
+
+The only module visible now is ``gcc``. Loading that you will make
+visible the ``Compiler`` part of the software stack that was built with ``gcc/6.2.0``:
+
+.. code-block:: console
+
+ $ module load gcc
+ $ module avail
+
+ -------------------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/gcc/6.2.0 ---------------------------------------------------------------------
+ binutils/2.27 curl/7.50.3 hwloc/1.11.4 libtool/2.4.6 lzo/2.09 netlib-lapack/3.6.1 openssl/1.0.2j py-scipy/0.18.1-openblas util-macros/1.19.0
+ bison/3.0.4 expat/2.2.0 libarchive/3.2.1 libxml2/2.9.4 m4/1.4.17 nettle/3.2 pkg-config/0.29.1 py-setuptools/25.2.0 xz/5.2.2
+ bzip2/1.0.6 flex/2.6.0 libpciaccess/0.13.4 lz4/131 mpich/3.2 openblas/0.2.19 py-nose/1.3.7 python/2.7.12 zlib/1.2.8
+ cmake/3.6.1 gmp/6.1.1 libsigsegv/2.10 lzma/4.32.7 ncurses/6.0 openmpi/2.0.1 py-numpy/1.11.1-openblas sqlite/3.8.5
+
+ ----------------------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/Core -----------------------------------------------------------------------
+ gcc/6.2.0 (L)
+
+The same holds true for the ``MPI`` part of the stack, that you can enable by loading
+either ``mpich`` or ``openmpi``. The nice features of LMod will become evident
+once you'll try switching among different stacks:
+
+.. code-block:: console
+
+ $ module load mpich
+ $ module avail
+
+ ----------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/mpich/3.2-5n5xoep/gcc/6.2.0 ------------------------------------------------------------
+ netlib-scalapack/2.0.2-netlib netlib-scalapack/2.0.2-openblas (D)
+
+ -------------------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/gcc/6.2.0 ---------------------------------------------------------------------
+ binutils/2.27 curl/7.50.3 hwloc/1.11.4 libtool/2.4.6 lzo/2.09 netlib-lapack/3.6.1 openssl/1.0.2j py-scipy/0.18.1-openblas util-macros/1.19.0
+ bison/3.0.4 expat/2.2.0 libarchive/3.2.1 libxml2/2.9.4 m4/1.4.17 nettle/3.2 pkg-config/0.29.1 py-setuptools/25.2.0 xz/5.2.2
+ bzip2/1.0.6 flex/2.6.0 libpciaccess/0.13.4 lz4/131 mpich/3.2 (L) openblas/0.2.19 py-nose/1.3.7 python/2.7.12 zlib/1.2.8
+ cmake/3.6.1 gmp/6.1.1 libsigsegv/2.10 lzma/4.32.7 ncurses/6.0 openmpi/2.0.1 py-numpy/1.11.1-openblas sqlite/3.8.5
+
+ ----------------------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/Core -----------------------------------------------------------------------
+ gcc/6.2.0 (L)
+
+ $ module load openblas netlib-scalapack/2.0.2-openblas
+ $ module list
+
+ Currently Loaded Modules:
+ 1) gcc/6.2.0 2) mpich/3.2 3) openblas/0.2.19 4) netlib-scalapack/2.0.2-openblas
+
+ $ module load openmpi
+
+ Lmod is automatically replacing "mpich/3.2" with "openmpi/2.0.1"
+
+
+ Due to MODULEPATH changes the following have been reloaded:
+ 1) netlib-scalapack/2.0.2-openblas
+
+This layout is already a great improvement over the usual non-hierarchical layout,
+but it still has an asymmetry: ``LAPACK`` providers are semantically the same as ``MPI``
+providers, but they are still not part of the hierarchy. We'll see a possible solution
+next.
+
+.. Activate lmod and turn the previous modifications into lmod:
+ Add core compilers
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Extend the hierarchy to other virtual providers
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. warning::
+ This is an experimental feature
+ Having a hierarchy deeper than ``Core``/``Compiler``/``MPI`` is an experimental
+ feature, still not fully supported by ``module spider``,
+ see `here <https://github.com/TACC/Lmod/issues/114>`_. Furthermore its use
+ with hierarchies more complex than ``Core``/``Compiler``/``MPI``/``LAPACK``
+ has not been thoroughly tested in production environments.
+
+Spack permits you to generate Lua hierarchical module files where users
+can add an arbitrary list of virtual providers to the triplet
+``Core``/``Compiler``/``MPI``. A configuration file like:
+
+.. code-block:: yaml
+ :emphasize-lines: 7,8
+
+ modules:
+ enable::
+ - lmod
+ lmod:
+ core_compilers:
+ - 'gcc@4.8'
+ hierarchical_scheme:
+ - lapack
+ hash_length: 0
+ whitelist:
+ - gcc
+ blacklist:
+ - '%gcc@4.8'
+ - readline
+ all:
+ filter:
+ environment_blacklist: ['CPATH', 'LIBRARY_PATH']
+ environment:
+ set:
+ '${PACKAGE}_ROOT': '${PREFIX}'
+ gcc:
+ environment:
+ set:
+ CC: gcc
+ CXX: g++
+ FC: gfortran
+ F90: gfortran
+ F77: gfortran
+ openmpi:
+ environment:
+ set:
+ SLURM_MPI_TYPE: pmi2
+ OMPI_MCA_btl_openib_warn_default_gid_prefix: '0'
+
+will add ``lapack`` providers to the mix. After the usual regeneration of module files:
+
+.. code-block:: console
+
+ $ module purge
+ $ spack module refresh --module-type lmod --delete-tree -y
+ ==> Regenerating lmod module files
+
+you will have something like:
+
+.. code-block:: console
+
+ $ module load gcc
+ $ module load openblas
+ $ module load openmpi
+ $ module avail
+
+ --------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/openblas/0.2.19-js33umc/openmpi/2.0.1-s3qbtby/gcc/6.2.0 ----------------------------------------------
+ netlib-scalapack/2.0.2
+
+ -------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/openblas/0.2.19-js33umc/gcc/6.2.0 ---------------------------------------------------------
+ py-numpy/1.11.1 py-scipy/0.18.1
+
+ -------------------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/gcc/6.2.0 ---------------------------------------------------------------------
+ binutils/2.27 curl/7.50.3 hwloc/1.11.4 libtool/2.4.6 lzo/2.09 netlib-lapack/3.6.1 openssl/1.0.2j python/2.7.12 zlib/1.2.8
+ bison/3.0.4 expat/2.2.0 libarchive/3.2.1 libxml2/2.9.4 m4/1.4.17 nettle/3.2 pkg-config/0.29.1 sqlite/3.8.5
+ bzip2/1.0.6 flex/2.6.0 libpciaccess/0.13.4 lz4/131 mpich/3.2 openblas/0.2.19 (L) py-nose/1.3.7 util-macros/1.19.0
+ cmake/3.6.1 gmp/6.1.1 libsigsegv/2.10 lzma/4.32.7 ncurses/6.0 openmpi/2.0.1 (L) py-setuptools/25.2.0 xz/5.2.2
+
+ ----------------------------------------------------------------------- /home/mculpo/wdir/spack/share/spack/lmod/linux-Ubuntu14-x86_64/Core -----------------------------------------------------------------------
+ gcc/6.2.0 (L)
+
+Now both the ``MPI`` and the ``LAPACK`` providers are handled by LMod as hierarchies:
+
+.. code-block:: console
+
+ $ module load py-numpy netlib-scalapack
+ $ module load mpich
+
+ Lmod is automatically replacing "openmpi/2.0.1" with "mpich/3.2"
+
+
+ Due to MODULEPATH changes the following have been reloaded:
+ 1) netlib-scalapack/2.0.2
+
+ $ module load netlib-lapack
+
+ Lmod is automatically replacing "openblas/0.2.19" with "netlib-lapack/3.6.1"
+
+
+ Inactive Modules:
+ 1) py-numpy
+
+ Due to MODULEPATH changes the following have been reloaded:
+ 1) netlib-scalapack/2.0.2
+
+making the use of tags to differentiate them unnecessary.
+Note that because we only compiled ``py-numpy`` with ``openblas`` the module
+is made inactive when we switch the ``LAPACK`` provider. The user
+environment will now be consistent by design!
diff --git a/lib/spack/docs/package_tutorial.rst b/lib/spack/docs/package_tutorial.rst
new file mode 100644
index 0000000000..e955780345
--- /dev/null
+++ b/lib/spack/docs/package_tutorial.rst
@@ -0,0 +1,463 @@
+.. _package_tutorial:
+
+=========================
+Package Creation Tutorial
+=========================
+
+This tutorial will walk you through the steps behind building a simple
+package installation script. We'll focus building an mpileaks package,
+which is a MPI debugging tool. By creating a package file we're
+essentially giving Spack a recipe for how to build a particular piece of
+software. We're describing some of the software's dependencies, where to
+find the package, what commands and options are used to build the package
+from source, and more. Once we've specified a package's recipe, we can
+ask Spack to build that package in many different ways.
+
+This tutorial assumes you have a basic familiarity with some of the Spack
+commands, and that you have a working version of Spack installed. If
+not, we suggest looking at Spack's *Getting Started* guide. This
+tutorial also assumes you have at least a beginner's-level familiarity
+with Python.
+
+Also note that this document is a tutorial. It can help you get started
+with packaging, but is not intended to be complete. See Spack's
+:ref:`packaging-guide` for more complete documentation on this topic.
+
+---------------
+Getting Started
+---------------
+
+A few things before we get started:
+
+- We'll refer to the Spack installation location via the environment
+ variable ``SPACK_ROOT``. You should point ``SPACK_ROOT`` at wherever
+ you have Spack installed.
+- Add ``$SPACK_ROOT/bin`` to your ``PATH`` before you start.
+- Make sure your ``EDITOR`` environment variable is set to some text
+ editor you like.
+- We'll be writting Python code as part of this tutorial. You can find
+ successive versions of the Python code in
+ ``$SPACK_ROOT/lib/spack/docs/packaging_tutorial``.
+
+-------------------------
+Creating the Package File
+-------------------------
+
+Spack comes with a handy command to create a new package: ``spack create``
+
+This command is given the location of a package's source code, downloads
+the code, and sets up some basic packaging infrastructure for you. The
+mpileaks source code can be found on github, and here's what happens when
+we run ``spack create`` on it:
+
+.. code-block:: console
+
+ % spack create -f https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz
+ ==> This looks like a URL for mpileaks version 1.0
+ ==> Creating template for package mpileaks
+ ==> Downloading...
+ ==> Fetching https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz
+ ###################################################################################### 100.0%
+
+And Spack should spawn a text editor with this file:
+
+.. literalinclude:: packaging_tutorial/0.package.py
+ :start-after: # flake8: noqa
+ :language: python
+
+Spack has created this file in
+``$SPACK_ROOT/var/spack/repos/builtin/packages/mpileaks/package.py``. Take a
+moment to look over the file. There's a few placeholders that Spack has
+created, which we'll fill in as part of this tutorial:
+
+- We'll document some information about this package in the comments.
+- We'll fill in the dependency list for this package.
+- We'll fill in some of the configuration arguments needed to build this
+ package.
+
+For the moment, exit your editor and let's see what happens when we try
+to build this package:
+
+.. code-block:: console
+
+ % spack install mpileaks
+ ==> Installing mpileaks
+ ==> Using cached archive: /usr/workspace/wsa/legendre/spack/var/spack/cache/mpileaks/mpileaks-1.0.tar.gz
+ ==> Staging archive: /usr/workspace/wsa/legendre/spack/var/spack/stage/mpileaks-1.0-hufwhwpq5benv3sslie6ryflk5s6nm35/mpileaks-1.0.tar.gz
+ ==> Created stage in /usr/workspace/wsa/legendre/spack/var/spack/stage/mpileaks-1.0-hufwhwpq5benv3sslie6ryflk5s6nm35
+ ==> Ran patch() for mpileaks
+ ==> Building mpileaks [AutotoolsPackage]
+ ==> Executing phase : 'autoreconf'
+ ==> Executing phase : 'configure'
+ ==> Error: ProcessError: Command exited with status 1:
+ './configure' '--prefix=/usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/mpileaks-1.0-hufwhwpq5benv3sslie6ryflk5s6nm35'
+ /usr/workspace/wsa/legendre/spack/lib/spack/spack/build_systems/autotools.py:150, in configure:
+ 145 def configure(self, spec, prefix):
+ 146 """Runs configure with the arguments specified in `configure_args`
+ 147 and an appropriately set prefix
+ 148 """
+ 149 options = ['--prefix={0}'.format(prefix)] + self.configure_args()
+ >> 150 inspect.getmodule(self).configure(*options)
+
+ See build log for details:
+ /tmp/legendre/spack-stage/spack-stage-8HVzqu/mpileaks-1.0/spack-build.out
+
+This obviously didn't work; we need to fill in the package-specific
+information. Specifically, Spack didn't try to build any of mpileaks'
+dependencies, nor did it use the proper configure arguments. Let's start
+fixing things
+
+---------------------
+Package Documentation
+---------------------
+
+We can bring the ``package.py`` file back into our ``EDITOR`` with the
+``spack edit`` command:
+
+.. code-block:: console
+
+ % spack edit mpileaks
+
+Let's remove some of the ``TODO`` comments, and add links to the mpileaks
+homepage and document what mpileaks does. I'm also going to cut out the
+Copyright clause at this point to keep this tutorial document shorter,
+but you shouldn't do that normally. The results of these changes can be
+found in ``$SPACK_ROOT/lib/spack/docs/packaging_tutorial/1.package.py``
+and are below. Make these changes to your ``package.py``:
+
+.. literalinclude:: packaging_tutorial/1.package.py
+ :start-after: # flake8: noqa
+ :language: python
+
+We've filled in the comment that describes what this package does and
+added a link to the web site. That won't help us build yet, but it will
+allow Spack to provide some documentation on this package to other users:
+
+.. code-block:: console
+
+ % spack info mpileaks
+ AutotoolsPackage: mpileaks
+ Homepage: https://github.com/hpc/mpileaks
+
+ Safe versions:
+ 1.0 https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz
+
+ Variants:
+ None
+
+ Installation Phases:
+ autoreconf configure build install
+
+ Build Dependencies:
+ None
+
+ Link Dependencies:
+ None
+
+ Run Dependencies:
+ None
+
+ Virtual Packages:
+ None
+
+ Description:
+ Tool to detect and report MPI objects like MPI_Requests and
+ MPI_Datatypes
+
+As we fill in more information about this package the spack info command
+will become more informative. Now let's start making this package build.
+
+------------
+Dependencies
+------------
+
+The mpileaks packages depends on three other package: ``MPI``,
+``adept-utils``, and ``callpath``. Let's add those via the
+``depends_on`` command in our ``package.py`` (this version is in
+``$SPACK_ROOT/lib/spack/docs/packaging_tutorial/2.package.py``):
+
+.. literalinclude:: packaging_tutorial/2.package.py
+ :start-after: # flake8: noqa
+ :language: python
+
+Now when we go to build mpileaks, Spack will fetch and build these
+dependencies before building mpileaks. Note that the mpi dependency is a
+different kind of beast than the adept-utils and callpath dependencies;
+there is no mpi package available in Spack. Instead mpi is a virtual
+dependency. Spack may satisfy that dependency by installing packages
+such as ``openmpi`` or ``mvapich``. See the :ref:`packaging-guide` for more
+information on virtual dependencies.
+
+Now when we try to install this package a lot more happens:
+
+.. code-block:: console
+
+ % spack install mpileaks
+ ==> Installing mpileaks
+ ==> openmpi is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz
+ ==> callpath is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/callpath-1.0.2-zm4pf3gasgxeibyu2y262suktvaazube
+ ==> adept-utils is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/adept-utils-1.0.1-7p7ezxwtajdglj6cmojy2vybjct4j4jz
+ ==> Using cached archive: /usr/workspace/wsa/legendre/spack/var/spack/cache/mpileaks/mpileaks-1.0.tar.gz
+ ==> Already staged mpileaks-1.0-eum4hmnlt6ovalwjnciaygfb3beja4gk in /usr/workspace/wsa/legendre/spack/var/spack/stage/mpileaks-1.0-eum4hmnlt6ovalwjnciaygfb3beja4gk
+ ==> Already patched mpileaks
+ ==> Building mpileaks [AutotoolsPackage]
+ ==> Executing phase : 'autoreconf'
+ ==> Executing phase : 'configure'
+ ==> Error: ProcessError: Command exited with status 1:
+ './configure' '--prefix=/usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/mpileaks-1.0-eum4hmnlt6ovalwjnciaygfb3beja4gk'
+ /usr/workspace/wsa/legendre/spack/lib/spack/spack/build_systems/autotools.py:150, in configure:
+ 145 def configure(self, spec, prefix):
+ 146 """Runs configure with the arguments specified in `configure_args`
+ 147 and an appropriately set prefix
+ 148 """
+ 149 options = ['--prefix={0}'.format(prefix)] + self.configure_args()
+ >> 150 inspect.getmodule(self).configure(*options)
+
+ See build log for details:
+ /tmp/legendre/spack-stage/spack-stage-7V5yyk/mpileaks-1.0/spack-build.out
+
+Note that this command may take a while to run and produce more output if
+you don't have an MPI already installed or configured in Spack.
+
+Now Spack has identified and made sure all of our dependencies have been
+built. It found the ``openmpi`` package that will satisfy our ``mpi``
+dependency, and the callpath and ``adept-utils`` package to satisfy our
+concrete dependencies.
+
+------------------------
+Debugging Package Builds
+------------------------
+
+Our ``mpileaks`` package is still not building. It may be obvious to
+many of you that we're still missing the configure options. But let's
+pretend we're not all intelligent developers and use this opportunity
+spend some time debugging. We a few options that can tell us about
+what's going wrong:
+
+As per the error message, Spack has given us a ``spack-build.out`` debug log:
+
+.. code-block:: console
+
+ ==> './configure' '--prefix=/usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/mpileaks-1.0-eum4hmnlt6ovalwjnciaygfb3beja4gk'
+ checking metadata... no
+ checking installation directory variables... yes
+ checking for a BSD-compatible install... /usr/bin/install -c
+ checking whether build environment is sane... yes
+ checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
+ checking for gawk... gawk
+ checking whether make sets $(MAKE)... yes
+ checking for gcc... /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc
+ checking for C compiler default output file name... a.out
+ checking whether the C compiler works... yes
+ checking whether we are cross compiling... no
+ checking for suffix of executables...
+ checking for suffix of object files... o
+ checking whether we are using the GNU C compiler... yes
+ checking whether /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc accepts -g... yes
+ checking for /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc option to accept ISO C89... none needed
+ checking for style of include used by make... GNU
+ checking dependency style of /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc... gcc3
+ checking whether /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc and cc understand -c and -o together... yes
+ checking whether we are using the GNU C++ compiler... yes
+ checking whether /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/g++ accepts -g... yes
+ checking dependency style of /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/g++... gcc3
+ checking for /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz/bin/mpicc... /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz/bin/mpicc
+ Checking whether /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz/bin/mpicc responds to '-showme:compile'... yes
+ configure: error: unable to locate ``adept-utils`` installation
+
+This gives us the output from the build, and it's fairly obvious that
+mpileaks isn't finding it's ``adept-utils`` package. Spack has
+automatically added the include and library directories of
+``adept-utils`` to the compiler's search path, but some packages like
+mpileaks can sometimes be picky and still want things spelled out on
+their command line. But let's continue to pretend we're not brilliant
+developers, and explore some other debugging paths:
+
+We can also enter the build area and try to manually run the build:
+
+.. code-block:: console
+
+ % spack env mpileaks tcsh
+ % spack cd mpileaks
+
+The ``spack env`` command spawned a new shell that contains the same
+environment that Spack used to build the mpileaks package (you can
+substitute tcsh for your favorite shell). The ``spack cd`` command
+changed our working dirctory to the last attempted build for mpileaks.
+From here we can manually re-run the build:
+
+.. code-block:: console
+
+ % ./configure
+ checking metadata... no
+ checking installation directory variables... yes
+ checking for a BSD-compatible install... /usr/bin/install -c
+ checking whether build environment is sane... yes
+ checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
+ checking for gawk... gawk
+ checking whether make sets $(MAKE)... yes
+ checking for gcc... /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc
+ checking for C compiler default output file name... a.out
+ checking whether the C compiler works... yes
+ checking whether we are cross compiling... no
+ checking for suffix of executables...
+ checking for suffix of object files... o
+ checking whether we are using the GNU C compiler... yes
+ checking whether /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc accepts -g... yes
+ checking for /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc option to accept ISO C89... none needed
+ checking for style of include used by make... GNU
+ checking dependency style of /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc... gcc3
+ checking whether /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/gcc and cc understand -c and -o together... yes
+ checking whether we are using the GNU C++ compiler... yes
+ checking whether /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/g++ accepts -g... yes
+ checking dependency style of /usr/workspace/wsa/legendre/spack/lib/spack/env/gcc/g++... gcc3
+ checking for /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz/bin/mpicc... /usr/workspace/wsa /legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz/bin/mpicc
+ Checking whether /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz/bin/mpicc responds to '-showme:compile'... yes
+ configure: error: unable to locate adept-utils installation
+
+We're seeing the same error, but now we're in a shell where we can run
+the command ourselves and debug as needed. We could, for example, run
+``./configure --help`` to see what options we can use to specify
+dependencies.
+
+We can use the ``exit`` command to leave the shell spawned by ``spack
+env``.
+
+------------------------------
+Specifying Configure Arguments
+------------------------------
+
+Let's add the configure arguments to the mpileaks' ``package.py``. This
+version can be found in
+``$SPACK_ROOT/lib/spack/docs/packaging_tutorial/3.package.py``:
+
+.. literalinclude:: packaging_tutorial/3.package.py
+ :start-after: # flake8: noqa
+ :language: python
+
+This is all we need for working mpileaks! If we install now we'll see:
+
+.. code-block:: console
+
+ % spack install mpileaks
+ spack install mpileaks
+ ==> Installing mpileaks
+ ==> openmpi is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz
+ ==> callpath is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/callpath-1.0.2-zm4pf3gasgxeibyu2y262suktvaazube
+ ==> adept-utils is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/adept-utils-1.0.1-7p7ezxwtajdglj6cmojy2vybjct4j4jz
+ ==> Using cached archive: /usr/workspace/wsa/legendre/spack/var/spack/cache/mpileaks/mpileaks-1.0.tar.gz
+ ==> Already staged mpileaks-1.0-eum4hmnlt6ovalwjnciaygfb3beja4gk in /usr/workspace/wsa/legendre/spack/var/spack/stage/mpileaks-1.0-eum4hmnlt6ovalwjnciaygfb3beja4gk
+ ==> Already patched mpileaks
+ ==> Building mpileaks [AutotoolsPackage]
+ ==> Executing phase : 'autoreconf'
+ ==> Executing phase : 'configure'
+ ==> Executing phase : 'build'
+ ==> Executing phase : 'install'
+ ==> Successfully installed mpileaks
+ Fetch: 0.00s. Build: 14.08s. Total: 14.08s.
+ [+] /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/mpileaks-1.0-eum4hmnlt6ovalwjnciaygfb3beja4gk
+
+We took a few shortcuts for this package that are worth highlighting.
+Spack automatically detected that mpileaks was an autotools-based package
+when we ran spack create. If this had been a CMake-based package we
+would have been filling in a ``cmake_args`` function instead of
+``configure_args``. If spack hadn't been able to detect the build
+system, we'd be filling in a generic install method that would manually
+be calling build commands, such as is found in the ``zlib`` package:
+
+.. code-block:: python
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+ make()
+ make('install')
+
+--------
+Variants
+--------
+
+We have a successful mpileaks build, but let's take some time to improve
+it. ``mpileaks`` has a build-time option to truncate parts of the stack
+that it walks. Let's add a variant to allow users to set this when they
+build in Spack.
+
+To do this, we'll add a variant to our package, as per the following (see
+``$SPACK_ROOT/lib/spack/docs/packaging_tutorial/4.package.py``):
+
+.. literalinclude:: packaging_tutorial/4.package.py
+ :start-after: # flake8: noqa
+ :language: python
+
+We've added the variant ``stackstart``, and given it a default value of
+``0``. If we install now we can see the stackstart variant added to the
+configure line (output truncated for length):
+
+.. code-block:: console
+
+ % spack install --verbose mpileaks stackstart=4
+ ==> Installing mpileaks
+ ==> openmpi is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/openmpi-2.0.1-5ee5j34c2y4kb5c3joygrgahidqnwhnz
+ ==> callpath is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/callpath-1.0.2-zm4pf3gasgxeibyu2y262suktvaazube
+ ==> adept-utils is already installed in /usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/adept-utils-1.0.1-7p7ezxwtajdglj6cmojy2vybjct4j4jz
+ ==> Using cached archive: /usr/workspace/wsa/legendre/spack/var/spack/cache/mpileaks/mpileaks-1.0.tar.gz
+ ==> Staging archive: /usr/workspace/wsa/legendre/spack/var/spack/stage/mpileaks-1.0-otqo2opkhan5ksujt6tpmdftydrieig7/mpileaks-1.0.tar.gz
+ ==> Created stage in /usr/workspace/wsa/legendre/spack/var/spack/stage/mpileaks-1.0-otqo2opkhan5ksujt6tpmdftydrieig7
+ ==> Ran patch() for mpileaks
+ ==> Building mpileaks [AutotoolsPackage]
+ ==> Executing phase : 'autoreconf'
+ ==> Executing phase : 'configure'
+ ==> './configure' '--prefix=/usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/mpileaks-1.0-otqo2opkhan5ksujt6tpmdftydrieig7' '--with-adept-utils=/usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/adept-utils-1.0.1-7p7ezxwtajdglj6cmojy2vybjct4j4jz' '--with-callpath=/usr/workspace/wsa/legendre/spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/callpath-1.0.2-zm4pf3gasgxeibyu2y262suktvaazube' '--with-stack-start-c=4' '--with-stack-start-fortran=4'
+
+---------------
+The Spec Object
+---------------
+
+This tutorial has glossed over a few important features, which weren't
+too relevant for mpleaks but may be useful for other packages. There
+were several places we references the ``self.spec`` object. This is a
+powerful class for querying information about what we're building. For
+example, you could use the spec to query information about how a
+package's dependencies were built, or what compiler was being used, or
+what version of a package is being installed. Full documentation can be
+found in the :ref:`packaging-guide`, but here's some quick snippets with
+common queries:
+
+- Am I building ``mpileaks`` version ``1.1`` or greater?
+
+.. code-block:: python
+
+ if self.spec.satisfies('@1.1:'):
+ # Do things needed for 1.1+
+
+- Is ``openmpi`` the MPI I'm building with?
+
+.. code-block:: python
+
+ if self.spec['mpi'].name == 'openmpi':
+ # Do openmpi things
+
+- Am I building with ``gcc`` version less than ``5.0.0``:
+
+.. code-block:: python
+
+ if self.spec.satisfies('%gcc@:5.0.0'):
+ # Add arguments specific to gcc's earlier than 5.0.0
+
+- Am I built with the ``debug`` variant:
+
+.. code-block:: python
+
+ if self.spec.satisfies('+debug'):
+ # Add -g option to configure flags
+
+- Is my ``dyninst`` dependency greater than version ``8.0``?
+
+.. code-block:: python
+
+ if self.spec['dyninst'].satisfies('@8.0:'):
+ # Use newest dyninst options
+
+More examples can be found in the thousands of packages already added to
+Spack in ``$SPACK_ROOT/var/spack/repos/builtin/packages``.
+
+Good Luck!
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index a082b85efa..a22fcd71ba 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -1,7 +1,8 @@
.. _packaging-guide:
+===============
Packaging Guide
-=====================
+===============
This guide is intended for developers or administrators who want to
package software so that Spack can install it. It assumes that you
@@ -11,9 +12,9 @@ have at least some familiarity with Python, and that you've read the
There are two key parts of Spack:
- #. **Specs**: expressions for describing builds of software, and
- #. **Packages**: Python modules that describe how to build
- software according to a spec.
+#. **Specs**: expressions for describing builds of software, and
+#. **Packages**: Python modules that describe how to build
+ software according to a spec.
Specs allow a user to describe a *particular* build in a way that a
package author can understand. Packages allow a the packager to
@@ -28,13 +29,15 @@ ubiquitous in the scientific software community. Second, it's a modern
language and has many powerful features to help make package writing
easy.
+---------------------------
Creating & editing packages
-----------------------------------
+---------------------------
-.. _spack-create:
+.. _cmd-spack-create:
+^^^^^^^^^^^^^^^^
``spack create``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^
The ``spack create`` command creates a directory with the package name and
generates a ``package.py`` file with a boilerplate package template from a URL.
@@ -44,7 +47,7 @@ working.
Here's an example:
-.. code-block:: sh
+.. code-block:: console
$ spack create http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
@@ -59,7 +62,7 @@ strings look like for this package. Using this information, it will try to find
versions, Spack prompts you to tell it how many versions you want to download
and checksum:
-.. code-block:: sh
+.. code-block:: console
$ spack create http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
==> This looks like a URL for cmake version 2.8.12.1.
@@ -78,30 +81,32 @@ Spack will automatically download the number of tarballs you specify
You do not *have* to download all of the versions up front. You can
always choose to download just one tarball initially, and run
-:ref:`spack checksum <spack-checksum>` later if you need more.
+:ref:`cmd-spack-checksum` later if you need more.
.. note::
If ``spack create`` fails to detect the package name correctly,
- you can try supplying it yourself, e.g.::
+ you can try supplying it yourself, e.g.:
+
+ .. code-block:: console
$ spack create --name cmake http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
If it fails entirely, you can get minimal boilerplate by using
- :ref:`spack-edit-f`, or you can manually create a directory and
+ :ref:`spack edit --force <spack-edit-f>`, or you can manually create a directory and
``package.py`` file for the package in ``var/spack/repos/builtin/packages``.
.. note::
Spack can fetch packages from source code repositories, but,
``spack create`` will *not* currently create a boilerplate package
- from a repository URL. You will need to use :ref:`spack-edit-f`
+ from a repository URL. You will need to use :ref:`spack edit --force <spack-edit-f>`
and manually edit the ``version()`` directives to fetch from a
repo. See :ref:`vcs-fetch` for details.
Let's say you download 3 tarballs:
-.. code-block:: sh
+.. code-block:: none
Include how many checksums in the package file? (default is 5, q to abort) 3
==> Downloading...
@@ -118,27 +123,28 @@ file in your favorite ``$EDITOR``:
.. code-block:: python
:linenos:
- # FIXME:
- # This is a template package file for Spack. We've conveniently
- # put "FIXME" labels next to all the things you'll want to change.
#
- # Once you've edited all the FIXME's, delete this whole message,
- # save this file, and test out your package like this:
+ # This is a template package file for Spack. We've put "FIXME"
+ # next to all the things you'll want to change. Once you've handled
+ # them, you can save this file and test your package like this:
#
# spack install cmake
#
- # You can always get back here to change things with:
+ # You can edit this file again by typing:
#
# spack edit cmake
#
- # See the spack documentation for more information on building
- # packages.
+ # See the Spack documentation for more information on packaging.
+ # If you submit this package back to Spack as a pull request,
+ # please first remove this boilerplate and all FIXME comments.
#
from spack import *
+
class Cmake(Package):
- """FIXME: put a proper description of your package here."""
- # FIXME: add a proper url for your package's homepage here.
+ """FIXME: Put a proper description of your package here."""
+
+ # FIXME: Add a proper url for your package's homepage here.
homepage = "http://www.example.com"
url = "http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz"
@@ -162,79 +168,81 @@ done for you.
In the generated package, the download ``url`` attribute is already
set. All the things you still need to change are marked with
-``FIXME`` labels. The first ``FIXME`` refers to the commented
-instructions at the top of the file. You can delete these
-instructions after reading them. The rest of them are as follows:
+``FIXME`` labels. You can delete the commented instructions between
+the license and the first import statement after reading them.
+The rest of the tasks you need to do are as follows:
- #. Add a description.
+#. Add a description.
- Immediately inside the package class is a *docstring* in
- triple-quotes (``"""``). It's used to generate the description
- shown when users run ``spack info``.
+ Immediately inside the package class is a *docstring* in
+ triple-quotes (``"""``). It's used to generate the description
+ shown when users run ``spack info``.
- #. Change the ``homepage`` to a useful URL.
+#. Change the ``homepage`` to a useful URL.
- The ``homepage`` is displayed when users run ``spack info`` so
- that they can learn about packages.
+ The ``homepage`` is displayed when users run ``spack info`` so
+ that they can learn about packages.
- #. Add ``depends_on()`` calls for the package's dependencies.
+#. Add ``depends_on()`` calls for the package's dependencies.
- ``depends_on`` tells Spack that other packages need to be built
- and installed before this one. See `dependencies_`.
+ ``depends_on`` tells Spack that other packages need to be built
+ and installed before this one. See :ref:`dependencies`.
- #. Get the ``install()`` method working.
+#. Get the ``install()`` method working.
- The ``install()`` method implements the logic to build a
- package. The code should look familiar; it is designed to look
- like a shell script. Specifics will differ depending on the package,
- and :ref:`implementing the install method <install-method>` is
- covered in detail later.
+ The ``install()`` method implements the logic to build a
+ package. The code should look familiar; it is designed to look
+ like a shell script. Specifics will differ depending on the package,
+ and :ref:`implementing the install method <install-method>` is
+ covered in detail later.
Before going into details, we'll cover a few more basics.
-.. _spack-edit:
+.. _cmd-spack-edit:
+^^^^^^^^^^^^^^
``spack edit``
-~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
One of the easiest ways to learn to write packages is to look at
existing ones. You can edit a package file by name with the ``spack
edit`` command:
-.. code-block:: sh
+.. code-block:: console
- spack edit cmake
+ $ spack edit cmake
So, if you used ``spack create`` to create a package, then saved and
closed the resulting file, you can get back to it with ``spack edit``.
The ``cmake`` package actually lives in
-``$SPACK_ROOT/var/spack/repos/builtin/packages/cmake/package.py``, but this provides
-a much simpler shortcut and saves you the trouble of typing the full
-path.
+``$SPACK_ROOT/var/spack/repos/builtin/packages/cmake/package.py``,
+but this provides a much simpler shortcut and saves you the trouble
+of typing the full path.
If you try to edit a package that doesn't exist, Spack will recommend
-using ``spack create`` or ``spack edit -f``:
+using ``spack create`` or ``spack edit --force``:
-.. code-block:: sh
+.. code-block:: console
$ spack edit foo
==> Error: No package 'foo'. Use spack create, or supply -f/--force to edit a new file.
.. _spack-edit-f:
-``spack edit -f``
-~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^
+``spack edit --force``
+^^^^^^^^^^^^^^^^^^^^^^
-``spack edit -f`` can be used to create a new, minimal boilerplate
+``spack edit --force`` can be used to create a new, minimal boilerplate
package:
-.. code-block:: sh
+.. code-block:: console
- $ spack edit -f foo
+ $ spack edit --force foo
Unlike ``spack create``, which infers names and versions, and which
actually downloads the tarball and checksums it for you, ``spack edit
--f`` has no such fanciness. It will substitute dummy values for you
+--force`` has no such fanciness. It will substitute dummy values for you
to fill in yourself:
.. code-block:: python
@@ -251,31 +259,25 @@ to fill in yourself:
version('1.0', '0123456789abcdef0123456789abcdef')
def install(self, spec, prefix):
- configure("--prefix=" + prefix)
+ configure("--prefix=%s" % prefix)
make()
make("install")
This is useful when ``spack create`` cannot figure out the name and
version of your package from the archive URL.
-
+----------------------------
Naming & directory structure
---------------------------------------
-
-.. note::
-
- Spack's default naming and directory structure will change in
- version 0.9. Specifically, 0.9 will stop using directory names
- with special characters like ``@``, to avoid interfering with
- certain packages that do not handle this well.
+----------------------------
This section describes how packages need to be named, and where they
-live in Spack's directory structure. In general, `spack-create`_ and
-`spack-edit`_ handle creating package files for you, so you can skip
+live in Spack's directory structure. In general, :ref:`cmd-spack-create` and
+:ref:`cmd-spack-edit` handle creating package files for you, so you can skip
most of the details here.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``var/spack/repos/builtin/packages``
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A Spack installation directory is structured like a standard UNIX
install prefix (``bin``, ``lib``, ``include``, ``var``, ``opt``,
@@ -285,28 +287,30 @@ Packages themselves live in ``$SPACK_ROOT/var/spack/repos/builtin/packages``.
If you ``cd`` to that directory, you will see directories for each
package:
-.. command-output:: cd $SPACK_ROOT/var/spack/repos/builtin/packages; ls -CF
+.. command-output:: cd $SPACK_ROOT/var/spack/repos/builtin/packages && ls
:shell:
:ellipsis: 10
Each directory contains a file called ``package.py``, which is where
all the python code for the package goes. For example, the ``libelf``
-package lives in::
+package lives in:
+
+.. code-block:: none
$SPACK_ROOT/var/spack/repos/builtin/packages/libelf/package.py
Alongside the ``package.py`` file, a package may contain extra
directories or files (like patches) that it needs to build.
-
+^^^^^^^^^^^^^
Package Names
-~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^
Packages are named after the directory containing ``package.py``. It is
preferred, but not required, that the directory, and thus the package name, are
lower case. So, ``libelf``'s ``package.py`` lives in a directory called
``libelf``. The ``package.py`` file defines a class called ``Libelf``, which
-extends Spack's ``Package`` class. for example, here is
+extends Spack's ``Package`` class. For example, here is
``$SPACK_ROOT/var/spack/repos/builtin/packages/libelf/package.py``:
.. code-block:: python
@@ -328,7 +332,7 @@ The **directory name** (``libelf``) determines the package name that
users should provide on the command line. e.g., if you type any of
these:
-.. code-block:: sh
+.. code-block:: console
$ spack install libelf
$ spack install libelf@0.8.13
@@ -346,8 +350,9 @@ difficult to support these options. So, you can name a package
``3proxy`` or ``_foo`` and Spack won't care. It just needs to see
that name in the package spec.
+^^^^^^^^^^^^^^^^^^^
Package class names
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^
Spack loads ``package.py`` files dynamically, and it needs to find a
special class name in the file for the load to succeed. The **class
@@ -366,11 +371,138 @@ some examples:
================= =================
In general, you won't have to remember this naming convention because
-`spack-create`_ and `spack-edit`_ handle the details for you.
+:ref:`cmd-spack-create` and :ref:`cmd-spack-edit` handle the details for you.
+
+-----------------
+Trusted Downloads
+-----------------
+
+Spack verifies that the source code it downloads is not corrupted or
+compromised; or at least, that it is the same version the author of
+the Spack package saw when the package was created. If Spack uses a
+download method it can verify, we say the download method is
+*trusted*. Trust is important for *all downloads*: Spack
+has no control over the security of the various sites from which it
+downloads source code, and can never assume that any particular site
+hasn't been compromised.
+
+Trust is established in different ways for different download methods.
+For the most common download method --- a single-file tarball --- the
+tarball is checksummed. Git downloads using ``commit=`` are trusted
+implicitly, as long as a hash is specified.
+
+Spack also provides untrusted download methods: tarball URLs may be
+supplied without a checksum, or Git downloads may specify a branch or
+tag instead of a hash. If the user does not control or trust the
+source of an untrusted download, it is a security risk. Unless otherwise
+specified by the user for special cases, Spack should by default use
+*only* trusted download methods.
+
+Unfortunately, Spack does not currently provide that guarantee. It
+does provide the following mechanisms for safety:
+
+#. By default, Spack will only install a tarball package if it has a
+ checksum and that checksum matches. You can override this with
+ ``spack install --no-checksum``.
+
+#. Numeric versions are almost always tarball downloads, whereas
+ non-numeric versions not named ``develop`` frequently download
+ untrusted branches or tags from a version control system. As long
+ as a package has at least one numeric version, and no non-numeric
+ version named ``develop``, Spack will prefer it over any
+ non-numeric versions.
+
+^^^^^^^^^
+Checksums
+^^^^^^^^^
+
+For tarball downloads, Spack can currently support checksums using the
+MD5, SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 algorithms. It
+determines the algorithm to use based on the hash length.
+
+-----------------------
+Package Version Numbers
+-----------------------
+
+Most Spack versions are numeric, a tuple of integers; for example,
+``apex@0.1``, ``ferret@6.96`` or ``py-netcdf@1.2.3.1``. Spack knows
+how to compare and sort numeric versions.
+
+Some Spack versions involve slight extensions of numeric syntax; for
+example, ``py-sphinx-rtd-theme@0.1.10a0``. In this case, numbers are
+always considered to be "newer" than letters. This is for consistency
+with `RPM <https://bugzilla.redhat.com/show_bug.cgi?id=50977>`_.
+
+Spack versions may also be arbitrary non-numeric strings; any string
+here will suffice; for example, ``@develop``, ``@master``, ``@local``.
+The following rules determine the sort order of numeric
+vs. non-numeric versions:
+
+#. The non-numeric versions ``@develop`` is considered greatest (newest).
+
+#. Numeric versions are all less than ``@develop`` version, and are
+ sorted numerically.
+
+#. All other non-numeric versions are less than numeric versions, and
+ are sorted alphabetically.
+The logic behind this sort order is two-fold:
+#. Non-numeric versions are usually used for special cases while
+ developing or debugging a piece of software. Keeping most of them
+ less than numeric versions ensures that Spack choose numeric
+ versions by default whenever possible.
+
+#. The most-recent development version of a package will usually be
+ newer than any released numeric versions. This allows the
+ ``develop`` version to satisfy dependencies like ``depends_on(abc,
+ when="@x.y.z:")``
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Concretization Version Selection
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When concretizing, many versions might match a user-supplied spec.
+For example, the spec ``python`` matches all available versions of the
+package ``python``. Similarly, ``python@3:`` matches all versions of
+Python3. Given a set of versions that match a spec, Spack
+concretization uses the following priorities to decide which one to
+use:
+
+#. If the user provided a list of versions in ``packages.yaml``, the
+ first matching version in that list will be used.
+
+#. If one or more versions is specified as ``preferred=True``, in
+ either ``packages.yaml`` or ``package.py``, the largest matching
+ version will be used. ("Latest" is defined by the sort order
+ above).
+
+#. If no preferences in particular are specified in the package or in
+ ``packages.yaml``, then the largest matching non-develop version
+ will be used. By avoiding ``@develop``, this prevents users from
+ accidentally installing a ``@develop`` version.
+
+#. If all else fails and ``@develop`` is the only matching version, it
+ will be used.
+
+^^^^^^^^^^^^^
+Date Versions
+^^^^^^^^^^^^^
+
+If you wish to use dates as versions, it is best to use the format
+``@date-yyyy-mm-dd``. This will ensure they sort in the correct
+order. If you want your date versions to be numeric (assuming they
+don't conflict with other numeric versions), you can use just
+``yyyy.mm.dd``.
+
+Alternately, you might use a hybrid release-version / date scheme.
+For example, ``@1.3.2016.08.31`` would mean the version from the
+``1.3`` branch, as of August 31, 2016.
+
+
+-------------------
Adding new versions
-------------------------
+-------------------
The most straightforward way to add new versions to your package is to
add a line like this in the package class:
@@ -385,45 +517,73 @@ add a line like this in the package class:
Versions should be listed with the newest version first.
+^^^^^^^^^^^^
Version URLs
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^
By default, each version's URL is extrapolated from the ``url`` field
in the package. For example, Spack is smart enough to download
version ``8.2.1.`` of the ``Foo`` package above from
``http://example.com/foo-8.2.1.tar.gz``.
-If spack *cannot* extrapolate the URL from the ``url`` field by
-default, you can write your own URL generation algorithm in place of
-the ``url`` declaration. For example:
+If the URL is particularly complicated or changes based on the release,
+you can override the default URL generation algorithm by defining your
+own ``url_for_version()`` function. For example, the developers of HDF5
+keep changing the archive layout, so the ``url_for_version()`` function
+looks like:
+
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/hdf5/package.py
+ :pyobject: Hdf5.url_for_version
+
+With the use of this ``url_for_version()``, Spack knows to download HDF5 ``1.8.16``
+from ``http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.16/src/hdf5-1.8.16.tar.gz``
+but download HDF5 ``1.10.0`` from ``http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0/src/hdf5-1.10.0.tar.gz``.
+
+You'll notice that HDF5's ``url_for_version()`` function makes use of a special
+``Version`` function called ``up_to()``. When you call ``version.up_to(2)`` on a
+version like ``1.10.0``, it returns ``1.10``. ``version.up_to(1)`` would return
+``1``. This can be very useful for packages that place all ``X.Y.*`` versions in
+a single directory and then places all ``X.Y.Z`` versions in a subdirectory.
+
+There are a few ``Version`` properties you should be aware of. We generally
+prefer numeric versions to be separated by dots for uniformity, but not all
+tarballs are named that way. For example, ``icu4c`` separates its major and minor
+versions with underscores, like ``icu4c-57_1-src.tgz``. The value ``57_1`` can be
+obtained with the use of the ``version.underscored`` property. Note that Python
+properties don't need parentheses. There are other separator properties as well:
+
+=================== ======
+Property Result
+=================== ======
+version.dotted 1.2.3
+version.dashed 1-2-3
+version.underscored 1_2_3
+version.joined 123
+=================== ======
-.. code-block:: python
- :linenos:
+.. note::
- class Foo(Package):
- def url_for_version(self, version):
- return 'http://example.com/version_%s/foo-%s.tar.gz' \
- % (version, version)
- version('8.2.1', '4136d7b4c04df68b686570afa26988ac')
- ...
+ Python properties don't need parentheses. ``version.dashed`` is correct.
+ ``version.dashed()`` is incorrect.
-If a URL cannot be derived systematically, you can add an explicit URL
-for a particular version:
+If a URL cannot be derived systematically, or there is a special URL for one
+of its versions, you can add an explicit URL for a particular version:
.. code-block:: python
version('8.2.1', '4136d7b4c04df68b686570afa26988ac',
url='http://example.com/foo-8.2.1-special-version.tar.gz')
-For the URL above, you might have to add an explicit URL because the
-version can't simply be substituted in the original ``url`` to
-construct the new one for ``8.2.1``.
+This is common for Python packages that download from PyPi. Since newer
+download URLs often contain a unique hash for each version, there is no
+way to guess the URL systematically.
When you supply a custom URL for a version, Spack uses that URL
*verbatim* and does not perform extrapolation.
+^^^^^^^^^^^^^^^^^^^^^^^^
Skipping the expand step
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^
Spack normally expands archives automatically after downloading
them. If you want to skip this step (e.g., for self-extracting
@@ -433,7 +593,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
@@ -451,26 +611,15 @@ it executable, then runs it with some arguments.
installer = Executable(self.stage.archive_file)
installer('--prefix=%s' % prefix, 'arg1', 'arg2', 'etc.')
-Checksums
-~~~~~~~~~~~~~~~~~
-
-Spack uses a checksum to ensure that the downloaded package version is
-not corrupted or compromised. This is especially important when
-fetching from insecure sources, like unencrypted http. By default, a
-package will *not* be installed if it doesn't pass a checksum test
-(though you can override this with ``spack install --no-checksum``).
-
-Spack can currently support checksums using the MD5, SHA-1, SHA-224,
-SHA-256, SHA-384, and SHA-512 algorithms. It determines the algorithm
-to use based on the hash length.
+^^^^^^^^^^^^^
``spack md5``
-^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^
If you have one or more files to checksum, you can use the ``spack md5``
command to do it:
-.. code-block:: sh
+.. code-block:: console
$ spack md5 foo-8.2.1.tar.gz foo-8.2.2.tar.gz
==> 2 MD5 checksums:
@@ -480,7 +629,7 @@ command to do it:
``spack md5`` also accepts one or more URLs and automatically downloads
the files for you:
-.. code-block:: sh
+.. code-block:: console
$ spack md5 http://example.com/foo-8.2.1.tar.gz
==> Trying to fetch from http://example.com/foo-8.2.1.tar.gz
@@ -492,16 +641,17 @@ Doing this for lots of files, or whenever a new package version is
released, is tedious. See ``spack checksum`` below for an automated
version of this process.
-.. _spack-checksum:
+.. _cmd-spack-checksum:
+^^^^^^^^^^^^^^^^^^
``spack checksum``
-^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^
If you want to add new versions to a package you've already created,
this is automated with the ``spack checksum`` command. Here's an
example for ``libelf``:
-.. code-block:: sh
+.. code-block:: console
$ spack checksum libelf
==> Found 16 versions of libelf.
@@ -525,7 +675,7 @@ they're released). It fetches the tarballs you ask for and prints out
a list of ``version`` commands ready to copy/paste into your package
file:
-.. code-block:: sh
+.. code-block:: console
==> Checksummed new versions of libelf:
version('0.8.13', '4136d7b4c04df68b686570afa26988ac')
@@ -558,8 +708,9 @@ versions. See the documentation on `attribute_list_url`_ and
.. _vcs-fetch:
+------------------------------
Fetching from VCS repositories
---------------------------------------
+------------------------------
For some packages, source code is provided in a Version Control System
(VCS) repository rather than in a tarball. Spack can fetch packages
@@ -572,50 +723,19 @@ call to your package with parameters indicating the repository URL and
any branch, tag, or revision to fetch. See below for the parameters
you'll need for each VCS system.
-Repositories and versions
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The package author is responsible for coming up with a sensible name
-for each version to be fetched from a repository. For example, if
-you're fetching from a tag like ``v1.0``, you might call that ``1.0``.
-If you're fetching a nameless git commit or an older subversion
-revision, you might give the commit an intuitive name, like ``develop``
-for a development version, or ``some-fancy-new-feature`` if you want
-to be more specific.
-
-In general, it's recommended to fetch tags or particular
-commits/revisions, NOT branches or the repository mainline, as
-branches move forward over time and you aren't guaranteed to get the
-same thing every time you fetch a particular version. Life isn't
-always simple, though, so this is not strictly enforced.
-
-When fetching from from the branch corresponding to the development version
-(often called ``master``,``trunk`` or ``dev``), it is recommended to
-call this version ``develop``. Spack has special treatment for this version so
- that ``@develop`` will satisfy dependencies like
-``depends_on(abc, when="@x.y.z:")``. In other words, ``@develop`` is
-greater than any other version. The rationale is that certain features or
-options first appear in the development branch. Therefore if a package author
-wants to keep the package on the bleeding edge and provide support for new
-features, it is advised to use ``develop`` for such a version which will
-greatly simplify writing dependencies and version-related conditionals.
-
-In some future release, Spack may support extrapolating repository
-versions as it does for tarball URLs, but currently this is not
-supported.
-
.. _git-fetch:
+^^^
Git
-~~~~~~~~~~~~~~~~~~~~
+^^^
Git fetching is enabled with the following parameters to ``version``:
- * ``git``: URL of the git repository.
- * ``tag``: name of a tag to fetch.
- * ``branch``: name of a branch to fetch.
- * ``commit``: SHA hash (or prefix) of a commit to fetch.
- * ``submodules``: Also fetch submodules when checking out this repository.
+* ``git``: URL of the git repository.
+* ``tag``: name of a tag to fetch.
+* ``branch``: name of a branch to fetch.
+* ``commit``: SHA hash (or prefix) of a commit to fetch.
+* ``submodules``: Also fetch submodules when checking out this repository.
Only one of ``tag``, ``branch``, or ``commit`` can be used at a time.
@@ -628,8 +748,7 @@ Default branch
...
version('develop', git='https://github.com/example-project/example.git')
- This is not recommended, as the contents of the default branch
- change over time.
+ This download method is untrusted, and is not recommended.
Tags
To fetch from a particular tag, use the ``tag`` parameter along with
@@ -640,6 +759,8 @@ Tags
version('1.0.1', git='https://github.com/example-project/example.git',
tag='v1.0.1')
+ This download method is untrusted, and is not recommended.
+
Branches
To fetch a particular branch, use ``branch`` instead:
@@ -648,8 +769,7 @@ Branches
version('experimental', git='https://github.com/example-project/example.git',
branch='experimental')
- This is not recommended, as the contents of branches change over
- time.
+ This download method is untrusted, and is not recommended.
Commits
Finally, to fetch a particular commit, use ``commit``:
@@ -659,7 +779,7 @@ Commits
version('2014-10-08', git='https://github.com/example-project/example.git',
commit='9d38cd4e2c94c3cea97d0e2924814acc')
- This doesn't have to be a full hash; You can abbreviate it as you'd
+ This doesn't have to be a full hash; you can abbreviate it as you'd
expect with git:
.. code-block:: python
@@ -667,6 +787,9 @@ Commits
version('2014-10-08', git='https://github.com/example-project/example.git',
commit='9d38cd')
+ This download method *is trusted*. It is the recommended way to
+ securely download from a Git repository.
+
It may be useful to provide a saner version for commits like this,
e.g. you might use the date as the version, as done above. Or you
could just use the abbreviated commit hash. It's up to the package
@@ -683,24 +806,29 @@ Submodules
tag='v1.0.1', submdoules=True)
-Installing
-^^^^^^^^^^^^^^
-
-You can fetch and install any of the versions above as you'd expect,
-by using ``@<version>`` in a spec:
+.. _github-fetch:
-.. code-block:: sh
+""""""
+GitHub
+""""""
- spack install example@2014-10-08
+If a project is hosted on GitHub, *any* valid Git branch, tag or hash
+may be downloaded as a tarball. This is accomplished simply by
+constructing an appropriate URL. Spack can checksum any package
+downloaded this way, thereby producing a trusted download. For
+example, the following downloads a particular hash, and then applies a
+checksum.
-Git and other VCS versions will show up in the list of versions when
-a user runs ``spack info <package name>``.
+.. code-block:: python
+ version('1.9.5.1.1', 'd035e4bc704d136db79b43ab371b27d2',
+ url='https://www.github.com/jswhit/pyproj/tarball/0be612cc9f972e38b50a90c946a9b353e2ab140f')
.. _hg-fetch:
+^^^^^^^^^
Mercurial
-~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^
Fetching with mercurial works much like `git <git-fetch>`_, but you
use the ``hg`` parameter.
@@ -712,8 +840,7 @@ Default
version('develop', hg='https://jay.grs.rwth-aachen.de/hg/example')
- Note that this is not recommended; try to fetch a particular
- revision instead.
+ This download method is untrusted, and is not recommended.
Revisions
Add ``hg`` and ``revision`` parameters:
@@ -723,6 +850,8 @@ Revisions
version('1.0', hg='https://jay.grs.rwth-aachen.de/hg/example',
revision='v1.0')
+ This download method is untrusted, and is not recommended.
+
Unlike ``git``, which has special parameters for different types of
revisions, you can use ``revision`` for branches, tags, and commits
when you fetch with Mercurial.
@@ -732,8 +861,9 @@ example@<version>`` command-line syntax.
.. _svn-fetch:
+^^^^^^^^^^
Subversion
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^
To fetch with subversion, use the ``svn`` and ``revision`` parameters:
@@ -744,7 +874,7 @@ Fetching the head
version('develop', svn='https://outreach.scidac.gov/svn/libmonitor/trunk')
- This is not recommended, as the head will move forward over time.
+ This download method is untrusted, and is not recommended.
Fetching a revision
To fetch a particular revision, add a ``revision`` to the
@@ -755,9 +885,63 @@ Fetching a revision
version('develop', svn='https://outreach.scidac.gov/svn/libmonitor/trunk',
revision=128)
+ This download method is untrusted, and is not recommended.
+
Subversion branches are handled as part of the directory structure, so
you can check out a branch or tag by changing the ``url``.
+-----------------------------------------
+Standard repositories for python packages
+-----------------------------------------
+
+In addition to their developer websites, many python packages are hosted at the
+`Python Package Index (PyPi) <https://pypi.python.org/pypi>`_. Although links to
+these individual files are typically `generated using a hash
+<https://bitbucket.org/pypa/pypi/issues/438>`_ it is often possible to find a
+reliable link of the format
+
+.. code-block:: sh
+
+ https://pypi.python.org/packages/source/<first letter of package>/<package>/<package>-<version>.<extension>
+
+Packages hosted on GitHub and the like are often developer versions that do not
+contain all of the files (e.g. configuration scripts) necessary to support
+compilation. For this reason it is ideal to link to a repository such as PyPi
+if possible.
+
+More recently, sources are being indexed at `pypi.io <https://pypi.io>`_ as
+well. Links obtained from this site follow a similar pattern, namely
+
+.. code-block:: sh
+
+ https://pypi.io/packages/source/<first letter of package>/<package>/<package>-<version>.<extension>
+
+These links currently redirect back to `pypi.python.org
+<https://pypi.python.org>`_, but this `may change in the future
+<https://bitbucket.org/pypa/pypi/issues/438#comment-27243225>`_.
+
+-------------------------------------------------
+Expanding additional resources in the source tree
+-------------------------------------------------
+
+Some packages (most notably compilers) provide optional features if additional
+resources are expanded within their source tree before building. In Spack it is
+possible to describe such a need with the ``resource`` directive :
+
+ .. code-block:: python
+
+ resource(
+ name='cargo',
+ git='https://github.com/rust-lang/cargo.git',
+ tag='0.10.0',
+ destination='cargo'
+ )
+
+Based on the keywords present among the arguments the appropriate ``FetchStrategy``
+will be used for the resource. The keyword ``destination`` is relative to the source
+root of the package and should point to where the resource is to be expanded.
+
+------------------------------------------------------
Automatic caching of files fetched during installation
------------------------------------------------------
@@ -768,42 +952,48 @@ reinstalled on account of a change in the hashing scheme.
.. _license:
+-----------------
Licensed software
-------------------------------------------
+-----------------
In order to install licensed software, Spack needs to know a few more
details about a package. The following class attributes should be defined.
+^^^^^^^^^^^^^^^^^^^^
``license_required``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^
Boolean. If set to ``True``, this software requires a license. If set to
``False``, all of the following attributes will be ignored. Defaults to
``False``.
+^^^^^^^^^^^^^^^^^^^
``license_comment``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^
String. Contains the symbol used by the license manager to denote a comment.
Defaults to ``#``.
+^^^^^^^^^^^^^^^^^
``license_files``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^
List of strings. These are files that the software searches for when
looking for a license. All file paths must be relative to the installation
directory. More complex packages like Intel may require multiple
licenses for individual components. Defaults to the empty list.
+^^^^^^^^^^^^^^^^
``license_vars``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^
List of strings. Environment variables that can be set to tell the software
where to look for a license if it is not in the usual location. Defaults
to the empty list.
+^^^^^^^^^^^^^^^
``license_url``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^
String. A URL pointing to license setup instructions for the software.
Defaults to the empty string.
@@ -812,12 +1002,12 @@ For example, let's take a look at the package for the PGI compilers.
.. code-block:: python
- # Licensing
- license_required = True
- license_comment = '#'
- license_files = ['license.dat']
- license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE']
- license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf'
+ # Licensing
+ license_required = True
+ license_comment = '#'
+ license_files = ['license.dat']
+ license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE']
+ license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf'
As you can see, PGI requires a license. Its license manager, FlexNet, uses
the ``#`` symbol to denote a comment. It expects the license file to be
@@ -840,39 +1030,39 @@ this:
.. code-block:: sh
- # A license is required to use pgi.
- #
- # The recommended solution is to store your license key in this global
- # license file. After installation, the following symlink(s) will be
- # added to point to this file (relative to the installation prefix):
- #
- # license.dat
- #
- # Alternatively, use one of the following environment variable(s):
- #
- # PGROUPD_LICENSE_FILE
- # LM_LICENSE_FILE
- #
- # If you choose to store your license in a non-standard location, you may
- # set one of these variable(s) to the full pathname to the license file, or
- # port@host if you store your license keys on a dedicated license server.
- # You will likely want to set this variable in a module file so that it
- # gets loaded every time someone tries to use pgi.
- #
- # For further information on how to acquire a license, please refer to:
- #
- # http://www.pgroup.com/doc/pgiinstall.pdf
- #
- # You may enter your license below.
+ # A license is required to use pgi.
+ #
+ # The recommended solution is to store your license key in this global
+ # license file. After installation, the following symlink(s) will be
+ # added to point to this file (relative to the installation prefix):
+ #
+ # license.dat
+ #
+ # Alternatively, use one of the following environment variable(s):
+ #
+ # PGROUPD_LICENSE_FILE
+ # LM_LICENSE_FILE
+ #
+ # If you choose to store your license in a non-standard location, you may
+ # set one of these variable(s) to the full pathname to the license file, or
+ # port@host if you store your license keys on a dedicated license server.
+ # You will likely want to set this variable in a module file so that it
+ # gets loaded every time someone tries to use pgi.
+ #
+ # For further information on how to acquire a license, please refer to:
+ #
+ # http://www.pgroup.com/doc/pgiinstall.pdf
+ #
+ # You may enter your license below.
You can add your license directly to this file, or tell FlexNet to use a
license stored on a separate license server. Here is an example that
points to a license server called licman1:
-.. code-block:: sh
+.. code-block:: none
- SERVER licman1.mcs.anl.gov 00163eb7fba5 27200
- USE_SERVER
+ SERVER licman1.mcs.anl.gov 00163eb7fba5 27200
+ USE_SERVER
If your package requires the license to install, you can reference the
location of this global license using ``self.global_license_file``.
@@ -888,8 +1078,9 @@ documentation.
.. _patching:
+-------
Patches
-------------------------------------------
+-------
Depending on the host architecture, package version, known bugs, or
other issues, you may need to patch your software to get it to build
@@ -897,11 +1088,12 @@ correctly. Like many other package systems, spack allows you to store
patches alongside your package files and apply them to source code
after it's downloaded.
+^^^^^^^^^
``patch``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^
You can specify patches in your package file with the ``patch()``
-function. ``patch`` looks like this:
+directive. ``patch`` looks like this:
.. code-block:: python
@@ -913,7 +1105,9 @@ The first argument can be either a URL or a filename. It specifies a
patch file that should be applied to your source. If the patch you
supply is a filename, then the patch needs to live within the spack
source tree. For example, the patch above lives in a directory
-structure like this::
+structure like this:
+
+.. code-block:: none
$SPACK_ROOT/var/spack/repos/builtin/packages/
mvapich2/
@@ -934,52 +1128,59 @@ from the URL and then applied to your source code.
``patch`` can take two options keyword arguments. They are:
+""""""""
``when``
- If supplied, this is a spec that tells spack when to apply
- the patch. If the installed package spec matches this spec, the
- patch will be applied. In our example above, the patch is applied
- when mvapich is at version ``1.9`` or higher.
+""""""""
+
+If supplied, this is a spec that tells spack when to apply
+the patch. If the installed package spec matches this spec, the
+patch will be applied. In our example above, the patch is applied
+when mvapich is at version ``1.9`` or higher.
+"""""""""
``level``
- This tells spack how to run the ``patch`` command. By default,
- the level is 1 and spack runs ``patch -p1``. If level is 2,
- spack will run ``patch -p2``, and so on.
-
- A lot of people are confused by level, so here's a primer. If you
- look in your patch file, you may see something like this:
-
- .. code-block:: diff
- :linenos:
-
- --- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800
- +++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800
- @@ -8,7 +8,7 @@
- * Copyright (C) 2008 Sun Microsystems, Lustre group
- */
-
- -#define _XOPEN_SOURCE 600
- +//#define _XOPEN_SOURCE 600
- #include <stdlib.h>
- #include <malloc.h>
- #include "ad_lustre.h"
-
- Lines 1-2 show paths with synthetic ``a/`` and ``b/`` prefixes. These
- are placeholders for the two ``mvapich2`` source directories that
- ``diff`` compared when it created the patch file. This is git's
- default behavior when creating patch files, but other programs may
- behave differently.
-
- ``-p1`` strips off the first level of the prefix in both paths,
- allowing the patch to be applied from the root of an expanded mvapich2
- archive. If you set level to ``2``, it would strip off ``src``, and
- so on.
-
- It's generally easier to just structure your patch file so that it
- applies cleanly with ``-p1``, but if you're using a patch you didn't
- create yourself, ``level`` can be handy.
-
-``patch()`` functions
-~~~~~~~~~~~~~~~~~~~~~~~~
+"""""""""
+
+This tells spack how to run the ``patch`` command. By default,
+the level is 1 and spack runs ``patch -p 1``. If level is 2,
+spack will run ``patch -p 2``, and so on.
+
+A lot of people are confused by level, so here's a primer. If you
+look in your patch file, you may see something like this:
+
+.. code-block:: diff
+ :linenos:
+
+ --- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800
+ +++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800
+ @@ -8,7 +8,7 @@
+ * Copyright (C) 2008 Sun Microsystems, Lustre group
+ \*/
+
+ -#define _XOPEN_SOURCE 600
+ +//#define _XOPEN_SOURCE 600
+ #include <stdlib.h>
+ #include <malloc.h>
+ #include "ad_lustre.h"
+
+Lines 1-2 show paths with synthetic ``a/`` and ``b/`` prefixes. These
+are placeholders for the two ``mvapich2`` source directories that
+``diff`` compared when it created the patch file. This is git's
+default behavior when creating patch files, but other programs may
+behave differently.
+
+``-p1`` strips off the first level of the prefix in both paths,
+allowing the patch to be applied from the root of an expanded mvapich2
+archive. If you set level to ``2``, it would strip off ``src``, and
+so on.
+
+It's generally easier to just structure your patch file so that it
+applies cleanly with ``-p1``, but if you're using a patch you didn't
+create yourself, ``level`` can be handy.
+
+^^^^^^^^^^^^^^^^^^^^^
+Patch functions
+^^^^^^^^^^^^^^^^^^^^^
In addition to supplying patch files, you can write a custom function
to patch a package's source. For example, the ``py-pyside`` package
@@ -988,35 +1189,10 @@ handles ``RPATH``:
.. _pyside-patch:
-.. code-block:: python
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/py-pyside/package.py
+ :pyobject: PyPyside.patch
:linenos:
- class PyPyside(Package):
- ...
-
- def patch(self):
- """Undo PySide RPATH handling and add Spack RPATH."""
- # Figure out the special RPATH
- pypkg = self.spec['python'].package
- rpath = self.rpath
- rpath.append(os.path.join(self.prefix, pypkg.site_packages_dir, 'PySide'))
-
- # Add Spack's standard CMake args to the sub-builds.
- # They're called BY setup.py so we have to patch it.
- filter_file(
- r'OPTION_CMAKE,',
- r'OPTION_CMAKE, ' + (
- '"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE", '
- '"-DCMAKE_INSTALL_RPATH=%s",' % ':'.join(rpath)),
- 'setup.py')
-
- # 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')
-
A ``patch`` function, if present, will be run after patch files are
applied and before ``install()`` is run.
@@ -1025,56 +1201,57 @@ function gives you some benefits. First, spack ensures that the
``patch()`` function is run once per code checkout. That means that
if you run install, hit ctrl-C, and run install again, the code in the
patch function is only run once. Also, you can tell Spack to run only
-the patching part of the build using the :ref:`spack-patch` command.
+the patching part of the build using the :ref:`cmd-spack-patch` command.
+---------------
Handling RPATHs
-----------------------------
+---------------
Spack installs each package in a way that ensures that all of its
dependencies are found when it runs. It does this using `RPATHs
<http://en.wikipedia.org/wiki/Rpath>`_. An RPATH is a search
path, stored in a binary (an executable or library), that tells the
dynamic loader where to find its dependencies at runtime. You may be
-familiar with ```LD_LIBRARY_PATH``
+familiar with `LD_LIBRARY_PATH
<http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html>`_
-on Linux or ```DYLD_LIBRARY_PATH``
-<https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dyld.1.html>`
+on Linux or `DYLD_LIBRARY_PATH
+<https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dyld.1.html>`_
on Mac OS X. RPATH is similar to these paths, in that it tells
the loader where to find libraries. Unlike them, it is embedded in
the binary and not set in each user's environment.
RPATHs in Spack are handled in one of three ways:
- 1. For most packages, RPATHs are handled automatically using Spack's
- :ref:`compiler wrappers <compiler-wrappers>`. These wrappers are
- set in standard variables like ``CC``, ``CXX``, and ``FC``, so
- most build systems (autotools and many gmake systems) pick them
- up and use them.
- 2. CMake also respects Spack's compiler wrappers, but many CMake
- builds have logic to overwrite RPATHs when binaries are
- installed. Spack provides the ``std_cmake_args`` variable, which
- includes parameters necessary for CMake build use the right
- installation RPATH. It can be used like this when ``cmake`` is
- invoked:
-
- .. code-block:: python
-
- class MyPackage(Package):
- ...
- def install(self, spec, prefix):
- cmake('..', *std_cmake_args)
- make()
- make('install')
-
- 3. If you need to modify the build to add your own RPATHs, you can
- use the ``self.rpath`` property of your package, which will
- return a list of all the RPATHs that Spack will use when it
- links. You can see this how this is used in the :ref:`PySide
- example <pyside-patch>` above.
-
-
+#. For most packages, RPATHs are handled automatically using Spack's
+ :ref:`compiler wrappers <compiler-wrappers>`. These wrappers are
+ set in standard variables like ``CC``, ``CXX``, ``F77``, and ``FC``,
+ so most build systems (autotools and many gmake systems) pick them
+ up and use them.
+#. CMake also respects Spack's compiler wrappers, but many CMake
+ builds have logic to overwrite RPATHs when binaries are
+ installed. Spack provides the ``std_cmake_args`` variable, which
+ includes parameters necessary for CMake build use the right
+ installation RPATH. It can be used like this when ``cmake`` is
+ invoked:
+
+ .. code-block:: python
+
+ class MyPackage(Package):
+ ...
+ def install(self, spec, prefix):
+ cmake('..', *std_cmake_args)
+ make()
+ make('install')
+
+#. If you need to modify the build to add your own RPATHs, you can
+ use the ``self.rpath`` property of your package, which will
+ return a list of all the RPATHs that Spack will use when it
+ links. You can see this how this is used in the :ref:`PySide
+ example <pyside-patch>` above.
+
+--------------------
Finding new versions
-----------------------------
+--------------------
You've already seen the ``homepage`` and ``url`` package attributes:
@@ -1083,6 +1260,7 @@ You've already seen the ``homepage`` and ``url`` package attributes:
from spack import *
+
class Mpich(Package):
"""MPICH is a high performance and widely portable implementation of
the Message Passing Interface (MPI) standard."""
@@ -1094,17 +1272,18 @@ information about the package, and to determine where to download its
source code.
Spack uses the tarball URL to extrapolate where to find other tarballs
-of the same package (e.g. in `spack checksum <spack-checksum_>`_, but
+of the same package (e.g. in :ref:`cmd-spack-checksum`, but
this does not always work. This section covers ways you can tell
Spack to find tarballs elsewhere.
.. _attribute_list_url:
+^^^^^^^^^^^^
``list_url``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^
When spack tries to find available versions of packages (e.g. with
-`spack checksum <spack-checksum_>`_), it spiders the parent directory
+:ref:`cmd-spack-checksum`), it spiders the parent directory
of the tarball in the ``url`` attribute. For example, for libelf, the
url is:
@@ -1135,14 +1314,17 @@ the ``list_url``, because that is where links to old versions are:
.. _attribute_list_depth:
+^^^^^^^^^^^^^^
``list_depth``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
``libdwarf`` and many other packages have a listing of available
versions on a single webpage, but not all do. For example, ``mpich``
has a tarball URL that looks like this:
- url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
+.. code-block:: python
+
+ url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
But its downloads are in many different subdirectories of
``http://www.mpich.org/static/downloads/``. So, we need to add a
@@ -1166,8 +1348,9 @@ when spidering the page.
.. _attribute_parallel:
+---------------
Parallel builds
-------------------
+---------------
By default, Spack will invoke ``make()`` with a ``-j <njobs>``
argument, so that builds run in parallel. It figures out how many
@@ -1219,11 +1402,11 @@ you set ``parallel`` to ``False`` at the package level, then each call
to ``make()`` will be sequential by default, but packagers can call
``make(parallel=True)`` to override it.
-
.. _dependencies:
+------------
Dependencies
-------------------------------
+------------
We've covered how to build a simple package, but what if one package
relies on another package to build? How do you express that in a
@@ -1250,8 +1433,9 @@ Spack makes this relatively easy. Let's take a look at the
def install(self, spec, prefix):
...
+^^^^^^^^^^^^^^^^
``depends_on()``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^
The highlighted ``depends_on('libelf')`` call tells Spack that it
needs to build and install the ``libelf`` package before it builds
@@ -1259,8 +1443,9 @@ needs to build and install the ``libelf`` package before it builds
guaranteed that ``libelf`` has been built and installed successfully,
so you can rely on it for your libdwarf build.
+^^^^^^^^^^^^^^^^
Dependency specs
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^
``depends_on`` doesn't just take the name of another package. It
takes a full spec. This means that you can restrict the versions or
@@ -1289,7 +1474,7 @@ Or a requirement for a particular variant or compiler flags:
depends_on("libelf@0.8+debug")
depends_on('libelf debug=True')
- depends_on('libelf cppflags="-fPIC")
+ depends_on('libelf cppflags="-fPIC"')
Both users *and* package authors can use the same spec syntax to refer
to different package configurations. Users use the spec syntax on the
@@ -1301,9 +1486,9 @@ Additionally, dependencies may be specified for specific use cases:
.. code-block:: python
- depends_on("cmake", type="build")
- depends_on("libelf", type=("build", "link"))
- depends_on("python", type="run")
+ depends_on("cmake", type="build")
+ depends_on("libelf", type=("build", "link"))
+ depends_on("python", type="run")
The dependency types are:
@@ -1316,16 +1501,31 @@ The dependency types are:
* **"run"**: the project is used by the project at runtime. The package will
be added to ``PATH`` and ``PYTHONPATH``.
-If not specified, ``type`` is assumed to be ``("build", "link")``. This is the
-common case for compiled language usage. Also available are the aliases
-``"alldeps"`` for all dependency types and ``"nolink"`` (``("build", "run")``)
-for use by dependencies which are not expressed via a linker (e.g., Python or
-Lua module loading).
+Additional hybrid dependency types are (note the lack of quotes):
+
+ * **<not specified>**: ``type`` assumed to be ``("build",
+ "link")``. This is the common case for compiled language usage.
+ * **alldeps**: All dependency types. **Note:** No quotes here
+ * **nolink**: Equal to ``("build", "run")``, for use by dependencies
+ that are not expressed via a linker (e.g., Python or Lua module
+ loading). **Note:** No quotes here
+
+"""""""""""""""""""
+Dependency Formulas
+"""""""""""""""""""
+
+This section shows how to write appropriate ``depends_on()``
+declarations for some common cases.
+
+* Python 2 only: ``depends_on('python@:2.8')``
+* Python 2.7 only: ``depends_on('python@2.7:2.8')``
+* Python 3 only: ``depends_on('python@3:')``
.. _setup-dependent-environment:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``setup_dependent_environment()``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Spack provides a mechanism for dependencies to provide variables that
can be used in their dependents' build. Any package can declare a
@@ -1349,34 +1549,16 @@ packages that depend on a particular Qt installation will find it.
The arguments to this function are:
- * **module**: the module of the dependent package, where global
- properties can be assigned.
- * **spec**: the spec of the *dependency package* (the one the function is called on).
- * **dep_spec**: the spec of the dependent package (i.e. dep_spec depends on spec).
+* **module**: the module of the dependent package, where global
+ properties can be assigned.
+* **spec**: the spec of the *dependency package* (the one the function is called on).
+* **dep_spec**: the spec of the dependent package (i.e. dep_spec depends on spec).
A good example of using these is in the Python package:
-.. code-block:: python
-
- def setup_dependent_environment(self, module, spec, dep_spec):
- # Python extension builds can have a global python executable function
- module.python = Executable(join_path(spec.prefix.bin, 'python'))
-
- # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
- module.python_lib_dir = os.path.join(dep_spec.prefix, self.python_lib_dir)
- module.python_include_dir = os.path.join(dep_spec.prefix, self.python_include_dir)
- module.site_packages_dir = os.path.join(dep_spec.prefix, self.site_packages_dir)
-
- # Make the site packages directory if it does not exist already.
- mkdirp(module.site_packages_dir)
-
- # Set PYTHONPATH to include site-packages dir for the
- # extension and any other python extensions it depends on.
- python_paths = []
- for d in dep_spec.traverse():
- if d.package.extends(self.spec):
- python_paths.append(os.path.join(d.prefix, self.site_packages_dir))
- os.environ['PYTHONPATH'] = ':'.join(python_paths)
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/python/package.py
+ :pyobject: Python.setup_dependent_environment
+ :linenos:
The first thing that happens here is that the ``python`` command is
inserted into module scope of the dependent. This allows most python
@@ -1385,17 +1567,17 @@ packages to have a very simple install method, like this:
.. code-block:: python
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
Python's ``setup_dependent_environment`` method also sets up some
other variables, creates a directory, and sets up the ``PYTHONPATH``
so that dependent packages can find their dependencies at build time.
-
.. _packaging_extensions:
+----------
Extensions
--------------------------
+----------
Spack's support for package extensions is documented extensively in
:ref:`extensions`. This section documents how to make your own
@@ -1426,8 +1608,19 @@ Now, the ``py-numpy`` package can be used as an argument to ``spack
activate``. When it is activated, all the files in its prefix will be
symbolically linked into the prefix of the python package.
+Some packages produce a Python extension, but are only compatible with
+Python 3, or with Python 2. In those cases, a ``depends_on()``
+declaration should be made in addition to the ``extends()``
+declaration:
+
+.. code-block:: python
+
+ class Icebin(Package):
+ extends('python', when='+python')
+ depends_on('python@3:', when='+python')
+
Many packages produce Python extensions for *some* variants, but not
-others: they should extend ``python`` only if the apropriate
+others: they should extend ``python`` only if the appropriate
variant(s) are selected. This may be accomplished with conditional
``extends()`` declarations:
@@ -1446,13 +1639,15 @@ when it does the activation:
.. code-block:: python
- class PyNose(Package):
+ class PySncosmo(Package):
...
- extends('python', ignore=r'bin/nosetests.*$')
+ # py-sncosmo binaries are duplicates of those from py-astropy
+ extends('python', ignore=r'bin/.*')
+ depends_on('py-astropy')
...
-The code above will prevent ``$prefix/bin/nosetests`` from being
-linked in at activation time.
+The code above will prevent everything in the ``$prefix/bin/`` directory
+from being linked in at activation time.
.. note::
@@ -1461,10 +1656,9 @@ linked in at activation time.
``depends_on('python')`` and ``extends(python)`` in the same
package. ``extends`` implies ``depends_on``.
-
-
+^^^^^^^^^^^^^^^^^^^^^^^^^
Activation & deactivation
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^
Spack's ``Package`` class has default ``activate`` and ``deactivate``
implementations that handle symbolically linking extensions' prefixes
@@ -1482,15 +1676,9 @@ same way that Python does.
Let's look at Python's activate function:
-.. code-block:: python
-
- def activate(self, ext_pkg, **kwargs):
- kwargs.update(ignore=self.python_ignore(ext_pkg, kwargs))
- super(Python, self).activate(ext_pkg, **kwargs)
-
- exts = spack.install_layout.extension_map(self.spec)
- exts[ext_pkg.name] = ext_pkg.spec
- self.write_easy_install_pth(exts)
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/python/package.py
+ :pyobject: Python.activate
+ :linenos:
This function is called on the *extendee* (Python). It first calls
``activate`` in the superclass, which handles symlinking the
@@ -1500,23 +1688,16 @@ Python's setuptools.
Deactivate behaves similarly to activate, but it unlinks files:
-.. code-block:: python
-
- def deactivate(self, ext_pkg, **kwargs):
- kwargs.update(ignore=self.python_ignore(ext_pkg, kwargs))
- super(Python, self).deactivate(ext_pkg, **kwargs)
-
- exts = spack.install_layout.extension_map(self.spec)
- if ext_pkg.name in exts: # Make deactivate idempotent.
- del exts[ext_pkg.name]
- self.write_easy_install_pth(exts)
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/python/package.py
+ :pyobject: Python.deactivate
+ :linenos:
Both of these methods call some custom functions in the Python
package. See the source for Spack's Python package for details.
-
+^^^^^^^^^^^^^^^^^^^^
Activation arguments
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^
You may have noticed that the ``activate`` function defined above
takes keyword arguments. These are the keyword arguments from
@@ -1531,11 +1712,11 @@ The only keyword argument supported by default is the ``ignore``
argument, which can take a regex, list of regexes, or a predicate to
determine which files *not* to symlink during activation.
-
.. _virtual-dependencies:
+--------------------
Virtual dependencies
------------------------------
+--------------------
In some cases, more than one package can satisfy another package's
dependency. One way this can happen is if a package depends on a
@@ -1556,8 +1737,9 @@ similar package files, e.g., ``foo``, ``foo-mvapich``, ``foo-mpich``,
but Spack avoids this explosion of package files by providing support
for *virtual dependencies*.
+^^^^^^^^^^^^
``provides``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^
In Spack, ``mpi`` is handled as a *virtual package*. A package like
``mpileaks`` can depend on it just like any other package, by
@@ -1593,8 +1775,9 @@ The ``provides("mpi")`` call tells Spack that the ``mpich`` package
can be used to satisfy the dependency of any package that
``depends_on('mpi')``.
+^^^^^^^^^^^^^^^^^^^^
Versioned Interfaces
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^
Just as you can pass a spec to ``depends_on``, so can you pass a spec
to ``provides`` to add constraints. This allows Spack to support the
@@ -1615,8 +1798,9 @@ This says that ``mpich2`` provides MPI support *up to* version 2, but
if a package ``depends_on("mpi@3")``, then Spack will *not* build that
package with ``mpich2``.
+^^^^^^^^^^^^^^^^^
``provides when``
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^
The same package may provide different versions of an interface
depending on *its* version. Above, we simplified the ``provides``
@@ -1650,27 +1834,27 @@ the package ``foo`` declares this:
Suppose a user invokes ``spack install`` like this:
-.. code-block:: sh
+.. code-block:: console
$ spack install foo ^mpich@1.0
Spack will fail with a constraint violation, because the version of
MPICH requested is too low for the ``mpi`` requirement in ``foo``.
-
.. _abstract-and-concrete:
+-------------------------
Abstract & concrete specs
-------------------------------------------
+-------------------------
Now that we've seen how spec constraints can be specified :ref:`on the
command line <sec-specs>` and within package definitions, we can talk
about how Spack puts all of this information together. When you run
this:
-.. code-block:: sh
+.. code-block:: console
- spack install mpileaks ^callpath@1.0+debug ^libelf@0.8.11
+ $ spack install mpileaks ^callpath@1.0+debug ^libelf@0.8.11
Spack parses the command line and builds a spec from the description.
The spec says that ``mpileaks`` should be built with the ``callpath``
@@ -1686,7 +1870,9 @@ abstract spec is partially specified. In other words, it could
describe more than one build of a package. Spack does this to make
things easier on the user: they should only have to specify as much of
the package spec as they care about. Here's an example partial spec
-DAG, based on the constraints above::
+DAG, based on the constraints above:
+
+.. code-block:: none
mpileaks
^callpath@1.0+debug
@@ -1695,7 +1881,6 @@ DAG, based on the constraints above::
^libelf@0.8.11
^mpi
-
.. graphviz::
digraph {
@@ -1706,7 +1891,6 @@ DAG, based on the constraints above::
dyninst -> "libelf@0.8.11"
}
-
This diagram shows a spec DAG output as a tree, where successive
levels of indentation represent a depends-on relationship. In the
above DAG, we can see some packages annotated with their constraints,
@@ -1714,8 +1898,9 @@ and some packages with no annotations at all. When there are no
annotations, it means the user doesn't care what configuration of that
package is built, just so long as it works.
+^^^^^^^^^^^^^^
Concretization
-~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
An abstract spec is useful for the user, but you can't install an
abstract spec. Spack has to take the abstract spec and "fill in" the
@@ -1723,7 +1908,9 @@ remaining unspecified parts in order to install. This process is
called **concretization**. Concretization happens in between the time
the user runs ``spack install`` and the time the ``install()`` method
is called. The concretized version of the spec above might look like
-this::
+this:
+
+.. code-block:: none
mpileaks@2.3%gcc@4.7.3 arch=linux-debian7-x86_64
^callpath@1.0%gcc@4.7.3+debug arch=linux-debian7-x86_64
@@ -1753,15 +1940,16 @@ explicitly. Concretization policies are discussed in more detail in
:ref:`configuration`. Sites using Spack can customize them to match
the preferences of their own users.
-.. _spack-spec:
+.. _cmd-spack-spec:
+^^^^^^^^^^^^^^
``spack spec``
-~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
For an arbitrary spec, you can see the result of concretization by
running ``spack spec``. For example:
-.. code-block:: sh
+.. code-block:: console
$ spack spec dyninst@8.0.1
dyninst@8.0.1
@@ -1775,44 +1963,83 @@ running ``spack spec``. For example:
This is useful when you want to know exactly what Spack will do when
you ask for a particular spec.
+.. _concretization-policies:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
``Concretization Policies``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
A user may have certain preferences for how packages should
be concretized on their system. For example, one user may prefer packages
built with OpenMPI and the Intel compiler. Another user may prefer
packages be built with MVAPICH and GCC.
-See the `documentation in the config section <concretization-preferences_>`_
-for more details.
+See the :ref:`concretization-preferences` section for more details.
.. _install-method:
+------------------
+Inconsistent Specs
+------------------
+
+Suppose a user needs to install package C, which depends on packages A
+and B. Package A builds a library with a Python2 extension, and
+package B builds a library with a Python3 extension. Packages A and B
+cannot be loaded together in the same Python runtime:
+
+.. code-block:: python
+
+ class A(Package):
+ variant('python', default=True, 'enable python bindings')
+ depends_on('python@2.7', when='+python')
+ def install(self, spec, prefix):
+ # do whatever is necessary to enable/disable python
+ # bindings according to variant
+
+ class B(Package):
+ variant('python', default=True, 'enable python bindings')
+ depends_on('python@3.2:', when='+python')
+ def install(self, spec, prefix):
+ # do whatever is necessary to enable/disable python
+ # bindings according to variant
+
+Package C needs to use the libraries from packages A and B, but does
+not need either of the Python extensions. In this case, package C
+should simply depend on the ``~python`` variant of A and B:
+
+.. code-block:: python
+
+ class C(Package):
+ depends_on('A~python')
+ depends_on('B~python')
+
+This may require that A or B be built twice, if the user wishes to use
+the Python extensions provided by them: once for ``+python`` and once
+for ``~python``. Other than using a little extra disk space, that
+solution has no serious problems.
+
+-----------------------------------
Implementing the ``install`` method
-------------------------------------------
+-----------------------------------
The last element of a package is its ``install()`` method. This is
where the real work of installation happens, and it's the main part of
the package you'll need to customize for each piece of software.
-.. literalinclude:: ../../../var/spack/repos/builtin/packages/libelf/package.py
- :start-after: 0.8.12
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/libpng/package.py
+ :pyobject: Libpng.install
:linenos:
``install`` takes a ``spec``: a description of how the package should
be built, and a ``prefix``: the path to the directory where the
software should be installed.
-
Spack provides wrapper functions for ``configure`` and ``make`` so
that you can call them in a similar way to how you'd call a shell
command. In reality, these are Python functions. Spack provides
these functions to make writing packages more natural. See the section
on :ref:`shell wrappers <shell-wrappers>`.
-
-
Now that the metadata is out of the way, we can move on to the
``install()`` method. When a user runs ``spack install``, Spack
fetches an archive for the correct version of the software, expands
@@ -1862,8 +2089,9 @@ information.
.. _install-environment:
+-----------------------
The install environment
---------------------------
+-----------------------
In general, you should not have to do much differently in your install
method than you would when installing a package on the command line.
@@ -1880,14 +2108,15 @@ custom Makefiles, you may need to add logic to modify the makefiles.
The remainder of the section covers the way Spack's build environment
works.
+^^^^^^^^^^^^^^^^^^^^^
Environment variables
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^
Spack sets a number of standard environment variables that serve two
purposes:
- #. Make build systems use Spack's compiler wrappers for their builds.
- #. Allow build systems to find dependencies more easily
+#. Make build systems use Spack's compiler wrappers for their builds.
+#. Allow build systems to find dependencies more easily
The Compiler environment variables that Spack sets are:
@@ -1901,7 +2130,7 @@ The Compiler environment variables that Spack sets are:
============ ===============================
All of these are standard variables respected by most build systems.
-If your project uses ``autotools`` or ``CMake``, then it should pick
+If your project uses ``Autotools`` or ``CMake``, then it should pick
them up automatically when you run ``configure`` or ``cmake`` in the
``install()`` function. Many traditional builds using GNU Make and
BSD make also respect these variables, so they may work with these
@@ -1918,12 +2147,12 @@ In addition to the compiler variables, these variables are set before
entering ``install()`` so that packages can locate dependencies
easily:
- ======================= =============================
- ``PATH`` Set to point to ``/bin`` directories of dependencies
- ``CMAKE_PREFIX_PATH`` Path to dependency prefixes for CMake
- ``PKG_CONFIG_PATH`` Path to any pkgconfig directories for dependencies
- ``PYTHONPATH`` Path to site-packages dir of any python dependencies
- ======================= =============================
+===================== ====================================================
+``PATH`` Set to point to ``/bin`` directories of dependencies
+``CMAKE_PREFIX_PATH`` Path to dependency prefixes for CMake
+``PKG_CONFIG_PATH`` Path to any pkgconfig directories for dependencies
+``PYTHONPATH`` Path to site-packages dir of any python dependencies
+===================== ====================================================
``PATH`` is set up to point to dependencies ``/bin`` directories so
that you can use tools installed by dependency packages at build time.
@@ -1934,7 +2163,7 @@ For example, ``$MPICH_ROOT/bin/mpicc`` is frequently used by dependencies of
where ``cmake`` will search for dependency libraries and headers.
This causes all standard CMake find commands to look in the paths of
your dependencies, so you *do not* have to manually specify arguments
-like ``-D DEPENDENCY_DIR=/path/to/dependency`` to ``cmake``. More on
+like ``-DDEPENDENCY_DIR=/path/to/dependency`` to ``cmake``. More on
this is `in the CMake documentation <http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_PREFIX_PATH.html>`_.
``PKG_CONFIG_PATH`` is for packages that attempt to discover
@@ -1944,13 +2173,14 @@ discover its dependencies.
If you want to see the environment that a package will build with, or
if you want to run commands in that environment to test them out, you
-can use the :ref:`spack env <spack-env>` command, documented
+can use the :ref:`cmd-spack-env` command, documented
below.
.. _compiler-wrappers:
+^^^^^^^^^^^^^^^^^^^^^
Compiler interceptors
-~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^
As mentioned, ``CC``, ``CXX``, ``F77``, and ``FC`` are set to point to
Spack's compiler wrappers. These are simply called ``cc``, ``c++``,
@@ -1971,13 +2201,15 @@ flags to the compile line so that dependencies can be easily found.
These flags are added for each dependency, if they exist:
Compile-time library search paths
- * ``-L$dep_prefix/lib``
- * ``-L$dep_prefix/lib64``
+* ``-L$dep_prefix/lib``
+* ``-L$dep_prefix/lib64``
+
Runtime library search paths (RPATHs)
- * ``$rpath_flag$dep_prefix/lib``
- * ``$rpath_flag$dep_prefix/lib64``
+* ``$rpath_flag$dep_prefix/lib``
+* ``$rpath_flag$dep_prefix/lib64``
+
Include search paths
- * ``-I$dep_prefix/include``
+* ``-I$dep_prefix/include``
An example of this would be the ``libdwarf`` build, which has one
dependency: ``libelf``. Every call to ``cc`` in the ``libdwarf``
@@ -2016,12 +2248,14 @@ and/or ``ldlibs``). They do not override the canonical autotools flags with the
same names (but in ALL-CAPS) that may be passed into the build by particularly
challenging package scripts.
+^^^^^^^^^^^^^^
Compiler flags
-~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
+
In rare circumstances such as compiling and running small unit tests, a package
developer may need to know what are the appropriate compiler flags to enable
features like ``OpenMP``, ``c++11``, ``c++14`` and alike. To that end the
-compiler classes in ``spack`` implement the following _properties_ :
+compiler classes in ``spack`` implement the following **properties**:
``openmp_flag``, ``cxx11_flag``, ``cxx14_flag``, which can be accessed in a
package by ``self.compiler.cxx11_flag`` and alike. Note that the implementation
is such that if a given compiler version does not support this feature, an
@@ -2033,12 +2267,14 @@ package supports additional variants like
variant('openmp', default=True, description="Enable OpenMP support.")
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Message Parsing Interface (MPI)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
It is common for high performance computing software/packages to use ``MPI``.
As a result of conretization, a given package can be built using different
implementations of MPI such as ``Openmpi``, ``MPICH`` or ``IntelMPI``.
-In some scenarios to configure a package one have to provide it with appropriate MPI
+In some scenarios, to configure a package, one has to provide it with appropriate MPI
compiler wrappers such as ``mpicc``, ``mpic++``.
However different implementations of ``MPI`` may have different names for those
wrappers. In order to make package's ``install()`` method indifferent to the
@@ -2049,22 +2285,22 @@ Package developers are advised to use these variables, for example ``self.spec['
instead of hard-coding ``join_path(self.spec['mpi'].prefix.bin, 'mpicc')`` for
the reasons outlined above.
-
+^^^^^^^^^^^^^^^^^^^^^^^^^
Blas and Lapack libraries
-~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
Different packages provide implementation of ``Blas`` and ``Lapack`` routines.
The names of the resulting static and/or shared libraries differ from package
-to package. In order to make ``install()`` method indifferent to the
+to package. In order to make the ``install()`` method independent of the
choice of ``Blas`` implementation, each package which provides it
-sets up ``self.spec.blas_shared_lib`` and ``self.spec.blas_static_lib `` to
-point to the shared and static ``Blas`` libraries, respectively. The same
-applies to packages which provide ``Lapack``. Package developers are advised to
-use these variables, for example ``spec['blas'].blas_shared_lib`` instead of
+sets up ``self.spec.blas_libs`` to point to the correct ``Blas`` libraries.
+The same applies to packages which provide ``Lapack``. Package developers are advised to
+use these variables, for example ``spec['blas'].blas_libs.joined()`` instead of
hard-coding ``join_path(spec['blas'].prefix.lib, 'libopenblas.so')``.
-
+^^^^^^^^^^^^^^^^^^^^^
Forking ``install()``
-~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^
To give packagers free reign over their install environment, Spack
forks a new process each time it invokes a package's ``install()``
@@ -2076,9 +2312,9 @@ dedicated process.
.. _prefix-objects:
-
+-----------------
Failing the build
-----------------------
+-----------------
Sometimes you don't want a package to successfully install unless some
condition is true. You can explicitly cause the build to fail from
@@ -2089,9 +2325,9 @@ condition is true. You can explicitly cause the build to fail from
if spec.architecture.startswith('darwin'):
raise InstallError('This package does not build on Mac OS X!')
-
+--------------
Prefix objects
-----------------------
+--------------
Spack passes the ``prefix`` parameter to the install method so that
you can pass it to ``configure``, ``cmake``, or some other installer,
@@ -2101,7 +2337,6 @@ e.g.:
configure('--prefix=' + prefix)
-
For the most part, prefix objects behave exactly like strings. For
packages that do not have their own install target, or for those that
implement it poorly (like ``libdwarf``), you may need to manually copy
@@ -2121,7 +2356,6 @@ yourself, e.g.:
mkdirp(prefix.lib)
install('libfoo.a', prefix.lib)
-
Most of the standard UNIX directory names are attributes on the
``prefix`` object. Here is a full list:
@@ -2148,8 +2382,9 @@ Most of the standard UNIX directory names are attributes on the
.. _spec-objects:
+------------
Spec objects
--------------------------
+------------
When ``install`` is called, most parts of the build process are set up
for you. The correct version's tarball has been downloaded and
@@ -2166,8 +2401,9 @@ special parameters to ``configure``, like
need to supply special compiler flags depending on the compiler. All
of this information is available in the spec.
+^^^^^^^^^^^^^^^^^^^^^^^^
Testing spec constraints
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^
You can test whether your spec is configured a certain way by using
the ``satisfies`` method. For example, if you want to check whether
@@ -2176,9 +2412,14 @@ do that, e.g.:
.. code-block:: python
+ configure_args = [
+ '--prefix={0}'.format(prefix)
+ ]
+
if spec.satisfies('@1.2:1.4'):
configure_args.append("CXXFLAGS='-DWITH_FEATURE'")
- configure('--prefix=' + prefix, *configure_args)
+
+ configure(*configure_args)
This works for compilers, too:
@@ -2232,39 +2473,40 @@ the two functions is that ``satisfies()`` tests whether spec
constraints overlap at all, while ``in`` tests whether a spec or any
of its dependencies satisfy the provided spec.
-
+^^^^^^^^^^^^^^^^^^^^^^
Accessing Dependencies
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^
You may need to get at some file or binary that's in the prefix of one
of your dependencies. You can do that by sub-scripting the spec:
.. code-block:: python
- my_mpi = spec['mpich']
+ my_mpi = spec['mpi']
The value in the brackets needs to be some package name, and spec
needs to depend on that package, or the operation will fail. For
example, the above code will fail if the ``spec`` doesn't depend on
-``mpich``. The value returned and assigned to ``my_mpi``, is itself
+``mpi``. The value returned and assigned to ``my_mpi``, is itself
just another ``Spec`` object, so you can do all the same things you
would do with the package's own spec:
.. code-block:: python
- mpicc = new_path(my_mpi.prefix.bin, 'mpicc')
+ mpicc = join_path(my_mpi.prefix.bin, 'mpicc')
.. _multimethods:
+^^^^^^^^^^^^^^^^^^^^^^^^^^
Multimethods and ``@when``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^
Spack allows you to make multiple versions of instance functions in
packages, based on whether the package's spec satisfies particular
criteria.
The ``@when`` annotation lets packages declare multiple versions of
-methods like install() that depend on the package's spec. For
+methods like ``install()`` that depend on the package's spec. For
example:
.. code-block:: python
@@ -2275,16 +2517,17 @@ example:
def install(self, prefix):
# Do default install
- @when('arch=linux-debian7-x86_64')
+ @when('arch=chaos_5_x86_64_ib')
def install(self, prefix):
# This will be executed instead of the default install if
# the package's sys_type() is chaos_5_x86_64_ib.
- @when('arch=linux-debian7-x86_64")
+ @when('arch=linux-debian7-x86_64')
def install(self, prefix):
- # This will be executed if the package's sys_type is bgqos_0
+ # This will be executed if the package's sys_type() is
+ # linux-debian7-x86_64.
-In the above code there are three versions of install(), two of which
+In the above code there are three versions of ``install()``, two of which
are specialized for particular platforms. The version that is called
depends on the architecture of the package spec.
@@ -2356,22 +2599,15 @@ method (the one without the ``@when`` decorator) will be called.
.. _shell-wrappers:
+-----------------------
Shell command functions
-----------------------------
+-----------------------
Recall the install method from ``libelf``:
-.. code-block:: python
-
- def install(self, spec, prefix):
- configure("--prefix=" + prefix,
- "--enable-shared",
- "--disable-dependency-tracking",
- "--disable-debug")
- make()
-
- # The mkdir commands in libelf's install can fail in parallel
- make("install", parallel=False)
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/libelf/package.py
+ :pyobject: Libelf.install
+ :linenos:
Normally in Python, you'd have to write something like this in order
to execute shell commands:
@@ -2379,7 +2615,7 @@ to execute shell commands:
.. code-block:: python
import subprocess
- subprocess.check_call('configure', '--prefix=' + prefix)
+ subprocess.check_call('configure', '--prefix={0}'.format(prefix))
We've tried to make this a bit easier by providing callable wrapper
objects for some shell commands. By default, ``configure``,
@@ -2399,17 +2635,17 @@ Callable wrappers also allow spack to provide some special features.
For example, in Spack, ``make`` is parallel by default, and Spack
figures out the number of cores on your machine and passes an
appropriate value for ``-j<numjobs>`` when it calls ``make`` (see the
-``parallel`` package attribute under :ref:`metadata <metadata>`). In
+``parallel`` `package attribute <attribute_parallel>`). In
a package file, you can supply a keyword argument, ``parallel=False``,
to the ``make`` wrapper to disable parallel make. In the ``libelf``
package, this allows us to avoid race conditions in the library's
build system.
-
.. _sanity-checks:
+-------------------------------
Sanity checking an installation
---------------------------------
+-------------------------------
By default, Spack assumes that a build has failed if nothing is
written to the install prefix, and that it has succeeded if anything
@@ -2421,7 +2657,7 @@ Consider a simple autotools build like this:
.. code-block:: python
def install(self, spec, prefix):
- configure("--prefix=" + prefix)
+ configure("--prefix={0}".format(prefix))
make()
make("install")
@@ -2434,9 +2670,9 @@ like this can falsely report that they were successfully installed if
an error occurs before the install is complete but after files have
been written to the ``prefix``.
-
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``sanity_check_is_file`` and ``sanity_check_is_dir``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can optionally specify *sanity checks* to deal with this problem.
Add properties like this to your package:
@@ -2458,14 +2694,14 @@ Now, after ``install()`` runs, Spack will check whether
``$prefix/include/libelf.h`` exists and is a file, and whether
``$prefix/lib`` exists and is a directory. If the checks fail, then
the build will fail and the install prefix will be removed. If they
-succeed, Spack considers the build succeeful and keeps the prefix in
+succeed, Spack considers the build successful and keeps the prefix in
place.
-
.. _file-manipulation:
+---------------------------
File manipulation functions
-------------------------------
+---------------------------
Many builds are not perfect. If a build lacks an install target, or if
it does not use systems like CMake or autotools, which have standard
@@ -2487,9 +2723,9 @@ running:
This is already part of the boilerplate for packages created with
``spack create`` or ``spack edit``.
-
+^^^^^^^^^^^^^^^^^^^
Filtering functions
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^
:py:func:`filter_file(regex, repl, *filenames, **kwargs) <spack.filter_file>`
Works like ``sed`` but with Python regular expression syntax. Takes
@@ -2547,9 +2783,9 @@ Filtering functions
change_sed_delimiter('@', ';', 'utils/FixMakefile')
change_sed_delimiter('@', ';', 'utils/FixMakefile.sed.default')
-
+^^^^^^^^^^^^^^
File functions
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^
:py:func:`ancestor(dir, n=1) <spack.ancestor>`
Get the n\ :sup:`th` ancestor of the directory ``dir``.
@@ -2566,8 +2802,8 @@ File functions
install('my-header.h', join_path(prefix.include))
-:py:func:`join_path(prefix, *args) <spack.join_path>` Like
- ``os.path.join``, this joins paths using the OS path separator.
+:py:func:`join_path(prefix, *args) <spack.join_path>`
+ Like ``os.path.join``, this joins paths using the OS path separator.
However, this version allows an arbitrary number of arguments, so
you can string together many path components.
@@ -2617,22 +2853,21 @@ File functions
The ``create=True`` keyword argument causes the command to create
the directory if it does not exist.
-
:py:func:`touch(path) <spack.touch>`
Create an empty file at ``path``.
-
.. _package-lifecycle:
+-----------------------
Coding Style Guidelines
----------------------------
+-----------------------
The following guidelines are provided, in the interests of making
Spack packages work in a consistent manner:
-
+^^^^^^^^^^^^^
Variant Names
-~~~~~~~~~~~~~~
+^^^^^^^^^^^^^
Spack packages with variants similar to already-existing Spack
packages should use the same name for their variants. Standard
@@ -2642,43 +2877,54 @@ variant names are:
Name Default Description
======= ======== ========================
shared True Build shared libraries
- static Build static libraries
- mpi Use MPI
- python Build Python extension
+ static True Build static libraries
+ mpi True Use MPI
+ python False Build Python extension
======= ======== ========================
If specified in this table, the corresponding default should be used
when declaring a variant.
-
+^^^^^^^^^^^^^
Version Lists
-~~~~~~~~~~~~~~
+^^^^^^^^^^^^^
-Spack packges should list supported versions with the newest first.
+Spack packages should list supported versions with the newest first.
+^^^^^^^^^^^^^^^^
Special Versions
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^
The following *special* version names may be used when building a package:
-* *@system*: Indicates a hook to the OS-installed version of the
- package. This is useful, for example, to tell Spack to use the
- OS-installed version in ``packages.yaml``::
+"""""""""""
+``@system``
+"""""""""""
+
+Indicates a hook to the OS-installed version of the
+package. This is useful, for example, to tell Spack to use the
+OS-installed version in ``packages.yaml``:
- openssl:
- paths:
- openssl@system: /usr
- buildable: False
+.. code-block:: yaml
- Certain Spack internals look for the *@system* version and do
- appropriate things in that case.
+ openssl:
+ paths:
+ openssl@system: /usr
+ buildable: False
-* *@local*: Indicates the version was built manually from some source
- tree of unknown provenance (see ``spack setup``).
+Certain Spack internals look for the ``@system`` version and do
+appropriate things in that case.
+""""""""""
+``@local``
+""""""""""
+Indicates the version was built manually from some source
+tree of unknown provenance (see ``spack setup``).
+
+---------------------------
Packaging workflow commands
----------------------------------
+---------------------------
When you are building packages, you will likely not get things
completely right the first time.
@@ -2693,7 +2939,7 @@ of the build.
A typical package workflow might look like this:
-.. code-block:: sh
+.. code-block:: console
$ spack edit mypackage
$ spack install mypackage
@@ -2706,10 +2952,11 @@ A typical package workflow might look like this:
Below are some commands that will allow you some finer-grained
control over the install process.
-.. _spack-fetch:
+.. _cmd-spack-fetch:
+^^^^^^^^^^^^^^^
``spack fetch``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^
The first step of ``spack install``. Takes a spec and determines the
correct download URL to use for the requested package version, then
@@ -2720,20 +2967,22 @@ directory will be located under ``$SPACK_HOME/var/spack``.
When run after the archive has already been downloaded, ``spack
fetch`` is idempotent and will not download the archive again.
-.. _spack-stage:
+.. _cmd-spack-stage:
+^^^^^^^^^^^^^^^
``spack stage``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^
The second step in ``spack install`` after ``spack fetch``. Expands
the downloaded archive in its temporary directory, where it will be
built by ``spack install``. Similar to ``fetch``, if the archive has
already been expanded, ``stage`` is idempotent.
-.. _spack-patch:
+.. _cmd-spack-patch:
+^^^^^^^^^^^^^^^
``spack patch``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^
After staging, Spack applies patches to downloaded packages, if any
have been specified in the package file. This command will run the
@@ -2743,187 +2992,167 @@ this step if they have been. If Spack discovers that patches didn't
apply cleanly on some previous run, then it will restage the entire
package before patching.
-.. _spack-restage:
+.. _cmd-spack-restage:
+^^^^^^^^^^^^^^^^^
``spack restage``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^
+
Restores the source code to pristine state, as it was before building.
Does this in one of two ways:
- 1. If the source was fetched as a tarball, deletes the entire build
- directory and re-expands the tarball.
+#. If the source was fetched as a tarball, deletes the entire build
+ directory and re-expands the tarball.
- 2. If the source was checked out from a repository, this deletes the
- build directory and checks it out again.
+#. If the source was checked out from a repository, this deletes the
+ build directory and checks it out again.
-.. _spack-clean:
+.. _cmd-spack-clean:
+^^^^^^^^^^^^^^^
``spack clean``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^
+
Cleans up temporary files for a particular package, by deleting the
expanded/checked out source code *and* any downloaded archive. If
``fetch``, ``stage``, or ``install`` are run again after this, Spack's
build process will start from scratch.
+.. _cmd-spack-purge:
-.. _spack-purge:
-
+^^^^^^^^^^^^^^^
``spack purge``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^
+
Cleans up all of Spack's temporary and cached files. This can be used to
recover disk space if temporary files from interrupted or failed installs
accumulate in the staging area.
-When called with ``--stage`` or ``--all`` (or without arguments, in which case
-the default is ``--all``) this removes all staged files; this is equivalent to
-running ``spack clean`` for every package you have fetched or staged.
+When called with ``--stage`` or without arguments this removes all staged
+files and will be equivalent to running ``spack clean`` for every package
+you have fetched or staged.
-When called with ``--cache`` or ``--all`` this will clear all resources
+When called with ``--downloads`` this will clear all resources
:ref:`cached <caching>` during installs.
+When called with ``--user-cache`` this will remove caches in the user home
+directory, including cached virtual indices.
+
+To remove all of the above, the command can be called with ``--all``.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Keeping the stage directory on success
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default, ``spack install`` will delete the staging area once a
package has been successfully built and installed. Use
``--keep-stage`` to leave the build directory intact:
-.. code-block:: sh
+.. code-block:: console
- spack install --keep-stage <spec>
+ $ spack install --keep-stage <spec>
This allows you to inspect the build directory and potentially debug
the build. You can use ``purge`` or ``clean`` later to get rid of the
unwanted temporary files.
-
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Keeping the install prefix on failure
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default, ``spack install`` will delete any partially constructed
install prefix if anything fails during ``install()``. If you want to
keep the prefix anyway (e.g. to diagnose a bug), you can use
``--keep-prefix``:
-.. code-block:: sh
+.. code-block:: console
- spack install --keep-prefix <spec>
+ $ spack install --keep-prefix <spec>
Note that this may confuse Spack into thinking that the package has
-been installed properly, so you may need to use ``spack uninstall -f``
+been installed properly, so you may need to use ``spack uninstall --force``
to get rid of the install prefix before you build again:
-.. code-block:: sh
-
- spack uninstall -f <spec>
+.. code-block:: console
+ $ spack uninstall --force <spec>
+---------------------
Graphing dependencies
---------------------------
+---------------------
-.. _spack-graph:
+.. _cmd-spack-graph:
+^^^^^^^^^^^^^^^
``spack graph``
-~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^
Spack provides the ``spack graph`` command for graphing dependencies.
The command by default generates an ASCII rendering of a spec's
-dependency graph. For example::
-
- $ spack graph mpileaks
- o mpileaks
- |\
- | |\
- | o | callpath
- |/| |
- | |\|
- | |\ \
- | | |\ \
- | | | | o adept-utils
- | |_|_|/|
- |/| | | |
- o | | | | mpi
- / / / /
- | | o | dyninst
- | |/| |
- |/|/| |
- | | |/
- | o | libdwarf
- |/ /
- o | libelf
- /
- o boost
-
-At the top is the root package in the DAG, with dependency edges
-emerging from it. On a color terminal, the edges are colored by which
-dependency they lead to.
+dependency graph. For example:
+
+.. command-output:: spack graph mpileaks
+
+At the top is the root package in the DAG, with dependency edges emerging
+from it. On a color terminal, the edges are colored by which dependency
+they lead to.
+
+.. command-output:: spack graph --deptype=all mpileaks
+
+The ``deptype`` argument tells Spack what types of dependencies to graph.
+By default it includes link and run dependencies but not build
+dependencies. Supplying ``--deptype=all`` will show the build
+dependencies as well. This is equivalent to
+``--deptype=build,link,run``. Options for ``deptype`` include:
+
+* Any combination of ``build``, ``link``, and ``run`` separated by
+ commas.
+* ``nobuild``, ``nolink``, ``norun`` to omit one type.
+* ``all`` or ``alldeps`` for all types of dependencies.
You can also use ``spack graph`` to generate graphs in the widely used
`Dot <http://www.graphviz.org/doc/info/lang.html>`_ format. For
-example::
-
- $ spack graph --dot mpileaks
- digraph G {
- label = "Spack Dependencies"
- labelloc = "b"
- rankdir = "LR"
- ranksep = "5"
-
- "boost" [label="boost"]
- "callpath" [label="callpath"]
- "libdwarf" [label="libdwarf"]
- "mpileaks" [label="mpileaks"]
- "mpi" [label="mpi"]
- "adept-utils" [label="adept-utils"]
- "dyninst" [label="dyninst"]
- "libelf" [label="libelf"]
-
- "callpath" -> "dyninst"
- "callpath" -> "adept-utils"
- "callpath" -> "mpi"
- "callpath" -> "libelf"
- "callpath" -> "libdwarf"
- "libdwarf" -> "libelf"
- "mpileaks" -> "adept-utils"
- "mpileaks" -> "callpath"
- "mpileaks" -> "mpi"
- "adept-utils" -> "boost"
- "adept-utils" -> "mpi"
- "dyninst" -> "boost"
- "dyninst" -> "libelf"
- "dyninst" -> "libdwarf"
- }
+example:
+
+.. command-output:: spack graph --dot mpileaks
This graph can be provided as input to other graphing tools, such as
those in `Graphviz <http://www.graphviz.org>`_.
+-------------------------
Interactive shell support
---------------------------
+-------------------------
Spack provides some limited shell support to make life easier for
packagers. You can enable these commands by sourcing a setup file in
-the ``/share/spack`` directory. For ``bash`` or ``ksh``, run::
+the ``share/spack`` directory. For ``bash`` or ``ksh``, run:
+
+.. code-block:: sh
- . $SPACK_ROOT/share/spack/setup-env.sh
+ export SPACK_ROOT=/path/to/spack
+ . $SPACK_ROOT/share/spack/setup-env.sh
For ``csh`` and ``tcsh`` run:
- setenv SPACK_ROOT /path/to/spack
- source $SPACK_ROOT/share/spack/setup-env.csh
+.. code-block:: csh
+
+ setenv SPACK_ROOT /path/to/spack
+ source $SPACK_ROOT/share/spack/setup-env.csh
``spack cd`` will then be available.
-.. _spack-cd:
+.. _cmd-spack-cd:
+^^^^^^^^^^^^
``spack cd``
-~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^
``spack cd`` allows you to quickly cd to pertinent directories in Spack.
Suppose you've staged a package but you want to modify it before you
build it:
-.. code-block:: sh
+.. code-block:: console
$ spack stage libelf
==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.13.tar.gz
@@ -2934,37 +3163,39 @@ build it:
$ pwd
/Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-debian7-x86_64/libelf-0.8.13
-``spack cd`` here changed he current working directory to the
+``spack cd`` here changed the current working directory to the
directory containing the expanded ``libelf`` source code. There are a
number of other places you can cd to in the spack directory hierarchy:
-.. command-output:: spack cd -h
+.. command-output:: spack cd --help
Some of these change directory into package-specific locations (stage
directory, install directory, package directory) and others change to
-core spack locations. For example, ``spack cd -m`` will take you to
+core spack locations. For example, ``spack cd --module-dir`` will take you to
the main python source directory of your spack install.
-.. _spack-env:
+.. _cmd-spack-env:
+^^^^^^^^^^^^^
``spack env``
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^
``spack env`` functions much like the standard unix ``env`` command,
but it takes a spec as an argument. You can use it to see the
environment variables that will be set when a particular build runs,
for example:
-.. code-block:: sh
+.. code-block:: console
$ spack env mpileaks@1.1%intel
This will display the entire environment that will be set when the
``mpileaks@1.1%intel`` build runs.
-To run commands in a package's build environment, you can simply provided them after the spec argument to ``spack env``:
+To run commands in a package's build environment, you can simply
+provide them after the spec argument to ``spack env``:
-.. code-block:: sh
+.. code-block:: console
$ spack cd mpileaks@1.1%intel
$ spack env mpileaks@1.1%intel ./configure
@@ -2972,21 +3203,25 @@ To run commands in a package's build environment, you can simply provided them a
This will cd to the build directory and then run ``configure`` in the
package's build environment.
+.. _cmd-spack-location:
-.. _spack-location:
-
+^^^^^^^^^^^^^^^^^^
``spack location``
-~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^
``spack location`` is the same as ``spack cd`` but it does not require
shell support. It simply prints out the path you ask for, rather than
-cd'ing to it. In bash, this::
+cd'ing to it. In bash, this:
+
+.. code-block:: console
- cd $(spack location -b <spec>)
+ $ cd $(spack location --build-dir <spec>)
-is the same as::
+is the same as:
- spack cd -b <spec>
+.. code-block:: console
+
+ $ spack cd --build-dir <spec>
``spack location`` is intended for use in scripts or makefiles that
need to know where packages are installed. e.g., in a makefile you
@@ -2994,59 +3229,62 @@ might write:
.. code-block:: makefile
- DWARF_PREFIX = $(spack location -i libdwarf)
+ DWARF_PREFIX = $(spack location --install-dir libdwarf)
CXXFLAGS += -I$DWARF_PREFIX/include
CXXFLAGS += -L$DWARF_PREFIX/lib
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Build System Configuration Support
-----------------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Imagine a developer creating a CMake-based (or Autotools) project in a local
-directory, which depends on libraries A-Z. Once Spack has installed
-those dependencies, one would like to run ``cmake`` with appropriate
-command line and environment so CMake can find them. The ``spack
-setup`` command does this conveniently, producing a CMake
+Imagine a developer creating a CMake or Autotools-based project in a
+local directory, which depends on libraries A-Z. Once Spack has
+installed those dependencies, one would like to run ``cmake`` with
+appropriate command line and environment so CMake can find them. The
+``spack setup`` command does this conveniently, producing a CMake
configuration that is essentially the same as how Spack *would have*
configured the project. This can be demonstrated with a usage
example:
-.. code-block:: bash
+.. code-block:: console
- cd myproject
- spack setup myproject@local
- mkdir build; cd build
- ../spconfig.py ..
- make
- make install
+ $ cd myproject
+ $ spack setup myproject@local
+ $ mkdir build; cd build
+ $ ../spconfig.py ..
+ $ make
+ $ make install
Notes:
- * Spack must have ``myproject/package.py`` in its repository for
- this to work.
- * ``spack setup`` produces the executable script ``spconfig.py`` in
- the local directory, and also creates the module file for the
- package. ``spconfig.py`` is normally run from the user's
- out-of-source build directory.
- * The version number given to ``spack setup`` is arbitrary, just
- like ``spack diy``. ``myproject/package.py`` does not need to
- have any valid downloadable versions listed (typical when a
- project is new).
- * spconfig.py produces a CMake configuration that *does not* use the
- Spack wrappers. Any resulting binaries *will not* use RPATH,
- unless the user has enabled it. This is recommended for
- development purposes, not production.
- * ``spconfig.py`` is human readable, and can serve as a developer
- reference of what dependencies are being used.
- * ``make install`` installs the package into the Spack repository,
- where it may be used by other Spack packages.
- * CMake-generated makefiles re-run CMake in some circumstances. Use
- of ``spconfig.py`` breaks this behavior, requiring the developer
- to manually re-run ``spconfig.py`` when a ``CMakeLists.txt`` file
- has changed.
+* Spack must have ``myproject/package.py`` in its repository for
+ this to work.
+* ``spack setup`` produces the executable script ``spconfig.py`` in
+ the local directory, and also creates the module file for the
+ package. ``spconfig.py`` is normally run from the user's
+ out-of-source build directory.
+* The version number given to ``spack setup`` is arbitrary, just
+ like ``spack diy``. ``myproject/package.py`` does not need to
+ have any valid downloadable versions listed (typical when a
+ project is new).
+* spconfig.py produces a CMake configuration that *does not* use the
+ Spack wrappers. Any resulting binaries *will not* use RPATH,
+ unless the user has enabled it. This is recommended for
+ development purposes, not production.
+* ``spconfig.py`` is human readable, and can serve as a developer
+ reference of what dependencies are being used.
+* ``make install`` installs the package into the Spack repository,
+ where it may be used by other Spack packages.
+* CMake-generated makefiles re-run CMake in some circumstances. Use
+ of ``spconfig.py`` breaks this behavior, requiring the developer
+ to manually re-run ``spconfig.py`` when a ``CMakeLists.txt`` file
+ has changed.
+
+^^^^^^^^^^^^
CMakePackage
-~~~~~~~~~~~~
+^^^^^^^^^^^^
-In order ot enable ``spack setup`` functionality, the author of
+In order to enable ``spack setup`` functionality, the author of
``myproject/package.py`` must subclass from ``CMakePackage`` instead
of the standard ``Package`` superclass. Because CMake is
standardized, the packager does not need to tell Spack how to run
@@ -3058,21 +3296,22 @@ translate variant flags into CMake definitions. For example:
.. code-block:: python
- def configure_args(self):
- spec = self.spec
- return [
- '-DUSE_EVERYTRACE=%s' % ('YES' if '+everytrace' in spec else 'NO'),
- '-DBUILD_PYTHON=%s' % ('YES' if '+python' in spec else 'NO'),
- '-DBUILD_GRIDGEN=%s' % ('YES' if '+gridgen' in spec else 'NO'),
- '-DBUILD_COUPLER=%s' % ('YES' if '+coupler' in spec else 'NO'),
- '-DUSE_PISM=%s' % ('YES' if '+pism' in spec else 'NO')]
+ def configure_args(self):
+ spec = self.spec
+ return [
+ '-DUSE_EVERYTRACE=%s' % ('YES' if '+everytrace' in spec else 'NO'),
+ '-DBUILD_PYTHON=%s' % ('YES' if '+python' in spec else 'NO'),
+ '-DBUILD_GRIDGEN=%s' % ('YES' if '+gridgen' in spec else 'NO'),
+ '-DBUILD_COUPLER=%s' % ('YES' if '+coupler' in spec else 'NO'),
+ '-DUSE_PISM=%s' % ('YES' if '+pism' in spec else 'NO')
+ ]
If needed, a packager may also override methods defined in
``StagedPackage`` (see below).
-
+^^^^^^^^^^^^^
StagedPackage
-~~~~~~~~~~~~~
+^^^^^^^^^^^^^
``CMakePackage`` is implemented by subclassing the ``StagedPackage``
superclass, which breaks down the standard ``Package.install()``
@@ -3094,8 +3333,9 @@ and ``install``. Details:
``install()`` method may be accessed via ``self.spec`` and
``self.prefix``.
+^^^^^^^^^^^^^
GNU Autotools
-~~~~~~~~~~~~~
+^^^^^^^^^^^^^
The ``setup`` functionality is currently only available for
CMake-based packages. Extending this functionality to GNU
diff --git a/lib/spack/docs/packaging_tutorial/0.package.py b/lib/spack/docs/packaging_tutorial/0.package.py
new file mode 100644
index 0000000000..ad6fd4d077
--- /dev/null
+++ b/lib/spack/docs/packaging_tutorial/0.package.py
@@ -0,0 +1,64 @@
+# flake8: noqa
+##############################################################################
+# 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
+##############################################################################
+#
+# This is a template package file for Spack. We've put "FIXME"
+# next to all the things you'll want to change. Once you've handled
+# them, you can save this file and test your package like this:
+#
+# spack install mpileaks
+#
+# You can edit this file again by typing:
+#
+# spack edit mpileaks
+#
+# See the Spack documentation for more information on packaging.
+# If you submit this package back to Spack as a pull request,
+# please first remove this boilerplate and all FIXME comments.
+#
+from spack import *
+
+
+class Mpileaks(AutotoolsPackage):
+ """FIXME: Put a proper description of your package here."""
+
+ # FIXME: Add a proper url for your package's homepage here.
+ homepage = "http://www.example.com"
+ url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
+
+ version('1.0', '8838c574b39202a57d7c2d68692718aa')
+
+ # FIXME: Add dependencies if required.
+ # depends_on('m4', type='build')
+ # depends_on('autoconf', type='build')
+ # depends_on('automake', type='build')
+ # depends_on('libtool', type='build')
+ # depends_on('foo')
+
+ def configure_args(self):
+ # FIXME: Add arguments other than --prefix
+ # FIXME: If not needed delete the function
+ args = []
+ return args
diff --git a/lib/spack/docs/packaging_tutorial/1.package.py b/lib/spack/docs/packaging_tutorial/1.package.py
new file mode 100644
index 0000000000..afacf3bbe8
--- /dev/null
+++ b/lib/spack/docs/packaging_tutorial/1.package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+# flake8: noqa
+
+from spack import *
+
+
+class Mpileaks(AutotoolsPackage):
+ """Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes"""
+
+ homepage = "https://github.com/hpc/mpileaks"
+ url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
+
+ version('1.0', '8838c574b39202a57d7c2d68692718aa')
+
+ # FIXME: Add dependencies if required.
+ # depends_on('m4', type='build')
+ # depends_on('autoconf', type='build')
+ # depends_on('automake', type='build')
+ # depends_on('libtool', type='build')
+ # depends_on('foo')
+
+ def configure_args(self):
+ # FIXME: Add arguments other than --prefix
+ # FIXME: If not needed delete the function
+ args = []
+ return args
diff --git a/lib/spack/docs/packaging_tutorial/2.package.py b/lib/spack/docs/packaging_tutorial/2.package.py
new file mode 100644
index 0000000000..f7000cd1b6
--- /dev/null
+++ b/lib/spack/docs/packaging_tutorial/2.package.py
@@ -0,0 +1,21 @@
+# flake8: noqa
+
+from spack import *
+
+class Mpileaks(AutotoolsPackage):
+ """Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes"""
+
+ homepage = "https://github.com/hpc/mpileaks"
+ url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
+
+ version('1.0', '8838c574b39202a57d7c2d68692718aa')
+
+ depends_on('mpi')
+ depends_on('adept-utils')
+ depends_on('callpath')
+
+ def configure_args(self):
+ # FIXME: Add arguments other than --prefix
+ # FIXME: If not needed delete the function
+ args = []
+ return args
diff --git a/lib/spack/docs/packaging_tutorial/3.package.py b/lib/spack/docs/packaging_tutorial/3.package.py
new file mode 100644
index 0000000000..6e7e5e2f3c
--- /dev/null
+++ b/lib/spack/docs/packaging_tutorial/3.package.py
@@ -0,0 +1,17 @@
+# flake8: noqa
+
+class Mpileaks(AutotoolsPackage):
+ """Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes"""
+ homepage = "https://github.com/hpc/mpileaks"
+ url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
+
+ version('1.0', '8838c574b39202a57d7c2d68692718aa')
+
+ depends_on('mpi')
+ depends_on('adept-utils')
+ depends_on('callpath')
+
+ def configure_args(self):
+ args = ['--with-adept-utils=%s' % self.spec['adept-utils'].prefix,
+ '--with-callpath=%s' % self.spec['callpath'].prefix]
+ return args
diff --git a/lib/spack/docs/packaging_tutorial/4.package.py b/lib/spack/docs/packaging_tutorial/4.package.py
new file mode 100644
index 0000000000..3294b86e25
--- /dev/null
+++ b/lib/spack/docs/packaging_tutorial/4.package.py
@@ -0,0 +1,26 @@
+# flake8: noqa
+
+from spack import *
+
+class Mpileaks(AutotoolsPackage):
+ """Tool to detect and report MPI objects like MPI_Requests and MPI_Datatypes"""
+
+ homepage = "https://github.com/hpc/mpileaks"
+ url = "https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"
+
+ version('1.0', '8838c574b39202a57d7c2d68692718aa')
+
+ variant('stackstart', default=0, description='Specify the number of stack frames to truncate.')
+
+ depends_on('mpi')
+ depends_on('adept-utils')
+ depends_on('callpath')
+
+ def configure_args(self):
+ args = ['--with-adept-utils=%s' % self.spec['adept-utils'].prefix,
+ '--with-callpath=%s' % self.spec['callpath'].prefix]
+ stackstart = int(self.spec.variants['stackstart'].value)
+ if stackstart:
+ args.extend(['--with-stack-start-c=%s' % stackstart,
+ '--with-stack-start-fortran=%s' % stackstart])
+ return args
diff --git a/lib/spack/docs/workflows.rst b/lib/spack/docs/workflows.rst
new file mode 100644
index 0000000000..314f57c8b5
--- /dev/null
+++ b/lib/spack/docs/workflows.rst
@@ -0,0 +1,1198 @@
+=========
+Workflows
+=========
+
+The process of using Spack involves building packages, running
+binaries from those packages, and developing software that depends on
+those packages. For example, one might use Spack to build the
+``netcdf`` package, use ``spack load`` to run the ``ncdump`` binary, and
+finally, write a small C program to read/write a particular NetCDF file.
+
+Spack supports a variety of workflows to suit a variety of situations
+and user preferences, there is no single way to do all these things.
+This chapter demonstrates different workflows that have been
+developed, pointing out the pros and cons of them.
+
+-----------
+Definitions
+-----------
+
+First some basic definitions.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Package, Concrete Spec, Installed Package
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In Spack, a package is an abstract recipe to build one piece of software.
+Spack packages may be used to build, in principle, any version of that
+software with any set of variants. Examples of packages include
+``curl`` and ``zlib``.
+
+A package may be *instantiated* to produce a concrete spec; one
+possible realization of a particular package, out of combinatorially
+many other realizations. For example, here is a concrete spec
+instantiated from ``curl``:
+
+.. code-block:: console
+
+ curl@7.50.1%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^openssl@system%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^zlib@1.2.8%gcc@5.3.0 arch=linux-SuSE11-x86_64
+
+Spack's core concretization algorithm generates concrete specs by
+instantiating packages from its repo, based on a set of "hints",
+including user input and the ``packages.yaml`` file. This algorithm
+may be accessed at any time with the ``spack spec`` command. For
+example:
+
+.. code-block:: console
+
+ $ spack spec curl
+ curl@7.50.1%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^openssl@system%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^zlib@1.2.8%gcc@5.3.0 arch=linux-SuSE11-x86_64
+
+Every time Spack installs a package, that installation corresponds to
+a concrete spec. Only a vanishingly small fraction of possible
+concrete specs will be installed at any one Spack site.
+
+^^^^^^^^^^^^^^^
+Consistent Sets
+^^^^^^^^^^^^^^^
+
+A set of Spack specs is said to be *consistent* if each package is
+only instantiated one way within it --- that is, if two specs in the
+set have the same package, then they must also have the same version,
+variant, compiler, etc. For example, the following set is consistent:
+
+.. code-block:: console
+
+ curl@7.50.1%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^openssl@system%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^zlib@1.2.8%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ zlib@1.2.8%gcc@5.3.0 arch=linux-SuSE11-x86_64
+
+The following set is not consistent:
+
+.. code-block:: console
+
+ curl@7.50.1%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^openssl@system%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ ^zlib@1.2.8%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ zlib@1.2.7%gcc@5.3.0 arch=linux-SuSE11-x86_64
+
+The compatibility of a set of installed packages determines what may
+be done with it. It is always possible to ``spack load`` any set of
+installed packages, whether or not they are consistent, and run their
+binaries from the command line. However, a set of installed packages
+can only be linked together in one binary if it is consistent.
+
+If the user produces a series of ``spack spec`` or ``spack load``
+commands, in general there is no guarantee of consistency between
+them. Spack's concretization procedure guarantees that the results of
+any *single* ``spack spec`` call will be consistent. Therefore, the
+best way to ensure a consistent set of specs is to create a Spack
+package with dependencies, and then instantiate that package. We will
+use this technique below.
+
+-----------------
+Building Packages
+-----------------
+
+Suppose you are tasked with installing a set of software packages on a
+system in order to support one application -- both a core application
+program, plus software to prepare input and analyze output. The
+required software might be summed up as a series of ``spack install``
+commands placed in a script. If needed, this script can always be run
+again in the future. For example:
+
+.. code-block:: sh
+
+ #!/bin/sh
+ spack install modele-utils
+ spack install emacs
+ spack install ncview
+ spack install nco
+ spack install modele-control
+ spack install py-numpy
+
+In most cases, this script will not correctly install software
+according to your specific needs: choices need to be made for
+variants, versions and virtual dependency choices may be needed. It
+*is* possible to specify these choices by extending specs on the
+command line; however, the same choices must be specified repeatedly.
+For example, if you wish to use ``openmpi`` to satisfy the ``mpi``
+dependency, then ``^openmpi`` will have to appear on *every* ``spack
+install`` line that uses MPI. It can get repetitive fast.
+
+Customizing Spack installation options is easier to do in the
+``~/.spack/packages.yaml`` file. In this file, you can specify
+preferred versions and variants to use for packages. For example:
+
+.. code-block:: yaml
+
+ packages:
+ python:
+ version: [3.5.1]
+ modele-utils:
+ version: [cmake]
+
+ everytrace:
+ version: [develop]
+ eigen:
+ variants: ~suitesparse
+ netcdf:
+ variants: +mpi
+
+ all:
+ compiler: [gcc@5.3.0]
+ providers:
+ mpi: [openmpi]
+ blas: [openblas]
+ lapack: [openblas]
+
+
+This approach will work as long as you are building packages for just
+one application.
+
+^^^^^^^^^^^^^^^^^^^^^
+Multiple Applications
+^^^^^^^^^^^^^^^^^^^^^
+
+Suppose instead you're building multiple inconsistent applications.
+For example, users want package A to be built with ``openmpi`` and
+package B with ``mpich`` --- but still share many other lower-level
+dependencies. In this case, a single ``packages.yaml`` file will not
+work. Plans are to implement *per-project* ``packages.yaml`` files.
+In the meantime, one could write shell scripts to switch
+``packages.yaml`` between multiple versions as needed, using symlinks.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Combinatorial Sets of Installs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Suppose that you are now tasked with systematically building many
+incompatible versions of packages. For example, you need to build
+``petsc`` 9 times for 3 different MPI implementations on 3 different
+compilers, in order to support user needs. In this case, you will
+need to either create 9 different ``packages.yaml`` files; or more
+likely, create 9 different ``spack install`` command lines with the
+correct options in the spec. Here is a real-life example of this kind
+of usage:
+
+.. code-block:: sh
+
+ #!/bin/sh
+
+ compilers=(
+ %gcc
+ %intel
+ %pgi
+ )
+
+ mpis=(
+ openmpi+psm~verbs
+ openmpi~psm+verbs
+ mvapich2+psm~mrail
+ mvapich2~psm+mrail
+ mpich+verbs
+ )
+
+ for compiler in "${compilers[@]}"
+ do
+ # Serial installs
+ spack install szip $compiler
+ spack install hdf $compiler
+ spack install hdf5 $compiler
+ spack install netcdf $compiler
+ spack install netcdf-fortran $compiler
+ spack install ncview $compiler
+
+ # Parallel installs
+ for mpi in "${mpis[@]}"
+ do
+ spack install $mpi $compiler
+ spack install hdf5~cxx+mpi $compiler ^$mpi
+ spack install parallel-netcdf $compiler ^$mpi
+ done
+ done
+
+------------------------------
+Running Binaries from Packages
+------------------------------
+
+Once Spack packages have been built, the next step is to use them. As
+with building packages, there are many ways to use them, depending on
+the use case.
+
+^^^^^^^^^^^^
+Find and Run
+^^^^^^^^^^^^
+
+The simplest way to run a Spack binary is to find it and run it!
+In many cases, nothing more is needed because Spack builds binaries
+with RPATHs. Spack installation directories may be found with ``spack
+location --install-dir`` commands. For example:
+
+.. code-block:: console
+
+ $ spack location --install-dir cmake
+ /home/me/spack2/opt/spack/linux-SuSE11-x86_64/gcc-5.3.0/cmake-3.6.0-7cxrynb6esss6jognj23ak55fgxkwtx7
+
+This gives the root of the Spack package; relevant binaries may be
+found within it. For example:
+
+.. code-block:: console
+
+ $ CMAKE=`spack location --install-dir cmake`/bin/cmake
+
+
+Standard UNIX tools can find binaries as well. For example:
+
+.. code-block:: console
+
+ $ find ~/spack2/opt -name cmake | grep bin
+ /home/me/spack2/opt/spack/linux-SuSE11-x86_64/gcc-5.3.0/cmake-3.6.0-7cxrynb6esss6jognj23ak55fgxkwtx7/bin/cmake
+
+These methods are suitable, for example, for setting up build
+processes or GUIs that need to know the location of particular tools.
+However, other more powerful methods are generally preferred for user
+environments.
+
+
+^^^^^^^^^^^^^^^^^^^^^^^
+Spack-Generated Modules
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Suppose that Spack has been used to install a set of command-line
+programs, which users now wish to use. One can in principle put a
+number of ``spack load`` commands into ``.bashrc``, for example, to
+load a set of Spack-generated modules:
+
+.. code-block:: sh
+
+ spack load modele-utils
+ spack load emacs
+ spack load ncview
+ spack load nco
+ spack load modele-control
+
+Although simple load scripts like this are useful in many cases, they
+have some drawbacks:
+
+1. The set of modules loaded by them will in general not be
+ consistent. They are a decent way to load commands to be called
+ from command shells. See below for better ways to assemble a
+ consistent set of packages for building application programs.
+
+2. The ``spack spec`` and ``spack install`` commands use a
+ sophisticated concretization algorithm that chooses the "best"
+ among several options, taking into account ``packages.yaml`` file.
+ The ``spack load`` and ``spack module loads`` commands, on the
+ other hand, are not very smart: if the user-supplied spec matches
+ more than one installed package, then ``spack module loads`` will
+ fail. This may change in the future. For now, the workaround is to
+ be more specific on any ``spack module loads`` lines that fail.
+
+
+""""""""""""""""""""""
+Generated Load Scripts
+""""""""""""""""""""""
+
+Another problem with using `spack load` is, it is slow; a typical user
+environment could take several seconds to load, and would not be
+appropriate to put into ``.bashrc`` directly. It is preferable to use
+a series of ``spack module loads`` commands to pre-compute which
+modules to load. These can be put in a script that is run whenever
+installed Spack packages change. For example:
+
+.. code-block:: sh
+
+ #!/bin/sh
+ #
+ # Generate module load commands in ~/env/spackenv
+
+ cat <<EOF | /bin/sh >$HOME/env/spackenv
+ FIND='spack module loads --prefix linux-SuSE11-x86_64/'
+
+ \$FIND modele-utils
+ \$FIND emacs
+ \$FIND ncview
+ \$FIND nco
+ \$FIND modele-control
+ EOF
+
+The output of this file is written in ``~/env/spackenv``:
+
+.. code-block:: sh
+
+ # binutils@2.25%gcc@5.3.0+gold~krellpatch~libiberty arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/binutils-2.25-gcc-5.3.0-6w5d2t4
+ # python@2.7.12%gcc@5.3.0~tk~ucs4 arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/python-2.7.12-gcc-5.3.0-2azoju2
+ # ncview@2.1.7%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/ncview-2.1.7-gcc-5.3.0-uw3knq2
+ # nco@4.5.5%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/nco-4.5.5-gcc-5.3.0-7aqmimu
+ # modele-control@develop%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/modele-control-develop-gcc-5.3.0-7rddsij
+ # zlib@1.2.8%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/zlib-1.2.8-gcc-5.3.0-fe5onbi
+ # curl@7.50.1%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/curl-7.50.1-gcc-5.3.0-4vlev55
+ # hdf5@1.10.0-patch1%gcc@5.3.0+cxx~debug+fortran+mpi+shared~szip~threadsafe arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/hdf5-1.10.0-patch1-gcc-5.3.0-pwnsr4w
+ # netcdf@4.4.1%gcc@5.3.0~hdf4+mpi arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/netcdf-4.4.1-gcc-5.3.0-rl5canv
+ # netcdf-fortran@4.4.4%gcc@5.3.0 arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/netcdf-fortran-4.4.4-gcc-5.3.0-stdk2xq
+ # modele-utils@cmake%gcc@5.3.0+aux+diags+ic arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/modele-utils-cmake-gcc-5.3.0-idyjul5
+ # everytrace@develop%gcc@5.3.0+fortran+mpi arch=linux-SuSE11-x86_64
+ module load linux-SuSE11-x86_64/everytrace-develop-gcc-5.3.0-p5wmb25
+
+Users may now put ``source ~/env/spackenv`` into ``.bashrc``.
+
+.. note ::
+
+ Some module systems put a prefix on the names of modules created
+ by Spack. For example, that prefix is ``linux-SuSE11-x86_64/`` in
+ the above case. If a prefix is not needed, you may omit the
+ ``--prefix`` flag from ``spack module loads``.
+
+
+"""""""""""""""""""""""
+Transitive Dependencies
+"""""""""""""""""""""""
+
+In the script above, each ``spack module loads`` command generates a
+*single* ``module load`` line. Transitive dependencies do not usually
+need to be loaded, only modules the user needs in in ``$PATH``. This is
+because Spack builds binaries with RPATH. Spack's RPATH policy has
+some nice features:
+
+#. Modules for multiple inconsistent applications may be loaded
+ simultaneously. In the above example (Multiple Applications),
+ package A and package B can coexist together in the user's $PATH,
+ even though they use different MPIs.
+
+#. RPATH eliminates a whole class of strange errors that can happen
+ in non-RPATH binaries when the wrong ``LD_LIBRARY_PATH`` is
+ loaded.
+
+#. Recursive module systems such as LMod are not necessary.
+
+#. Modules are not needed at all to execute binaries. If a path to a
+ binary is known, it may be executed. For example, the path for a
+ Spack-built compiler can be given to an IDE without requiring the
+ IDE to load that compiler's module.
+
+Unfortunately, Spack's RPATH support does not work in all case. For example:
+
+#. Software comes in many forms --- not just compiled ELF binaries,
+ but also as interpreted code in Python, R, JVM bytecode, etc.
+ Those systems almost universally use an environment variable
+ analogous to ``LD_LIBRARY_PATH`` to dynamically load libraries.
+
+#. Although Spack generally builds binaries with RPATH, it does not
+ currently do so for compiled Python extensions (for example,
+ ``py-numpy``). Any libraries that these extensions depend on
+ (``blas`` in this case, for example) must be specified in the
+ ``LD_LIBRARY_PATH``.`
+
+#. In some cases, Spack-generated binaries end up without a
+ functional RPATH for no discernible reason.
+
+In cases where RPATH support doesn't make things "just work," it can
+be necessary to load a module's dependencies as well as the module
+itself. This is done by adding the ``--dependencies`` flag to the
+``spack module loads`` command. For example, the following line,
+added to the script above, would be used to load SciPy, along with
+Numpy, core Python, BLAS/LAPACK and anything else needed:
+
+.. code-block:: sh
+
+ spack module loads --dependencies py-scipy
+
+^^^^^^^^^^^^^^^^^^
+Extension Packages
+^^^^^^^^^^^^^^^^^^
+
+:ref:`packaging_extensions` may be used as an alternative to loading
+Python (and similar systems) packages directly. If extensions are
+activated, then ``spack load python`` will also load all the
+extensions activated for the given ``python``. This reduces the need
+for users to load a large number of modules.
+
+However, Spack extensions have two potential drawbacks:
+
+#. Activated packages that involve compiled C extensions may still
+ need their dependencies to be loaded manually. For example,
+ ``spack load openblas`` might be required to make ``py-numpy``
+ work.
+
+#. Extensions "break" a core feature of Spack, which is that multiple
+ versions of a package can co-exist side-by-side. For example,
+ suppose you wish to run a Python package in two different
+ environments but the same basic Python --- one with
+ ``py-numpy@1.7`` and one with ``py-numpy@1.8``. Spack extensions
+ will not support this potential debugging use case.
+
+
+^^^^^^^^^^^^^^
+Dummy Packages
+^^^^^^^^^^^^^^
+
+As an alternative to a series of ``module load`` commands, one might
+consider dummy packages as a way to create a *consistent* set of
+packages that may be loaded as one unit. The idea here is pretty
+simple:
+
+#. Create a package (say, ``mydummy``) with no URL and no
+ ``install()`` method, just dependencies.
+
+#. Run ``spack install mydummy`` to install.
+
+An advantage of this method is the set of packages produced will be
+consistent. This means that you can reliably build software against
+it. A disadvantage is the set of packages will be consistent; this
+means you cannot load up two applications this way if they are not
+consistent with each other.
+
+^^^^^^^^^^^^^^^^
+Filesystem Views
+^^^^^^^^^^^^^^^^
+
+Filesystem views offer an alternative to environment modules, another
+way to assemble packages in a useful way and load them into a user's
+environment.
+
+A filesystem view is a single directory tree that is the union of the
+directory hierarchies of a number of installed packages; it is similar
+to the directory hiearchy that might exist under ``/usr/local``. The
+files of the view's installed packages are brought into the view by
+symbolic or hard links, referencing the original Spack installation.
+
+When software is built and installed, absolute paths are frequently
+"baked into" the software, making it non-relocatable. This happens
+not just in RPATHs, but also in shebangs, configuration files, and
+assorted other locations.
+
+Therefore, programs run out of a Spack view will typically still look
+in the original Spack-installed location for shared libraries and
+other resources. This behavior is not easily changed; in general,
+there is no way to know where absolute paths might be written into an
+installed package, and how to relocate it. Therefore, the original
+Spack tree must be kept in place for a filesystem view to work, even
+if the view is built with hardlinks.
+
+.. FIXME: reference the relocation work of Hegner and Gartung (PR #1013)
+
+
+""""""""""""""""""""""
+Using Filesystem Views
+""""""""""""""""""""""
+
+A filesystem view is created, and packages are linked in, by the ``spack
+view`` command's ``symlink`` and ``hardlink`` sub-commands. The
+``spack view remove`` command can be used to unlink some or all of the
+filesystem view.
+
+The following example creates a filesystem view based
+on an installed ``cmake`` package and then removes from the view the
+files in the ``cmake`` package while retaining its dependencies.
+
+.. code-block:: console
+
+ $ spack view --verbose symlink myview cmake@3.5.2
+ ==> Linking package: "ncurses"
+ ==> Linking package: "zlib"
+ ==> Linking package: "openssl"
+ ==> Linking package: "cmake"
+
+ $ ls myview/
+ bin doc etc include lib share
+
+ $ ls myview/bin/
+ captoinfo clear cpack ctest infotocap openssl tabs toe tset
+ ccmake cmake c_rehash infocmp ncurses6-config reset tic tput
+
+ $ spack view --verbose --dependencies false rm myview cmake@3.5.2
+ ==> Removing package: "cmake"
+
+ $ ls myview/bin/
+ captoinfo c_rehash infotocap openssl tabs toe tset
+ clear infocmp ncurses6-config reset tic tput
+
+.. note::
+
+ If the set of packages being included in a view is inconsistent,
+ then it is possible that two packages will provide the same file. Any
+ conflicts of this type are handled on a first-come-first-served basis,
+ and a warning is printed.
+
+.. note::
+
+ When packages are removed from a view, empty directories are
+ purged.
+
+""""""""""""""""""
+Fine-Grain Control
+""""""""""""""""""
+
+The ``--exclude`` and ``--dependencies`` option flags allow for
+fine-grained control over which packages and dependencies do or not
+get included in a view. For example, suppose you are developing the
+``appsy`` package. You wish to build against a view of all ``appsy``
+dependencies, but not ``appsy`` itself:
+
+.. code-block:: console
+
+ $ spack view symlink --dependencies yes --exclude appsy appsy
+
+Alternately, you wish to create a view whose purpose is to provide
+binary executables to end users. You only need to include
+applications they might want, and not those applications'
+dependencies. In this case, you might use:
+
+.. code-block:: console
+
+ $ spack view symlink --dependencies no cmake
+
+
+"""""""""""""""""""""""
+Hybrid Filesystem Views
+"""""""""""""""""""""""
+
+Although filesystem views are usually created by Spack, users are free
+to add to them by other means. For example, imagine a filesystem
+view, created by Spack, that looks something like:
+
+.. code-block:: console
+
+ /path/to/MYVIEW/bin/programA -> /path/to/spack/.../bin/programA
+ /path/to/MYVIEW/lib/libA.so -> /path/to/spack/.../lib/libA.so
+
+Now, the user may add to this view by non-Spack means; for example, by
+running a classic install script. For example:
+
+.. code-block:: console
+
+ $ tar -xf B.tar.gz
+ $ cd B/
+ $ ./configure --prefix=/path/to/MYVIEW \
+ --with-A=/path/to/MYVIEW
+ $ make && make install
+
+The result is a hybrid view:
+
+.. code-block:: console
+
+ /path/to/MYVIEW/bin/programA -> /path/to/spack/.../bin/programA
+ /path/to/MYVIEW/bin/programB
+ /path/to/MYVIEW/lib/libA.so -> /path/to/spack/.../lib/libA.so
+ /path/to/MYVIEW/lib/libB.so
+
+In this case, real files coexist, interleaved with the "view"
+symlinks. At any time one can delete ``/path/to/MYVIEW`` or use
+``spack view`` to manage it surgically. None of this will affect the
+real Spack install area.
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Discussion: Running Binaries
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Modules, extension packages and filesystem views are all ways to
+assemble sets of Spack packages into a useful environment. They are
+all semantically similar, in that conflicting installed packages
+cannot simultaneously be loaded, activated or included in a view.
+
+With all of these approaches, there is no guarantee that the
+environment created will be consistent. It is possible, for example,
+to simultaneously load application A that uses OpenMPI and application
+B that uses MPICH. Both applications will run just fine in this
+inconsistent environment because they rely on RPATHs, not the
+environment, to find their dependencies.
+
+In general, environments set up using modules vs. views will work
+similarly. Both can be used to set up ephemeral or long-lived
+testing/development environments. Operational differences between the
+two approaches can make one or the other preferable in certain
+environments:
+
+* Filesystem views do not require environment module infrastructure.
+ Although Spack can install ``environment-modules``, users might be
+ hostile to its use. Filesystem views offer a good solution for
+ sysadmins serving users who just "want all the stuff I need in one
+ place" and don't want to hear about Spack.
+
+* Although modern build systems will find dependencies wherever they
+ might be, some applications with hand-built make files expect their
+ dependencies to be in one place. One common problem is makefiles
+ that assume that ``netcdf`` and ``netcdf-fortran`` are installed in
+ the same tree. Or, one might use an IDE that requires tedious
+ configuration of dependency paths; and it's easier to automate that
+ administration in a view-building script than in the IDE itself.
+ For all these cases, a view will be preferable to other ways to
+ assemble an environment.
+
+* On systems with I-node quotas, modules might be preferable to views
+ and extension packages.
+
+* Views and activated extensions maintain state that is semantically
+ equivalent to the information in a ``spack module loads`` script.
+ Administrators might find things easier to maintain without the
+ added "heavyweight" state of a view.
+
+------------------------------
+Developing Software with Spack
+------------------------------
+
+For any project, one needs to assemble an
+environment of that application's dependencies. You might consider
+loading a series of modules or creating a filesystem view. This
+approach, while obvious, has some serious drawbacks:
+
+1. There is no guarantee that an environment created this way will be
+ consistent. Your application could end up with dependency A
+ expecting one version of MPI, and dependency B expecting another.
+ The linker will not be happy...
+
+2. Suppose you need to debug a package deep within your software DAG.
+ If you build that package with a manual environment, then it
+ becomes difficult to have Spack auto-build things that depend on
+ it. That could be a serious problem, depending on how deep the
+ package in question is in your dependency DAG.
+
+3. At its core, Spack is a sophisticated concretization algorithm that
+ matches up packages with appropriate dependencies and creates a
+ *consistent* environment for the package it's building. Writing a
+ list of ``spack load`` commands for your dependencies is at least
+ as hard as writing the same list of ``depends_on()`` declarations
+ in a Spack package. But it makes no use of Spack concretization
+ and is more error-prone.
+
+4. Spack provides an automated, systematic way not just to find a
+ packages's dependencies --- but also to build other packages on
+ top. Any Spack package can become a dependency for another Spack
+ package, offering a powerful vision of software re-use. If you
+ build your package A outside of Spack, then your ability to use it
+ as a building block for other packages in an automated way is
+ diminished: other packages depending on package A will not
+ be able to use Spack to fulfill that dependency.
+
+5. If you are reading this manual, you probably love Spack. You're
+ probably going to write a Spack package for your software so
+ prospective users can install it with the least amount of pain.
+ Why should you go to additional work to find dependencies in your
+ development environment? Shouldn't Spack be able to help you build
+ your software based on the package you've already written?
+
+In this section, we show how Spack can be used in the software
+development process to greatest effect, and how development packages
+can be seamlessly integrated into the Spack ecosystem. We will show
+how this process works by example, assuming the software you are
+creating is called ``mylib``.
+
+^^^^^^^^^^^^^^^^^^^^^
+Write the CMake Build
+^^^^^^^^^^^^^^^^^^^^^
+
+For now, the techniques in this section only work for CMake-based
+projects, although they could be easily extended to other build
+systems in the future. We will therefore assume you are using CMake
+to build your project.
+
+The ``CMakeLists.txt`` file should be written as normal. A few caveats:
+
+1. Your project should produce binaries with RPATHs. This will ensure
+ that they work the same whether built manually or automatically by
+ Spack. For example:
+
+.. code-block:: cmake
+
+ # enable @rpath in the install name for any shared library being built
+ # note: it is planned that a future version of CMake will enable this by default
+ set(CMAKE_MACOSX_RPATH 1)
+
+ # Always use full RPATH
+ # http://www.cmake.org/Wiki/CMake_RPATH_handling
+ # http://www.kitware.com/blog/home/post/510
+
+ # use, i.e. don't skip the full RPATH for the build tree
+ SET(CMAKE_SKIP_BUILD_RPATH FALSE)
+
+ # when building, don't use the install RPATH already
+ # (but later on when installing)
+ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+
+ # add the automatically determined parts of the RPATH
+ # which point to directories outside the build tree to the install RPATH
+ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+ # the RPATH to be used when installing, but only if it's not a system directory
+ LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
+ IF("${isSystemDir}" STREQUAL "-1")
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+ ENDIF("${isSystemDir}" STREQUAL "-1")
+
+
+2. Spack provides a CMake variable called
+ ``SPACK_TRANSITIVE_INCLUDE_PATH``, which contains the ``include/``
+ directory for all of your project's transitive dependencies. It
+ can be useful if your project ``#include``s files from package B,
+ which ``#include`` files from package C, but your project only
+ lists project B as a dependency. This works in traditional
+ single-tree build environments, in which B and C's include files
+ live in the same place. In order to make it work with Spack as
+ well, you must add the following to ``CMakeLists.txt``. It will
+ have no effect when building without Spack:
+
+ .. code-block:: cmake
+
+ # Include all the transitive dependencies determined by Spack.
+ # If we're not running with Spack, this does nothing...
+ include_directories($ENV{SPACK_TRANSITIVE_INCLUDE_PATH})
+
+ .. note::
+
+ Note that this feature is controversial and could break with
+ future versions of GNU ld. The best practice is to make sure
+ anything you ``#include`` is listed as a dependency in your
+ CMakeLists.txt (and Spack package).
+
+.. _write-the-spack-package:
+
+^^^^^^^^^^^^^^^^^^^^^^^
+Write the Spack Package
+^^^^^^^^^^^^^^^^^^^^^^^
+
+The Spack package also needs to be written, in tandem with setting up
+the build (for example, CMake). The most important part of this task
+is declaring dependencies. Here is an example of the Spack package
+for the ``mylib`` package (ellipses for brevity):
+
+.. code-block:: python
+
+ class Mylib(CMakePackage):
+ """Misc. reusable utilities used by Myapp."""
+
+ homepage = "https://github.com/citibeth/mylib"
+ url = "https://github.com/citibeth/mylib/tarball/123"
+
+ version('0.1.2', '3a6acd70085e25f81b63a7e96c504ef9')
+ version('develop', git='https://github.com/citibeth/mylib.git',
+ branch='develop')
+
+ variant('everytrace', default=False,
+ description='Report errors through Everytrace')
+ ...
+
+ extends('python')
+
+ depends_on('eigen')
+ depends_on('everytrace', when='+everytrace')
+ depends_on('proj', when='+proj')
+ ...
+ depends_on('cmake', type='build')
+ depends_on('doxygen', type='build')
+
+ def configure_args(self):
+ spec = self.spec
+ return [
+ '-DUSE_EVERYTRACE=%s' % ('YES' if '+everytrace' in spec else 'NO'),
+ '-DUSE_PROJ4=%s' % ('YES' if '+proj' in spec else 'NO'),
+ ...
+ '-DUSE_UDUNITS2=%s' % ('YES' if '+udunits2' in spec else 'NO'),
+ '-DUSE_GTEST=%s' % ('YES' if '+googletest' in spec else 'NO')]
+
+This is a standard Spack package that can be used to install
+``mylib`` in a production environment. The list of dependencies in
+the Spack package will generally be a repeat of the list of CMake
+dependencies. This package also has some features that allow it to be
+used for development:
+
+1. It subclasses ``CMakePackage`` instead of ``Package``. This
+ eliminates the need to write an ``install()`` method, which is
+ defined in the superclass. Instead, one just needs to write the
+ ``configure_args()`` method. That method should return the
+ arguments needed for the ``cmake`` command (beyond the standard
+ CMake arguments, which Spack will include already). These
+ arguments are typically used to turn features on/off in the build.
+
+2. It specifies a non-checksummed version ``develop``. Running
+ ``spack install mylib@develop`` the ``@develop`` version will
+ install the latest version off the develop branch. This method of
+ download is useful for the developer of a project while it is in
+ active development; however, it should only be used by developers
+ who control and trust the repository in question!
+
+3. The ``url``, ``url_for_version()`` and ``homepage`` attributes are
+ not used in development. Don't worry if you don't have any, or if
+ they are behind a firewall.
+
+^^^^^^^^^^^^^^^^
+Build with Spack
+^^^^^^^^^^^^^^^^
+
+Now that you have a Spack package, you can use Spack to find its
+dependencies automatically. For example:
+
+.. code-block:: console
+
+ $ cd mylib
+ $ spack setup mylib@local
+
+The result will be a file ``spconfig.py`` in the top-level
+``mylib/`` directory. It is a short script that calls CMake with the
+dependencies and options determined by Spack --- similar to what
+happens in ``spack install``, but now written out in script form.
+From a developer's point of view, you can think of ``spconfig.py`` as
+a stand-in for the ``cmake`` command.
+
+.. note::
+
+ You can invent any "version" you like for the ``spack setup``
+ command.
+
+.. note::
+
+ Although ``spack setup`` does not build your package, it does
+ create and install a module file, and mark in the database that
+ your package has been installed. This can lead to errors, of
+ course, if you don't subsequently install your package.
+ Also... you will need to ``spack uninstall`` before you run
+ ``spack setup`` again.
+
+
+You can now build your project as usual with CMake:
+
+.. code-block:: console
+
+ $ mkdir build; cd build
+ $ ../spconfig.py .. # Instead of cmake ..
+ $ make
+ $ make install
+
+Once your ``make install`` command is complete, your package will be
+installed, just as if you'd run ``spack install``. Except you can now
+edit, re-build and re-install as often as needed, without checking
+into Git or downloading tarballs.
+
+.. note::
+
+ The build you get this way will be *almost* the same as the build
+ from ``spack install``. The only difference is, you will not be
+ using Spack's compiler wrappers. This difference has not caused
+ problems in our experience, as long as your project sets
+ RPATHs as shown above. You DO use RPATHs, right?
+
+^^^^^^^^^^^^^^^^^^^^
+Build Other Software
+^^^^^^^^^^^^^^^^^^^^
+
+Now that you've built ``mylib`` with Spack, you might want to build
+another package that depends on it --- for example, ``myapp``. This
+is accomplished easily enough:
+
+.. code-block:: console
+
+ $ spack install myapp ^mylib@local
+
+Note that auto-built software has now been installed *on top of*
+manually-built software, without breaking Spack's "web." This
+property is useful if you need to debug a package deep in the
+dependency hierarchy of your application. It is a *big* advantage of
+using ``spack setup`` to build your package's environment.
+
+If you feel your software is stable, you might wish to install it with
+``spack install`` and skip the source directory. You can just use,
+for example:
+
+.. code-block:: console
+
+ $ spack install mylib@develop
+
+.. _release-your-software:
+
+^^^^^^^^^^^^^^^^^^^^^
+Release Your Software
+^^^^^^^^^^^^^^^^^^^^^
+
+You are now ready to release your software as a tarball with a
+numbered version, and a Spack package that can build it. If you're
+hosted on GitHub, this process will be a bit easier.
+
+#. Put tag(s) on the version(s) in your GitHub repo you want to be
+ release versions. For example, a tag ``v0.1.0`` for version 0.1.0.
+
+#. Set the ``url`` in your ``package.py`` to download a tarball for
+ the appropriate version. GitHub will give you a tarball for any
+ commit in the repo, if you tickle it the right way. For example:
+
+ .. code-block:: python
+
+ url = 'https://github.com/citibeth/mylib/tarball/v0.1.2'
+
+#. Use Spack to determine your version's hash, and cut'n'paste it into
+ your ``package.py``:
+
+ .. code-block:: console
+
+ $ spack checksum mylib 0.1.2
+ ==> Found 1 versions of mylib
+ 0.1.2 https://github.com/citibeth/mylib/tarball/v0.1.2
+
+ How many would you like to checksum? (default is 5, q to abort)
+ ==> Downloading...
+ ==> Trying to fetch from https://github.com/citibeth/mylib/tarball/v0.1.2
+ ######################################################################## 100.0%
+ ==> Checksummed new versions of mylib:
+ version('0.1.2', '3a6acd70085e25f81b63a7e96c504ef9')
+
+#. You should now be able to install released version 0.1.2 of your package with:
+
+ .. code-block:: console
+
+ $ spack install mylib@0.1.2
+
+#. There is no need to remove the `develop` version from your package.
+ Spack concretization will always prefer numbered version to
+ non-numeric versions. Users will only get it if they ask for it.
+
+^^^^^^^^^^^^^^^^^^^^^^^^
+Distribute Your Software
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Once you've released your software, other people will want to build
+it; and you will need to tell them how. In the past, that has meant a
+few paragraphs of pros explaining which dependencies to install. But
+now you use Spack, and those instructions are written in executable
+Python code. But your software has many dependencies, and you know
+Spack is the best way to install it:
+
+#. First, you will want to fork Spack's ``develop`` branch. Your aim
+ is to provide a stable version of Spack that you KNOW will install
+ your software. If you make changes to Spack in the process, you
+ will want to submit pull requests to Spack core.
+
+#. Add your software's ``package.py`` to that fork. You should submit
+ a pull request for this as well, unless you don't want the public
+ to know about your software.
+
+#. Prepare instructions that read approximately as follows:
+
+ #. Download Spack from your forked repo.
+
+ #. Install Spack; see :ref:`getting_started`.
+
+ #. Set up an appropriate ``packages.yaml`` file. You should tell
+ your users to include in this file whatever versions/variants
+ are needed to make your software work correctly (assuming those
+ are not already in your ``packages.yaml``).
+
+ #. Run ``spack install mylib``.
+
+ #. Run this script to generate the ``module load`` commands or
+ filesystem view needed to use this software.
+
+#. Be aware that your users might encounter unexpected bootstrapping
+ issues on their machines, especially if they are running on older
+ systems. The :ref:`getting_started` section should cover this, but
+ there could always be issues.
+
+^^^^^^^^^^^^^^^^^^^
+Other Build Systems
+^^^^^^^^^^^^^^^^^^^
+
+``spack setup`` currently only supports CMake-based builds, in
+packages that subclass ``CMakePackage``. The intent is that this
+mechanism should support a wider range of build systems; for example,
+GNU Autotools. Someone well-versed in Autotools is needed to develop
+this patch and test it out.
+
+Python Distutils is another popular build system that should get
+``spack setup`` support. For non-compiled languages like Python,
+``spack diy`` may be used. Even better is to put the source directory
+directly in the user's ``PYTHONPATH``. Then, edits in source files
+are immediately available to run without any install process at all!
+
+^^^^^^^^^^
+Conclusion
+^^^^^^^^^^
+
+The ``spack setup`` development workflow provides better automation,
+flexibility and safety than workflows relying on environment modules
+or filesystem views. However, it has some drawbacks:
+
+#. It currently works only with projects that use the CMake build
+ system. Support for other build systems is not hard to build, but
+ will require a small amount of effort for each build system to be
+ supported. It might not work well with some IDEs.
+
+#. It only works with packages that sub-class ``StagedPackage``.
+ Currently, most Spack packages do not. Converting them is not
+ hard; but must be done on a package-by-package basis.
+
+#. It requires that users are comfortable with Spack, as they
+ integrate Spack explicitly in their workflow. Not all users are
+ willing to do this.
+
+------------------
+Upstream Bug Fixes
+------------------
+
+It is not uncommon to discover a bug in an upstream project while
+trying to build with Spack. Typically, the bug is in a package that
+serves a dependency to something else. This section describes
+procedure to work around and ultimately resolve these bugs, while not
+delaying the Spack user's main goal.
+
+^^^^^^^^^^^^^^^^^
+Buggy New Version
+^^^^^^^^^^^^^^^^^
+
+Sometimes, the old version of a package works fine, but a new version
+is buggy. For example, it was once found that `Adios did not build
+with hdf5@1.10 <https://github.com/LLNL/spack/issues/1683>`_. If the
+old version of ``hdf5`` will work with ``adios``, the suggested
+procedure is:
+
+#. Revert ``adios`` to the old version of ``hdf5``. Put in its
+ ``adios/package.py``:
+
+ .. code-block:: python
+
+ # Adios does not build with HDF5 1.10
+ # See: https://github.com/LLNL/spack/issues/1683
+ depends_on('hdf5@:1.9')
+
+#. Determine whether the problem is with ``hdf5`` or ``adios``, and
+ report the problem to the appropriate upstream project. In this
+ case, the problem was with ``adios``.
+
+#. Once a new version of ``adios`` comes out with the bugfix, modify
+ ``adios/package.py`` to reflect it:
+
+ .. code-block:: python
+
+ # Adios up to v1.10.0 does not build with HDF5 1.10
+ # See: https://github.com/LLNL/spack/issues/1683
+ depends_on('hdf5@:1.9', when='@:1.10.0')
+ depends_on('hdf5', when='@1.10.1:')
+
+^^^^^^^^^^^^^^^^
+No Version Works
+^^^^^^^^^^^^^^^^
+
+Sometimes, *no* existing versions of a dependency work for a build.
+This typically happens when developing a new project: only then does
+the developer notice that existing versions of a dependency are all
+buggy, or the non-buggy versions are all missing a critical feature.
+
+In the long run, the upstream project will hopefully fix the bug and
+release a new version. But that could take a while, even if a bugfix
+has already been pushed to the project's repository. In the meantime,
+the Spack user needs things to work.
+
+The solution is to create an unofficial Spack release of the project,
+as soon as the bug is fixed in *some* repository. A study of the `Git
+history <https://github.com/citibeth/spack/commits/efischer/develop/var/spack/repos/builtin/packages/py-proj/package.py>`_
+of ``py-proj/package.py`` is instructive here:
+
+#. On `April 1 <https://github.com/citibeth/spack/commit/44a1d6a96706affe6ef0a11c3a780b91d21d105a>`_, an initial bugfix was identified for the PyProj project
+ and a pull request submitted to PyProj. Because the upstream
+ authors had not yet fixed the bug, the ``py-proj`` Spack package
+ downloads from a forked repository, set up by the package's author.
+ A non-numeric version number is used to make it easy to upgrade the
+ package without recomputing checksums; however, this is an
+ untrusted download method and should not be distributed. The
+ package author has now become, temporarily, a maintainer of the
+ upstream project:
+
+ .. code-block:: python
+
+ # We need the benefits of this PR
+ # https://github.com/jswhit/pyproj/pull/54
+ version('citibeth-latlong2',
+ git='https://github.com/citibeth/pyproj.git',
+ branch='latlong2')
+
+
+#. By May 14, the upstream project had accepted a pull request with
+ the required bugfix. At this point, the forked repository was
+ deleted. However, the upstream project still had not released a
+ new version with a bugfix. Therefore, a Spack-only release was
+ created by specifying the desired hash in the main project
+ repository. The version number ``@1.9.5.1.1`` was chosen for this
+ "release" because it's a descendent of the officially released
+ version ``@1.9.5.1``. This is a trusted download method, and can
+ be released to the Spack community:
+
+ .. code-block:: python
+
+ # This is not a tagged release of pyproj.
+ # The changes in this "version" fix some bugs, especially with Python3 use.
+ version('1.9.5.1.1', 'd035e4bc704d136db79b43ab371b27d2',
+ url='https://www.github.com/jswhit/pyproj/tarball/0be612cc9f972e38b50a90c946a9b353e2ab140f')
+
+ .. note::
+
+ It would have been simpler to use Spack's Git download method,
+ which is also a trusted download in this case:
+
+ .. code-block:: python
+
+ # This is not a tagged release of pyproj.
+ # The changes in this "version" fix some bugs, especially with Python3 use.
+ version('1.9.5.1.1',
+ git='https://github.com/jswhit/pyproj.git',
+ commit='0be612cc9f972e38b50a90c946a9b353e2ab140f')
+
+ .. note::
+
+ In this case, the upstream project fixed the bug in its
+ repository in a relatively timely manner. If that had not been
+ the case, the numbered version in this step could have been
+ released from the forked repository.
+
+
+#. The author of the Spack package has now become an unofficial
+ release engineer for the upstream project. Depending on the
+ situation, it may be advisable to put ``preferred=True`` on the
+ latest *officially released* version.
+
+#. As of August 31, the upstream project still had not made a new
+ release with the bugfix. In the meantime, Spack-built ``py-proj``
+ provides the bugfix needed by packages depending on it. As long as
+ this works, there is no particular need for the upstream project to
+ make a new official release.
+
+#. If the upstream project releases a new official version with the
+ bugfix, then the unofficial ``version()`` line should be removed
+ from the Spack package.
+
+^^^^^^^
+Patches
+^^^^^^^
+
+Spack's source patching mechanism provides another way to fix bugs in
+upstream projects. This has advantages and disadvantages compared to the procedures above.
+
+Advantages:
+
+ 1. It can fix bugs in existing released versions, and (probably)
+ future releases as well.
+
+ 2. It is lightweight, does not require a new fork to be set up.
+
+Disadvantages:
+
+ 1. It is harder to develop and debug a patch, vs. a branch in a
+ repository. The user loses the automation provided by version
+ control systems.
+
+ 2. Although patches of a few lines work OK, large patch files can be
+ hard to create and maintain.
+
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index c6bb50d261..c4e51834a5 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -175,6 +175,18 @@ if [[ -z $command ]]; then
fi
#
+# Set paths as defined in the 'environment' section of the compiler config
+# names are stored in SPACK_ENV_TO_SET
+# values are stored in SPACK_ENV_SET_<varname>
+#
+IFS=':' read -ra env_set_varnames <<< "$SPACK_ENV_TO_SET"
+for varname in "${env_set_varnames[@]}"; do
+ spack_varname="SPACK_ENV_SET_$varname"
+ export $varname=${!spack_varname}
+ unset $spack_varname
+done
+
+#
# Filter '.' and Spack environment directories out of PATH so that
# this script doesn't just call itself
#
@@ -204,9 +216,9 @@ fi
# It doesn't work with -rpath.
# This variable controls whether they are added.
add_rpaths=true
-if [[ $mode == ld && "$SPACK_SHORT_SPEC" =~ "darwin" ]]; then
+if [[ ($mode == ld || $mode == ccld) && "$SPACK_SHORT_SPEC" =~ "darwin" ]]; then
for arg in "$@"; do
- if [[ $arg == -r ]]; then
+ if [[ ($arg == -r && $mode == ld) || ($arg == -Wl,-r && $mode == ccld) ]]; then
add_rpaths=false
break
fi
@@ -266,22 +278,38 @@ for dep in "${deps[@]}"; do
# Prepend lib and RPATH directories
if [[ -d $dep/lib ]]; then
if [[ $mode == ccld ]]; then
- $add_rpaths && args=("$rpath$dep/lib" "${args[@]}")
- args=("-L$dep/lib" "${args[@]}")
+ if [[ $SPACK_RPATH_DEPS == *$dep* ]]; then
+ $add_rpaths && args=("$rpath$dep/lib" "${args[@]}")
+ fi
+ if [[ $SPACK_LINK_DEPS == *$dep* ]]; then
+ args=("-L$dep/lib" "${args[@]}")
+ fi
elif [[ $mode == ld ]]; then
- $add_rpaths && args=("-rpath" "$dep/lib" "${args[@]}")
- args=("-L$dep/lib" "${args[@]}")
+ if [[ $SPACK_RPATH_DEPS == *$dep* ]]; then
+ $add_rpaths && args=("-rpath" "$dep/lib" "${args[@]}")
+ fi
+ if [[ $SPACK_LINK_DEPS == *$dep* ]]; then
+ args=("-L$dep/lib" "${args[@]}")
+ fi
fi
fi
# Prepend lib64 and RPATH directories
if [[ -d $dep/lib64 ]]; then
if [[ $mode == ccld ]]; then
- $add_rpaths && args=("$rpath$dep/lib64" "${args[@]}")
- args=("-L$dep/lib64" "${args[@]}")
+ if [[ $SPACK_RPATH_DEPS == *$dep* ]]; then
+ $add_rpaths && args=("$rpath$dep/lib64" "${args[@]}")
+ fi
+ if [[ $SPACK_LINK_DEPS == *$dep* ]]; then
+ args=("-L$dep/lib64" "${args[@]}")
+ fi
elif [[ $mode == ld ]]; then
- $add_rpaths && args=("-rpath" "$dep/lib64" "${args[@]}")
- args=("-L$dep/lib64" "${args[@]}")
+ if [[ $SPACK_RPATH_DEPS == *$dep* ]]; then
+ $add_rpaths && args=("-rpath" "$dep/lib64" "${args[@]}")
+ fi
+ if [[ $SPACK_LINK_DEPS == *$dep* ]]; then
+ args=("-L$dep/lib64" "${args[@]}")
+ fi
fi
fi
done
@@ -295,19 +323,22 @@ elif [[ $mode == ld ]]; then
$add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib" "${args[@]}")
fi
+# Set extra RPATHs
+IFS=':' read -ra extra_rpaths <<< "$SPACK_COMPILER_EXTRA_RPATHS"
+for extra_rpath in "${extra_rpaths[@]}"; do
+ if [[ $mode == ccld ]]; then
+ $add_rpaths && args=("$rpath$extra_rpath" "${args[@]}")
+ elif [[ $mode == ld ]]; then
+ $add_rpaths && args=("-rpath" "$extra_rpath" "${args[@]}")
+ fi
+done
+
# Add SPACK_LDLIBS to args
case "$mode" in
ld|ccld)
args=("${args[@]}" ${SPACK_LDLIBS[@]}) ;;
esac
-#
-# Unset pesky environment variables that could affect build sanity.
-#
-unset LD_LIBRARY_PATH
-unset LD_RUN_PATH
-unset DYLD_LIBRARY_PATH
-
full_command=("$command" "${args[@]}")
# In test command mode, write out full command for Spack tests.
diff --git a/lib/spack/env/clang/gfortran b/lib/spack/env/clang/gfortran
new file mode 120000
index 0000000000..82c2b8e90a
--- /dev/null
+++ b/lib/spack/env/clang/gfortran
@@ -0,0 +1 @@
+../cc \ No newline at end of file
diff --git a/lib/spack/external/distro.py b/lib/spack/external/distro.py
new file mode 100644
index 0000000000..091bba3db8
--- /dev/null
+++ b/lib/spack/external/distro.py
@@ -0,0 +1,1049 @@
+# Copyright 2015,2016 Nir Cohen
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+The ``distro`` package (``distro`` stands for Linux Distribution) provides
+information about the Linux distribution it runs on, such as a reliable
+machine-readable distro ID, or version information.
+
+It is a renewed alternative implementation for Python's original
+:py:func:`platform.linux_distribution` function, but it provides much more
+functionality. An alternative implementation became necessary because Python
+3.5 deprecated this function, and Python 3.7 is expected to remove it
+altogether. Its predecessor function :py:func:`platform.dist` was already
+deprecated since Python 2.6 and is also expected to be removed in Python 3.7.
+Still, there are many cases in which access to Linux distribution information
+is needed. See `Python issue 1322 <https://bugs.python.org/issue1322>`_ for
+more information.
+"""
+
+import os
+import re
+import sys
+import shlex
+import subprocess
+
+
+if not sys.platform.startswith('linux'):
+ raise ImportError('Unsupported platform: {0}'.format(sys.platform))
+
+
+_UNIXCONFDIR = '/etc'
+_OS_RELEASE_BASENAME = 'os-release'
+
+#: Translation table for normalizing the "ID" attribute defined in os-release
+#: files, for use by the :func:`distro.id` method.
+#:
+#: * Key: Value as defined in the os-release file, translated to lower case,
+#: with blanks translated to underscores.
+#:
+#: * Value: Normalized value.
+NORMALIZED_OS_ID = {}
+
+#: Translation table for normalizing the "Distributor ID" attribute returned by
+#: the lsb_release command, for use by the :func:`distro.id` method.
+#:
+#: * Key: Value as returned by the lsb_release command, translated to lower
+#: case, with blanks translated to underscores.
+#:
+#: * Value: Normalized value.
+NORMALIZED_LSB_ID = {
+ 'enterpriseenterprise': 'oracle', # Oracle Enterprise Linux
+ 'redhatenterpriseworkstation': 'rhel', # RHEL 6, 7 Workstation
+ 'redhatenterpriseserver': 'rhel', # RHEL 6, 7 Server
+}
+
+#: Translation table for normalizing the distro ID derived from the file name
+#: of distro release files, for use by the :func:`distro.id` method.
+#:
+#: * Key: Value as derived from the file name of a distro release file,
+#: translated to lower case, with blanks translated to underscores.
+#:
+#: * Value: Normalized value.
+NORMALIZED_DISTRO_ID = {
+ 'redhat': 'rhel', # RHEL 6.x, 7.x
+}
+
+
+# Pattern for content of distro release file (reversed)
+_DISTRO_RELEASE_CONTENT_REVERSED_PATTERN = re.compile(
+ r'(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)')
+
+# Pattern for base file name of distro release file
+_DISTRO_RELEASE_BASENAME_PATTERN = re.compile(
+ r'(\w+)[-_](release|version)$')
+
+# Base file names to be ignored when searching for distro release file
+_DISTRO_RELEASE_IGNORE_BASENAMES = (
+ 'debian_version',
+ 'lsb-release',
+ 'oem-release',
+ _OS_RELEASE_BASENAME,
+ 'system-release'
+)
+
+
+def linux_distribution(full_distribution_name=True):
+ """
+ Return information about the current Linux distribution as a tuple
+ ``(id_name, version, codename)`` with items as follows:
+
+ * ``id_name``: If *full_distribution_name* is false, the result of
+ :func:`distro.id`. Otherwise, the result of :func:`distro.name`.
+
+ * ``version``: The result of :func:`distro.version`.
+
+ * ``codename``: The result of :func:`distro.codename`.
+
+ The interface of this function is compatible with the original
+ :py:func:`platform.linux_distribution` function, supporting a subset of
+ its parameters.
+
+ The data it returns may not exactly be the same, because it uses more data
+ sources than the original function, and that may lead to different data if
+ the Linux distribution is not consistent across multiple data sources it
+ provides (there are indeed such distributions ...).
+
+ Another reason for differences is the fact that the :func:`distro.id`
+ method normalizes the distro ID string to a reliable machine-readable value
+ for a number of popular Linux distributions.
+ """
+ return _distroi.linux_distribution(full_distribution_name)
+
+
+def id():
+ """
+ Return the distro ID of the current Linux distribution, as a
+ machine-readable string.
+
+ For a number of Linux distributions, the returned distro ID value is
+ *reliable*, in the sense that it is documented and that it does not change
+ across releases of the distribution.
+
+ This package maintains the following reliable distro ID values:
+
+ ============== =========================================
+ Distro ID Distribution
+ ============== =========================================
+ "ubuntu" Ubuntu
+ "debian" Debian
+ "rhel" RedHat Enterprise Linux
+ "centos" CentOS
+ "fedora" Fedora
+ "sles" SUSE Linux Enterprise Server
+ "opensuse" openSUSE
+ "amazon" Amazon Linux
+ "arch" Arch Linux
+ "cloudlinux" CloudLinux OS
+ "exherbo" Exherbo Linux
+ "gentoo" GenToo Linux
+ "ibm_powerkvm" IBM PowerKVM
+ "kvmibm" KVM for IBM z Systems
+ "linuxmint" Linux Mint
+ "mageia" Mageia
+ "mandriva" Mandriva Linux
+ "parallels" Parallels
+ "pidora" Pidora
+ "raspbian" Raspbian
+ "oracle" Oracle Linux (and Oracle Enterprise Linux)
+ "scientific" Scientific Linux
+ "slackware" Slackware
+ "xenserver" XenServer
+ ============== =========================================
+
+ If you have a need to get distros for reliable IDs added into this set,
+ or if you find that the :func:`distro.id` function returns a different
+ distro ID for one of the listed distros, please create an issue in the
+ `distro issue tracker`_.
+
+ **Lookup hierarchy and transformations:**
+
+ First, the ID is obtained from the following sources, in the specified
+ order. The first available and non-empty value is used:
+
+ * the value of the "ID" attribute of the os-release file,
+
+ * the value of the "Distributor ID" attribute returned by the lsb_release
+ command,
+
+ * the first part of the file name of the distro release file,
+
+ The so determined ID value then passes the following transformations,
+ before it is returned by this method:
+
+ * it is translated to lower case,
+
+ * blanks (which should not be there anyway) are translated to underscores,
+
+ * a normalization of the ID is performed, based upon
+ `normalization tables`_. The purpose of this normalization is to ensure
+ that the ID is as reliable as possible, even across incompatible changes
+ in the Linux distributions. A common reason for an incompatible change is
+ the addition of an os-release file, or the addition of the lsb_release
+ command, with ID values that differ from what was previously determined
+ from the distro release file name.
+ """
+ return _distroi.id()
+
+
+def name(pretty=False):
+ """
+ Return the name of the current Linux distribution, as a human-readable
+ string.
+
+ If *pretty* is false, the name is returned without version or codename.
+ (e.g. "CentOS Linux")
+
+ If *pretty* is true, the version and codename are appended.
+ (e.g. "CentOS Linux 7.1.1503 (Core)")
+
+ **Lookup hierarchy:**
+
+ The name is obtained from the following sources, in the specified order.
+ The first available and non-empty value is used:
+
+ * If *pretty* is false:
+
+ - the value of the "NAME" attribute of the os-release file,
+
+ - the value of the "Distributor ID" attribute returned by the lsb_release
+ command,
+
+ - the value of the "<name>" field of the distro release file.
+
+ * If *pretty* is true:
+
+ - the value of the "PRETTY_NAME" attribute of the os-release file,
+
+ - the value of the "Description" attribute returned by the lsb_release
+ command,
+
+ - the value of the "<name>" field of the distro release file, appended
+ with the value of the pretty version ("<version_id>" and "<codename>"
+ fields) of the distro release file, if available.
+ """
+ return _distroi.name(pretty)
+
+
+def version(pretty=False, best=False):
+ """
+ Return the version of the current Linux distribution, as a human-readable
+ string.
+
+ If *pretty* is false, the version is returned without codename (e.g.
+ "7.0").
+
+ If *pretty* is true, the codename in parenthesis is appended, if the
+ codename is non-empty (e.g. "7.0 (Maipo)").
+
+ Some distributions provide version numbers with different precisions in
+ the different sources of distribution information. Examining the different
+ sources in a fixed priority order does not always yield the most precise
+ version (e.g. for Debian 8.2, or CentOS 7.1).
+
+ The *best* parameter can be used to control the approach for the returned
+ version:
+
+ If *best* is false, the first non-empty version number in priority order of
+ the examined sources is returned.
+
+ If *best* is true, the most precise version number out of all examined
+ sources is returned.
+
+ **Lookup hierarchy:**
+
+ In all cases, the version number is obtained from the following sources.
+ If *best* is false, this order represents the priority order:
+
+ * the value of the "VERSION_ID" attribute of the os-release file,
+ * the value of the "Release" attribute returned by the lsb_release
+ command,
+ * the version number parsed from the "<version_id>" field of the first line
+ of the distro release file,
+ * the version number parsed from the "PRETTY_NAME" attribute of the
+ os-release file, if it follows the format of the distro release files.
+ * the version number parsed from the "Description" attribute returned by
+ the lsb_release command, if it follows the format of the distro release
+ files.
+ """
+ return _distroi.version(pretty, best)
+
+
+def version_parts(best=False):
+ """
+ Return the version of the current Linux distribution as a tuple
+ ``(major, minor, build_number)`` with items as follows:
+
+ * ``major``: The result of :func:`distro.major_version`.
+
+ * ``minor``: The result of :func:`distro.minor_version`.
+
+ * ``build_number``: The result of :func:`distro.build_number`.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distroi.version_parts(best)
+
+
+def major_version(best=False):
+ """
+ Return the major version of the current Linux distribution, as a string,
+ if provided.
+ Otherwise, the empty string is returned. The major version is the first
+ part of the dot-separated version string.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distroi.major_version(best)
+
+
+def minor_version(best=False):
+ """
+ Return the minor version of the current Linux distribution, as a string,
+ if provided.
+ Otherwise, the empty string is returned. The minor version is the second
+ part of the dot-separated version string.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distroi.minor_version(best)
+
+
+def build_number(best=False):
+ """
+ Return the build number of the current Linux distribution, as a string,
+ if provided.
+ Otherwise, the empty string is returned. The build number is the third part
+ of the dot-separated version string.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distroi.build_number(best)
+
+
+def like():
+ """
+ Return a space-separated list of distro IDs of distributions that are
+ closely related to the current Linux distribution in regards to packaging
+ and programming interfaces, for example distributions the current
+ distribution is a derivative from.
+
+ **Lookup hierarchy:**
+
+ This information item is only provided by the os-release file.
+ For details, see the description of the "ID_LIKE" attribute in the
+ `os-release man page
+ <http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
+ """
+ return _distroi.like()
+
+
+def codename():
+ """
+ Return the codename for the release of the current Linux distribution,
+ as a string.
+
+ If the distribution does not have a codename, an empty string is returned.
+
+ Note that the returned codename is not always really a codename. For
+ example, openSUSE returns "x86_64". This function does not handle such
+ cases in any special way and just returns the string it finds, if any.
+
+ **Lookup hierarchy:**
+
+ * the codename within the "VERSION" attribute of the os-release file, if
+ provided,
+
+ * the value of the "Codename" attribute returned by the lsb_release
+ command,
+
+ * the value of the "<codename>" field of the distro release file.
+ """
+ return _distroi.codename()
+
+
+def info(pretty=False, best=False):
+ """
+ Return certain machine-readable information items about the current Linux
+ distribution in a dictionary, as shown in the following example:
+
+ .. sourcecode:: python
+
+ {
+ 'id': 'rhel',
+ 'version': '7.0',
+ 'version_parts': {
+ 'major': '7',
+ 'minor': '0',
+ 'build_number': ''
+ },
+ 'like': 'fedora',
+ 'codename': 'Maipo'
+ }
+
+ The dictionary structure and keys are always the same, regardless of which
+ information items are available in the underlying data sources. The values
+ for the various keys are as follows:
+
+ * ``id``: The result of :func:`distro.id`.
+
+ * ``version``: The result of :func:`distro.version`.
+
+ * ``version_parts -> major``: The result of :func:`distro.major_version`.
+
+ * ``version_parts -> minor``: The result of :func:`distro.minor_version`.
+
+ * ``version_parts -> build_number``: The result of
+ :func:`distro.build_number`.
+
+ * ``like``: The result of :func:`distro.like`.
+
+ * ``codename``: The result of :func:`distro.codename`.
+
+ For a description of the *pretty* and *best* parameters, see the
+ :func:`distro.version` method.
+ """
+ return _distroi.info(pretty, best)
+
+
+def os_release_info():
+ """
+ Return a dictionary containing key-value pairs for the information items
+ from the os-release file data source of the current Linux distribution.
+
+ See `os-release file`_ for details about these information items.
+ """
+ return _distroi.os_release_info()
+
+
+def lsb_release_info():
+ """
+ Return a dictionary containing key-value pairs for the information items
+ from the lsb_release command data source of the current Linux distribution.
+
+ See `lsb_release command output`_ for details about these information
+ items.
+ """
+ return _distroi.lsb_release_info()
+
+
+def distro_release_info():
+ """
+ Return a dictionary containing key-value pairs for the information items
+ from the distro release file data source of the current Linux distribution.
+
+ See `distro release file`_ for details about these information items.
+ """
+ return _distroi.distro_release_info()
+
+
+def os_release_attr(attribute):
+ """
+ Return a single named information item from the os-release file data source
+ of the current Linux distribution.
+
+ Parameters:
+
+ * ``attribute`` (string): Key of the information item.
+
+ Returns:
+
+ * (string): Value of the information item, if the item exists.
+ The empty string, if the item does not exist.
+
+ See `os-release file`_ for details about these information items.
+ """
+ return _distroi.os_release_attr(attribute)
+
+
+def lsb_release_attr(attribute):
+ """
+ Return a single named information item from the lsb_release command output
+ data source of the current Linux distribution.
+
+ Parameters:
+
+ * ``attribute`` (string): Key of the information item.
+
+ Returns:
+
+ * (string): Value of the information item, if the item exists.
+ The empty string, if the item does not exist.
+
+ See `lsb_release command output`_ for details about these information
+ items.
+ """
+ return _distroi.lsb_release_attr(attribute)
+
+
+def distro_release_attr(attribute):
+ """
+ Return a single named information item from the distro release file
+ data source of the current Linux distribution.
+
+ Parameters:
+
+ * ``attribute`` (string): Key of the information item.
+
+ Returns:
+
+ * (string): Value of the information item, if the item exists.
+ The empty string, if the item does not exist.
+
+ See `distro release file`_ for details about these information items.
+ """
+ return _distroi.distro_release_attr(attribute)
+
+
+class LinuxDistribution(object):
+ """
+ Provides information about a Linux distribution.
+
+ This package creates a private module-global instance of this class with
+ default initialization arguments, that is used by the
+ `consolidated accessor functions`_ and `single source accessor functions`_.
+ By using default initialization arguments, that module-global instance
+ returns data about the current Linux distribution (i.e. the distro this
+ package runs on).
+
+ Normally, it is not necessary to create additional instances of this class.
+ However, in situations where control is needed over the exact data sources
+ that are used, instances of this class can be created with a specific
+ distro release file, or a specific os-release file, or without invoking the
+ lsb_release command.
+ """
+
+ def __init__(self,
+ include_lsb=True,
+ os_release_file='',
+ distro_release_file=''):
+ """
+ The initialization method of this class gathers information from the
+ available data sources, and stores that in private instance attributes.
+ Subsequent access to the information items uses these private instance
+ attributes, so that the data sources are read only once.
+
+ Parameters:
+
+ * ``include_lsb`` (bool): Controls whether the
+ `lsb_release command output`_ is included as a data source.
+
+ If the lsb_release command is not available in the program execution
+ path, the data source for the lsb_release command will be empty.
+
+ * ``os_release_file`` (string): The path name of the
+ `os-release file`_ that is to be used as a data source.
+
+ An empty string (the default) will cause the default path name to
+ be used (see `os-release file`_ for details).
+
+ If the specified or defaulted os-release file does not exist, the
+ data source for the os-release file will be empty.
+
+ * ``distro_release_file`` (string): The path name of the
+ `distro release file`_ that is to be used as a data source.
+
+ An empty string (the default) will cause a default search algorithm
+ to be used (see `distro release file`_ for details).
+
+ If the specified distro release file does not exist, or if no default
+ distro release file can be found, the data source for the distro
+ release file will be empty.
+
+ Public instance attributes:
+
+ * ``os_release_file`` (string): The path name of the
+ `os-release file`_ that is actually used as a data source. The
+ empty string if no distro release file is used as a data source.
+
+ * ``distro_release_file`` (string): The path name of the
+ `distro release file`_ that is actually used as a data source. The
+ empty string if no distro release file is used as a data source.
+
+ Raises:
+
+ * :py:exc:`IOError`: Some I/O issue with an os-release file or distro
+ release file.
+
+ * :py:exc:`subprocess.CalledProcessError`: The lsb_release command had
+ some issue (other than not being available in the program execution
+ path).
+
+ * :py:exc:`UnicodeError`: A data source has unexpected characters or
+ uses an unexpected encoding.
+ """
+ self.os_release_file = os_release_file or \
+ os.path.join(_UNIXCONFDIR, _OS_RELEASE_BASENAME)
+ self.distro_release_file = distro_release_file or '' # updated later
+ self._os_release_info = self._os_release_info()
+ self._lsb_release_info = self._lsb_release_info() \
+ if include_lsb else {}
+ self._distro_release_info = self._distro_release_info()
+
+ def __repr__(self):
+ return \
+ "LinuxDistribution(" \
+ "os_release_file={0!r}, " \
+ "distro_release_file={1!r}, " \
+ "_os_release_info={2!r}, " \
+ "_lsb_release_info={3!r}, " \
+ "_distro_release_info={4!r})".format(
+ self.os_release_file,
+ self.distro_release_file,
+ self._os_release_info,
+ self._lsb_release_info,
+ self._distro_release_info)
+
+ def linux_distribution(self, full_distribution_name=True):
+ """
+ Return information about the Linux distribution that is compatible
+ with Python's :func:`platform.linux_distribution`, supporting a subset
+ of its parameters.
+
+ For details, see :func:`distro.linux_distribution`.
+ """
+ return (
+ self.name() if full_distribution_name else self.id(),
+ self.version(),
+ self.codename()
+ )
+
+ def id(self):
+ """
+ Return the distro ID of the Linux distribution, as a string.
+
+ For details, see :func:`distro.id`.
+ """
+ distro_id = self.os_release_attr('id')
+ if distro_id:
+ distro_id = distro_id.lower().replace(' ', '_')
+ return NORMALIZED_OS_ID.get(distro_id, distro_id)
+
+ distro_id = self.lsb_release_attr('distributor_id')
+ if distro_id:
+ distro_id = distro_id.lower().replace(' ', '_')
+ return NORMALIZED_LSB_ID.get(distro_id, distro_id)
+
+ distro_id = self.distro_release_attr('id')
+ if distro_id:
+ distro_id = distro_id.lower().replace(' ', '_')
+ return NORMALIZED_DISTRO_ID.get(distro_id, distro_id)
+
+ return ''
+
+ def name(self, pretty=False):
+ """
+ Return the name of the Linux distribution, as a string.
+
+ For details, see :func:`distro.name`.
+ """
+ name = self.os_release_attr('name') \
+ or self.lsb_release_attr('distributor_id') \
+ or self.distro_release_attr('name')
+ if pretty:
+ name = self.os_release_attr('pretty_name') \
+ or self.lsb_release_attr('description')
+ if not name:
+ name = self.distro_release_attr('name')
+ version = self.version(pretty=True)
+ if version:
+ name = name + ' ' + version
+ return name or ''
+
+ def version(self, pretty=False, best=False):
+ """
+ Return the version of the Linux distribution, as a string.
+
+ For details, see :func:`distro.version`.
+ """
+ versions = [
+ self.os_release_attr('version_id'),
+ self.lsb_release_attr('release'),
+ self.distro_release_attr('version_id'),
+ self._parse_distro_release_content(
+ self.os_release_attr('pretty_name')).get('version_id', ''),
+ self._parse_distro_release_content(
+ self.lsb_release_attr('description')).get('version_id', '')
+ ]
+ version = ''
+ if best:
+ # This algorithm uses the last version in priority order that has
+ # the best precision. If the versions are not in conflict, that
+ # does not matter; otherwise, using the last one instead of the
+ # first one might be considered a surprise.
+ for v in versions:
+ if v.count(".") > version.count(".") or version == '':
+ version = v
+ else:
+ for v in versions:
+ if v != '':
+ version = v
+ break
+ if pretty and version and self.codename():
+ version = u'{0} ({1})'.format(version, self.codename())
+ return version
+
+ def version_parts(self, best=False):
+ """
+ Return the version of the Linux distribution, as a tuple of version
+ numbers.
+
+ For details, see :func:`distro.version_parts`.
+ """
+ version_str = self.version(best=best)
+ if version_str:
+ g = re.compile(r'(\d+)\.?(\d+)?\.?(\d+)?')
+ m = g.match(version_str)
+ if m:
+ major, minor, build_number = m.groups()
+ return major, minor or '', build_number or ''
+ return '', '', ''
+
+ def major_version(self, best=False):
+ """
+ Return the major version number of the current distribution.
+
+ For details, see :func:`distro.major_version`.
+ """
+ return self.version_parts(best)[0]
+
+ def minor_version(self, best=False):
+ """
+ Return the minor version number of the Linux distribution.
+
+ For details, see :func:`distro.minor_version`.
+ """
+ return self.version_parts(best)[1]
+
+ def build_number(self, best=False):
+ """
+ Return the build number of the Linux distribution.
+
+ For details, see :func:`distro.build_number`.
+ """
+ return self.version_parts(best)[2]
+
+ def like(self):
+ """
+ Return the IDs of distributions that are like the Linux distribution.
+
+ For details, see :func:`distro.like`.
+ """
+ return self.os_release_attr('id_like') or ''
+
+ def codename(self):
+ """
+ Return the codename of the Linux distribution.
+
+ For details, see :func:`distro.codename`.
+ """
+ return self.os_release_attr('codename') \
+ or self.lsb_release_attr('codename') \
+ or self.distro_release_attr('codename') \
+ or ''
+
+ def info(self, pretty=False, best=False):
+ """
+ Return certain machine-readable information about the Linux
+ distribution.
+
+ For details, see :func:`distro.info`.
+ """
+ return dict(
+ id=self.id(),
+ version=self.version(pretty, best),
+ version_parts=dict(
+ major=self.major_version(best),
+ minor=self.minor_version(best),
+ build_number=self.build_number(best)
+ ),
+ like=self.like(),
+ codename=self.codename(),
+ )
+
+ def os_release_info(self):
+ """
+ Return a dictionary containing key-value pairs for the information
+ items from the os-release file data source of the Linux distribution.
+
+ For details, see :func:`distro.os_release_info`.
+ """
+ return self._os_release_info
+
+ def lsb_release_info(self):
+ """
+ Return a dictionary containing key-value pairs for the information
+ items from the lsb_release command data source of the Linux
+ distribution.
+
+ For details, see :func:`distro.lsb_release_info`.
+ """
+ return self._lsb_release_info
+
+ def distro_release_info(self):
+ """
+ Return a dictionary containing key-value pairs for the information
+ items from the distro release file data source of the Linux
+ distribution.
+
+ For details, see :func:`distro.distro_release_info`.
+ """
+ return self._distro_release_info
+
+ def os_release_attr(self, attribute):
+ """
+ Return a single named information item from the os-release file data
+ source of the Linux distribution.
+
+ For details, see :func:`distro.os_release_attr`.
+ """
+ return self._os_release_info.get(attribute, '')
+
+ def lsb_release_attr(self, attribute):
+ """
+ Return a single named information item from the lsb_release command
+ output data source of the Linux distribution.
+
+ For details, see :func:`distro.lsb_release_attr`.
+ """
+ return self._lsb_release_info.get(attribute, '')
+
+ def distro_release_attr(self, attribute):
+ """
+ Return a single named information item from the distro release file
+ data source of the Linux distribution.
+
+ For details, see :func:`distro.distro_release_attr`.
+ """
+ return self._distro_release_info.get(attribute, '')
+
+ def _os_release_info(self):
+ """
+ Get the information items from the specified os-release file.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if os.path.isfile(self.os_release_file):
+ with open(self.os_release_file, 'r') as f:
+ return self._parse_os_release_content(f)
+ return {}
+
+ @staticmethod
+ def _parse_os_release_content(lines):
+ """
+ Parse the lines of an os-release file.
+
+ Parameters:
+
+ * lines: Iterable through the lines in the os-release file.
+ Each line must be a unicode string or a UTF-8 encoded byte
+ string.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ props = {}
+ lexer = shlex.shlex(lines, posix=True)
+ lexer.whitespace_split = True
+
+ # The shlex module defines its `wordchars` variable using literals,
+ # making it dependent on the encoding of the Python source file.
+ # In Python 2.6 and 2.7, the shlex source file is encoded in
+ # 'iso-8859-1', and the `wordchars` variable is defined as a byte
+ # string. This causes a UnicodeDecodeError to be raised when the
+ # parsed content is a unicode object. The following fix resolves that
+ # (... but it should be fixed in shlex...):
+ if sys.version_info[0] == 2 and isinstance(lexer.wordchars, bytes):
+ lexer.wordchars = lexer.wordchars.decode('iso-8859-1')
+
+ tokens = list(lexer)
+ for token in tokens:
+ # At this point, all shell-like parsing has been done (i.e.
+ # comments processed, quotes and backslash escape sequences
+ # processed, multi-line values assembled, trailing newlines
+ # stripped, etc.), so the tokens are now either:
+ # * variable assignments: var=value
+ # * commands or their arguments (not allowed in os-release)
+ if '=' in token:
+ k, v = token.split('=', 1)
+ if isinstance(v, bytes):
+ v = v.decode('utf-8')
+ props[k.lower()] = v
+ if k == 'VERSION':
+ # this handles cases in which the codename is in
+ # the `(CODENAME)` (rhel, centos, fedora) format
+ # or in the `, CODENAME` format (Ubuntu).
+ codename = re.search(r'(\(\D+\))|,(\s+)?\D+', v)
+ if codename:
+ codename = codename.group()
+ codename = codename.strip('()')
+ codename = codename.strip(',')
+ codename = codename.strip()
+ # codename appears within paranthese.
+ props['codename'] = codename
+ else:
+ props['codename'] = ''
+ else:
+ # Ignore any tokens that are not variable assignments
+ pass
+ return props
+
+ def _lsb_release_info(self):
+ """
+ Get the information items from the lsb_release command output.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ cmd = 'lsb_release -a'
+ p = subprocess.Popen(
+ cmd,
+ shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ out, err = out.decode('ascii'), err.decode('ascii')
+ rc = p.returncode
+ if rc == 0:
+ content = out.splitlines()
+ return self._parse_lsb_release_content(content)
+ elif rc == 127: # Command not found
+ return {}
+ else:
+ if sys.version_info[:2] >= (3, 5):
+ raise subprocess.CalledProcessError(rc, cmd, out, err)
+ elif sys.version_info[:2] >= (2, 7):
+ raise subprocess.CalledProcessError(rc, cmd, out)
+ elif sys.version_info[:2] == (2, 6):
+ raise subprocess.CalledProcessError(rc, cmd)
+
+ @staticmethod
+ def _parse_lsb_release_content(lines):
+ """
+ Parse the output of the lsb_release command.
+
+ Parameters:
+
+ * lines: Iterable through the lines of the lsb_release output.
+ Each line must be a unicode string or a UTF-8 encoded byte
+ string.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ props = {}
+ for line in lines:
+ if isinstance(line, bytes):
+ line = line.decode('utf-8')
+ kv = line.strip('\n').split(':', 1)
+ if len(kv) != 2:
+ # Ignore lines without colon.
+ continue
+ k, v = kv
+ props.update({k.replace(' ', '_').lower(): v.strip()})
+ return props
+
+ def _distro_release_info(self):
+ """
+ Get the information items from the specified distro release file.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if self.distro_release_file:
+ # If it was specified, we use it and parse what we can, even if
+ # its file name or content does not match the expected pattern.
+ distro_info = self._parse_distro_release_file(
+ self.distro_release_file)
+ basename = os.path.basename(self.distro_release_file)
+ # The file name pattern for user-specified distro release files
+ # is somewhat more tolerant (compared to when searching for the
+ # file), because we want to use what was specified as best as
+ # possible.
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
+ if match:
+ distro_info['id'] = match.group(1)
+ return distro_info
+ else:
+ basenames = os.listdir(_UNIXCONFDIR)
+ # We sort for repeatability in cases where there are multiple
+ # distro specific files; e.g. CentOS, Oracle, Enterprise all
+ # containing `redhat-release` on top of their own.
+ basenames.sort()
+ for basename in basenames:
+ if basename in _DISTRO_RELEASE_IGNORE_BASENAMES:
+ continue
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
+ if match:
+ filepath = os.path.join(_UNIXCONFDIR, basename)
+ distro_info = self._parse_distro_release_file(filepath)
+ if 'name' in distro_info:
+ # The name is always present if the pattern matches
+ self.distro_release_file = filepath
+ distro_info['id'] = match.group(1)
+ return distro_info
+ return {}
+
+ def _parse_distro_release_file(self, filepath):
+ """
+ Parse a distro release file.
+
+ Parameters:
+
+ * filepath: Path name of the distro release file.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if os.path.isfile(filepath):
+ with open(filepath, 'r') as fp:
+ # Only parse the first line. For instance, on SLES there
+ # are multiple lines. We don't want them...
+ return self._parse_distro_release_content(fp.readline())
+ return {}
+
+ @staticmethod
+ def _parse_distro_release_content(line):
+ """
+ Parse a line from a distro release file.
+
+ Parameters:
+ * line: Line from the distro release file. Must be a unicode string
+ or a UTF-8 encoded byte string.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if isinstance(line, bytes):
+ line = line.decode('utf-8')
+ m = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN.match(
+ line.strip()[::-1])
+ distro_info = {}
+ if m:
+ distro_info['name'] = m.group(3)[::-1] # regexp ensures non-None
+ if m.group(2):
+ distro_info['version_id'] = m.group(2)[::-1]
+ if m.group(1):
+ distro_info['codename'] = m.group(1)[::-1]
+ elif line:
+ distro_info['name'] = line.strip()
+ return distro_info
+
+
+_distroi = LinuxDistribution()
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 22ca85abf9..31e09f2fe6 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -22,28 +22,49 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import os
+import collections
+import errno
+import fileinput
import glob
+import numbers
+import os
import re
import shutil
import stat
-import errno
-import getpass
-from contextlib import contextmanager
import subprocess
-import fileinput
+import sys
+from contextlib import contextmanager
import llnl.util.tty as tty
-
-__all__ = ['set_install_permissions', 'install', 'install_tree',
- 'traverse_tree',
- 'expand_user', 'working_dir', 'touch', 'touchp', 'mkdirp',
- 'force_remove', 'join_path', 'ancestor', 'can_access',
- 'filter_file',
- 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink',
- 'set_executable', 'copy_mode', 'unset_executable_mode',
- 'remove_dead_links', 'remove_linked_tree', 'find_library_path',
- 'fix_darwin_install_name', 'to_link_flags', 'to_lib_name']
+from llnl.util.lang import dedupe
+
+__all__ = [
+ 'FileFilter',
+ 'LibraryList',
+ 'ancestor',
+ 'can_access',
+ 'change_sed_delimiter',
+ 'copy_mode',
+ 'filter_file',
+ 'find_libraries',
+ 'fix_darwin_install_name',
+ 'force_remove',
+ 'force_symlink',
+ 'install',
+ 'install_tree',
+ 'is_exe',
+ 'join_path',
+ 'mkdirp',
+ 'remove_dead_links',
+ 'remove_if_dead_link',
+ 'remove_linked_tree',
+ 'set_executable',
+ 'set_install_permissions',
+ 'touch',
+ 'touchp',
+ 'traverse_tree',
+ 'unset_executable_mode',
+ 'working_dir']
def filter_file(regex, repl, *filenames, **kwargs):
@@ -206,16 +227,6 @@ def is_exe(path):
return os.path.isfile(path) and os.access(path, os.X_OK)
-def expand_user(path):
- """Find instances of '%u' in a path and replace with the current user's
- username."""
- username = getpass.getuser()
- if not username and '%u' in path:
- tty.die("Couldn't get username to complete path '%s'" % path)
-
- return path.replace('%u', username)
-
-
def mkdirp(*paths):
"""Creates a directory, as well as parent directories if needed."""
for path in paths:
@@ -326,7 +337,7 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs):
follow_links = kwargs.get('follow_link', False)
# Yield in pre or post order?
- order = kwargs.get('order', 'pre')
+ order = kwargs.get('order', 'pre')
if order not in ('pre', 'post'):
raise ValueError("Order must be 'pre' or 'post'.")
@@ -338,7 +349,7 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs):
return
source_path = os.path.join(source_root, rel_path)
- dest_path = os.path.join(dest_root, rel_path)
+ dest_path = os.path.join(dest_root, rel_path)
# preorder yields directories before children
if order == 'pre':
@@ -346,8 +357,8 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs):
for f in os.listdir(source_path):
source_child = os.path.join(source_path, f)
- dest_child = os.path.join(dest_path, f)
- rel_child = os.path.join(rel_path, f)
+ dest_child = os.path.join(dest_path, f)
+ rel_child = os.path.join(rel_path, f)
# Treat as a directory
if os.path.isdir(source_child) and (
@@ -384,10 +395,20 @@ def remove_dead_links(root):
"""
for file in os.listdir(root):
path = join_path(root, file)
- if os.path.islink(path):
- real_path = os.path.realpath(path)
- if not os.path.exists(real_path):
- os.unlink(path)
+ remove_if_dead_link(path)
+
+
+def remove_if_dead_link(path):
+ """
+ Removes the argument if it is a dead link, does nothing otherwise
+
+ Args:
+ path: the potential dead link
+ """
+ if os.path.islink(path):
+ real_path = os.path.realpath(path)
+ if not os.path.exists(real_path):
+ os.unlink(path)
def remove_linked_tree(path):
@@ -440,35 +461,162 @@ def fix_darwin_install_name(path):
stdout=subprocess.PIPE).communicate()[0]
break
+# Utilities for libraries
-def to_lib_name(library):
- """Transforms a path to the library /path/to/lib<name>.xyz into <name>
+
+class LibraryList(collections.Sequence):
+ """Sequence of absolute paths to libraries
+
+ Provides a few convenience methods to manipulate library paths and get
+ commonly used compiler flags or names
"""
- # Assume libXYZ.suffix
- return os.path.basename(library)[3:].split(".")[0]
+ def __init__(self, libraries):
+ self.libraries = list(libraries)
-def to_link_flags(library):
- """Transforms a path to a <library> into linking flags -L<dir> -l<name>.
+ @property
+ def directories(self):
+ """Stable de-duplication of the directories where the libraries
+ reside
- Return:
- A string of linking flags.
- """
- dir = os.path.dirname(library)
- name = to_lib_name(library)
- res = '-L%s -l%s' % (dir, name)
- return res
+ >>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/libc.a'])
+ >>> assert l.directories == ['/dir1', '/dir2']
+ """
+ return list(dedupe(
+ os.path.dirname(x) for x in self.libraries if os.path.dirname(x)
+ ))
+
+ @property
+ def basenames(self):
+ """Stable de-duplication of the base-names in the list
+
+ >>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir3/liba.a'])
+ >>> assert l.basenames == ['liba.a', 'libb.a']
+ """
+ return list(dedupe(os.path.basename(x) for x in self.libraries))
+
+ @property
+ def names(self):
+ """Stable de-duplication of library names in the list
+ >>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir3/liba.so'])
+ >>> assert l.names == ['a', 'b']
+ """
+ return list(dedupe(x.split('.')[0][3:] for x in self.basenames))
-def find_library_path(libname, *paths):
- """Searches for a file called <libname> in each path.
+ @property
+ def search_flags(self):
+ """Search flags for the libraries
- Return:
- directory where the library was found, if found. None otherwise.
+ >>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/liba.so'])
+ >>> assert l.search_flags == '-L/dir1 -L/dir2'
+ """
+ return ' '.join(['-L' + x for x in self.directories])
+ @property
+ def link_flags(self):
+ """Link flags for the libraries
+
+ >>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/liba.so'])
+ >>> assert l.search_flags == '-la -lb'
+ """
+ return ' '.join(['-l' + name for name in self.names])
+
+ @property
+ def ld_flags(self):
+ """Search flags + link flags
+
+ >>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/liba.so'])
+ >>> assert l.search_flags == '-L/dir1 -L/dir2 -la -lb'
+ """
+ return self.search_flags + ' ' + self.link_flags
+
+ def __getitem__(self, item):
+ cls = type(self)
+ if isinstance(item, numbers.Integral):
+ return self.libraries[item]
+ return cls(self.libraries[item])
+
+ def __add__(self, other):
+ return LibraryList(dedupe(self.libraries + list(other)))
+
+ def __radd__(self, other):
+ return self.__add__(other)
+
+ def __eq__(self, other):
+ return self.libraries == other.libraries
+
+ def __len__(self):
+ return len(self.libraries)
+
+ def joined(self, separator=' '):
+ return separator.join(self.libraries)
+
+ def __repr__(self):
+ return self.__class__.__name__ + '(' + repr(self.libraries) + ')'
+
+ def __str__(self):
+ return self.joined()
+
+
+def find_libraries(args, root, shared=True, recurse=False):
+ """Returns an iterable object containing a list of full paths to
+ libraries if found.
+
+ Args:
+ args: iterable object containing a list of library names to \
+ search for (e.g. 'libhdf5')
+ root: root folder where to start searching
+ shared: if True searches for shared libraries, otherwise for static
+ recurse: if False search only root folder, if True descends top-down \
+ from the root
+
+ Returns:
+ list of full paths to the libraries that have been found
"""
- for path in paths:
- library = join_path(path, libname)
- if os.path.exists(library):
- return path
- return None
+ if not isinstance(args, collections.Sequence) or isinstance(args, str):
+ message = '{0} expects a sequence of strings as first argument'
+ message += ' [got {1} instead]'
+ raise TypeError(message.format(find_libraries.__name__, type(args)))
+
+ # Construct the right suffix for the library
+ if shared is True:
+ suffix = 'dylib' if sys.platform == 'darwin' else 'so'
+ else:
+ suffix = 'a'
+ # List of libraries we are searching with suffixes
+ libraries = ['{0}.{1}'.format(lib, suffix) for lib in args]
+ # Search method
+ if recurse is False:
+ search_method = _find_libraries_non_recursive
+ else:
+ search_method = _find_libraries_recursive
+
+ return search_method(libraries, root)
+
+
+def _find_libraries_recursive(libraries, root):
+ library_dict = collections.defaultdict(list)
+ for path, _, files in os.walk(root):
+ for lib in libraries:
+ if lib in files:
+ library_dict[lib].append(
+ join_path(path, lib)
+ )
+ answer = []
+ for lib in libraries:
+ answer.extend(library_dict[lib])
+ return LibraryList(answer)
+
+
+def _find_libraries_non_recursive(libraries, root):
+
+ def lib_or_none(lib):
+ library = join_path(root, lib)
+ if not os.path.exists(library):
+ return None
+ return library
+
+ return LibraryList(
+ [lib_or_none(lib) for lib in libraries if lib_or_none(lib) is not None]
+ )
diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py
index df32012e2d..253334c416 100644
--- a/lib/spack/llnl/util/lang.py
+++ b/lib/spack/llnl/util/lang.py
@@ -374,6 +374,22 @@ def DictWrapper(dictionary):
return wrapper()
+def dedupe(sequence):
+ """Yields a stable de-duplication of an hashable sequence
+
+ Args:
+ sequence: hashable sequence to be de-duplicated
+
+ Returns:
+ stable de-duplication of the sequence
+ """
+ seen = set()
+ for x in sequence:
+ if x not in seen:
+ yield x
+ seen.add(x)
+
+
class RequiredAttributeError(ValueError):
def __init__(self, message):
diff --git a/lib/spack/llnl/util/lock.py b/lib/spack/llnl/util/lock.py
index aa8272d5fe..2e44a94798 100644
--- a/lib/spack/llnl/util/lock.py
+++ b/lib/spack/llnl/util/lock.py
@@ -28,9 +28,13 @@ import errno
import time
import socket
+import llnl.util.tty as tty
+
+
__all__ = ['Lock', 'LockTransaction', 'WriteTransaction', 'ReadTransaction',
'LockError']
+
# Default timeout in seconds, after which locks will raise exceptions.
_default_timeout = 60
@@ -41,42 +45,86 @@ _sleep_time = 1e-5
class Lock(object):
"""This is an implementation of a filesystem lock using Python's lockf.
- In Python, `lockf` actually calls `fcntl`, so this should work with any
- filesystem implementation that supports locking through the fcntl calls.
- This includes distributed filesystems like Lustre (when flock is enabled)
- and recent NFS versions.
-
+ In Python, `lockf` actually calls `fcntl`, so this should work with
+ any filesystem implementation that supports locking through the fcntl
+ calls. This includes distributed filesystems like Lustre (when flock
+ is enabled) and recent NFS versions.
"""
- def __init__(self, file_path):
- self._file_path = file_path
- self._fd = None
+ def __init__(self, path, start=0, length=0):
+ """Construct a new lock on the file at ``path``.
+
+ By default, the lock applies to the whole file. Optionally,
+ caller can specify a byte range beginning ``start`` bytes from
+ the start of the file and extending ``length`` bytes from there.
+
+ This exposes a subset of fcntl locking functionality. It does
+ not currently expose the ``whence`` parameter -- ``whence`` is
+ always os.SEEK_SET and ``start`` is always evaluated from the
+ beginning of the file.
+ """
+ self.path = path
+ self._file = None
self._reads = 0
self._writes = 0
- def _lock(self, op, timeout):
+ # byte range parameters
+ self._start = start
+ self._length = length
+
+ # PID and host of lock holder
+ self.pid = self.old_pid = None
+ self.host = self.old_host = None
+
+ def _lock(self, op, timeout=_default_timeout):
"""This takes a lock using POSIX locks (``fnctl.lockf``).
- The lock is implemented as a spin lock using a nonblocking
- call to lockf().
+ The lock is implemented as a spin lock using a nonblocking call
+ to lockf().
On acquiring an exclusive lock, the lock writes this process's
- pid and host to the lock file, in case the holding process
- needs to be killed later.
+ pid and host to the lock file, in case the holding process needs
+ to be killed later.
If the lock times out, it raises a ``LockError``.
"""
start_time = time.time()
while (time.time() - start_time) < timeout:
try:
- if self._fd is None:
- self._fd = os.open(self._file_path, os.O_RDWR)
-
- fcntl.lockf(self._fd, op | fcntl.LOCK_NB)
+ # If we could write the file, we'd have opened it 'r+'.
+ # Raise an error when we attempt to upgrade to a write lock.
+ if op == fcntl.LOCK_EX:
+ if self._file and self._file.mode == 'r':
+ raise LockError(
+ "Can't take exclusive lock on read-only file: %s"
+ % self.path)
+
+ # Create file and parent directories if they don't exist.
+ if self._file is None:
+ self._ensure_parent_directory()
+
+ # Prefer to open 'r+' to allow upgrading to write
+ # lock later if possible. Open read-only if we can't
+ # write the lock file at all.
+ os_mode, fd_mode = (os.O_RDWR | os.O_CREAT), 'r+'
+ if os.path.exists(self.path) and not os.access(
+ self.path, os.W_OK):
+ os_mode, fd_mode = os.O_RDONLY, 'r'
+
+ fd = os.open(self.path, os_mode)
+ self._file = os.fdopen(fd, fd_mode)
+
+ # Try to get the lock (will raise if not available.)
+ fcntl.lockf(self._file, op | fcntl.LOCK_NB,
+ self._length, self._start, os.SEEK_SET)
+
+ # All locks read the owner PID and host
+ self._read_lock_data()
+
+ # Exclusive locks write their PID/host
if op == fcntl.LOCK_EX:
- os.write(
- self._fd,
- "pid=%s,host=%s" % (os.getpid(), socket.getfqdn()))
+ self._write_lock_data()
+
return
except IOError as error:
@@ -88,6 +136,40 @@ class Lock(object):
raise LockError("Timed out waiting for lock.")
+ def _ensure_parent_directory(self):
+ parent = os.path.dirname(self.path)
+ try:
+ os.makedirs(parent)
+ return True
+ except OSError as e:
+ # makedirs can fail when diretory already exists.
+ if not (e.errno == errno.EEXIST and os.path.isdir(parent) or
+ e.errno == errno.EISDIR):
+ raise
+
+ def _read_lock_data(self):
+ """Read PID and host data out of the file if it is there."""
+ line = self._file.read()
+ if line:
+ pid, host = line.strip().split(',')
+ _, _, self.pid = pid.rpartition('=')
+ _, _, self.host = host.rpartition('=')
+
+ def _write_lock_data(self):
+ """Write PID and host data to the file, recording old values."""
+ self.old_pid = self.pid
+ self.old_host = self.host
+
+ self.pid = os.getpid()
+ self.host = socket.getfqdn()
+
+ # write pid, host to disk to sync over FS
+ self._file.seek(0)
+ self._file.write("pid=%s,host=%s" % (self.pid, self.host))
+ self._file.truncate()
+ self._file.flush()
+ os.fsync(self._file.fileno())
+
def _unlock(self):
"""Releases a lock using POSIX locks (``fcntl.lockf``)
@@ -95,9 +177,10 @@ class Lock(object):
be masquerading as write locks, but this removes either.
"""
- fcntl.lockf(self._fd, fcntl.LOCK_UN)
- os.close(self._fd)
- self._fd = None
+ fcntl.lockf(self._file, fcntl.LOCK_UN,
+ self._length, self._start, os.SEEK_SET)
+ self._file.close()
+ self._file = None
def acquire_read(self, timeout=_default_timeout):
"""Acquires a recursive, shared lock for reading.
@@ -111,7 +194,9 @@ class Lock(object):
"""
if self._reads == 0 and self._writes == 0:
- self._lock(fcntl.LOCK_SH, timeout) # can raise LockError.
+ tty.debug('READ LOCK: {0.path}[{0._start}:{0._length}] [Acquiring]'
+ .format(self))
+ self._lock(fcntl.LOCK_SH, timeout=timeout) # can raise LockError.
self._reads += 1
return True
else:
@@ -130,7 +215,10 @@ class Lock(object):
"""
if self._writes == 0:
- self._lock(fcntl.LOCK_EX, timeout) # can raise LockError.
+ tty.debug(
+ 'WRITE LOCK: {0.path}[{0._start}:{0._length}] [Acquiring]'
+ .format(self))
+ self._lock(fcntl.LOCK_EX, timeout=timeout) # can raise LockError.
self._writes += 1
return True
else:
@@ -150,6 +238,8 @@ class Lock(object):
assert self._reads > 0
if self._reads == 1 and self._writes == 0:
+ tty.debug('READ LOCK: {0.path}[{0._start}:{0._length}] [Released]'
+ .format(self))
self._unlock() # can raise LockError.
self._reads -= 1
return True
@@ -170,6 +260,8 @@ class Lock(object):
assert self._writes > 0
if self._writes == 1 and self._reads == 0:
+ tty.debug('WRITE LOCK: {0.path}[{0._start}:{0._length}] [Released]'
+ .format(self))
self._unlock() # can raise LockError.
self._writes -= 1
return True
diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py
index b67edcf9cc..3d4972b3ae 100644
--- a/lib/spack/llnl/util/tty/log.py
+++ b/lib/spack/llnl/util/tty/log.py
@@ -24,11 +24,11 @@
##############################################################################
"""Utility classes for logging the output of blocks of code.
"""
-import sys
+import multiprocessing
import os
import re
import select
-import inspect
+import sys
import llnl.util.tty as tty
import llnl.util.tty.color as color
@@ -100,25 +100,36 @@ class keyboard_input(object):
class log_output(object):
- """Redirects output and error of enclosed block to a file.
+ """Spawns a daemon that reads from a pipe and writes to a file
Usage:
- with log_output(open('logfile.txt', 'w')):
- # do things ... output will be logged.
+ # Spawns the daemon
+ with log_output('logfile.txt', 'w') as log_redirection:
+ # do things ... output is not redirected
+ with log_redirection:
+ # do things ... output will be logged
or:
- with log_output(open('logfile.txt', 'w'), echo=True):
- # do things ... output will be logged
- # and also printed to stdout.
-
- Closes the provided stream when done with the block.
- If echo is True, also prints the output to stdout.
+ with log_output('logfile.txt', echo=True) as log_redirection:
+ # do things ... output is not redirected
+ with log_redirection:
+ # do things ... output will be logged
+ # and also printed to stdout.
+
+ Opens a stream in 'w' mode at daemon spawning and closes it at
+ daemon joining. If echo is True, also prints the output to stdout.
"""
- def __init__(self, stream, echo=False, force_color=False, debug=False):
- self.stream = stream
-
- # various output options
+ def __init__(
+ self,
+ filename,
+ echo=False,
+ force_color=False,
+ debug=False,
+ input_stream=sys.stdin
+ ):
+ self.filename = filename
+ # Various output options
self.echo = echo
self.force_color = force_color
self.debug = debug
@@ -126,70 +137,92 @@ class log_output(object):
# Default is to try file-descriptor reassignment unless the system
# out/err streams do not have an associated file descriptor
self.directAssignment = False
+ self.read, self.write = os.pipe()
- def trace(self, frame, event, arg):
- """Jumps to __exit__ on the child process."""
- raise _SkipWithBlock()
+ # Needed to un-summon the daemon
+ self.parent_pipe, self.child_pipe = multiprocessing.Pipe()
+ # Input stream that controls verbosity interactively
+ self.input_stream = input_stream
def __enter__(self):
- """Redirect output from the with block to a file.
-
- This forks the with block as a separate process, with stdout
- and stderr redirected back to the parent via a pipe. If
- echo is set, also writes to standard out.
-
- """
- # remember these values for later.
- self._force_color = color._force_color
- self._debug = tty._debug
-
- read, write = os.pipe()
-
- self.pid = os.fork()
- if self.pid:
- # Parent: read from child, skip the with block.
- os.close(write)
-
- read_file = os.fdopen(read, 'r', 0)
- with self.stream as log_file:
- with keyboard_input(sys.stdin):
- while True:
- rlist, w, x = select.select(
- [read_file, sys.stdin], [], [])
- if not rlist:
- break
-
- # Allow user to toggle echo with 'v' key.
- # Currently ignores other chars.
- if sys.stdin in rlist:
- if sys.stdin.read(1) == 'v':
- self.echo = not self.echo
-
- # handle output from the with block process.
- if read_file in rlist:
- line = read_file.readline()
- if not line:
- break
-
- # Echo to stdout if requested.
- if self.echo:
- sys.stdout.write(line)
-
- # Stripped output to log file.
- log_file.write(_strip(line))
-
- read_file.flush()
- read_file.close()
-
- # Set a trace function to skip the with block.
- sys.settrace(lambda *args, **keys: None)
- frame = inspect.currentframe(1)
- frame.f_trace = self.trace
-
- else:
- # Child: redirect output, execute the with block.
- os.close(read)
-
+ # Sets a daemon that writes to file what it reads from a pipe
+ try:
+ fwd_input_stream = os.fdopen(
+ os.dup(self.input_stream.fileno())
+ )
+ self.p = multiprocessing.Process(
+ target=self._spawn_writing_daemon,
+ args=(self.read, fwd_input_stream),
+ name='logger_daemon'
+ )
+ self.p.daemon = True
+ self.p.start()
+ finally:
+ fwd_input_stream.close()
+ return log_output.OutputRedirection(self)
+
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ self.parent_pipe.send(True)
+ self.p.join(60.0) # 1 minute to join the child
+
+ def _spawn_writing_daemon(self, read, input_stream):
+ # Parent: read from child, skip the with block.
+ read_file = os.fdopen(read, 'r', 0)
+ with open(self.filename, 'w') as log_file:
+ with keyboard_input(input_stream):
+ while True:
+ # Without the last parameter (timeout) select will wait
+ # until at least one of the two streams are ready. This
+ # may cause the function to hang.
+ rlist, _, _ = select.select(
+ [read_file, input_stream], [], [], 0
+ )
+
+ # Allow user to toggle echo with 'v' key.
+ # Currently ignores other chars.
+ if input_stream in rlist:
+ if input_stream.read(1) == 'v':
+ self.echo = not self.echo
+
+ # Handle output from the with block process.
+ if read_file in rlist:
+ # If we arrive here it means that
+ # read_file was ready for reading : it
+ # should never happen that line is false-ish
+ line = read_file.readline()
+
+ # Echo to stdout if requested.
+ if self.echo:
+ sys.stdout.write(line)
+
+ # Stripped output to log file.
+ log_file.write(_strip(line))
+ log_file.flush()
+
+ if self.child_pipe.poll():
+ break
+
+ def __del__(self):
+ """Closes the pipes"""
+ os.close(self.write)
+ os.close(self.read)
+
+ class OutputRedirection(object):
+
+ def __init__(self, other):
+ self.__dict__.update(other.__dict__)
+
+ def __enter__(self):
+ """Redirect output from the with block to a file.
+
+ Hijacks stdout / stderr and writes to the pipe
+ connected to the logger daemon
+ """
+ # remember these values for later.
+ self._force_color = color._force_color
+ self._debug = tty._debug
+ # Redirect this output to a pipe
+ write = self.write
try:
# Save old stdout and stderr
self._stdout = os.dup(sys.stdout.fileno())
@@ -205,53 +238,26 @@ class log_output(object):
output_redirect = os.fdopen(write, 'w')
sys.stdout = output_redirect
sys.stderr = output_redirect
-
if self.force_color:
color._force_color = True
-
if self.debug:
tty._debug = True
- def __exit__(self, exc_type, exception, traceback):
- """Exits on child, handles skipping the with block on parent."""
- # Child should just exit here.
- if self.pid == 0:
+ def __exit__(self, exc_type, exception, traceback):
+ """Plugs back the original file descriptors
+ for stdout and stderr
+ """
# Flush the log to disk.
sys.stdout.flush()
sys.stderr.flush()
-
- if exception:
- # Restore stdout on the child if there's an exception,
- # and let it be raised normally.
- #
- # This assumes that even if the exception is caught,
- # the child will exit with a nonzero return code. If
- # it doesn't, the child process will continue running.
- #
- # TODO: think about how this works outside install.
- # TODO: ideally would propagate exception to parent...
- if self.directAssignment:
- sys.stdout = self._stdout
- sys.stderr = self._stderr
- else:
- os.dup2(self._stdout, sys.stdout.fileno())
- os.dup2(self._stderr, sys.stderr.fileno())
-
- return False
-
+ if self.directAssignment:
+ # We seem to need this only to pass test/install.py
+ sys.stdout = self._stdout
+ sys.stderr = self._stderr
else:
- # Die quietly if there was no exception.
- os._exit(0)
-
- else:
- # If the child exited badly, parent also should exit.
- pid, returncode = os.waitpid(self.pid, 0)
- if returncode != 0:
- os._exit(1)
-
- # restore output options.
- color._force_color = self._force_color
- tty._debug = self._debug
+ os.dup2(self._stdout, sys.stdout.fileno())
+ os.dup2(self._stderr, sys.stderr.fileno())
- # Suppresses exception if it's our own.
- return exc_type is _SkipWithBlock
+ # restore output options.
+ color._force_color = self._force_color
+ tty._debug = self._debug
diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py
index 3d508d0fde..0646f5cb32 100644
--- a/lib/spack/spack/__init__.py
+++ b/lib/spack/spack/__init__.py
@@ -30,7 +30,10 @@ import getpass
from llnl.util.filesystem import *
import llnl.util.tty as tty
-# This lives in $prefix/lib/spack/spack/__file__
+#-----------------------------------------------------------------------------
+# Variables describing how Spack is laid out in its prefix.
+#-----------------------------------------------------------------------------
+# This file lives in $prefix/lib/spack/spack/__file__
spack_root = ancestor(__file__, 4)
# The spack script itself
@@ -49,132 +52,100 @@ var_path = join_path(spack_root, "var", "spack")
stage_path = join_path(var_path, "stage")
repos_path = join_path(var_path, "repos")
share_path = join_path(spack_root, "share", "spack")
-cache_path = join_path(var_path, "cache")
+
+# Paths to built-in Spack repositories.
+packages_path = join_path(repos_path, "builtin")
+mock_packages_path = join_path(repos_path, "builtin.mock")
# User configuration location
user_config_path = os.path.expanduser('~/.spack')
-import spack.fetch_strategy
-fetch_cache = spack.fetch_strategy.FsCache(cache_path)
-
-from spack.file_cache import FileCache
-user_cache_path = join_path(user_config_path, 'cache')
-user_cache = FileCache(user_cache_path)
-
prefix = spack_root
opt_path = join_path(prefix, "opt")
-install_path = join_path(opt_path, "spack")
etc_path = join_path(prefix, "etc")
-#
-# Set up the default packages database.
-#
+
+#-----------------------------------------------------------------------------
+# Initial imports (only for use in this file -- see __all__ below.)
+#-----------------------------------------------------------------------------
+# These imports depend on the paths above, or on each other
+# Group them here so it's easy to understand the order.
+# TODO: refactor this stuff to be more init order agnostic.
import spack.repository
+import spack.error
+import spack.config
+import spack.fetch_strategy
+from spack.file_cache import FileCache
+from spack.preferred_packages import PreferredPackages
+from spack.abi import ABI
+from spack.concretize import DefaultConcretizer
+from spack.version import Version
+from spack.util.path import canonicalize_path
+
+
+#-----------------------------------------------------------------------------
+# Initialize various data structures & objects at the core of Spack.
+#-----------------------------------------------------------------------------
+# Version information
+spack_version = Version("0.9.1")
+
+
+# Set up the default packages database.
try:
repo = spack.repository.RepoPath()
sys.meta_path.append(repo)
except spack.error.SpackError, e:
tty.die('while initializing Spack RepoPath:', e.message)
-#
-# Set up the installed packages database
-#
-from spack.database import Database
-installed_db = Database(install_path)
-
-#
-# Paths to built-in Spack repositories.
-#
-packages_path = join_path(repos_path, "builtin")
-mock_packages_path = join_path(repos_path, "builtin.mock")
-
-#
-# This controls how spack lays out install prefixes and
-# stage directories.
-#
-from spack.directory_layout import YamlDirectoryLayout
-install_layout = YamlDirectoryLayout(install_path)
-#
-# This controls how packages are sorted when trying to choose
-# the most preferred package. More preferred packages are sorted
-# first.
-#
-from spack.preferred_packages import PreferredPackages
+# PreferredPackages controls preference sort order during concretization.
+# More preferred packages are sorted first.
pkgsort = PreferredPackages()
-#
-# This tests ABI compatibility between packages
-#
-from spack.abi import ABI
+
+# Tests ABI compatibility between packages
abi = ABI()
-#
+
# This controls how things are concretized in spack.
# Replace it with a subclass if you want different
# policies.
-#
-from spack.concretize import DefaultConcretizer
concretizer = DefaultConcretizer()
-# Version information
-from spack.version import Version
-spack_version = Version("0.9.1")
+#-----------------------------------------------------------------------------
+# config.yaml options
+#-----------------------------------------------------------------------------
+_config = spack.config.get_config('config')
-#
-# Executables used by Spack
-#
-from spack.util.executable import Executable, which
-# User's editor from the environment
-editor = Executable(os.environ.get("EDITOR", "vi"))
+# Path where downloaded source code is cached
+cache_path = canonicalize_path(
+ _config.get('source_cache', join_path(var_path, "cache")))
+fetch_cache = spack.fetch_strategy.FsCache(cache_path)
-# Curl tool for fetching files.
-curl = which("curl", required=True)
-
-# Whether to build in tmp space or directly in the stage_path.
-# If this is true, then spack will make stage directories in
-# a tmp filesystem, and it will symlink them into stage_path.
-use_tmp_stage = True
-
-# Locations to use for staging and building, in order of preference
-# Use a %u to add a username to the stage paths here, in case this
-# is a shared filesystem. Spack will use the first of these paths
-# that it can create.
-tmp_dirs = []
-_default_tmp = tempfile.gettempdir()
-_tmp_user = getpass.getuser()
-
-_tmp_candidates = (_default_tmp, '/nfs/tmp2', '/tmp', '/var/tmp')
-for path in _tmp_candidates:
- # don't add a second username if it's already unique by user.
- if _tmp_user not in path:
- tmp_dirs.append(join_path(path, '%u', 'spack-stage'))
- else:
- tmp_dirs.append(join_path(path, 'spack-stage'))
-
-# Whether spack should allow installation of unsafe versions of
-# software. "Unsafe" versions are ones it doesn't have a checksum
-# for.
-do_checksum = True
-#
-# SYS_TYPE to use for the spack installation.
-# Value of this determines what platform spack thinks it is by
-# default. You can assign three types of values:
-# 1. None
-# Spack will try to determine the sys_type automatically.
-#
-# 2. A string
-# Spack will assume that the sys_type is hardcoded to the value.
-#
-# 3. A function that returns a string:
-# Spack will use this function to determine the sys_type.
-#
-sys_type = None
+# cache for miscellaneous stuff.
+misc_cache_path = canonicalize_path(
+ _config.get('misc_cache', join_path(user_config_path, 'cache')))
+misc_cache = FileCache(misc_cache_path)
-#
+# If this is enabled, tools that use SSL should not verify
+# certifiates. e.g., curl should use the -k option.
+insecure = not _config.get('verify_ssl', True)
+
+
+# Whether spack should allow installation of unsafe versions of software.
+# "Unsafe" versions are ones it doesn't have a checksum for.
+do_checksum = _config.get('checksum', True)
+
+
+# If this is True, spack will not clean the environment to remove
+# potentially harmful variables before builds.
+dirty = _config.get('dirty', False)
+
+
+#-----------------------------------------------------------------------------
# When packages call 'from spack import *', this extra stuff is brought in.
#
# Spack internal code should call 'import spack' and accesses other
@@ -185,10 +156,21 @@ sys_type = None
# packages should live. This file is overloaded for spack core vs.
# for packages.
#
-__all__ = ['Package', 'StagedPackage', 'CMakePackage',
- 'Version', 'when', 'ver', 'alldeps', 'nolink']
-from spack.package import Package, ExtensionConflictError
-from spack.package import StagedPackage, CMakePackage
+#-----------------------------------------------------------------------------
+__all__ = ['PackageBase',
+ 'Package',
+ 'CMakePackage',
+ 'AutotoolsPackage',
+ 'MakefilePackage',
+ 'Version',
+ 'when',
+ 'ver',
+ 'alldeps',
+ 'nolink']
+from spack.package import Package, PackageBase, ExtensionConflictError
+from spack.build_systems.makefile import MakefilePackage
+from spack.build_systems.autotools import AutotoolsPackage
+from spack.build_systems.cmake import CMakePackage
from spack.version import Version, ver
from spack.spec import DependencySpec, alldeps, nolink
from spack.multimethod import when
@@ -205,6 +187,9 @@ import spack.util.executable
from spack.util.executable import *
__all__ += spack.util.executable.__all__
+# User's editor from the environment
+editor = Executable(os.environ.get("EDITOR", "vi"))
+
from spack.package import \
install_dependency_symlinks, flatten_dependencies, \
DependencyConflictError, InstallError, ExternalPackageError
diff --git a/lib/spack/spack/abi.py b/lib/spack/spack/abi.py
index 064abb9782..b3b1dd6d27 100644
--- a/lib/spack/spack/abi.py
+++ b/lib/spack/spack/abi.py
@@ -26,6 +26,7 @@
import os
import spack
import spack.spec
+from spack.build_environment import dso_suffix
from spack.spec import CompilerSpec
from spack.util.executable import Executable, ProcessError
from llnl.util.lang import memoized
@@ -54,10 +55,10 @@ class ABI(object):
output = None
if compiler.cxx:
rungcc = Executable(compiler.cxx)
- libname = "libstdc++.so"
+ libname = "libstdc++." + dso_suffix
elif compiler.cc:
rungcc = Executable(compiler.cc)
- libname = "libgcc_s.so"
+ libname = "libgcc_s." + dso_suffix
else:
return None
try:
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index 0d210f9741..b14de35109 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -83,10 +83,10 @@ from llnl.util.filesystem import join_path
import llnl.util.tty as tty
import spack
-import spack.compilers
from spack.util.naming import mod_to_class
from spack.util.environment import get_path
from spack.util.multiproc import parmap
+from spack.util.spack_yaml import syaml_dict
import spack.error as serr
@@ -275,6 +275,8 @@ class OperatingSystem(object):
# Once the paths are cleaned up, do a search for each type of
# compiler. We can spawn a bunch of parallel searches to reduce
# the overhead of spelunking all these directories.
+ # NOTE: we import spack.compilers here to avoid init order cycles
+ import spack.compilers
types = spack.compilers.all_compiler_types()
compiler_lists = parmap(lambda cmp_cls:
self.find_compiler(cmp_cls, *filtered_path),
@@ -407,12 +409,13 @@ class Arch(object):
return (platform, platform_os, target)
def to_dict(self):
- d = {}
- d['platform'] = str(self.platform) if self.platform else None
- d['platform_os'] = str(self.platform_os) if self.platform_os else None
- d['target'] = str(self.target) if self.target else None
-
- return d
+ return syaml_dict((
+ ('platform',
+ str(self.platform) if self.platform else None),
+ ('platform_os',
+ str(self.platform_os) if self.platform_os else None),
+ ('target',
+ str(self.target) if self.target else None)))
def _target_from_dict(target_name, plat=None):
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 5affd3c7c5..49df7a90b4 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -53,14 +53,15 @@ calls you can make from within the install() function.
"""
import os
import sys
-import shutil
import multiprocessing
-import platform
+import traceback
+import inspect
+import shutil
import llnl.util.tty as tty
-from llnl.util.filesystem import *
-
import spack
+import spack.store
+from llnl.util.filesystem import *
from spack.environment import EnvironmentModifications, validate
from spack.util.environment import *
from spack.util.executable import Executable, which
@@ -77,6 +78,8 @@ SPACK_NO_PARALLEL_MAKE = 'SPACK_NO_PARALLEL_MAKE'
#
SPACK_ENV_PATH = 'SPACK_ENV_PATH'
SPACK_DEPENDENCIES = 'SPACK_DEPENDENCIES'
+SPACK_RPATH_DEPS = 'SPACK_RPATH_DEPS'
+SPACK_LINK_DEPS = 'SPACK_LINK_DEPS'
SPACK_PREFIX = 'SPACK_PREFIX'
SPACK_INSTALL = 'SPACK_INSTALL'
SPACK_DEBUG = 'SPACK_DEBUG'
@@ -221,6 +224,8 @@ def set_compiler_environment_variables(pkg, env):
for mod in compiler.modules:
load_module(mod)
+ compiler.setup_custom_environment(env)
+
return env
@@ -249,14 +254,24 @@ def set_build_environment_variables(pkg, env, dirty=False):
if os.path.isdir(ci):
env_paths.append(ci)
+ env_paths = filter_system_paths(env_paths)
+
for item in reversed(env_paths):
env.prepend_path('PATH', item)
env.set_path(SPACK_ENV_PATH, env_paths)
# Prefixes of all of the package's dependencies go in SPACK_DEPENDENCIES
- dep_prefixes = [d.prefix
- for d in pkg.spec.traverse(root=False, deptype='build')]
+ dep_prefixes = [d.prefix for d in
+ pkg.spec.traverse(root=False, deptype=('build', 'link'))]
+ dep_prefixes = filter_system_paths(dep_prefixes)
env.set_path(SPACK_DEPENDENCIES, dep_prefixes)
+
+ # These variables control compiler wrapper behavior
+ env.set_path(SPACK_RPATH_DEPS, filter_system_paths([
+ d.prefix for d in get_rpath_deps(pkg)]))
+ env.set_path(SPACK_LINK_DEPS, filter_system_paths([
+ d.prefix for d in pkg.spec.traverse(root=False, deptype=('link'))]))
+
# Add dependencies to CMAKE_PREFIX_PATH
env.set_path('CMAKE_PREFIX_PATH', dep_prefixes)
@@ -264,7 +279,7 @@ def set_build_environment_variables(pkg, env, dirty=False):
env.set(SPACK_PREFIX, pkg.prefix)
# Install root prefix
- env.set(SPACK_INSTALL, spack.install_path)
+ env.set(SPACK_INSTALL, spack.store.root)
# Stuff in here sanitizes the build environemnt to eliminate
# anything the user has set that may interfere.
@@ -287,9 +302,27 @@ def set_build_environment_variables(pkg, env, dirty=False):
if '/macports/' in p:
env.remove_path('PATH', p)
+ # Set environment variables if specified for
+ # the given compiler
+ compiler = pkg.compiler
+ environment = compiler.environment
+ if 'set' in environment:
+ env_to_set = environment['set']
+ for key, value in env_to_set.iteritems():
+ env.set('SPACK_ENV_SET_%s' % key, value)
+ env.set('%s' % key, value)
+ # Let shell know which variables to set
+ env_variables = ":".join(env_to_set.keys())
+ env.set('SPACK_ENV_TO_SET', env_variables)
+
+ if compiler.extra_rpaths:
+ extra_rpaths = ':'.join(compiler.extra_rpaths)
+ env.set('SPACK_COMPILER_EXTRA_RPATHS', extra_rpaths)
+
# Add bin directories from dependencies to the PATH for the build.
- bin_dirs = reversed(
- filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes]))
+ bin_dirs = reversed(filter(os.path.isdir, [
+ '%s/bin' % d.prefix for d in pkg.spec.dependencies(deptype='build')]))
+ bin_dirs = filter_system_bin_paths(bin_dirs)
for item in bin_dirs:
env.prepend_path('PATH', item)
@@ -341,16 +374,8 @@ def set_module_variables_for_package(pkg, module):
m.cmake = Executable('cmake')
m.ctest = Executable('ctest')
- # standard CMake arguments
- m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix,
- '-DCMAKE_BUILD_TYPE=RelWithDebInfo']
- if platform.mac_ver()[0]:
- m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST')
-
- # Set up CMake rpath
- m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE')
- m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' %
- ":".join(get_rpaths(pkg)))
+ # Standard CMake arguments
+ m.std_cmake_args = spack.CMakePackage._std_args(pkg)
# Put spack compiler paths in module scope.
link_dir = spack.build_env_path
@@ -382,10 +407,18 @@ def set_module_variables_for_package(pkg, module):
m.dso_suffix = dso_suffix
+def get_rpath_deps(pkg):
+ """Return immediate or transitive RPATHs depending on the package."""
+ if pkg.transitive_rpaths:
+ return [d for d in pkg.spec.traverse(root=False, deptype=('link'))]
+ else:
+ return pkg.spec.dependencies(deptype='link')
+
+
def get_rpaths(pkg):
"""Get a list of all the rpaths for a package."""
rpaths = [pkg.prefix.lib, pkg.prefix.lib64]
- deps = pkg.spec.dependencies(deptype='link')
+ deps = get_rpath_deps(pkg)
rpaths.extend(d.prefix.lib for d in deps
if os.path.isdir(d.prefix.lib))
rpaths.extend(d.prefix.lib64 for d in deps
@@ -397,6 +430,21 @@ def get_rpaths(pkg):
return rpaths
+def get_std_cmake_args(cmake_pkg):
+ # standard CMake arguments
+ ret = ['-DCMAKE_INSTALL_PREFIX=%s' % cmake_pkg.prefix,
+ '-DCMAKE_BUILD_TYPE=RelWithDebInfo',
+ '-DCMAKE_VERBOSE_MAKEFILE=ON']
+ if platform.mac_ver()[0]:
+ ret.append('-DCMAKE_FIND_FRAMEWORK=LAST')
+
+ # Set up CMake rpath
+ ret.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE')
+ ret.append('-DCMAKE_INSTALL_RPATH=%s' % ":".join(get_rpaths(cmake_pkg)))
+
+ return ret
+
+
def parent_class_modules(cls):
"""
Get list of super class modules that are all descend from spack.Package
@@ -476,14 +524,12 @@ def setup_package(pkg, dirty=False):
def fork(pkg, function, dirty=False):
"""Fork a child process to do part of a spack build.
- Arguments:
+ :param pkg: pkg whose environemnt we should set up the forked process for.
+ :param function: arg-less function to run in the child process.
+ :param dirty: If True, do NOT clean the environment before building.
- pkg -- pkg whose environemnt we should set up the
- forked process for.
- function -- arg-less function to run in the child process.
- dirty -- If True, do NOT clean the environment before building.
+ Usage::
- Usage:
def child_fun():
# do stuff
build_env.fork(pkg, child_fun)
@@ -498,42 +544,170 @@ def fork(pkg, function, dirty=False):
well. If things go well, the child exits and the parent
carries on.
"""
- try:
- pid = os.fork()
- except OSError as e:
- raise InstallError("Unable to fork build process: %s" % e)
-
- if pid == 0:
- # Give the child process the package's build environment.
- setup_package(pkg, dirty=dirty)
+ def child_execution(child_connection, input_stream):
try:
- # call the forked function.
- function()
+ setup_package(pkg, dirty=dirty)
+ function(input_stream)
+ child_connection.send(None)
+ except:
+ # catch ANYTHING that goes wrong in the child process
+ exc_type, exc, tb = sys.exc_info()
- # Use os._exit here to avoid raising a SystemExit exception,
- # which interferes with unit tests.
- os._exit(0)
+ # Need to unwind the traceback in the child because traceback
+ # objects can't be sent to the parent.
+ tb_string = traceback.format_exc()
- except spack.error.SpackError as e:
- e.die()
+ # build up some context from the offending package so we can
+ # show that, too.
+ package_context = get_package_context(tb)
- except:
- # Child doesn't raise or return to main spack code.
- # Just runs default exception handler and exits.
- sys.excepthook(*sys.exc_info())
- os._exit(1)
+ build_log = None
+ if hasattr(pkg, 'log_path'):
+ build_log = pkg.log_path
- else:
- # Parent process just waits for the child to complete. If the
- # child exited badly, assume it already printed an appropriate
- # message. Just make the parent exit with an error code.
- pid, returncode = os.waitpid(pid, 0)
- if returncode != 0:
- message = "Installation process had nonzero exit code : {code}"
- strcode = str(returncode)
- raise InstallError(message.format(code=strcode))
+ # make a pickleable exception to send to parent.
+ msg = "%s: %s" % (str(exc_type.__name__), str(exc))
+
+ ce = ChildError(msg, tb_string, build_log, package_context)
+ child_connection.send(ce)
+
+ finally:
+ child_connection.close()
+
+ parent_connection, child_connection = multiprocessing.Pipe()
+ try:
+ # Forward sys.stdin to be able to activate / deactivate
+ # verbosity pressing a key at run-time
+ input_stream = os.fdopen(os.dup(sys.stdin.fileno()))
+ p = multiprocessing.Process(
+ target=child_execution,
+ args=(child_connection, input_stream)
+ )
+ p.start()
+ finally:
+ # Close the input stream in the parent process
+ input_stream.close()
+ child_exc = parent_connection.recv()
+ p.join()
+
+ if child_exc is not None:
+ raise child_exc
+
+
+def get_package_context(traceback):
+ """Return some context for an error message when the build fails.
+
+ Args:
+ traceback -- A traceback from some exception raised during install.
+
+ This function inspects the stack to find where we failed in the
+ package file, and it adds detailed context to the long_message
+ from there.
+
+ """
+ def make_stack(tb, stack=None):
+ """Tracebacks come out of the system in caller -> callee order. Return
+ an array in callee -> caller order so we can traverse it."""
+ if stack is None:
+ stack = []
+ if tb is not None:
+ make_stack(tb.tb_next, stack)
+ stack.append(tb)
+ return stack
+
+ stack = make_stack(traceback)
+
+ for tb in stack:
+ frame = tb.tb_frame
+ if 'self' in frame.f_locals:
+ # Find the first proper subclass of spack.PackageBase.
+ obj = frame.f_locals['self']
+ if isinstance(obj, spack.PackageBase):
+ break
+
+ # we found obj, the Package implementation we care about.
+ # point out the location in the install method where we failed.
+ lines = []
+ lines.append("%s:%d, in %s:" % (
+ inspect.getfile(frame.f_code), frame.f_lineno, frame.f_code.co_name
+ ))
+
+ # Build a message showing context in the install method.
+ sourcelines, start = inspect.getsourcelines(frame)
+ for i, line in enumerate(sourcelines):
+ mark = ">> " if start + i == frame.f_lineno else " "
+ lines.append(" %s%-5d%s" % (mark, start + i, line.rstrip()))
+
+ return lines
class InstallError(spack.error.SpackError):
- """Raised when a package fails to install"""
+ """Raised by packages when a package fails to install"""
+
+
+class ChildError(spack.error.SpackError):
+ """Special exception class for wrapping exceptions from child processes
+ in Spack's build environment.
+
+ The main features of a ChildError are:
+
+ 1. They're serializable, so when a child build fails, we can send one
+ of these to the parent and let the parent report what happened.
+
+ 2. They have a ``traceback`` field containing a traceback generated
+ on the child immediately after failure. Spack will print this on
+ failure in lieu of trying to run sys.excepthook on the parent
+ process, so users will see the correct stack trace from a child.
+
+ 3. They also contain package_context, which shows source code context
+ in the Package implementation where the error happened. To get
+ this, Spack searches the stack trace for the deepest frame where
+ ``self`` is in scope and is an instance of PackageBase. This will
+ generally find a useful spot in the ``package.py`` file.
+
+ The long_message of a ChildError displays all this stuff to the user,
+ and SpackError handles displaying the special traceback if we're in
+ debug mode with spack -d.
+
+ """
+ def __init__(self, msg, traceback_string, build_log, package_context):
+ super(ChildError, self).__init__(msg)
+ self.traceback = traceback_string
+ self.build_log = build_log
+ self.package_context = package_context
+
+ @property
+ def long_message(self):
+ msg = self._long_message if self._long_message else ''
+
+ if self.package_context:
+ if msg:
+ msg += "\n\n"
+ msg += '\n'.join(self.package_context)
+
+ if msg:
+ msg += "\n\n"
+
+ if self.build_log:
+ msg += "See build log for details:\n"
+ msg += " %s" % self.build_log
+
+ return msg
+
+ def __reduce__(self):
+ """__reduce__ is used to serialize (pickle) ChildErrors.
+
+ Return a function to reconstruct a ChildError, along with the
+ salient properties we'll need.
+ """
+ return _make_child_error, (
+ self.message,
+ self.traceback,
+ self.build_log,
+ self.package_context)
+
+
+def _make_child_error(msg, traceback, build_log, package_context):
+ """Used by __reduce__ in ChildError to reconstruct pickled errors."""
+ return ChildError(msg, traceback, build_log, package_context)
diff --git a/lib/spack/spack/build_systems/__init__.py b/lib/spack/spack/build_systems/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/spack/spack/build_systems/__init__.py
diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py
new file mode 100644
index 0000000000..8535c9d3e3
--- /dev/null
+++ b/lib/spack/spack/build_systems/autotools.py
@@ -0,0 +1,183 @@
+##############################################################################
+# 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
+##############################################################################
+
+import inspect
+import os
+import os.path
+import shutil
+from subprocess import PIPE
+from subprocess import check_call
+
+import llnl.util.tty as tty
+from spack.package import PackageBase
+
+
+class AutotoolsPackage(PackageBase):
+ """Specialized class for packages that are built using GNU Autotools
+
+ This class provides four phases that can be overridden:
+ - autoreconf
+ - configure
+ - build
+ - install
+
+ They all have sensible defaults and for many packages the only thing
+ necessary will be to override `configure_args`
+ """
+ phases = ['autoreconf', 'configure', 'build', 'install']
+ # To be used in UI queries that require to know which
+ # build-system class we are using
+ build_system_class = 'AutotoolsPackage'
+ patch_config_guess = True
+
+ def do_patch_config_guess(self):
+ """Some packages ship with an older config.guess and need to have
+ this updated when installed on a newer architecture."""
+
+ my_config_guess = None
+ config_guess = None
+ if os.path.exists('config.guess'):
+ # First search the top-level source directory
+ my_config_guess = 'config.guess'
+ else:
+ # Then search in all sub directories.
+ # We would like to use AC_CONFIG_AUX_DIR, but not all packages
+ # ship with their configure.in or configure.ac.
+ d = '.'
+ dirs = [os.path.join(d, o) for o in os.listdir(d)
+ if os.path.isdir(os.path.join(d, o))]
+ for dirname in dirs:
+ path = os.path.join(dirname, 'config.guess')
+ if os.path.exists(path):
+ my_config_guess = path
+
+ if my_config_guess is not None:
+ try:
+ check_call([my_config_guess], stdout=PIPE, stderr=PIPE)
+ # The package's config.guess already runs OK, so just use it
+ return True
+ except:
+ pass
+
+ # Look for a spack-installed automake package
+ if 'automake' in self.spec:
+ automake_path = os.path.join(self.spec['automake'].prefix, 'share',
+ 'automake-' +
+ str(self.spec['automake'].version))
+ path = os.path.join(automake_path, 'config.guess')
+ if os.path.exists(path):
+ config_guess = path
+ if config_guess is not None:
+ try:
+ check_call([config_guess], stdout=PIPE, stderr=PIPE)
+ shutil.copyfile(config_guess, my_config_guess)
+ return True
+ except:
+ pass
+
+ # Look for the system's config.guess
+ if os.path.exists('/usr/share'):
+ automake_dir = [s for s in os.listdir('/usr/share') if
+ "automake" in s]
+ if automake_dir:
+ automake_path = os.path.join('/usr/share', automake_dir[0])
+ path = os.path.join(automake_path, 'config.guess')
+ if os.path.exists(path):
+ config_guess = path
+ if config_guess is not None:
+ try:
+ check_call([config_guess], stdout=PIPE, stderr=PIPE)
+ shutil.copyfile(config_guess, my_config_guess)
+ return True
+ except:
+ pass
+
+ return False
+
+ def patch(self):
+ """Perform any required patches."""
+
+ if self.patch_config_guess and self.spec.satisfies(
+ 'arch=linux-redhat7-ppc64le'):
+ if not self.do_patch_config_guess():
+ raise RuntimeError('Failed to find suitable config.guess')
+
+ def autoreconf(self, spec, prefix):
+ """Not needed usually, configure should be already there"""
+ pass
+
+ @PackageBase.sanity_check('autoreconf')
+ def is_configure_or_die(self):
+ """Checks the presence of a `configure` file after the
+ autoreconf phase"""
+ if not os.path.exists('configure'):
+ raise RuntimeError(
+ 'configure script not found in {0}'.format(os.getcwd()))
+
+ def configure_args(self):
+ """Method to be overridden. Should return an iterable containing
+ all the arguments that must be passed to configure, except --prefix
+ """
+ return []
+
+ def configure(self, spec, prefix):
+ """Runs configure with the arguments specified in `configure_args`
+ and an appropriately set prefix
+ """
+ options = ['--prefix={0}'.format(prefix)] + self.configure_args()
+ inspect.getmodule(self).configure(*options)
+
+ def build(self, spec, prefix):
+ """The usual `make` after configure"""
+ inspect.getmodule(self).make()
+
+ def install(self, spec, prefix):
+ """...and the final `make install` after configure"""
+ inspect.getmodule(self).make('install')
+
+ @PackageBase.sanity_check('build')
+ @PackageBase.on_package_attributes(run_tests=True)
+ def _run_default_function(self):
+ """This function is run after build if self.run_tests == True
+
+ It will search for a method named `check` and run it. A sensible
+ default is provided in the base class.
+ """
+ try:
+ fn = getattr(self, 'check')
+ tty.msg('Trying default sanity checks [check]')
+ fn()
+ except AttributeError:
+ tty.msg('Skipping default sanity checks [method `check` not implemented]') # NOQA: ignore=E501
+
+ def check(self):
+ """Default test : search the Makefile for targets `test` and `check`
+ and run them if found.
+ """
+ self._if_make_target_execute('test')
+ self._if_make_target_execute('check')
+
+ # Check that self.prefix is there after installation
+ PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix)
diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py
new file mode 100644
index 0000000000..cb1076d7b7
--- /dev/null
+++ b/lib/spack/spack/build_systems/cmake.py
@@ -0,0 +1,143 @@
+##############################################################################
+# 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
+##############################################################################
+
+import inspect
+import os
+import platform
+
+import llnl.util.tty as tty
+import spack.build_environment
+from llnl.util.filesystem import working_dir, join_path
+from spack.package import PackageBase
+
+
+class CMakePackage(PackageBase):
+ """Specialized class for packages that are built using cmake
+
+ This class provides three phases that can be overridden:
+ - cmake
+ - build
+ - install
+
+ They all have sensible defaults and for many packages the only thing
+ necessary will be to override `cmake_args`
+ """
+ phases = ['cmake', 'build', 'install']
+ # To be used in UI queries that require to know which
+ # build-system class we are using
+ build_system_class = 'CMakePackage'
+
+ def build_type(self):
+ """Override to provide the correct build_type in case a complex
+ logic is needed
+ """
+ return 'RelWithDebInfo'
+
+ def root_cmakelists_dir(self):
+ """Directory where to find the root CMakeLists.txt"""
+ return self.stage.source_path
+
+ @property
+ def std_cmake_args(self):
+ """Standard cmake arguments provided as a property for
+ convenience of package writers
+ """
+ # standard CMake arguments
+ return CMakePackage._std_args(self)
+
+ @staticmethod
+ def _std_args(pkg):
+ """Computes the standard cmake arguments for a generic package"""
+ try:
+ build_type = pkg.build_type()
+ except AttributeError:
+ build_type = 'RelWithDebInfo'
+
+ args = ['-DCMAKE_INSTALL_PREFIX:PATH={0}'.format(pkg.prefix),
+ '-DCMAKE_BUILD_TYPE:STRING={0}'.format(build_type),
+ '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON']
+ if platform.mac_ver()[0]:
+ args.append('-DCMAKE_FIND_FRAMEWORK:STRING=LAST')
+
+ # Set up CMake rpath
+ args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE')
+ rpaths = ':'.join(spack.build_environment.get_rpaths(pkg))
+ args.append('-DCMAKE_INSTALL_RPATH:STRING={0}'.format(rpaths))
+ return args
+
+ def build_directory(self):
+ """Override to provide another place to build the package"""
+ return join_path(self.stage.source_path, 'spack-build')
+
+ def cmake_args(self):
+ """Method to be overridden. Should return an iterable containing
+ all the arguments that must be passed to configure, except:
+ - CMAKE_INSTALL_PREFIX
+ - CMAKE_BUILD_TYPE
+ """
+ return []
+
+ def cmake(self, spec, prefix):
+ """Run cmake in the build directory"""
+ options = [self.root_cmakelists_dir()] + self.std_cmake_args + \
+ self.cmake_args()
+ create = not os.path.exists(self.build_directory())
+ with working_dir(self.build_directory(), create=create):
+ inspect.getmodule(self).cmake(*options)
+
+ def build(self, spec, prefix):
+ """The usual `make` after cmake"""
+ with working_dir(self.build_directory()):
+ inspect.getmodule(self).make()
+
+ def install(self, spec, prefix):
+ """...and the final `make install` after cmake"""
+ with working_dir(self.build_directory()):
+ inspect.getmodule(self).make('install')
+
+ @PackageBase.sanity_check('build')
+ @PackageBase.on_package_attributes(run_tests=True)
+ def _run_default_function(self):
+ """This function is run after build if self.run_tests == True
+
+ It will search for a method named `check` and run it. A sensible
+ default is provided in the base class.
+ """
+ try:
+ fn = getattr(self, 'check')
+ tty.msg('Trying default build sanity checks [check]')
+ fn()
+ except AttributeError:
+ tty.msg('Skipping default build sanity checks [method `check` not implemented]') # NOQA: ignore=E501
+
+ def check(self):
+ """Default test : search the Makefile for the target `test`
+ and run them if found.
+ """
+ with working_dir(self.build_directory()):
+ self._if_make_target_execute('test')
+
+ # Check that self.prefix is there after installation
+ PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix)
diff --git a/lib/spack/spack/build_systems/makefile.py b/lib/spack/spack/build_systems/makefile.py
new file mode 100644
index 0000000000..dcddadeedc
--- /dev/null
+++ b/lib/spack/spack/build_systems/makefile.py
@@ -0,0 +1,77 @@
+##############################################################################
+# 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
+##############################################################################
+
+import inspect
+
+from llnl.util.filesystem import working_dir
+from spack.package import PackageBase
+
+
+class MakefilePackage(PackageBase):
+ """Specialized class for packages that are built using editable Makefiles
+
+ This class provides three phases that can be overridden:
+ - edit
+ - build
+ - install
+
+ It is necessary to override the 'edit' phase, while 'build' and 'install'
+ have sensible defaults.
+ """
+ phases = ['edit', 'build', 'install']
+ # To be used in UI queries that require to know which
+ # build-system class we are using
+ build_system_class = 'MakefilePackage'
+
+ def build_directory(self):
+ """Directory where the main Makefile is located"""
+ return self.stage.source_path
+
+ def build_args(self):
+ """List of arguments that should be passed to make at build time"""
+ return []
+
+ def install_args(self):
+ """List of arguments that should be passed to make at install time"""
+ return []
+
+ def edit(self, spec, prefix):
+ """This phase cannot be defaulted for obvious reasons..."""
+ raise NotImplementedError('\'edit\' function not implemented')
+
+ def build(self, spec, prefix):
+ """Default build phase : call make passing build_args"""
+ args = self.build_args()
+ with working_dir(self.build_directory()):
+ inspect.getmodule(self).make(*args)
+
+ def install(self, spec, prefix):
+ """Default install phase : call make passing install_args"""
+ args = self.install_args() + ['install']
+ with working_dir(self.build_directory()):
+ inspect.getmodule(self).make(*args)
+
+ # Check that self.prefix is there after installation
+ PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix)
diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py
index f69f434afd..8000c9f1f2 100644
--- a/lib/spack/spack/cmd/__init__.py
+++ b/lib/spack/spack/cmd/__init__.py
@@ -27,13 +27,15 @@ import re
import sys
import llnl.util.tty as tty
-import spack
-import spack.config
-import spack.spec
from llnl.util.lang import *
from llnl.util.tty.colify import *
from llnl.util.tty.color import *
+import spack
+import spack.config
+import spack.spec
+import spack.store
+
#
# Settings for commands that modify configuration
#
@@ -69,17 +71,17 @@ def get_cmd_function_name(name):
def get_module(name):
"""Imports the module for a particular command name and returns it."""
module_name = "%s.%s" % (__name__, name)
- module = __import__(
- module_name, fromlist=[name, SETUP_PARSER, DESCRIPTION],
- level=0)
+ module = __import__(module_name,
+ fromlist=[name, SETUP_PARSER, DESCRIPTION],
+ level=0)
attr_setdefault(module, SETUP_PARSER, lambda *args: None) # null-op
attr_setdefault(module, DESCRIPTION, "")
fn_name = get_cmd_function_name(name)
if not hasattr(module, fn_name):
- tty.die("Command module %s (%s) must define function '%s'."
- % (module.__name__, module.__file__, fn_name))
+ tty.die("Command module %s (%s) must define function '%s'." %
+ (module.__name__, module.__file__, fn_name))
return module
@@ -135,7 +137,7 @@ def elide_list(line_list, max_num=10):
def disambiguate_spec(spec):
- matching_specs = spack.installed_db.query(spec)
+ matching_specs = spack.store.db.query(spec)
if not matching_specs:
tty.die("Spec '%s' matches no installed packages." % spec)
diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py
index 1badd40f7f..4e29230c28 100644
--- a/lib/spack/spack/cmd/arch.py
+++ b/lib/spack/spack/cmd/arch.py
@@ -24,8 +24,18 @@
##############################################################################
import spack.architecture as architecture
-description = "Print the architecture for this machine"
+description = "Print architecture information about this machine."
+
+
+def setup_parser(subparser):
+ parts = subparser.add_mutually_exclusive_group()
+ parts.add_argument(
+ '-p', '--platform', action='store_true', default=False,
+ help="Print only the platform.")
def arch(parser, args):
- print architecture.sys_type()
+ if args.platform:
+ print architecture.platform()
+ else:
+ print architecture.sys_type()
diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py
index 60e2bd3a11..a79ef4aa68 100644
--- a/lib/spack/spack/cmd/bootstrap.py
+++ b/lib/spack/spack/cmd/bootstrap.py
@@ -28,7 +28,7 @@ import llnl.util.tty as tty
from llnl.util.filesystem import join_path, mkdirp
import spack
-from spack.util.executable import which
+from spack.util.executable import ProcessError, which
_SPACK_UPSTREAM = 'https://github.com/llnl/spack'
diff --git a/lib/spack/spack/schema/targets.py b/lib/spack/spack/cmd/build.py
index 312474cab4..703705a32c 100644
--- a/lib/spack/spack/schema/targets.py
+++ b/lib/spack/spack/cmd/build.py
@@ -22,24 +22,21 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-"""Schema for target configuration files."""
+import spack.cmd.configure as cfg
+from spack import *
-schema = {
- '$schema': 'http://json-schema.org/schema#',
- 'title': 'Spack target configuration file schema',
- 'type': 'object',
- 'additionalProperties': False,
- 'patternProperties': {
- r'targets:?': {
- 'type': 'object',
- 'default': {},
- 'additionalProperties': False,
- 'patternProperties': {
- r'\w[\w-]*': { # target name
- 'type': 'string',
- },
- },
- },
- },
+description = 'Stops at build stage when installing a package, if possible'
+
+build_system_to_phase = {
+ CMakePackage: 'build',
+ AutotoolsPackage: 'build'
}
+
+
+def setup_parser(subparser):
+ cfg.setup_parser(subparser)
+
+
+def build(parser, args):
+ cfg._stop_at_phase_during_install(args, build, build_system_to_phase)
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py
index aedb0fd99c..2e24d0527e 100644
--- a/lib/spack/spack/cmd/checksum.py
+++ b/lib/spack/spack/cmd/checksum.py
@@ -113,6 +113,6 @@ def checksum(parser, args):
tty.die("Could not fetch any versions for %s" % pkg.name)
version_lines = [
- " version('%s', '%s')" % (v, h) for v, h in version_hashes
+ " version('%s', '%s')" % (v, h) for v, h in version_hashes
]
tty.msg("Checksummed new versions of %s:" % pkg.name, *version_lines)
diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py
index afcba33714..1470ea035d 100644
--- a/lib/spack/spack/cmd/common/arguments.py
+++ b/lib/spack/spack/cmd/common/arguments.py
@@ -25,8 +25,9 @@
import argparse
+import spack.store
import spack.modules
-from spack.util.pattern import Bunch
+from spack.util.pattern import Args
__all__ = ['add_common_arguments']
_arguments = {}
@@ -45,52 +46,54 @@ class ConstraintAction(argparse.Action):
"""Constructs a list of specs based on a constraint given on the command line
An instance of this class is supposed to be used as an argument action
- in a parser. It will read a constraint and will attach a list of matching
- specs to the namespace
+ in a parser. It will read a constraint and will attach a function to the
+ arguments that accepts optional keyword arguments.
+
+ To obtain the specs from a command the function must be called.
"""
- qualifiers = {}
def __call__(self, parser, namespace, values, option_string=None):
# Query specs from command line
- d = self.qualifiers.get(namespace.subparser_name, {})
- specs = [s for s in spack.installed_db.query(**d)]
- values = ' '.join(values)
+ self.values = values
+ namespace.contraint = values
+ namespace.specs = self._specs
+
+ def _specs(self, **kwargs):
+ specs = [s for s in spack.store.db.query(**kwargs)]
+ values = ' '.join(self.values)
if values:
specs = [x for x in specs if x.satisfies(values, strict=True)]
- namespace.specs = specs
-
-parms = Bunch(
- flags=('constraint',),
- kwargs={
- 'nargs': '*',
- 'help': 'Constraint to select a subset of installed packages',
- 'action': ConstraintAction
- })
-_arguments['constraint'] = parms
-
-parms = Bunch(
- flags=('-m', '--module-type'),
- kwargs={
- 'help': 'Type of module files',
- 'default': 'tcl',
- 'choices': spack.modules.module_types
- })
-_arguments['module_type'] = parms
-
-parms = Bunch(
- flags=('-y', '--yes-to-all'),
- kwargs={
- 'action': 'store_true',
- 'dest': 'yes_to_all',
- 'help': 'Assume "yes" is the answer to every confirmation request.'
- })
-_arguments['yes_to_all'] = parms
-
-parms = Bunch(
- flags=('-r', '--dependencies'),
- kwargs={
- 'action': 'store_true',
- 'dest': 'recurse_dependencies',
- 'help': 'Recursively traverse spec dependencies'
- })
-_arguments['recurse_dependencies'] = parms
+ return specs
+
+
+_arguments['constraint'] = Args(
+ 'constraint', nargs='*', action=ConstraintAction,
+ help='Constraint to select a subset of installed packages')
+
+_arguments['module_type'] = Args(
+ '-m', '--module-type', help='Type of module files',
+ default='tcl', choices=spack.modules.module_types)
+
+_arguments['yes_to_all'] = Args(
+ '-y', '--yes-to-all', action='store_true', dest='yes_to_all',
+ help='Assume "yes" is the answer to every confirmation request.')
+
+_arguments['recurse_dependencies'] = Args(
+ '-r', '--dependencies', action='store_true', dest='recurse_dependencies',
+ help='Recursively traverse spec dependencies')
+
+_arguments['clean'] = Args(
+ '--clean', action='store_false', dest='dirty',
+ help='Clean environment before installing package.')
+
+_arguments['dirty'] = Args(
+ '--dirty', action='store_true', dest='dirty',
+ help='Do NOT clean environment before installing.')
+
+_arguments['long'] = Args(
+ '-l', '--long', action='store_true',
+ help='Show dependency hashes as well as versions.')
+
+_arguments['very_long'] = Args(
+ '-L', '--very-long', action='store_true',
+ help='Show full dependency hashes as well as versions.')
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py
index ea91c71479..80a3c71d61 100644
--- a/lib/spack/spack/cmd/compiler.py
+++ b/lib/spack/spack/cmd/compiler.py
@@ -133,10 +133,23 @@ def compiler_info(args):
else:
for c in compilers:
print str(c.spec) + ":"
- print "\tcc = %s" % c.cc
- print "\tcxx = %s" % c.cxx
- print "\tf77 = %s" % c.f77
- print "\tfc = %s" % c.fc
+ print "\tpaths:"
+ for cpath in ['cc', 'cxx', 'f77', 'fc']:
+ print "\t\t%s = %s" % (cpath, getattr(c, cpath, None))
+ if c.flags:
+ print "\tflags:"
+ for flag, flag_value in c.flags.iteritems():
+ print "\t\t%s = %s" % (flag, flag_value)
+ if len(c.environment) != 0:
+ if len(c.environment['set']) != 0:
+ print "\tenvironment:"
+ print "\t set:"
+ for key, value in c.environment['set'].iteritems():
+ print "\t %s = %s" % (key, value)
+ if c.extra_rpaths:
+ print "\tExtra rpaths:"
+ for extra_rpath in c.extra_rpaths:
+ print "\t\t%s" % extra_rpath
print "\tmodules = %s" % c.modules
print "\toperating system = %s" % c.operating_system
diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py
index c189e37036..5e041192e2 100644
--- a/lib/spack/spack/cmd/config.py
+++ b/lib/spack/spack/cmd/config.py
@@ -29,13 +29,8 @@ description = "Get and set configuration options."
def setup_parser(subparser):
# User can only choose one
- scope_group = subparser.add_mutually_exclusive_group()
- scope_group.add_argument(
- '--user', action='store_const', const='user', dest='scope',
- help="Use config file in user home directory (default).")
- scope_group.add_argument(
- '--site', action='store_const', const='site', dest='scope',
- help="Use config file in spack prefix.")
+ subparser.add_argument('--scope', choices=spack.config.config_scopes,
+ help="Configuration scope to read/modify.")
sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='config_command')
diff --git a/lib/spack/spack/cmd/configure.py b/lib/spack/spack/cmd/configure.py
new file mode 100644
index 0000000000..3eebe2584b
--- /dev/null
+++ b/lib/spack/spack/cmd/configure.py
@@ -0,0 +1,90 @@
+##############################################################################
+# 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
+##############################################################################
+
+import argparse
+
+import llnl.util.tty as tty
+import spack.cmd
+import spack.cmd.install as inst
+
+from spack import *
+
+description = 'Stops at configuration stage when installing a package, if possible' # NOQA: ignore=E501
+
+
+build_system_to_phase = {
+ CMakePackage: 'cmake',
+ AutotoolsPackage: 'configure'
+}
+
+
+def setup_parser(subparser):
+ subparser.add_argument(
+ 'package',
+ nargs=argparse.REMAINDER,
+ help="spec of the package to install"
+ )
+ subparser.add_argument(
+ '-v', '--verbose',
+ action='store_true',
+ help="Print additional output during builds"
+ )
+
+
+def _stop_at_phase_during_install(args, calling_fn, phase_mapping):
+ if not args.package:
+ tty.die("configure requires at least one package argument")
+
+ # TODO: to be refactored with code in install
+ specs = spack.cmd.parse_specs(args.package, concretize=True)
+ if len(specs) != 1:
+ tty.error('only one spec can be installed at a time.')
+ spec = specs.pop()
+ pkg = spec.package
+ try:
+ key = [cls for cls in phase_mapping if isinstance(pkg, cls)].pop()
+ phase = phase_mapping[key]
+ # Install package dependencies if needed
+ parser = argparse.ArgumentParser()
+ inst.setup_parser(parser)
+ tty.msg('Checking dependencies for {0}'.format(args.package))
+ cli_args = ['-v'] if args.verbose else []
+ install_args = parser.parse_args(cli_args + ['--only=dependencies'])
+ install_args.package = args.package
+ inst.install(parser, install_args)
+ # Install package and stop at the given phase
+ cli_args = ['-v'] if args.verbose else []
+ install_args = parser.parse_args(cli_args + ['--only=package'])
+ install_args.package = args.package
+ inst.install(parser, install_args, stop_at=phase)
+ except IndexError:
+ tty.error(
+ 'Package {0} has no {1} phase, or its {1} phase is not separated from install'.format( # NOQA: ignore=E501
+ spec.name, calling_fn.__name__)
+ )
+
+
+def configure(parser, args):
+ _stop_at_phase_during_install(args, configure, build_system_to_phase)
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py
index 52a82eb38f..feed3b8772 100644
--- a/lib/spack/spack/cmd/create.py
+++ b/lib/spack/spack/cmd/create.py
@@ -22,25 +22,24 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import string
+from __future__ import print_function
+
import os
import re
+import string
-from ordereddict_backport import OrderedDict
import llnl.util.tty as tty
-from llnl.util.filesystem import mkdirp
-
import spack
import spack.cmd
import spack.cmd.checksum
import spack.url
import spack.util.web
-from spack.spec import Spec
-from spack.util.naming import *
+from llnl.util.filesystem import mkdirp
+from ordereddict_backport import OrderedDict
from spack.repository import Repo, RepoError
-
+from spack.spec import Spec
from spack.util.executable import which
-
+from spack.util.naming import *
description = "Create a new package file from an archive URL"
@@ -87,7 +86,7 @@ package_template = string.Template("""\
from spack import *
-class ${class_name}(Package):
+class ${class_name}(${base_class_name}):
""\"FIXME: Put a proper description of your package here.""\"
# FIXME: Add a proper url for your package's homepage here.
@@ -98,100 +97,160 @@ ${versions}
${dependencies}
- def install(self, spec, prefix):
-${install}
+${body}
""")
-# Build dependencies and extensions
-dependencies_dict = {
- 'autotools': """\
+
+class DefaultGuess(object):
+ """Provides the default values to be used for the package file template"""
+ base_class_name = 'Package'
+
+ dependencies = """\
# FIXME: Add dependencies if required.
- # depends_on('foo')""",
+ # depends_on('foo')"""
- 'cmake': """\
- # FIXME: Add additional dependencies if required.
- depends_on('cmake', type='build')""",
+ body = """\
+ def install(self, spec, prefix):
+ # FIXME: Unknown build system
+ make()
+ make('install')"""
- 'scons': """\
- # FIXME: Add additional dependencies if required.
- depends_on('scons', type='build')""",
+ def __init__(self, name, url, version_hash_tuples):
+ self.name = name
+ self.class_name = mod_to_class(name)
+ self.url = url
+ self.version_hash_tuples = version_hash_tuples
- 'python': """\
- extends('python')
+ @property
+ def versions(self):
+ """Adds a version() call to the package for each version found."""
+ max_len = max(len(str(v)) for v, h in self.version_hash_tuples)
+ format = " version(%%-%ds, '%%s')" % (max_len + 2)
+ return '\n'.join(
+ format % ("'%s'" % v, h) for v, h in self.version_hash_tuples
+ )
- # FIXME: Add additional dependencies if required.
- # depends_on('py-foo', type=nolink)""",
- 'R': """\
- extends('R')
+class AutotoolsGuess(DefaultGuess):
+ """Provides appropriate overrides for autotools-based packages"""
+ base_class_name = 'AutotoolsPackage'
- # FIXME: Add additional dependencies if required.
- # depends_on('r-foo', type=nolink)""",
+ dependencies = """\
+ # FIXME: Add dependencies if required.
+ # depends_on('m4', type='build')
+ # depends_on('autoconf', type='build')
+ # depends_on('automake', type='build')
+ # depends_on('libtool', type='build')
+ # depends_on('foo')"""
+
+ body = """\
+ def configure_args(self):
+ # FIXME: Add arguments other than --prefix
+ # FIXME: If not needed delete the function
+ args = []
+ return args"""
- 'octave': """\
- extends('octave')
+class CMakeGuess(DefaultGuess):
+ """Provides appropriate overrides for cmake-based packages"""
+ base_class_name = 'CMakePackage'
+
+ dependencies = """\
# FIXME: Add additional dependencies if required.
- # depends_on('octave-foo', type=nolink)""",
+ depends_on('cmake', type='build')"""
+
+ body = """\
+ def cmake_args(self):
+ # FIXME: Add arguments other than
+ # FIXME: CMAKE_INSTALL_PREFIX and CMAKE_BUILD_TYPE
+ # FIXME: If not needed delete the function
+ args = []
+ return args"""
- 'unknown': """\
- # FIXME: Add dependencies if required.
- # depends_on('foo')"""
-}
-# Default installation instructions
-install_dict = {
- 'autotools': """\
- # FIXME: Modify the configure line to suit your build system here.
- configure('--prefix={0}'.format(prefix))
+class SconsGuess(DefaultGuess):
+ """Provides appropriate overrides for scons-based packages"""
+ dependencies = """\
+ # FIXME: Add additional dependencies if required.
+ depends_on('scons', type='build')"""
+ body = """\
+ def install(self, spec, prefix):
# FIXME: Add logic to build and install here.
- make()
- make('install')""",
+ scons('prefix={0}'.format(prefix))
+ scons('install')"""
- 'cmake': """\
- with working_dir('spack-build', create=True):
- # FIXME: Modify the cmake line to suit your build system here.
- cmake('..', *std_cmake_args)
- # FIXME: Add logic to build and install here.
- make()
- make('install')""",
+class BazelGuess(DefaultGuess):
+ """Provides appropriate overrides for bazel-based packages"""
+ dependencies = """\
+ # FIXME: Add additional dependencies if required.
+ depends_on('bazel', type='build')"""
- 'scons': """\
+ body = """\
+ def install(self, spec, prefix):
# FIXME: Add logic to build and install here.
- scons('prefix={0}'.format(prefix))
- scons('install')""",
+ bazel()"""
+
+
+class PythonGuess(DefaultGuess):
+ """Provides appropriate overrides for python extensions"""
+ dependencies = """\
+ extends('python')
+
+ # FIXME: Add additional dependencies if required.
+ # depends_on('py-setuptools', type='build')
+ # depends_on('py-foo', type=nolink)"""
- 'python': """\
+ body = """\
+ def install(self, spec, prefix):
# FIXME: Add logic to build and install here.
- setup_py('install', '--prefix={0}'.format(prefix))""",
+ setup_py('install', '--prefix={0}'.format(prefix))"""
+
+ def __init__(self, name, *args):
+ name = 'py-{0}'.format(name)
+ super(PythonGuess, self).__init__(name, *args)
- 'R': """\
+
+class RGuess(DefaultGuess):
+ """Provides appropriate overrides for R extensions"""
+ dependencies = """\
+ extends('R')
+
+ # FIXME: Add additional dependencies if required.
+ # depends_on('r-foo', type=nolink)"""
+
+ body = """\
+ def install(self, spec, prefix):
# FIXME: Add logic to build and install here.
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
- self.stage.source_path)""",
+ self.stage.source_path)"""
- 'octave': """\
+ def __init__(self, name, *args):
+ name = 'r-{0}'.format(name)
+ super(RGuess, self).__init__(name, *args)
+
+
+class OctaveGuess(DefaultGuess):
+ """Provides appropriate overrides for octave packages"""
+ dependencies = """\
+ extends('octave')
+
+ # FIXME: Add additional dependencies if required.
+ # depends_on('octave-foo', type=nolink)"""
+
+ body = """\
+ def install(self, spec, prefix):
# FIXME: Add logic to build and install here.
octave('--quiet', '--norc',
'--built-in-docstrings-file=/dev/null',
'--texi-macros-file=/dev/null',
'--eval', 'pkg prefix {0}; pkg install {1}'.format(
- prefix, self.stage.archive_file))""",
+ prefix, self.stage.archive_file))"""
- 'unknown': """\
- # FIXME: Unknown build system
- make()
- make('install')"""
-}
-
-
-def make_version_calls(ver_hash_tuples):
- """Adds a version() call to the package for each version found."""
- max_len = max(len(str(v)) for v, h in ver_hash_tuples)
- format = " version(%%-%ds, '%%s')" % (max_len + 2)
- return '\n'.join(format % ("'%s'" % v, h) for v, h in ver_hash_tuples)
+ def __init__(self, name, *args):
+ name = 'octave-{0}'.format(name)
+ super(OctaveGuess, self).__init__(name, *args)
def setup_parser(subparser):
@@ -218,6 +277,16 @@ def setup_parser(subparser):
class BuildSystemGuesser(object):
+ _choices = {
+ 'autotools': AutotoolsGuess,
+ 'cmake': CMakeGuess,
+ 'scons': SconsGuess,
+ 'bazel': BazelGuess,
+ 'python': PythonGuess,
+ 'R': RGuess,
+ 'octave': OctaveGuess
+ }
+
def __call__(self, stage, url):
"""Try to guess the type of build system used by a project based on
the contents of its archive or the URL it was downloaded from."""
@@ -237,7 +306,8 @@ class BuildSystemGuesser(object):
(r'/CMakeLists.txt$', 'cmake'),
(r'/SConstruct$', 'scons'),
(r'/setup.py$', 'python'),
- (r'/NAMESPACE$', 'R')
+ (r'/NAMESPACE$', 'R'),
+ (r'/WORKSPACE$', 'bazel')
]
# Peek inside the compressed file.
@@ -265,6 +335,10 @@ class BuildSystemGuesser(object):
self.build_system = build_system
+ def make_guess(self, name, url, ver_hash_tuples):
+ cls = self._choices.get(self.build_system, DefaultGuess)
+ return cls(name, url, ver_hash_tuples)
+
def guess_name_and_version(url, args):
# Try to deduce name and version of the new package from the URL
@@ -338,7 +412,7 @@ def fetch_tarballs(url, name, version):
tty.msg("Found %s versions of %s:" % (len(versions), name),
*spack.cmd.elide_list(
["%-10s%s" % (v, u) for v, u in versions.iteritems()]))
- print
+ print('')
archives_to_fetch = tty.get_number(
"Include how many checksums in the package file?",
default=5, abort='q')
@@ -379,16 +453,10 @@ def create(parser, args):
if not ver_hash_tuples:
tty.die("Could not fetch any tarballs for %s" % name)
- # Add prefix to package name if it is an extension.
- if guesser.build_system == 'python':
- name = 'py-{0}'.format(name)
- if guesser.build_system == 'R':
- name = 'r-{0}'.format(name)
- if guesser.build_system == 'octave':
- name = 'octave-{0}'.format(name)
+ guess = guesser.make_guess(name, url, ver_hash_tuples)
# Create a directory for the new package.
- pkg_path = repo.filename_for_package_name(name)
+ pkg_path = repo.filename_for_package_name(guess.name)
if os.path.exists(pkg_path) and not args.force:
tty.die("%s already exists." % pkg_path)
else:
@@ -398,12 +466,15 @@ def create(parser, args):
with open(pkg_path, "w") as pkg_file:
pkg_file.write(
package_template.substitute(
- name=name,
- class_name=mod_to_class(name),
- url=url,
- versions=make_version_calls(ver_hash_tuples),
- dependencies=dependencies_dict[guesser.build_system],
- install=install_dict[guesser.build_system]))
+ name=guess.name,
+ class_name=guess.class_name,
+ base_class_name=guess.base_class_name,
+ url=guess.url,
+ versions=guess.versions,
+ dependencies=guess.dependencies,
+ body=guess.body
+ )
+ )
# If everything checks out, go ahead and edit.
spack.editor(pkg_path)
diff --git a/lib/spack/spack/cmd/deactivate.py b/lib/spack/spack/cmd/deactivate.py
index 2b15a0331e..fedd078972 100644
--- a/lib/spack/spack/cmd/deactivate.py
+++ b/lib/spack/spack/cmd/deactivate.py
@@ -27,6 +27,7 @@ import llnl.util.tty as tty
import spack
import spack.cmd
+import spack.store
from spack.graph import topological_sort
description = "Deactivate a package extension."
@@ -56,7 +57,7 @@ def deactivate(parser, args):
if args.all:
if pkg.extendable:
tty.msg("Deactivating all extensions of %s" % pkg.spec.short_spec)
- ext_pkgs = spack.installed_db.installed_extensions_for(spec)
+ ext_pkgs = spack.store.db.installed_extensions_for(spec)
for ext_pkg in ext_pkgs:
ext_pkg.spec.normalize()
diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py
new file mode 100644
index 0000000000..c7e90cb210
--- /dev/null
+++ b/lib/spack/spack/cmd/debug.py
@@ -0,0 +1,100 @@
+##############################################################################
+# 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
+##############################################################################
+import os
+import re
+from datetime import datetime
+from glob import glob
+
+import llnl.util.tty as tty
+from llnl.util.filesystem import working_dir
+
+import spack
+from spack.util.executable import which
+
+description = "Debugging commands for troubleshooting Spack."
+
+
+def setup_parser(subparser):
+ sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='debug_command')
+ sp.add_parser('create-db-tarball',
+ help="Create a tarball of Spack's installation metadata.")
+
+
+def _debug_tarball_suffix():
+ now = datetime.now()
+ suffix = now.strftime('%Y-%m-%d-%H%M%S')
+
+ git = which('git')
+ if not git:
+ return 'nobranch-nogit-%s' % suffix
+
+ with working_dir(spack.spack_root):
+ if not os.path.isdir('.git'):
+ return 'nobranch.nogit.%s' % suffix
+
+ # Get symbolic branch name and strip any special chars (mainly '/')
+ symbolic = git(
+ 'rev-parse', '--abbrev-ref', '--short', 'HEAD', output=str).strip()
+ symbolic = re.sub(r'[^\w.-]', '-', symbolic)
+
+ # Get the commit hash too.
+ commit = git(
+ 'rev-parse', '--short', 'HEAD', output=str).strip()
+
+ if symbolic == commit:
+ return "nobranch.%s.%s" % (commit, suffix)
+ else:
+ return "%s.%s.%s" % (symbolic, commit, suffix)
+
+
+def create_db_tarball(args):
+ tar = which('tar')
+ tarball_name = "spack-db.%s.tar.gz" % _debug_tarball_suffix()
+ tarball_path = os.path.abspath(tarball_name)
+
+ base = os.path.basename(spack.store.root)
+ transform_args = []
+ if 'GNU' in tar('--version', output=str):
+ transform_args = ['--transform', 's/^%s/%s/' % (base, tarball_name)]
+ else:
+ transform_args = ['-s', '/^%s/%s/' % (base, tarball_name)]
+
+ wd = os.path.dirname(spack.store.root)
+ with working_dir(wd):
+ files = [spack.store.db._index_path]
+ files += glob('%s/*/*/*/.spack/spec.yaml' % base)
+ files = [os.path.relpath(f) for f in files]
+
+ args = ['-czf', tarball_path]
+ args += transform_args
+ args += files
+ tar(*args)
+
+ tty.msg('Created %s' % tarball_name)
+
+
+def debug(parser, args):
+ action = {'create-db-tarball': create_db_tarball}
+ action[args.debug_command](args)
diff --git a/lib/spack/spack/cmd/diy.py b/lib/spack/spack/cmd/diy.py
index 487654d261..22966a26eb 100644
--- a/lib/spack/spack/cmd/diy.py
+++ b/lib/spack/spack/cmd/diy.py
@@ -30,6 +30,7 @@ import llnl.util.tty as tty
import spack
import spack.cmd
+import spack.cmd.common.arguments as arguments
from spack.cmd.edit import edit_package
from spack.stage import DIYStage
@@ -53,6 +54,9 @@ def setup_parser(subparser):
'spec', nargs=argparse.REMAINDER,
help="specs to use for install. Must contain package AND version.")
+ cd_group = subparser.add_mutually_exclusive_group()
+ arguments.add_common_arguments(cd_group, ['clean', 'dirty'])
+
def diy(self, args):
if not args.spec:
@@ -62,42 +66,40 @@ def diy(self, args):
if len(specs) > 1:
tty.die("spack diy only takes one spec.")
- # Take a write lock before checking for existence.
- with spack.installed_db.write_transaction():
- spec = specs[0]
- if not spack.repo.exists(spec.name):
- tty.warn("No such package: %s" % spec.name)
- create = tty.get_yes_or_no("Create this package?", default=False)
- if not create:
- tty.msg("Exiting without creating.")
- sys.exit(1)
- else:
- tty.msg("Running 'spack edit -f %s'" % spec.name)
- edit_package(spec.name, spack.repo.first_repo(), None, True)
- return
-
- if not spec.versions.concrete:
- tty.die(
- "spack diy spec must have a single, concrete version. "
- "Did you forget a package version number?")
-
- spec.concretize()
- package = spack.repo.get(spec)
-
- if package.installed:
- tty.error("Already installed in %s" % package.prefix)
- tty.msg("Uninstall or try adding a version suffix for this "
- "DIY build.")
+ spec = specs[0]
+ if not spack.repo.exists(spec.name):
+ tty.warn("No such package: %s" % spec.name)
+ create = tty.get_yes_or_no("Create this package?", default=False)
+ if not create:
+ tty.msg("Exiting without creating.")
sys.exit(1)
+ else:
+ tty.msg("Running 'spack edit -f %s'" % spec.name)
+ edit_package(spec.name, spack.repo.first_repo(), None, True)
+ return
+
+ if not spec.versions.concrete:
+ tty.die(
+ "spack diy spec must have a single, concrete version. "
+ "Did you forget a package version number?")
+
+ spec.concretize()
+ package = spack.repo.get(spec)
+
+ if package.installed:
+ tty.error("Already installed in %s" % package.prefix)
+ tty.msg("Uninstall or try adding a version suffix for this DIY build.")
+ sys.exit(1)
- # Forces the build to run out of the current directory.
- package.stage = DIYStage(os.getcwd())
+ # Forces the build to run out of the current directory.
+ package.stage = DIYStage(os.getcwd())
- # TODO: make this an argument, not a global.
- spack.do_checksum = False
+ # TODO: make this an argument, not a global.
+ spack.do_checksum = False
- package.do_install(
- keep_prefix=args.keep_prefix,
- ignore_deps=args.ignore_deps,
- verbose=not args.quiet,
- keep_stage=True) # don't remove source dir for DIY.
+ package.do_install(
+ keep_prefix=args.keep_prefix,
+ install_deps=not args.ignore_deps,
+ verbose=not args.quiet,
+ keep_stage=True, # don't remove source dir for DIY.
+ dirty=args.dirty)
diff --git a/lib/spack/spack/cmd/extensions.py b/lib/spack/spack/cmd/extensions.py
index b5c484305f..bd149044ca 100644
--- a/lib/spack/spack/cmd/extensions.py
+++ b/lib/spack/spack/cmd/extensions.py
@@ -30,6 +30,7 @@ from llnl.util.tty.colify import colify
import spack
import spack.cmd
import spack.cmd.find
+import spack.store
description = "List extensions for package."
@@ -86,8 +87,9 @@ def extensions(parser, args):
#
# List specs of installed extensions.
#
- installed = [
- s.spec for s in spack.installed_db.installed_extensions_for(spec)]
+ installed = [s.spec
+ for s in spack.store.db.installed_extensions_for(spec)]
+
print
if not installed:
tty.msg("None installed.")
@@ -98,7 +100,7 @@ def extensions(parser, args):
#
# List specs of activated extensions.
#
- activated = spack.install_layout.extension_map(spec)
+ activated = spack.store.layout.extension_map(spec)
print
if not activated:
tty.msg("None activated.")
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py
index d3ea38c573..542114c8c1 100644
--- a/lib/spack/spack/cmd/find.py
+++ b/lib/spack/spack/cmd/find.py
@@ -22,15 +22,11 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import argparse
import sys
import llnl.util.tty as tty
-import spack
-import spack.spec
-from llnl.util.lang import *
-from llnl.util.tty.colify import *
-from llnl.util.tty.color import *
+import spack.cmd.common.arguments as arguments
+
from spack.cmd import display_specs
description = "Find installed spack packages"
@@ -42,6 +38,7 @@ def setup_parser(subparser):
action='store_const',
dest='mode',
const='short',
+ default='short',
help='Show only specs (default)')
format_group.add_argument('-p', '--paths',
action='store_const',
@@ -55,24 +52,18 @@ def setup_parser(subparser):
const='deps',
help='Show full dependency DAG of installed packages')
- subparser.add_argument('-l', '--long',
- action='store_true',
- dest='long',
- help='Show dependency hashes as well as versions.')
- subparser.add_argument('-L', '--very-long',
- action='store_true',
- dest='very_long',
- help='Show dependency hashes as well as versions.')
+ arguments.add_common_arguments(subparser, ['long', 'very_long'])
+
subparser.add_argument('-f', '--show-flags',
action='store_true',
dest='show_flags',
help='Show spec compiler flags.')
-
- subparser.add_argument(
+ implicit_explicit = subparser.add_mutually_exclusive_group()
+ implicit_explicit.add_argument(
'-e', '--explicit',
action='store_true',
help='Show only specs that were installed explicitly')
- subparser.add_argument(
+ implicit_explicit.add_argument(
'-E', '--implicit',
action='store_true',
help='Show only specs that were installed as dependencies')
@@ -99,17 +90,10 @@ def setup_parser(subparser):
action='store_true',
help='Show fully qualified package names.')
- subparser.add_argument('query_specs',
- nargs=argparse.REMAINDER,
- help='optional specs to filter results')
+ arguments.add_common_arguments(subparser, ['constraint'])
def query_arguments(args):
- # Check arguments
- if args.explicit and args.implicit:
- tty.error('You can\'t pass -E and -e options simultaneously.')
- raise SystemExit(1)
-
# Set up query arguments.
installed, known = True, any
if args.only_missing:
@@ -128,35 +112,17 @@ def query_arguments(args):
def find(parser, args):
- # Filter out specs that don't exist.
- query_specs = spack.cmd.parse_specs(args.query_specs)
- query_specs, nonexisting = partition_list(
- query_specs, lambda s: spack.repo.exists(s.name) or not s.name)
-
- if nonexisting:
- msg = "No such package%s: " % ('s' if len(nonexisting) > 1 else '')
- msg += ", ".join(s.name for s in nonexisting)
- tty.msg(msg)
-
- if not query_specs:
- return
-
q_args = query_arguments(args)
-
- # Get all the specs the user asked for
- if not query_specs:
- specs = set(spack.installed_db.query(**q_args))
- else:
- results = [set(spack.installed_db.query(qs, **q_args))
- for qs in query_specs]
- specs = set.union(*results)
-
- if not args.mode:
- args.mode = 'short'
-
+ query_specs = args.specs(**q_args)
+ # Exit early if no package matches the constraint
+ if not query_specs and args.constraint:
+ msg = "No package matches the query: {0}".format(args.contraint)
+ tty.msg(msg)
+ return
+ # Display the result
if sys.stdout.isatty():
- tty.msg("%d installed packages." % len(specs))
- display_specs(specs,
+ tty.msg("%d installed packages." % len(query_specs))
+ display_specs(query_specs,
mode=args.mode,
long=args.long,
very_long=args.very_long,
diff --git a/lib/spack/spack/cmd/flake8.py b/lib/spack/spack/cmd/flake8.py
new file mode 100644
index 0000000000..a4c607a640
--- /dev/null
+++ b/lib/spack/spack/cmd/flake8.py
@@ -0,0 +1,184 @@
+##############################################################################
+# 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
+##############################################################################
+import re
+import os
+import sys
+import shutil
+import tempfile
+import argparse
+
+from llnl.util.filesystem import *
+
+import spack
+from spack.util.executable import *
+
+description = "Runs source code style checks on Spack. Requires flake8."
+
+changed_files_path = os.path.join(spack.share_path, 'qa', 'changed_files')
+changed_files = Executable(changed_files_path)
+flake8 = None
+
+#
+# This is a dict that maps:
+# filename pattern ->
+# a flake8 exemption code ->
+# list of patterns, for which matching lines should have codes applied.
+#
+exemptions = {
+ # exemptions applied only to package.py files.
+ r'package.py$': {
+ # Exempt lines with urls and descriptions from overlong line errors.
+ 501: [r'^\s*homepage\s*=',
+ r'^\s*url\s*=',
+ r'^\s*git\s*=',
+ r'^\s*svn\s*=',
+ r'^\s*hg\s*=',
+ r'^\s*version\(.*\)',
+ r'^\s*variant\(.*\)',
+ r'^\s*depends_on\(.*\)',
+ r'^\s*extends\(.*\)'],
+ # Exempt '@when' decorated functions from redefinition errors.
+ 811: [r'^\s*\@when\(.*\)'],
+ },
+
+ # exemptions applied to all files.
+ r'.py$': {
+ # Exempt lines with URLs from overlong line errors.
+ 501: [r'(https?|file)\:']
+ },
+}
+
+# compile all regular expressions.
+exemptions = dict((re.compile(file_pattern),
+ dict((code, [re.compile(p) for p in patterns])
+ for code, patterns in error_dict.items()))
+ for file_pattern, error_dict in exemptions.items())
+
+
+def filter_file(source, dest, output=False):
+ """Filter a single file through all the patterns in exemptions."""
+ with open(source) as infile:
+ parent = os.path.dirname(dest)
+ mkdirp(parent)
+
+ with open(dest, 'w') as outfile:
+ for line in infile:
+ line = line.rstrip()
+
+ for file_pattern, errors in exemptions.items():
+ if not file_pattern.search(source):
+ continue
+
+ for code, patterns in errors.items():
+ for pattern in patterns:
+ if pattern.search(line):
+ line += (" # NOQA: ignore=%d" % code)
+ break
+
+ oline = line + '\n'
+ outfile.write(oline)
+ if output:
+ sys.stdout.write(oline)
+
+
+def setup_parser(subparser):
+ subparser.add_argument(
+ '-k', '--keep-temp', action='store_true',
+ help="Do not delete temporary directory where flake8 runs. "
+ "Use for debugging, to see filtered files.")
+ subparser.add_argument(
+ '-o', '--output', action='store_true',
+ help="Send filtered files to stdout as well as temp files.")
+ subparser.add_argument(
+ '-r', '--root-relative', action='store_true', default=False,
+ help="print root-relative paths (default is cwd-relative)")
+ subparser.add_argument(
+ 'files', nargs=argparse.REMAINDER, help="specific files to check")
+
+
+def flake8(parser, args):
+ # Just use this to check for flake8 -- we actually execute it with Popen.
+ global flake8
+ flake8 = which('flake8', required=True)
+
+ temp = tempfile.mkdtemp()
+ try:
+ file_list = args.files
+ if file_list:
+ def prefix_relative(path):
+ return os.path.relpath(
+ os.path.abspath(os.path.realpath(path)), spack.prefix)
+
+ file_list = [prefix_relative(p) for p in file_list]
+
+ with working_dir(spack.prefix):
+ if not file_list:
+ file_list = changed_files('*.py', output=str)
+ file_list = [x for x in file_list.split('\n') if x]
+
+ shutil.copy('.flake8', os.path.join(temp, '.flake8'))
+
+ print '======================================================='
+ print 'flake8: running flake8 code checks on spack.'
+ print
+ print 'Modified files:'
+ for filename in file_list:
+ print " %s" % filename.strip()
+ print('=======================================================')
+
+ # filter files into a temporary directory with exemptions added.
+ for filename in file_list:
+ src_path = os.path.join(spack.prefix, filename)
+ dest_path = os.path.join(temp, filename)
+ filter_file(src_path, dest_path, args.output)
+
+ # run flake8 on the temporary tree.
+ with working_dir(temp):
+ output = flake8('--format', 'pylint', *file_list,
+ fail_on_error=False, output=str)
+
+ if args.root_relative:
+ # print results relative to repo root.
+ print output
+ else:
+ # print results relative to current working directory
+ def cwd_relative(path):
+ return '%s: [' % os.path.relpath(
+ os.path.join(spack.prefix, path.group(1)), os.getcwd())
+
+ for line in output.split('\n'):
+ print re.sub(r'^(.*): \[', cwd_relative, line)
+
+ if flake8.returncode != 0:
+ print "Flake8 found errors."
+ sys.exit(1)
+ else:
+ print "Flake8 checks were clean."
+
+ finally:
+ if args.keep_temp:
+ print "temporary files are in ", temp
+ else:
+ shutil.rmtree(temp, ignore_errors=True)
diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py
index 8faabfbb7b..ed3aed1946 100644
--- a/lib/spack/spack/cmd/graph.py
+++ b/lib/spack/spack/cmd/graph.py
@@ -24,8 +24,11 @@
##############################################################################
import argparse
+import llnl.util.tty as tty
+
import spack
import spack.cmd
+from spack.spec import *
from spack.graph import *
description = "Generate graphs of package dependency relationships."
@@ -36,15 +39,28 @@ def setup_parser(subparser):
method = subparser.add_mutually_exclusive_group()
method.add_argument(
- '--ascii', action='store_true',
+ '-a', '--ascii', action='store_true',
help="Draw graph as ascii to stdout (default).")
method.add_argument(
- '--dot', action='store_true',
+ '-d', '--dot', action='store_true',
help="Generate graph in dot format and print to stdout.")
subparser.add_argument(
- '--concretize', action='store_true',
- help="Concretize specs before graphing.")
+ '-n', '--normalize', action='store_true',
+ help="Skip concretization; only print normalized spec.")
+
+ subparser.add_argument(
+ '-s', '--static', action='store_true',
+ help="Use static information from packages, not dynamic spec info.")
+
+ subparser.add_argument(
+ '-i', '--installed', action='store_true',
+ help="Graph all installed specs in dot format (implies --dot).")
+
+ subparser.add_argument(
+ '-t', '--deptype', action='store',
+ help="Comma-separated list of deptypes to traverse. default=%s."
+ % ','.join(alldeps))
subparser.add_argument(
'specs', nargs=argparse.REMAINDER,
@@ -52,18 +68,32 @@ def setup_parser(subparser):
def graph(parser, args):
- specs = spack.cmd.parse_specs(
- args.specs, normalize=True, concretize=args.concretize)
+ concretize = not args.normalize
+ if args.installed:
+ if args.specs:
+ tty.die("Can't specify specs with --installed")
+ args.dot = True
+ specs = spack.installed_db.query()
+
+ else:
+ specs = spack.cmd.parse_specs(
+ args.specs, normalize=True, concretize=concretize)
if not specs:
setup_parser.parser.print_help()
return 1
+ deptype = nobuild
+ if args.deptype:
+ deptype = tuple(args.deptype.split(','))
+ validate_deptype(deptype)
+ deptype = canonical_deptype(deptype)
+
if args.dot: # Dot graph only if asked for.
- graph_dot(*specs)
+ graph_dot(specs, static=args.static, deptype=deptype)
elif specs: # ascii is default: user doesn't need to provide it explicitly
- graph_ascii(specs[0], debug=spack.debug)
+ graph_ascii(specs[0], debug=spack.debug, deptype=deptype)
for spec in specs[1:]:
print # extra line bt/w independent graphs
graph_ascii(spec, debug=spack.debug)
diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py
index 498518057b..5366ad4aa8 100644
--- a/lib/spack/spack/cmd/info.py
+++ b/lib/spack/spack/cmd/info.py
@@ -48,8 +48,11 @@ def setup_parser(subparser):
def print_text_info(pkg):
"""Print out a plain text description of a package."""
- print "Package: ", pkg.name
- print "Homepage: ", pkg.homepage
+ header = "{0}: ".format(pkg.build_system_class)
+
+ print header, pkg.name
+ whitespaces = ''.join([' '] * (len(header) - len("Homepage: ")))
+ print "Homepage:", whitespaces, pkg.homepage
print
print "Safe versions: "
@@ -84,17 +87,24 @@ def print_text_info(pkg):
print " " + fmt % (name, default, desc)
+ print
+ print "Installation Phases:"
+ phase_str = ''
+ for phase in pkg.phases:
+ phase_str += " {0}".format(phase)
+ print phase_str
+
for deptype in ('build', 'link', 'run'):
print
print "%s Dependencies:" % deptype.capitalize()
- deps = pkg.dependencies_of_type(deptype)
+ deps = sorted(pkg.dependencies_of_type(deptype))
if deps:
colify(deps, indent=4)
else:
print " None"
print
- print "Virtual packages: "
+ print "Virtual Packages: "
if pkg.provided:
for spec, when in pkg.provided.items():
print " %s provides %s" % (when, spec)
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 7663a97a28..de45c7ca4f 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -23,19 +23,36 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import argparse
+import codecs
+import functools
+import os
+import time
+import xml.dom.minidom
+import xml.etree.ElementTree as ET
+import llnl.util.filesystem as fs
import llnl.util.tty as tty
-
import spack
import spack.cmd
+import spack.cmd.common.arguments as arguments
+from spack.build_environment import InstallError
+from spack.fetch_strategy import FetchError
+from spack.package import PackageBase
description = "Build and install packages"
def setup_parser(subparser):
subparser.add_argument(
- '-i', '--ignore-dependencies', action='store_true', dest='ignore_deps',
- help="Do not try to install dependencies of requested packages.")
+ '--only',
+ default='package,dependencies',
+ dest='things_to_install',
+ choices=['package', 'dependencies'],
+ help="""Select the mode of installation.
+The default is to install the package along with all its dependencies.
+Alternatively one can decide to install only the package or only
+the dependencies."""
+ )
subparser.add_argument(
'-j', '--jobs', action='store', type=int,
help="Explicitly set number of make jobs. Default is #cpus.")
@@ -54,19 +71,222 @@ def setup_parser(subparser):
subparser.add_argument(
'--fake', action='store_true', dest='fake',
help="Fake install. Just remove prefix and create a fake file.")
+
+ cd_group = subparser.add_mutually_exclusive_group()
+ arguments.add_common_arguments(cd_group, ['clean', 'dirty'])
+
subparser.add_argument(
- '--dirty', action='store_true', dest='dirty',
- help="Install a package *without* cleaning the environment.")
- subparser.add_argument(
- 'packages', nargs=argparse.REMAINDER,
- help="specs of packages to install")
+ 'package',
+ nargs=argparse.REMAINDER,
+ help="spec of the package to install"
+ )
subparser.add_argument(
'--run-tests', action='store_true', dest='run_tests',
- help="Run tests during installation of a package.")
+ help="Run package level tests during installation."
+ )
+ subparser.add_argument(
+ '--log-format',
+ default=None,
+ choices=['junit'],
+ help="Format to be used for log files."
+ )
+ subparser.add_argument(
+ '--log-file',
+ default=None,
+ help="Filename for the log file. If not passed a default will be used."
+ )
+
+
+# Needed for test cases
+class TestResult(object):
+ PASSED = 0
+ FAILED = 1
+ SKIPPED = 2
+ ERRORED = 3
+
+
+class TestSuite(object):
+ def __init__(self):
+ self.root = ET.Element('testsuite')
+ self.tests = []
+
+ def append(self, item):
+ if not isinstance(item, TestCase):
+ raise TypeError(
+ 'only TestCase instances may be appended to TestSuite'
+ )
+ self.tests.append(item) # Append the item to the list of tests
+
+ def dump(self, filename):
+ # Prepare the header for the entire test suite
+ number_of_errors = sum(
+ x.result_type == TestResult.ERRORED for x in self.tests
+ )
+ self.root.set('errors', str(number_of_errors))
+ number_of_failures = sum(
+ x.result_type == TestResult.FAILED for x in self.tests
+ )
+ self.root.set('failures', str(number_of_failures))
+ self.root.set('tests', str(len(self.tests)))
+
+ for item in self.tests:
+ self.root.append(item.element)
+
+ with codecs.open(filename, 'wb', 'utf-8') as file:
+ xml_string = ET.tostring(self.root)
+ xml_string = xml.dom.minidom.parseString(xml_string).toprettyxml()
+ file.write(xml_string)
+
+
+class TestCase(object):
+
+ results = {
+ TestResult.PASSED: None,
+ TestResult.SKIPPED: 'skipped',
+ TestResult.FAILED: 'failure',
+ TestResult.ERRORED: 'error',
+ }
+
+ def __init__(self, classname, name):
+ self.element = ET.Element('testcase')
+ self.element.set('classname', str(classname))
+ self.element.set('name', str(name))
+ self.result_type = None
+ def set_duration(self, duration):
+ self.element.set('time', str(duration))
-def install(parser, args):
- if not args.packages:
+ def set_result(self, result_type,
+ message=None, error_type=None, text=None):
+ self.result_type = result_type
+ result = TestCase.results[self.result_type]
+ if result is not None and result is not TestResult.PASSED:
+ subelement = ET.SubElement(self.element, result)
+ if error_type is not None:
+ subelement.set('type', error_type)
+ if message is not None:
+ subelement.set('message', str(message))
+ if text is not None:
+ subelement.text = text
+
+
+def fetch_text(path):
+ if not os.path.exists(path):
+ return ''
+
+ with codecs.open(path, 'rb', 'utf-8') as f:
+ return '\n'.join(
+ list(line.strip() for line in f.readlines())
+ )
+
+
+def junit_output(spec, test_suite):
+ # Cycle once and for all on the dependencies and skip
+ # the ones that are already installed. This ensures that
+ # for the same spec, the same number of entries will be
+ # displayed in the XML report
+ for x in spec.traverse(order='post'):
+ package = spack.repo.get(x)
+ if package.installed:
+ test_case = TestCase(package.name, x.short_spec)
+ test_case.set_duration(0.0)
+ test_case.set_result(
+ TestResult.SKIPPED,
+ message='Skipped [already installed]',
+ error_type='already_installed'
+ )
+ test_suite.append(test_case)
+
+ def decorator(func):
+ @functools.wraps(func)
+ def wrapper(self, *args, ** kwargs):
+
+ # Check if the package has been installed already
+ if self.installed:
+ return
+
+ test_case = TestCase(self.name, self.spec.short_spec)
+ # Try to install the package
+ try:
+ # If already installed set the spec as skipped
+ start_time = time.time()
+ # PackageBase.do_install
+ func(self, *args, **kwargs)
+ duration = time.time() - start_time
+ test_case.set_duration(duration)
+ test_case.set_result(TestResult.PASSED)
+ except InstallError:
+ # Check if the package relies on dependencies that
+ # did not install
+ duration = time.time() - start_time
+ test_case.set_duration(duration)
+ if [x for x in self.spec.dependencies(('link', 'run')) if not spack.repo.get(x).installed]: # NOQA: ignore=E501
+ test_case.set_duration(0.0)
+ test_case.set_result(
+ TestResult.SKIPPED,
+ message='Skipped [failed dependencies]',
+ error_type='dep_failed'
+ )
+ else:
+ # An InstallError is considered a failure (the recipe
+ # didn't work correctly)
+ text = fetch_text(self.build_log_path)
+ test_case.set_result(
+ TestResult.FAILED,
+ message='Installation failure',
+ text=text
+ )
+ except FetchError:
+ # A FetchError is considered an error as
+ # we didn't even start building
+ duration = time.time() - start_time
+ test_case.set_duration(duration)
+ text = fetch_text(self.build_log_path)
+ test_case.set_result(
+ TestResult.ERRORED,
+ message='Unable to fetch package',
+ text=text
+ )
+ except Exception:
+ # Anything else is also an error
+ duration = time.time() - start_time
+ test_case.set_duration(duration)
+ text = fetch_text(self.build_log_path)
+ test_case.set_result(
+ TestResult.ERRORED,
+ message='Unexpected exception thrown during install',
+ text=text
+ )
+ except:
+ # Anything else is also an error
+ duration = time.time() - start_time
+ test_case.set_duration(duration)
+ text = fetch_text(self.build_log_path)
+ test_case.set_result(
+ TestResult.ERRORED,
+ message='Unknown error',
+ text=text
+ )
+
+ # Try to get the log
+ test_suite.append(test_case)
+ return wrapper
+ return decorator
+
+
+def default_log_file(spec):
+ """Computes the default filename for the log file and creates
+ the corresponding directory if not present
+ """
+ fmt = 'test-{x.name}-{x.version}-{hash}.xml'
+ basename = fmt.format(x=spec, hash=spec.dag_hash())
+ dirname = fs.join_path(spack.var_path, 'junit-report')
+ fs.mkdirp(dirname)
+ return fs.join_path(dirname, basename)
+
+
+def install(parser, args, **kwargs):
+ if not args.package:
tty.die("install requires at least one package argument")
if args.jobs is not None:
@@ -76,17 +296,51 @@ def install(parser, args):
if args.no_checksum:
spack.do_checksum = False # TODO: remove this global.
- specs = spack.cmd.parse_specs(args.packages, concretize=True)
- for spec in specs:
+ # Parse cli arguments and construct a dictionary
+ # that will be passed to Package.do_install API
+ kwargs.update({
+ 'keep_prefix': args.keep_prefix,
+ 'keep_stage': args.keep_stage,
+ 'install_deps': 'dependencies' in args.things_to_install,
+ 'make_jobs': args.jobs,
+ 'run_tests': args.run_tests,
+ 'verbose': args.verbose,
+ 'fake': args.fake,
+ 'dirty': args.dirty
+ })
+
+ # Spec from cli
+ specs = spack.cmd.parse_specs(args.package, concretize=True)
+ if len(specs) != 1:
+ tty.error('only one spec can be installed at a time.')
+ spec = specs.pop()
+
+ # Check if we were asked to produce some log for dashboards
+ if args.log_format is not None:
+ # Compute the filename for logging
+ log_filename = args.log_file
+ if not log_filename:
+ log_filename = default_log_file(spec)
+ # Create the test suite in which to log results
+ test_suite = TestSuite()
+ # Decorate PackageBase.do_install to get installation status
+ PackageBase.do_install = junit_output(
+ spec, test_suite
+ )(PackageBase.do_install)
+
+ # Do the actual installation
+ if args.things_to_install == 'dependencies':
+ # Install dependencies as-if they were installed
+ # for root (explicit=False in the DB)
+ kwargs['explicit'] = False
+ for s in spec.dependencies():
+ p = spack.repo.get(s)
+ p.do_install(**kwargs)
+ else:
package = spack.repo.get(spec)
- with spack.installed_db.write_transaction():
- package.do_install(
- keep_prefix=args.keep_prefix,
- keep_stage=args.keep_stage,
- ignore_deps=args.ignore_deps,
- make_jobs=args.jobs,
- run_tests=args.run_tests,
- verbose=args.verbose,
- fake=args.fake,
- dirty=args.dirty,
- explicit=True)
+ kwargs['explicit'] = True
+ package.do_install(**kwargs)
+
+ # Dump log file if asked to
+ if args.log_format is not None:
+ test_suite.dump(log_filename)
diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py
index c921efd1bd..e1389df69f 100644
--- a/lib/spack/spack/cmd/list.py
+++ b/lib/spack/spack/cmd/list.py
@@ -22,36 +22,51 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+import argparse
+import cgi
+import fnmatch
+import re
import sys
+from StringIO import StringIO
+
import llnl.util.tty as tty
-import argparse
+import spack
from llnl.util.tty.colify import colify
-import spack
-import fnmatch
-import re
+description = "Print available spack packages to stdout in different formats"
+
+formatters = {}
-description = "List available spack packages"
+
+def formatter(func):
+ """Decorator used to register formatters"""
+ formatters[func.__name__] = func
+ return func
def setup_parser(subparser):
subparser.add_argument(
'filter', nargs=argparse.REMAINDER,
- help='Optional glob patterns to filter results.')
- subparser.add_argument(
- '-s', '--sensitive', action='store_true', default=False,
- help='Use case-sensitive filtering. Default is case sensitive, '
- 'unless the query contains a capital letter.')
+ help='Optional case-insensitive glob patterns to filter results.')
subparser.add_argument(
'-d', '--search-description', action='store_true', default=False,
help='Filtering will also search the description for a match.')
+ subparser.add_argument(
+ '--format', default='name_only', choices=formatters,
+ help='Format to be used to print the output [default: name_only]')
-def list(parser, args):
- # Start with all package names.
- pkgs = set(spack.repo.all_package_names())
+def filter_by_name(pkgs, args):
+ """
+ Filters the sequence of packages according to user prescriptions
- # filter if a filter arg was provided
+ Args:
+ pkgs: sequence of packages
+ args: parsed command line arguments
+
+ Returns:
+ filtered and sorted list of packages
+ """
if args.filter:
res = []
for f in args.filter:
@@ -60,10 +75,7 @@ def list(parser, args):
else:
r = fnmatch.translate(f)
- re_flags = re.I
- if any(l.isupper for l in f) or args.sensitive:
- re_flags = 0
- rc = re.compile(r, flags=re_flags)
+ rc = re.compile(r, flags=re.IGNORECASE)
res.append(rc)
if args.search_description:
@@ -80,11 +92,91 @@ def list(parser, args):
return f.match(p)
pkgs = [p for p in pkgs if any(match(p, f) for f in res)]
- # sort before displaying.
- sorted_packages = sorted(pkgs, key=lambda s: s.lower())
+ return sorted(pkgs, key=lambda s: s.lower())
+
- # Print all the package names in columns
+@formatter
+def name_only(pkgs):
indent = 0
if sys.stdout.isatty():
- tty.msg("%d packages." % len(sorted_packages))
- colify(sorted_packages, indent=indent)
+ tty.msg("%d packages." % len(pkgs))
+ colify(pkgs, indent=indent)
+
+
+@formatter
+def rst(pkgs):
+ """Print out information on all packages in restructured text."""
+
+ def github_url(pkg):
+ """Link to a package file on github."""
+ url = 'https://github.com/LLNL/spack/blob/develop/var/spack/repos/builtin/packages/{0}/package.py'
+ return url.format(pkg.name)
+
+ def rst_table(elts):
+ """Print out a RST-style table."""
+ cols = StringIO()
+ ncol, widths = colify(elts, output=cols, tty=True)
+ header = ' '.join('=' * (w - 1) for w in widths)
+ return '%s\n%s%s' % (header, cols.getvalue(), header)
+
+ pkg_names = pkgs
+ pkgs = [spack.repo.get(name) for name in pkg_names]
+
+ print('.. _package-list:')
+ print('')
+ print('============')
+ print('Package List')
+ print('============')
+ print('')
+ print('This is a list of things you can install using Spack. It is')
+ print('automatically generated based on the packages in the latest Spack')
+ print('release.')
+ print('')
+ print('Spack currently has %d mainline packages:' % len(pkgs))
+ print('')
+ print(rst_table('`%s`_' % p for p in pkg_names))
+ print('')
+
+ # Output some text for each package.
+ for pkg in pkgs:
+ print('-----')
+ print('')
+ print('.. _%s:' % pkg.name)
+ print('')
+ # Must be at least 2 long, breaks for single letter packages like R.
+ print('-' * max(len(pkg.name), 2))
+ print(pkg.name)
+ print('-' * max(len(pkg.name), 2))
+ print('')
+ print('Homepage:')
+ print(' * `%s <%s>`__' % (cgi.escape(pkg.homepage), pkg.homepage))
+ print('')
+ print('Spack package:')
+ print(' * `%s/package.py <%s>`__' % (pkg.name, github_url(pkg)))
+ print('')
+ if pkg.versions:
+ print('Versions:')
+ print(' ' + ', '.join(str(v) for v in
+ reversed(sorted(pkg.versions))))
+ print('')
+
+ for deptype in spack.alldeps:
+ deps = pkg.dependencies_of_type(deptype)
+ if deps:
+ print('%s Dependencies' % deptype.capitalize())
+ print(' ' + ', '.join('%s_' % d if d in pkg_names
+ else d for d in deps))
+ print('')
+
+ print('Description:')
+ print(pkg.format_doc(indent=2))
+ print('')
+
+
+def list(parser, args):
+ # Retrieve the names of all the packages
+ pkgs = set(spack.repo.all_package_names())
+ # Filter the set appropriately
+ sorted_packages = filter_by_name(pkgs, args)
+ # Print to stdout
+ formatters[args.format](sorted_packages)
diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py
index b9c8b5c330..54f7185707 100644
--- a/lib/spack/spack/cmd/location.py
+++ b/lib/spack/spack/cmd/location.py
@@ -25,7 +25,6 @@
import argparse
import llnl.util.tty as tty
-from llnl.util.filesystem import join_path
import spack
import spack.cmd
@@ -77,7 +76,7 @@ def location(parser, args):
print spack.prefix
elif args.packages:
- print spack.repo.root
+ print spack.repo.first_repo().root
elif args.stages:
print spack.stage_path
@@ -99,7 +98,7 @@ def location(parser, args):
if args.package_dir:
# This one just needs the spec name.
- print join_path(spack.repo.root, spec.name)
+ print spack.repo.dirname_for_package_name(spec.name)
else:
# These versions need concretized specs.
diff --git a/lib/spack/spack/cmd/md5.py b/lib/spack/spack/cmd/md5.py
index 506cf0913f..2ae279a41e 100644
--- a/lib/spack/spack/cmd/md5.py
+++ b/lib/spack/spack/cmd/md5.py
@@ -25,6 +25,7 @@
import argparse
import hashlib
import os
+from urlparse import urlparse
import llnl.util.tty as tty
import spack.util.crypto
@@ -49,13 +50,23 @@ def compute_md5_checksum(url):
return value
+def normalized(files):
+ for p in files:
+ result = urlparse(p)
+ value = p
+ if not result.scheme:
+ value = os.path.abspath(p)
+ yield value
+
+
def md5(parser, args):
if not args.files:
setup_parser.parser.print_help()
return 1
+ urls = [x for x in normalized(args.files)]
results = []
- for url in args.files:
+ for url in urls:
try:
checksum = compute_md5_checksum(url)
results.append((checksum, url))
@@ -70,4 +81,4 @@ def md5(parser, args):
checksum = 'checksum' if len(results) == 1 else 'checksums'
tty.msg("%d MD5 %s:" % (len(results), checksum))
for checksum, url in results:
- print "%s %s" % (checksum, url)
+ print("{0} {1}".format(checksum, url))
diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py
index 2d0b83fe00..31460b3124 100644
--- a/lib/spack/spack/cmd/module.py
+++ b/lib/spack/spack/cmd/module.py
@@ -29,10 +29,10 @@ import os
import shutil
import sys
+import llnl.util.filesystem as filesystem
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
-import llnl.util.filesystem as filesystem
from spack.modules import module_types
description = "Manipulate module files"
@@ -210,7 +210,8 @@ def refresh(mtype, specs, args):
cls = module_types[mtype]
# Detect name clashes
- writers = [cls(spec) for spec in specs]
+ writers = [cls(spec) for spec in specs
+ if spack.repo.exists(spec.name)] # skip unknown packages.
file2writer = collections.defaultdict(list)
for item in writers:
file2writer[item.file_name].append(item)
@@ -243,17 +244,17 @@ def module(parser, args):
'known': True
},
}
- arguments.ConstraintAction.qualifiers.update(constraint_qualifiers)
-
+ query_args = constraint_qualifiers.get(args.subparser_name, {})
+ specs = args.specs(**query_args)
module_type = args.module_type
constraint = args.constraint
try:
- callbacks[args.subparser_name](module_type, args.specs, args)
+ callbacks[args.subparser_name](module_type, specs, args)
except MultipleMatches:
message = ('the constraint \'{query}\' matches multiple packages, '
'and this is not allowed in this context')
tty.error(message.format(query=constraint))
- for s in args.specs:
+ for s in specs:
sys.stderr.write(s.format(color=True) + '\n')
raise SystemExit(1)
except NoMatch:
diff --git a/lib/spack/spack/cmd/package-list.py b/lib/spack/spack/cmd/package-list.py
deleted file mode 100644
index 9ed42de823..0000000000
--- a/lib/spack/spack/cmd/package-list.py
+++ /dev/null
@@ -1,99 +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
-##############################################################################
-import cgi
-from StringIO import StringIO
-from llnl.util.tty.colify import *
-import spack
-
-description = "Print a list of all packages in reStructuredText."
-
-
-def github_url(pkg):
- """Link to a package file on github."""
- url = "https://github.com/llnl/spack/blob/master/var/spack/packages/%s/package.py"
- return (url % pkg.name)
-
-
-def rst_table(elts):
- """Print out a RST-style table."""
- cols = StringIO()
- ncol, widths = colify(elts, output=cols, tty=True)
- header = " ".join("=" * (w - 1) for w in widths)
- return "%s\n%s%s" % (header, cols.getvalue(), header)
-
-
-def print_rst_package_list():
- """Print out information on all packages in restructured text."""
- pkgs = sorted(spack.repo.all_packages(), key=lambda s: s.name.lower())
- pkg_names = [p.name for p in pkgs]
-
- print ".. _package-list:"
- print
- print "Package List"
- print "=================="
-
- print "This is a list of things you can install using Spack. It is"
- print "automatically generated based on the packages in the latest Spack"
- print "release."
- print
-
- print "Spack currently has %d mainline packages:" % len(pkgs)
- print
- print rst_table("`%s`_" % p for p in pkg_names)
- print
- print "-----"
-
- # Output some text for each package.
- for pkg in pkgs:
- print
- print ".. _%s:" % pkg.name
- print
- print pkg.name
- print "-" * len(pkg.name)
- print "Links:"
- print " * `%s <%s>`__" % (cgi.escape(pkg.homepage), pkg.homepage)
- print " * `%s/package.py <%s>`__" % (pkg.name, github_url(pkg))
- print
- if pkg.versions:
- print "Versions:"
- print " " + ", ".join(str(v) for v in
- reversed(sorted(pkg.versions)))
-
- for deptype in spack.alldeps:
- deps = pkg.dependencies_of_type(deptype)
- if deps:
- print "%s Dependencies" % deptype.capitalize()
- print " " + ", ".join("%s_" % d if d in pkg_names
- else d for d in deps)
- print
-
- print "Description:"
- print pkg.format_doc(indent=2)
- print
- print "-----"
-
-
-def package_list(parser, args):
- print_rst_package_list()
diff --git a/lib/spack/spack/cmd/purge.py b/lib/spack/spack/cmd/purge.py
index 26d160635c..66cfc2af29 100644
--- a/lib/spack/spack/cmd/purge.py
+++ b/lib/spack/spack/cmd/purge.py
@@ -36,8 +36,8 @@ def setup_parser(subparser):
'-d', '--downloads', action='store_true',
help="Remove cached downloads.")
subparser.add_argument(
- '-u', '--user-cache', action='store_true',
- help="Remove caches in user home directory. Includes virtual indices.")
+ '-m', '--misc-cache', action='store_true',
+ help="Remove long-lived caches, like the virtual package index.")
subparser.add_argument(
'-a', '--all', action='store_true',
help="Remove all of the above.")
@@ -45,7 +45,7 @@ def setup_parser(subparser):
def purge(parser, args):
# Special case: no flags.
- if not any((args.stage, args.downloads, args.user_cache, args.all)):
+ if not any((args.stage, args.downloads, args.misc_cache, args.all)):
stage.purge()
return
@@ -54,5 +54,5 @@ def purge(parser, args):
stage.purge()
if args.downloads or args.all:
spack.fetch_cache.destroy()
- if args.user_cache or args.all:
- spack.user_cache.destroy()
+ if args.misc_cache or args.all:
+ spack.misc_cache.destroy()
diff --git a/lib/spack/spack/cmd/reindex.py b/lib/spack/spack/cmd/reindex.py
index e37eebbd92..7dddda2ffb 100644
--- a/lib/spack/spack/cmd/reindex.py
+++ b/lib/spack/spack/cmd/reindex.py
@@ -23,9 +23,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import spack
-
+import spack.store
description = "Rebuild Spack's package database."
def reindex(parser, args):
- spack.installed_db.reindex(spack.install_layout)
+ spack.store.db.reindex(spack.store.layout)
diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py
index b55e102c0e..953906975e 100644
--- a/lib/spack/spack/cmd/setup.py
+++ b/lib/spack/spack/cmd/setup.py
@@ -22,14 +22,19 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import sys
-import os
import argparse
+import copy
+import os
+import string
+import sys
import llnl.util.tty as tty
-
import spack
import spack.cmd
+import spack.cmd.install as install
+import spack.cmd.common.arguments as arguments
+from llnl.util.filesystem import set_executable
+from spack import which
from spack.cmd.edit import edit_package
from spack.stage import DIYStage
@@ -47,6 +52,74 @@ def setup_parser(subparser):
'spec', nargs=argparse.REMAINDER,
help="specs to use for install. Must contain package AND version.")
+ cd_group = subparser.add_mutually_exclusive_group()
+ arguments.add_common_arguments(cd_group, ['clean', 'dirty'])
+
+
+def spack_transitive_include_path():
+ return ';'.join(
+ os.path.join(dep, 'include')
+ for dep in os.environ['SPACK_DEPENDENCIES'].split(os.pathsep)
+ )
+
+
+def write_spconfig(package):
+ # Set-up the environment
+ spack.build_environment.setup_package(package)
+
+ cmd = [str(which('cmake'))] + package.std_cmake_args + package.cmake_args()
+
+ env = dict()
+
+ paths = os.environ['PATH'].split(':')
+ paths = [item for item in paths if 'spack/env' not in item]
+ env['PATH'] = ':'.join(paths)
+ env['SPACK_TRANSITIVE_INCLUDE_PATH'] = spack_transitive_include_path()
+ env['CMAKE_PREFIX_PATH'] = os.environ['CMAKE_PREFIX_PATH']
+ env['CC'] = os.environ['SPACK_CC']
+ env['CXX'] = os.environ['SPACK_CXX']
+ env['FC'] = os.environ['SPACK_FC']
+
+ setup_fname = 'spconfig.py'
+ with open(setup_fname, 'w') as fout:
+ fout.write(
+ r"""#!%s
+#
+
+import sys
+import os
+import subprocess
+
+def cmdlist(str):
+ return list(x.strip().replace("'",'') for x in str.split('\n') if x)
+env = dict(os.environ)
+""" % sys.executable)
+
+ env_vars = sorted(list(env.keys()))
+ for name in env_vars:
+ val = env[name]
+ if string.find(name, 'PATH') < 0:
+ fout.write('env[%s] = %s\n' % (repr(name), repr(val)))
+ else:
+ if name == 'SPACK_TRANSITIVE_INCLUDE_PATH':
+ sep = ';'
+ else:
+ sep = ':'
+
+ fout.write(
+ 'env[%s] = "%s".join(cmdlist("""\n' % (repr(name), sep))
+ for part in string.split(val, sep):
+ fout.write(' %s\n' % part)
+ fout.write('"""))\n')
+
+ fout.write('\ncmd = cmdlist("""\n')
+ fout.write('%s\n' % cmd[0])
+ for arg in cmd[1:]:
+ fout.write(' %s\n' % arg)
+ fout.write('""") + sys.argv[1:]\n')
+ fout.write('\nproc = subprocess.Popen(cmd, env=env)\nproc.wait()\n')
+ set_executable(setup_fname)
+
def setup(self, args):
if not args.spec:
@@ -77,6 +150,12 @@ def setup(self, args):
spec.concretize()
package = spack.repo.get(spec)
+ if not isinstance(package, spack.CMakePackage):
+ tty.die(
+ 'Support for {0} derived packages not yet implemented'.format(
+ package.build_system_class
+ )
+ )
# It's OK if the package is already installed.
@@ -86,9 +165,26 @@ def setup(self, args):
# TODO: make this an argument, not a global.
spack.do_checksum = False
- package.do_install(
- keep_prefix=True, # Don't remove install directory
- ignore_deps=args.ignore_deps,
- verbose=args.verbose,
- keep_stage=True, # don't remove source dir for SETUP.
- install_phases=set(['setup', 'provenance']))
+ # Install dependencies if requested to do so
+ if not args.ignore_deps:
+ parser = argparse.ArgumentParser()
+ install.setup_parser(parser)
+ inst_args = copy.deepcopy(args)
+ inst_args = parser.parse_args(
+ ['--only=dependencies'] + args.spec,
+ namespace=inst_args
+ )
+ install.install(parser, inst_args)
+ # Generate spconfig.py
+ tty.msg(
+ 'Generating spconfig.py [{0}]'.format(package.spec.cshort_spec)
+ )
+ write_spconfig(package)
+ # Install this package to register it in the DB and permit
+ # module file regeneration
+ inst_args = copy.deepcopy(args)
+ inst_args = parser.parse_args(
+ ['--only=package', '--fake'] + args.spec,
+ namespace=inst_args
+ )
+ install.install(parser, inst_args)
diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py
index 6e6d1c1277..0a6fb330ac 100644
--- a/lib/spack/spack/cmd/spec.py
+++ b/lib/spack/spack/cmd/spec.py
@@ -23,36 +23,57 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import argparse
-import spack.cmd
import spack
+import spack.cmd
+import spack.cmd.common.arguments as arguments
description = "print out abstract and concrete versions of a spec."
def setup_parser(subparser):
- subparser.add_argument('-i', '--ids', action='store_true',
- help="show numerical ids for dependencies.")
+ arguments.add_common_arguments(subparser, ['long', 'very_long'])
+ subparser.add_argument(
+ '-y', '--yaml', action='store_true', default=False,
+ help='Print concrete spec as YAML.')
+ subparser.add_argument(
+ '-c', '--cover', action='store',
+ default='nodes', choices=['nodes', 'edges', 'paths'],
+ help='How extensively to traverse the DAG. (default: nodes).')
+ subparser.add_argument(
+ '-I', '--install-status', action='store_true', default=False,
+ help='Show install status of packages. Packages can be: '
+ 'installed [+], missing and needed by an installed package [-], '
+ 'or not installed (no annotation).')
subparser.add_argument(
'specs', nargs=argparse.REMAINDER, help="specs of packages")
def spec(parser, args):
- kwargs = {'ids': args.ids,
- 'indent': 2,
- 'color': True}
+ kwargs = {'color': True,
+ 'cover': args.cover,
+ 'install_status': args.install_status,
+ 'hashes': args.long or args.very_long,
+ 'hashlen': None if args.very_long else 7}
for spec in spack.cmd.parse_specs(args.specs):
+ # With -y, just print YAML to output.
+ if args.yaml:
+ spec.concretize()
+ print spec.to_yaml()
+ continue
+
+ # Print some diagnostic info by default.
print "Input spec"
- print "------------------------------"
+ print "--------------------------------"
print spec.tree(**kwargs)
print "Normalized"
- print "------------------------------"
+ print "--------------------------------"
spec.normalize()
print spec.tree(**kwargs)
print "Concretized"
- print "------------------------------"
+ print "--------------------------------"
spec.concretize()
print spec.tree(**kwargs)
diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py
deleted file mode 100644
index 8e7173e9a2..0000000000
--- a/lib/spack/spack/cmd/test-install.py
+++ /dev/null
@@ -1,245 +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
-##############################################################################
-import argparse
-import codecs
-import os
-import time
-import xml.dom.minidom
-import xml.etree.ElementTree as ET
-
-import llnl.util.tty as tty
-import spack
-import spack.cmd
-from llnl.util.filesystem import *
-from spack.build_environment import InstallError
-from spack.fetch_strategy import FetchError
-
-description = "Run package install as a unit test, output formatted results."
-
-
-def setup_parser(subparser):
- subparser.add_argument(
- '-j', '--jobs', action='store', type=int,
- help="Explicitly set number of make jobs. Default is #cpus.")
-
- subparser.add_argument(
- '-n', '--no-checksum', action='store_true', dest='no_checksum',
- help="Do not check packages against checksum")
-
- subparser.add_argument(
- '-o', '--output', action='store',
- help="test output goes in this file")
-
- subparser.add_argument(
- 'package', nargs=argparse.REMAINDER,
- help="spec of package to install")
-
-
-class TestResult(object):
- PASSED = 0
- FAILED = 1
- SKIPPED = 2
- ERRORED = 3
-
-
-class TestSuite(object):
-
- def __init__(self, filename):
- self.filename = filename
- self.root = ET.Element('testsuite')
- self.tests = []
-
- def __enter__(self):
- return self
-
- def append(self, item):
- if not isinstance(item, TestCase):
- raise TypeError(
- 'only TestCase instances may be appended to TestSuite')
- self.tests.append(item) # Append the item to the list of tests
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- # Prepare the header for the entire test suite
- number_of_errors = sum(
- x.result_type == TestResult.ERRORED for x in self.tests)
- self.root.set('errors', str(number_of_errors))
- number_of_failures = sum(
- x.result_type == TestResult.FAILED for x in self.tests)
- self.root.set('failures', str(number_of_failures))
- self.root.set('tests', str(len(self.tests)))
-
- for item in self.tests:
- self.root.append(item.element)
-
- with open(self.filename, 'wb') as file:
- xml_string = ET.tostring(self.root)
- xml_string = xml.dom.minidom.parseString(xml_string).toprettyxml()
- file.write(xml_string)
-
-
-class TestCase(object):
-
- results = {
- TestResult.PASSED: None,
- TestResult.SKIPPED: 'skipped',
- TestResult.FAILED: 'failure',
- TestResult.ERRORED: 'error',
- }
-
- def __init__(self, classname, name, time=None):
- self.element = ET.Element('testcase')
- self.element.set('classname', str(classname))
- self.element.set('name', str(name))
- if time is not None:
- self.element.set('time', str(time))
- self.result_type = None
-
- def set_result(self, result_type,
- message=None, error_type=None, text=None):
- self.result_type = result_type
- result = TestCase.results[self.result_type]
- if result is not None and result is not TestResult.PASSED:
- subelement = ET.SubElement(self.element, result)
- if error_type is not None:
- subelement.set('type', error_type)
- if message is not None:
- subelement.set('message', str(message))
- if text is not None:
- subelement.text = text
-
-
-def fetch_log(path):
- if not os.path.exists(path):
- return list()
- with codecs.open(path, 'rb', 'utf-8') as F:
- return list(line.strip() for line in F.readlines())
-
-
-def failed_dependencies(spec):
- def get_deps(deptype):
- return set(item for item in spec.dependencies(deptype)
- if not spack.repo.get(item).installed)
- link_deps = get_deps('link')
- run_deps = get_deps('run')
- return link_deps.union(run_deps)
-
-
-def get_top_spec_or_die(args):
- specs = spack.cmd.parse_specs(args.package, concretize=True)
- if len(specs) > 1:
- tty.die("Only 1 top-level package can be specified")
- top_spec = iter(specs).next()
- return top_spec
-
-
-def install_single_spec(spec, number_of_jobs):
- package = spack.repo.get(spec)
-
- # If it is already installed, skip the test
- if spack.repo.get(spec).installed:
- testcase = TestCase(package.name, package.spec.short_spec, time=0.0)
- testcase.set_result(
- TestResult.SKIPPED,
- message='Skipped [already installed]',
- error_type='already_installed')
- return testcase
-
- # If it relies on dependencies that did not install, skip
- if failed_dependencies(spec):
- testcase = TestCase(package.name, package.spec.short_spec, time=0.0)
- testcase.set_result(
- TestResult.SKIPPED,
- message='Skipped [failed dependencies]',
- error_type='dep_failed')
- return testcase
-
- # Otherwise try to install the spec
- try:
- start_time = time.time()
- package.do_install(keep_prefix=False,
- keep_stage=True,
- ignore_deps=False,
- make_jobs=number_of_jobs,
- verbose=True,
- fake=False)
- duration = time.time() - start_time
- testcase = TestCase(package.name, package.spec.short_spec, duration)
- testcase.set_result(TestResult.PASSED)
- except InstallError:
- # An InstallError is considered a failure (the recipe didn't work
- # correctly)
- duration = time.time() - start_time
- # Try to get the log
- lines = fetch_log(package.build_log_path)
- text = '\n'.join(lines)
- testcase = TestCase(package.name, package.spec.short_spec, duration)
- testcase.set_result(TestResult.FAILED,
- message='Installation failure', text=text)
-
- except FetchError:
- # A FetchError is considered an error (we didn't even start building)
- duration = time.time() - start_time
- testcase = TestCase(package.name, package.spec.short_spec, duration)
- testcase.set_result(TestResult.ERRORED,
- message='Unable to fetch package')
-
- return testcase
-
-
-def get_filename(args, top_spec):
- if not args.output:
- fname = 'test-{x.name}-{x.version}-{hash}.xml'.format(
- x=top_spec, hash=top_spec.dag_hash())
- output_directory = join_path(os.getcwd(), 'test-output')
- if not os.path.exists(output_directory):
- os.mkdir(output_directory)
- output_filename = join_path(output_directory, fname)
- else:
- output_filename = args.output
- return output_filename
-
-
-def test_install(parser, args):
- # Check the input
- if not args.package:
- tty.die("install requires a package argument")
-
- if args.jobs is not None:
- if args.jobs <= 0:
- tty.die("The -j option must be a positive integer!")
-
- if args.no_checksum:
- spack.do_checksum = False # TODO: remove this global.
-
- # Get the one and only top spec
- top_spec = get_top_spec_or_die(args)
- # Get the filename of the test
- output_filename = get_filename(args, top_spec)
- # TEST SUITE
- with TestSuite(output_filename) as test_suite:
- # Traverse in post order : each spec is a test case
- for spec in top_spec.traverse(order='post'):
- test_case = install_single_spec(spec, args.jobs)
- test_suite.append(test_case)
diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py
index bf7342f606..52c2a06778 100644
--- a/lib/spack/spack/cmd/test.py
+++ b/lib/spack/spack/cmd/test.py
@@ -56,7 +56,7 @@ class MockCache(object):
def store(self, copyCmd, relativeDst):
pass
- def fetcher(self, targetPath, digest):
+ def fetcher(self, targetPath, digest, **kwargs):
return MockCacheFetcher()
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index 8957d1c908..2f7e15ba55 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -29,6 +29,7 @@ import argparse
import llnl.util.tty as tty
import spack
import spack.cmd
+import spack.store
import spack.repository
description = "Remove an installed package"
@@ -54,9 +55,10 @@ def setup_parser(subparser):
subparser.add_argument(
'-a', '--all', action='store_true', dest='all',
help="USE CAREFULLY. Remove ALL installed packages that match each "
- "supplied spec. i.e., if you say uninstall libelf, ALL versions "
- "of libelf are uninstalled. This is both useful and dangerous, "
- "like rm -r.")
+ "supplied spec. i.e., if you say uninstall `libelf`,"
+ " ALL versions of `libelf` are uninstalled. If no spec is "
+ "supplied all installed software will be uninstalled. This "
+ "is both useful and dangerous, like rm -r.")
subparser.add_argument(
'-d', '--dependents', action='store_true', dest='dependents',
@@ -88,7 +90,7 @@ def concretize_specs(specs, allow_multiple_matches=False, force=False):
specs_from_cli = []
has_errors = False
for spec in specs:
- matching = spack.installed_db.query(spec)
+ matching = spack.store.db.query(spec)
# For each spec provided, make sure it refers to only one package.
# Fail and ask user to be unambiguous if it doesn't
if not allow_multiple_matches and len(matching) > 1:
@@ -99,7 +101,7 @@ def concretize_specs(specs, allow_multiple_matches=False, force=False):
has_errors = True
# No installed package matches the query
- if len(matching) == 0 and not force:
+ if len(matching) == 0 and spec is not any:
tty.error("%s does not match any installed packages." % spec)
has_errors = True
@@ -157,44 +159,53 @@ def do_uninstall(specs, force):
item.do_uninstall(force=force)
-def uninstall(parser, args):
- if not args.packages:
- tty.die("uninstall requires at least one package argument.")
-
- with spack.installed_db.write_transaction():
+def get_uninstall_list(args):
+ specs = [any]
+ if args.packages:
specs = spack.cmd.parse_specs(args.packages)
- # Gets the list of installed specs that match the ones give via cli
- # takes care of '-a' is given in the cli
- uninstall_list = concretize_specs(specs, args.all, args.force)
- dependent_list = installed_dependents(
- uninstall_list) # takes care of '-d'
-
- # Process dependent_list and update uninstall_list
- has_error = False
- if dependent_list and not args.dependents and not args.force:
- for spec, lst in dependent_list.items():
- tty.error("Will not uninstall %s" %
- spec.format("$_$@$%@$#", color=True))
- print('')
- print("The following packages depend on it:")
- spack.cmd.display_specs(lst, **display_args)
- print('')
- has_error = True
- elif args.dependents:
- for key, lst in dependent_list.items():
- uninstall_list.extend(lst)
- uninstall_list = list(set(uninstall_list))
-
- if has_error:
- tty.die('You can use spack uninstall --dependents '
- 'to uninstall these dependencies as well')
-
- if not args.yes_to_all:
- tty.msg("The following packages will be uninstalled : ")
+ # Gets the list of installed specs that match the ones give via cli
+ # takes care of '-a' is given in the cli
+ uninstall_list = concretize_specs(specs, args.all, args.force)
+ # Takes care of '-d'
+ dependent_list = installed_dependents(uninstall_list)
+ # Process dependent_list and update uninstall_list
+ has_error = False
+ if dependent_list and not args.dependents and not args.force:
+ for spec, lst in dependent_list.items():
+ tty.error("Will not uninstall %s" %
+ spec.format("$_$@$%@$#", color=True))
print('')
- spack.cmd.display_specs(uninstall_list, **display_args)
+ print("The following packages depend on it:")
+ spack.cmd.display_specs(lst, **display_args)
print('')
- spack.cmd.ask_for_confirmation('Do you want to proceed ? ')
+ has_error = True
+ elif args.dependents:
+ for key, lst in dependent_list.items():
+ uninstall_list.extend(lst)
+ uninstall_list = list(set(uninstall_list))
+ if has_error:
+ tty.die('You can use spack uninstall --dependents '
+ 'to uninstall these dependencies as well')
+
+ return uninstall_list
+
+
+def uninstall(parser, args):
+ if not args.packages and not args.all:
+ tty.die("uninstall requires at least one package argument.")
+
+ uninstall_list = get_uninstall_list(args)
+
+ if not uninstall_list:
+ tty.msg("There are no package to uninstall.")
+ return
+
+ if not args.yes_to_all:
+ tty.msg("The following packages will be uninstalled : ")
+ print('')
+ spack.cmd.display_specs(uninstall_list, **display_args)
+ print('')
+ spack.cmd.ask_for_confirmation('Do you want to proceed ? ')
- # Uninstall everything on the list
- do_uninstall(uninstall_list, args.force)
+ # Uninstall everything on the list
+ do_uninstall(uninstall_list, args.force)
diff --git a/lib/spack/spack/cmd/url-parse.py b/lib/spack/spack/cmd/url_parse.py
index b8c7c95040..b8c7c95040 100644
--- a/lib/spack/spack/cmd/url-parse.py
+++ b/lib/spack/spack/cmd/url_parse.py
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
index a77991e4dc..5170872cf7 100644
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -113,10 +113,17 @@ class Compiler(object):
PrgEnv_compiler = None
def __init__(self, cspec, operating_system,
- paths, modules=[], alias=None, **kwargs):
+ paths, modules=[], alias=None, environment=None,
+ extra_rpaths=None, **kwargs):
+ self.operating_system = operating_system
+ self.spec = cspec
+ self.modules = modules
+ self.alias = alias
+
def check(exe):
if exe is None:
return None
+ exe = self._find_full_path(exe)
_verify_executables(exe)
return exe
@@ -129,6 +136,9 @@ class Compiler(object):
else:
self.fc = check(paths[3])
+ self.environment = environment
+ self.extra_rpaths = extra_rpaths or []
+
# Unfortunately have to make sure these params are accepted
# in the same order they are returned by sorted(flags)
# in compilers/__init__.py
@@ -138,11 +148,6 @@ class Compiler(object):
if value is not None:
self.flags[flag] = value.split()
- self.operating_system = operating_system
- self.spec = cspec
- self.modules = modules
- self.alias = alias
-
@property
def version(self):
return self.spec.version
@@ -269,6 +274,21 @@ class Compiler(object):
successful.reverse()
return dict(((v, p, s), path) for v, p, s, path in successful)
+ def _find_full_path(self, path):
+ """Return the actual path for a tool.
+
+ Some toolchains use forwarding executables (particularly Xcode-based
+ toolchains) which can be manipulated by external environment variables.
+ This method should be used to extract the actual path used for a tool
+ by finding out the end executable the forwarding executables end up
+ running.
+ """
+ return path
+
+ def setup_custom_environment(self, env):
+ """Set any environment variables necessary to use the compiler."""
+ pass
+
def __repr__(self):
"""Return a string representation of the compiler toolchain."""
return self.__str__()
diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py
index eb866c8bbb..5b049367cc 100644
--- a/lib/spack/spack/compilers/__init__.py
+++ b/lib/spack/spack/compilers/__init__.py
@@ -26,7 +26,6 @@
system and configuring Spack to use multiple compilers.
"""
import imp
-import platform
from llnl.util.lang import list_modules
from llnl.util.filesystem import join_path
@@ -41,15 +40,10 @@ from spack.util.naming import mod_to_class
_imported_compilers_module = 'spack.compilers'
_path_instance_vars = ['cc', 'cxx', 'f77', 'fc']
-_other_instance_vars = ['modules', 'operating_system']
+_other_instance_vars = ['modules', 'operating_system', 'environment',
+ 'extra_rpaths']
_cache_config_file = []
-# TODO: customize order in config file
-if platform.system() == 'Darwin':
- _default_order = ['clang', 'gcc', 'intel']
-else:
- _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc', 'nag']
-
def _auto_compiler_spec(function):
def converter(cspec_like, *args, **kwargs):
@@ -65,8 +59,11 @@ def _to_dict(compiler):
d['spec'] = str(compiler.spec)
d['paths'] = dict((attr, getattr(compiler, attr, None))
for attr in _path_instance_vars)
+ d['flags'] = dict((fname, fvals) for fname, fvals in compiler.flags)
d['operating_system'] = str(compiler.operating_system)
d['modules'] = compiler.modules if compiler.modules else []
+ d['environment'] = compiler.environment if compiler.environment else {}
+ d['extra_rpaths'] = compiler.extra_rpaths if compiler.extra_rpaths else []
if compiler.alias:
d['alias'] = compiler.alias
@@ -168,18 +165,6 @@ def all_compilers(scope=None, init_config=True):
for s in all_compilers_config(scope, init_config)]
-def default_compiler():
- versions = []
- for name in _default_order:
- versions = find(name)
- if versions:
- break
- else:
- raise NoCompilersError()
-
- return sorted(versions)[-1]
-
-
def find_compilers(*paths):
"""Return a list of compilers found in the suppied paths.
This invokes the find_compilers() method for each operating
@@ -212,7 +197,7 @@ def supported(compiler_spec):
@_auto_compiler_spec
def find(compiler_spec, scope=None):
"""Return specs of available compilers that match the supplied
- compiler spec. Return an list if nothing found."""
+ compiler spec. Return an empty list if nothing found."""
return [c for c in all_compilers(scope) if c.satisfies(compiler_spec)]
@@ -221,7 +206,7 @@ def compilers_for_spec(compiler_spec, scope=None, **kwargs):
"""This gets all compilers that satisfy the supplied CompilerSpec.
Returns an empty list if none are found.
"""
- platform = kwargs.get("platform", None)
+ platform = kwargs.get('platform', None)
config = all_compilers_config(scope)
def get_compilers(cspec):
@@ -241,7 +226,7 @@ def compilers_for_spec(compiler_spec, scope=None, **kwargs):
compiler_paths = []
for c in _path_instance_vars:
compiler_path = items['paths'][c]
- if compiler_path != "None":
+ if compiler_path != 'None':
compiler_paths.append(compiler_path)
else:
compiler_paths.append(None)
@@ -250,21 +235,19 @@ def compilers_for_spec(compiler_spec, scope=None, **kwargs):
if mods == 'None':
mods = []
+ os = None
if 'operating_system' in items:
os = spack.architecture._operating_system_from_dict(
items['operating_system'], platform)
- else:
- os = None
-
- alias = items['alias'] if 'alias' in items else None
- flags = {}
- for f in spack.spec.FlagMap.valid_compiler_flags():
- if f in items:
- flags[f] = items[f]
+ alias = items.get('alias', None)
+ compiler_flags = items.get('flags', {})
+ environment = items.get('environment', {})
+ extra_rpaths = items.get('extra_rpaths', [])
compilers.append(
- cls(cspec, os, compiler_paths, mods, alias, **flags))
+ cls(cspec, os, compiler_paths, mods, alias, environment,
+ extra_rpaths, **compiler_flags))
return compilers
diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py
index 4cf65222ae..da18adcecd 100644
--- a/lib/spack/spack/compilers/clang.py
+++ b/lib/spack/spack/compilers/clang.py
@@ -23,11 +23,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import re
+import os
+import sys
+import spack
import spack.compiler as cpr
from spack.compiler import *
from spack.util.executable import *
import llnl.util.tty as tty
from spack.version import ver
+from shutil import copytree, ignore_patterns
class Clang(Compiler):
@@ -38,18 +42,18 @@ class Clang(Compiler):
cxx_names = ['clang++']
# Subclasses use possible names of Fortran 77 compiler
- f77_names = []
+ f77_names = ['gfortran']
# Subclasses use possible names of Fortran 90 compiler
- fc_names = []
+ fc_names = ['gfortran']
# Named wrapper links within spack.build_env_path
link_paths = {'cc': 'clang/clang',
'cxx': 'clang/clang++',
# Use default wrappers for fortran, in case provided in
# compilers.yaml
- 'f77': 'f77',
- 'fc': 'f90'}
+ 'f77': 'clang/gfortran',
+ 'fc': 'clang/gfortran'}
@property
def is_apple(self):
@@ -77,18 +81,17 @@ class Clang(Compiler):
@classmethod
def default_version(cls, comp):
"""The '--version' option works for clang compilers.
- On most platforms, output looks like this::
+ On most platforms, output looks like this::
- clang version 3.1 (trunk 149096)
- Target: x86_64-unknown-linux-gnu
- Thread model: posix
+ clang version 3.1 (trunk 149096)
+ Target: x86_64-unknown-linux-gnu
+ Thread model: posix
- On Mac OS X, it looks like this:
-
- Apple LLVM version 7.0.2 (clang-700.1.81)
- Target: x86_64-apple-darwin15.2.0
- Thread model: posix
+ On Mac OS X, it looks like this::
+ Apple LLVM version 7.0.2 (clang-700.1.81)
+ Target: x86_64-apple-darwin15.2.0
+ Thread model: posix
"""
if comp not in cpr._version_cache:
compiler = Executable(comp)
@@ -101,10 +104,108 @@ 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)
cpr._version_cache[comp] = ver
return cpr._version_cache[comp]
+
+ def _find_full_path(self, path):
+ basename = os.path.basename(path)
+
+ if not self.is_apple or basename not in ('clang', 'clang++'):
+ return super(Clang, self)._find_full_path(path)
+
+ xcrun = Executable('xcrun')
+ full_path = xcrun('-f', basename, output=str)
+ return full_path.strip()
+
+ @classmethod
+ def fc_version(cls, fc):
+ version = get_compiler_version(
+ fc, '-dumpversion',
+ # older gfortran versions don't have simple dumpversion output.
+ r'(?:GNU Fortran \(GCC\))?(\d+\.\d+(?:\.\d+)?)')
+ # This is horribly ad hoc, we need to map from gcc/gfortran version
+ # to clang version, but there could be multiple clang
+ # versions that work for a single gcc/gfortran version
+ if sys.platform == 'darwin':
+ clangversionfromgcc = {'6.2.0': '8.0.0-apple'}
+ else:
+ clangversionfromgcc = {}
+ if version in clangversionfromgcc:
+ return clangversionfromgcc[version]
+ else:
+ return 'unknown'
+
+ @classmethod
+ def f77_version(cls, f77):
+ return cls.fc_version(f77)
+
+ def setup_custom_environment(self, env):
+ """Set the DEVELOPER_DIR environment for the Xcode toolchain.
+
+ On macOS, not all buildsystems support querying CC and CXX for the
+ compilers to use and instead query the Xcode toolchain for what
+ compiler to run. This side-steps the spack wrappers. In order to inject
+ spack into this setup, we need to copy (a subset of) Xcode.app and
+ replace the compiler executables with symlinks to the spack wrapper.
+ Currently, the stage is used to store the Xcode.app copies. We then set
+ the 'DEVELOPER_DIR' environment variables to cause the xcrun and
+ related tools to use this Xcode.app.
+ """
+ super(Clang, self).setup_custom_environment(env)
+
+ if not self.is_apple:
+ return
+
+ xcode_select = Executable('xcode-select')
+ real_root = xcode_select('--print-path', output=str).strip()
+ real_root = os.path.dirname(os.path.dirname(real_root))
+ developer_root = os.path.join(spack.stage_path,
+ 'xcode-select',
+ self.name,
+ str(self.version))
+ xcode_link = os.path.join(developer_root, 'Xcode.app')
+
+ if not os.path.exists(developer_root):
+ tty.warn('Copying Xcode from %s to %s in order to add spack '
+ 'wrappers to it. Please do not interrupt.'
+ % (real_root, developer_root))
+
+ # We need to make a new Xcode.app instance, but with symlinks to
+ # the spack wrappers for the compilers it ships. This is necessary
+ # because some projects insist on just asking xcrun and related
+ # tools where the compiler runs. These tools are very hard to trick
+ # as they do realpath and end up ignoring the symlinks in a
+ # "softer" tree of nothing but symlinks in the right places.
+ copytree(real_root, developer_root, symlinks=True,
+ ignore=ignore_patterns('AppleTV*.platform',
+ 'Watch*.platform',
+ 'iPhone*.platform',
+ 'Documentation',
+ 'swift*'))
+
+ real_dirs = [
+ 'Toolchains/XcodeDefault.xctoolchain/usr/bin',
+ 'usr/bin',
+ ]
+
+ bins = ['c++', 'c89', 'c99', 'cc', 'clang', 'clang++', 'cpp']
+
+ for real_dir in real_dirs:
+ dev_dir = os.path.join(developer_root,
+ 'Contents',
+ 'Developer',
+ real_dir)
+ for fname in os.listdir(dev_dir):
+ if fname in bins:
+ os.unlink(os.path.join(dev_dir, fname))
+ os.symlink(os.path.join(spack.build_env_path, 'cc'),
+ os.path.join(dev_dir, fname))
+
+ os.symlink(developer_root, xcode_link)
+
+ env.set('DEVELOPER_DIR', xcode_link)
diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py
index a556f346d7..557b1c13a9 100644
--- a/lib/spack/spack/compilers/gcc.py
+++ b/lib/spack/spack/compilers/gcc.py
@@ -41,8 +41,9 @@ class Gcc(Compiler):
fc_names = ['gfortran']
# MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes.
- # Homebrew and Linuxes may build gcc with -X, -X.Y suffixes
- suffixes = [r'-mp-\d\.\d', r'-\d\.\d', r'-\d']
+ # Homebrew and Linuxbrew may build gcc with -X, -X.Y suffixes.
+ # Old compatibility versions may contain XY suffixes.
+ suffixes = [r'-mp-\d\.\d', r'-\d\.\d', r'-\d', r'\d\d']
# Named wrapper links within spack.build_env_path
link_paths = {'cc': 'gcc/gcc',
@@ -83,3 +84,7 @@ class Gcc(Compiler):
@classmethod
def f77_version(cls, f77):
return cls.fc_version(f77)
+
+ @property
+ def stdcxx_libs(self):
+ return ('-lstdc++', )
diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py
index 8531ecd19a..14f4d2dc91 100644
--- a/lib/spack/spack/compilers/intel.py
+++ b/lib/spack/spack/compilers/intel.py
@@ -68,15 +68,19 @@ class Intel(Compiler):
@classmethod
def default_version(cls, comp):
"""The '--version' option seems to be the most consistent one
- for intel compilers. Output looks like this::
+ for intel compilers. Output looks like this::
- icpc (ICC) 12.1.5 20120612
- Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
+ icpc (ICC) 12.1.5 20120612
+ Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
- or::
+ or::
- ifort (IFORT) 12.1.5 20120612
- Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
+ ifort (IFORT) 12.1.5 20120612
+ Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
"""
return get_compiler_version(
comp, '--version', r'\((?:IFORT|ICC)\) ([^ ]+)')
+
+ @property
+ def stdcxx_libs(self):
+ return ('-cxxlib', )
diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py
index fdfc078b5e..5ba235adbb 100644
--- a/lib/spack/spack/compilers/nag.py
+++ b/lib/spack/spack/compilers/nag.py
@@ -61,19 +61,19 @@ class Nag(Compiler):
# options with '-Wl,-Wl,,'
@property
def f77_rpath_arg(self):
- return '-Wl,-Wl,,-rpath,'
+ return '-Wl,-Wl,,-rpath,,'
@property
def fc_rpath_arg(self):
- return '-Wl,-Wl,,-rpath,'
+ return '-Wl,-Wl,,-rpath,,'
@classmethod
def default_version(self, comp):
"""The '-V' option works for nag compilers.
- Output looks like this::
+ Output looks like this::
- NAG Fortran Compiler Release 6.0(Hibiya) Build 1037
- Product NPL6A60NA for x86-64 Linux
+ NAG Fortran Compiler Release 6.0(Hibiya) Build 1037
+ Product NPL6A60NA for x86-64 Linux
"""
return get_compiler_version(
comp, '-V', r'NAG Fortran Compiler Release ([0-9.]+)')
diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py
index 0e4be6e9ba..37ffe44028 100644
--- a/lib/spack/spack/compilers/pgi.py
+++ b/lib/spack/spack/compilers/pgi.py
@@ -58,11 +58,11 @@ class Pgi(Compiler):
@classmethod
def default_version(cls, comp):
"""The '-V' option works for all the PGI compilers.
- Output looks like this::
+ Output looks like this::
- pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge
- The Portland Group - PGI Compilers and Tools
- Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
+ pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge
+ The Portland Group - PGI Compilers and Tools
+ Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
"""
return get_compiler_version(
comp, '-V', r'pg[^ ]* ([^ ]+) \d\d\d?-bit target')
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 726dee62e3..dcea147814 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -33,6 +33,7 @@ or user preferences.
TODO: make this customizable and allow users to configure
concretization policies.
"""
+from __future__ import print_function
import spack
import spack.spec
import spack.compilers
@@ -42,6 +43,7 @@ from spack.version import *
from functools import partial
from itertools import chain
from spack.config import *
+import spack.preferred_packages
class DefaultConcretizer(object):
@@ -93,7 +95,11 @@ class DefaultConcretizer(object):
not b.external and b.external_module):
# We're choosing between different providers, so
# maintain order from provider sort
- return candidates.index(a) - candidates.index(b)
+ index_of_a = next(i for i in range(0, len(candidates))
+ if a.satisfies(candidates[i]))
+ index_of_b = next(i for i in range(0, len(candidates))
+ if b.satisfies(candidates[i]))
+ return index_of_a - index_of_b
result = cmp_specs(a, b)
if result != 0:
@@ -160,23 +166,59 @@ class DefaultConcretizer(object):
# If there are known available versions, return the most recent
# version that satisfies the spec
pkg = spec.package
- cmp_versions = partial(spack.pkgsort.version_compare, spec.name)
- valid_versions = sorted(
- [v for v in pkg.versions
- if any(v.satisfies(sv) for sv in spec.versions)],
- cmp=cmp_versions)
- def prefer_key(v):
- return pkg.versions.get(Version(v)).get('preferred', False)
- valid_versions.sort(key=prefer_key, reverse=True)
+ # ---------- Produce prioritized list of versions
+ # Get list of preferences from packages.yaml
+ preferred = spack.pkgsort
+ # NOTE: spack.pkgsort == spack.preferred_packages.PreferredPackages()
+
+ yaml_specs = [
+ x[0] for x in
+ preferred._spec_for_pkgname(spec.name, 'version', None)]
+ n = len(yaml_specs)
+ yaml_index = dict(
+ [(spc, n - index) for index, spc in enumerate(yaml_specs)])
+
+ # List of versions we could consider, in sorted order
+ unsorted_versions = [
+ v for v in pkg.versions
+ if any(v.satisfies(sv) for sv in spec.versions)]
+
+ # The keys below show the order of precedence of factors used
+ # to select a version when concretizing. The item with
+ # the "largest" key will be selected.
+ #
+ # NOTE: When COMPARING VERSIONS, the '@develop' version is always
+ # larger than other versions. BUT when CONCRETIZING,
+ # the largest NON-develop version is selected by
+ # default.
+ keys = [(
+ # ------- Special direction from the user
+ # Respect order listed in packages.yaml
+ yaml_index.get(v, -1),
+
+ # The preferred=True flag (packages or packages.yaml or both?)
+ pkg.versions.get(Version(v)).get('preferred', False),
+
+ # ------- Regular case: use latest non-develop version by default.
+ # Avoid @develop version, which would otherwise be the "largest"
+ # in straight version comparisons
+ not v.isdevelop(),
+
+ # Compare the version itself
+ # This includes the logic:
+ # a) develop > everything (disabled by "not v.isdevelop() above)
+ # b) numeric > non-numeric
+ # c) Numeric or string comparison
+ v) for v in unsorted_versions]
+ keys.sort(reverse=True)
+
+ # List of versions in complete sorted order
+ valid_versions = [x[-1] for x in keys]
+ # --------------------------
if valid_versions:
- # Disregard @develop and take the next valid version
- if ver(valid_versions[0]) == ver('develop') and \
- len(valid_versions) > 1:
- spec.versions = ver([valid_versions[1]])
- else:
- spec.versions = ver([valid_versions[0]])
+ spec.versions = ver([valid_versions[0]])
else:
# We don't know of any SAFE versions that match the given
# spec. Grab the spec's versions and grab the highest
@@ -255,7 +297,7 @@ class DefaultConcretizer(object):
spec.architecture = spack.architecture.Arch()
return True
- # Concretize the operating_system and target based of the spec
+ # Concretize the operating_system and target based of the spec
ret = any((self._concretize_platform(spec),
self._concretize_operating_system(spec),
self._concretize_target(spec)))
@@ -343,14 +385,15 @@ class DefaultConcretizer(object):
arch.platform_os)
# copy concrete version into other_compiler
- index = 0
- while not _proper_compiler_style(matches[index], spec.architecture):
- index += 1
- if index == len(matches) - 1:
- arch = spec.architecture
- raise UnavailableCompilerVersionError(spec.compiler,
- arch.platform_os)
- spec.compiler = matches[index].copy()
+ try:
+ spec.compiler = next(
+ c for c in matches
+ if _proper_compiler_style(c, spec.architecture)).copy()
+ except StopIteration:
+ raise UnavailableCompilerVersionError(
+ spec.compiler, spec.architecture.platform_os
+ )
+
assert(spec.compiler.concrete)
return True # things changed.
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index c90eff4229..989b3da169 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -24,99 +24,30 @@
##############################################################################
"""This module implements Spack's configuration file handling.
-Configuration file scopes
-===============================
-
-When Spack runs, it pulls configuration data from several config
-directories, each of which contains configuration files. In Spack,
-there are two configuration scopes:
-
- 1. ``site``: Spack loads site-wide configuration options from
- ``$(prefix)/etc/spack/``.
-
- 2. ``user``: Spack next loads per-user configuration options from
- ~/.spack/.
-
-Spack may read configuration files from both of these locations. When
-configurations conflict, the user config options take precedence over
-the site configurations. Each configuration directory may contain
-several configuration files, such as compilers.yaml or mirrors.yaml.
-
-Configuration file format
-===============================
-
-Configuration files are formatted using YAML syntax. This format is
-implemented by libyaml (included with Spack as an external module),
-and it's easy to read and versatile.
-
-Config files are structured as trees, like this ``compiler`` section::
-
- compilers:
- chaos_5_x86_64_ib:
- gcc@4.4.7:
- cc: /usr/bin/gcc
- cxx: /usr/bin/g++
- f77: /usr/bin/gfortran
- fc: /usr/bin/gfortran
- bgqos_0:
- xlc@12.1:
- cc: /usr/local/bin/mpixlc
- ...
-
-In this example, entries like ''compilers'' and ''xlc@12.1'' are used to
-categorize entries beneath them in the tree. At the root of the tree,
-entries like ''cc'' and ''cxx'' are specified as name/value pairs.
-
-``config.get_config()`` returns these trees as nested dicts, but it
-strips the first level off. So, ``config.get_config('compilers')``
-would return something like this for the above example:
-
- { 'chaos_5_x86_64_ib' :
- { 'gcc@4.4.7' :
- { 'cc' : '/usr/bin/gcc',
- 'cxx' : '/usr/bin/g++'
- 'f77' : '/usr/bin/gfortran'
- 'fc' : '/usr/bin/gfortran' }
- }
- { 'bgqos_0' :
- { 'cc' : '/usr/local/bin/mpixlc' } }
-
-Likewise, the ``mirrors.yaml`` file's first line must be ``mirrors:``,
-but ``get_config()`` strips that off too.
-
-Precedence
-===============================
-
-``config.py`` routines attempt to recursively merge configuration
-across scopes. So if there are ``compilers.py`` files in both the
-site scope and the user scope, ``get_config('compilers')`` will return
-merged dictionaries of *all* the compilers available. If a user
-compiler conflicts with a site compiler, Spack will overwrite the site
-configuration wtih the user configuration. If both the user and site
-``mirrors.yaml`` files contain lists of mirrors, then ``get_config()``
-will return a concatenated list of mirrors, with the user config items
-first.
-
-Sometimes, it is useful to *completely* override a site setting with a
-user one. To accomplish this, you can use *two* colons at the end of
-a key in a configuration file. For example, this:
-
- compilers::
- chaos_5_x86_64_ib:
- gcc@4.4.7:
- cc: /usr/bin/gcc
- cxx: /usr/bin/g++
- f77: /usr/bin/gfortran
- fc: /usr/bin/gfortran
- bgqos_0:
- xlc@12.1:
- cc: /usr/local/bin/mpixlc
- ...
-
-Will make Spack take compilers *only* from the user configuration, and
-the site configuration will be ignored.
+This implements Spack's configuration system, which handles merging
+multiple scopes with different levels of precedence. See the
+documentation on :ref:`configuration-scopes` for details on how Spack's
+configuration system behaves. The scopes are:
+
+ #. ``default``
+ #. ``site``
+ #. ``user``
+
+And corresponding :ref:`per-platform scopes <platform-scopes>`. Important
+functions in this module are:
+
+* :py:func:`get_config`
+* :py:func:`update_config`
+
+``get_config`` reads in YAML data for a particular scope and returns
+it. Callers can then modify the data and write it back with
+``update_config``.
+
+When read in, Spack validates configurations with jsonschemas. The
+schemas are in submodules of :py:mod:`spack.schema`.
"""
+
import copy
import os
import re
@@ -132,12 +63,13 @@ import llnl.util.tty as tty
from llnl.util.filesystem import mkdirp
import spack
+import spack.architecture
from spack.error import SpackError
import spack.schema
# Hacked yaml for configuration files preserves line numbers.
import spack.util.spack_yaml as syaml
-from spack.build_environment import get_path_from_module
+
"""Dict from section names -> schema for that section."""
section_schemas = {
@@ -145,8 +77,8 @@ section_schemas = {
'mirrors': spack.schema.mirrors.schema,
'repos': spack.schema.repos.schema,
'packages': spack.schema.packages.schema,
- 'targets': spack.schema.targets.schema,
'modules': spack.schema.modules.schema,
+ 'config': spack.schema.config.schema,
}
"""OrderedDict of config scopes keyed by name.
@@ -264,16 +196,33 @@ class ConfigScope(object):
"""Empty cached config information."""
self.sections = {}
+ def __repr__(self):
+ return '<ConfigScope: %s: %s>' % (self.name, self.path)
+
+#
+# Below are configuration scopes.
+#
+# Each scope can have per-platfom overrides in subdirectories of the
+# configuration directory.
+#
+_platform = spack.architecture.platform().name
+
"""Default configuration scope is the lowest-level scope. These are
versioned with Spack and can be overridden by sites or users."""
-ConfigScope('defaults', os.path.join(spack.etc_path, 'spack', 'defaults'))
+_defaults_path = os.path.join(spack.etc_path, 'spack', 'defaults')
+ConfigScope('defaults', _defaults_path)
+ConfigScope('defaults/%s' % _platform, os.path.join(_defaults_path, _platform))
"""Site configuration is per spack instance, for sites or projects.
No site-level configs should be checked into spack by default."""
-ConfigScope('site', os.path.join(spack.etc_path, 'spack'))
+_site_path = os.path.join(spack.etc_path, 'spack')
+ConfigScope('site', _site_path)
+ConfigScope('site/%s' % _platform, os.path.join(_site_path, _platform))
"""User configuration can override both spack defaults and site config."""
-ConfigScope('user', spack.user_config_path)
+_user_path = spack.user_config_path
+ConfigScope('user', _user_path)
+ConfigScope('user/%s' % _platform, os.path.join(_user_path, _platform))
def highest_precedence_scope():
@@ -317,7 +266,7 @@ def _read_config_file(filename, schema):
try:
tty.debug("Reading config file %s" % filename)
with open(filename) as f:
- data = syaml.load(f)
+ data = _mark_overrides(syaml.load(f))
if data:
validate_section(data, schema)
@@ -339,6 +288,34 @@ def clear_config_caches():
scope.clear()
+def override(string):
+ """Test if a spack YAML string is an override.
+
+ See ``spack_yaml`` for details. Keys in Spack YAML can end in `::`,
+ and if they do, their values completely replace lower-precedence
+ configs instead of merging into them.
+
+ """
+ return hasattr(string, 'override') and string.override
+
+
+def _mark_overrides(data):
+ if isinstance(data, list):
+ return [_mark_overrides(elt) for elt in data]
+
+ elif isinstance(data, dict):
+ marked = {}
+ for key, val in data.iteritems():
+ if isinstance(key, basestring) and key.endswith(':'):
+ key = syaml.syaml_str(key[:-1])
+ key.override = True
+ marked[key] = _mark_overrides(val)
+ return marked
+
+ else:
+ return data
+
+
def _merge_yaml(dest, source):
"""Merges source into dest; entries in source take precedence over dest.
@@ -371,9 +348,11 @@ def _merge_yaml(dest, source):
# Source dict is merged into dest.
elif they_are(dict):
for sk, sv in source.iteritems():
- if sk not in dest:
+ if override(sk) or sk not in dest:
+ # if sk ended with ::, or if it's new, completely override
dest[sk] = copy.copy(sv)
else:
+ # otherwise, merge the YAML
dest[sk] = _merge_yaml(dest[sk], source[sk])
return dest
@@ -385,7 +364,26 @@ def _merge_yaml(dest, source):
def get_config(section, scope=None):
"""Get configuration settings for a section.
- Strips off the top-level section name from the YAML dict.
+ If ``scope`` is ``None`` or not provided, return the merged contents
+ of all of Spack's configuration scopes. If ``scope`` is provided,
+ return only the confiugration as specified in that scope.
+
+ This off the top-level name from the YAML section. That is, for a
+ YAML config file that looks like this::
+
+ config:
+ install_tree: $spack/opt/spack
+ module_roots:
+ lmod: $spack/share/spack/lmod
+
+ ``get_config('config')`` will return::
+
+ { 'install_tree': '$spack/opt/spack',
+ 'module_roots: {
+ 'lmod': '$spack/share/spack/lmod'
+ }
+ }
+
"""
validate_section_name(section)
merged_section = syaml.syaml_dict()
@@ -403,18 +401,18 @@ def get_config(section, scope=None):
if not data or not isinstance(data, dict):
continue
- # Allow complete override of site config with '<section>::'
- override_key = section + ':'
- if not (section in data or override_key in data):
+ if section not in data:
tty.warn("Skipping bad configuration file: '%s'" % scope.path)
continue
- if override_key in data:
- merged_section = data[override_key]
- else:
- merged_section = _merge_yaml(merged_section, data[section])
+ merged_section = _merge_yaml(merged_section, data)
+
+ # no config files -- empty config.
+ if section not in merged_section:
+ return {}
- return merged_section
+ # take the top key off before returning.
+ return merged_section[section]
def get_config_filename(scope, section):
@@ -463,6 +461,9 @@ def print_section(section):
def spec_externals(spec):
"""Return a list of external specs (with external directory path filled in),
one for each known external installation."""
+ # break circular import.
+ from spack.build_environment import get_path_from_module
+
allpkgs = get_config('packages')
name = spec.name
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index f3dcdef0a9..e8902ec024 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -33,7 +33,7 @@ The database serves two purposes:
2. It will allow us to track external installations as well as lost
packages and their dependencies.
-Prior ot the implementation of this store, a direcotry layout served
+Prior to the implementation of this store, a directory layout served
as the authoritative database of packages in Spack. This module
provides a cache and a sanity checking mechanism for what is in the
filesystem.
@@ -42,18 +42,19 @@ filesystem.
import os
import socket
-import yaml
from yaml.error import MarkedYAMLError, YAMLError
import llnl.util.tty as tty
from llnl.util.filesystem import *
from llnl.util.lock import *
-import spack.spec
+import spack.store
+import spack.repository
+from spack.directory_layout import DirectoryLayoutError
from spack.version import Version
-from spack.spec import Spec
+import spack.spec
from spack.error import SpackError
-from spack.repository import UnknownPackageError
+import spack.util.spack_yaml as syaml
# DB goes in this directory underneath the root
@@ -65,6 +66,9 @@ _db_version = Version('0.9.2')
# Default timeout for spack database locks is 5 min.
_db_lock_timeout = 60
+# Types of dependencies tracked by the database
+_tracked_deps = 'nobuild'
+
def _autospec(function):
"""Decorator that automatically converts the argument of a single-arg
@@ -153,17 +157,20 @@ class Database(object):
self._index_path = join_path(self._db_dir, 'index.yaml')
self._lock_path = join_path(self._db_dir, 'lock')
+ # This is for other classes to use to lock prefix directories.
+ self.prefix_lock_path = join_path(self._db_dir, 'prefix_lock')
+
# Create needed directories and files
if not os.path.exists(self._db_dir):
mkdirp(self._db_dir)
- if not os.path.exists(self._lock_path):
- touch(self._lock_path)
-
# initialize rest of state.
self.lock = Lock(self._lock_path)
self._data = {}
+ # whether there was an error at the start of a read transaction
+ self._error = None
+
def write_transaction(self, timeout=_db_lock_timeout):
"""Get a write lock context manager for use in a `with` block."""
return WriteTransaction(self.lock, self._read, self._write, timeout)
@@ -194,11 +201,12 @@ class Database(object):
}
try:
- return yaml.dump(database, stream=stream, default_flow_style=False)
+ return syaml.dump(
+ database, stream=stream, default_flow_style=False)
except YAMLError as e:
raise SpackYAMLError("error writing YAML database:", str(e))
- def _read_spec_from_yaml(self, hash_key, installs, parent_key=None):
+ def _read_spec_from_yaml(self, hash_key, installs):
"""Recursively construct a spec from a hash in a YAML database.
Does not do any locking.
@@ -211,20 +219,27 @@ class Database(object):
spec_dict[name]['hash'] = hash_key
# Build spec from dict first.
- spec = Spec.from_node_dict(spec_dict)
+ spec = spack.spec.Spec.from_node_dict(spec_dict)
+ return spec
+ def _assign_dependencies(self, hash_key, installs, data):
# Add dependencies from other records in the install DB to
# form a full spec.
+ spec = data[hash_key].spec
+ spec_dict = installs[hash_key]['spec']
+
if 'dependencies' in spec_dict[spec.name]:
yaml_deps = spec_dict[spec.name]['dependencies']
- for dname, dhash, dtypes in Spec.read_yaml_dep_specs(yaml_deps):
- child = self._read_spec_from_yaml(dhash, installs, hash_key)
- spec._add_dependency(child, dtypes)
+ for dname, dhash, dtypes in spack.spec.Spec.read_yaml_dep_specs(
+ yaml_deps):
+ if dhash not in data:
+ tty.warn("Missing dependency not in database: ",
+ "%s needs %s-%s" % (
+ spec.format('$_$#'), dname, dhash[:7]))
+ continue
- # Specs from the database need to be marked concrete because
- # they represent actual installations.
- spec._mark_concrete()
- return spec
+ child = data[dhash].spec
+ spec._add_dependency(child, dtypes)
def _read_from_yaml(self, stream):
"""
@@ -236,9 +251,9 @@ class Database(object):
try:
if isinstance(stream, basestring):
with open(stream, 'r') as f:
- yfile = yaml.load(f)
+ yfile = syaml.load(f)
else:
- yfile = yaml.load(stream)
+ yfile = syaml.load(stream)
except MarkedYAMLError as e:
raise SpackYAMLError("error parsing YAML database:", str(e))
@@ -248,7 +263,8 @@ class Database(object):
def check(cond, msg):
if not cond:
- raise CorruptDatabaseError(self._index_path, msg)
+ raise CorruptDatabaseError(
+ "Spack database is corrupt: %s" % msg, self._index_path)
check('database' in yfile, "No 'database' attribute in YAML.")
@@ -264,25 +280,31 @@ class Database(object):
if version > _db_version:
raise InvalidDatabaseVersionError(_db_version, version)
elif version < _db_version:
- self.reindex(spack.install_layout)
+ self.reindex(spack.store.layout)
installs = dict((k, v.to_dict()) for k, v in self._data.items())
- # Iterate through database and check each record.
+ def invalid_record(hash_key, error):
+ msg = ("Invalid record in Spack database: "
+ "hash: %s, cause: %s: %s")
+ msg %= (hash_key, type(e).__name__, str(e))
+ raise CorruptDatabaseError(msg, self._index_path)
+
+ # Build up the database in three passes:
+ #
+ # 1. Read in all specs without dependencies.
+ # 2. Hook dependencies up among specs.
+ # 3. Mark all specs concrete.
+ #
+ # The database is built up so that ALL specs in it share nodes
+ # (i.e., its specs are a true Merkle DAG, unlike most specs.)
+
+ # Pass 1: Iterate through database and build specs w/o dependencies
data = {}
for hash_key, rec in installs.items():
try:
# This constructs a spec DAG from the list of all installs
spec = self._read_spec_from_yaml(hash_key, installs)
- # Validate the spec by ensuring the stored and actual
- # hashes are the same.
- spec_hash = spec.dag_hash()
- if not spec_hash == hash_key:
- tty.warn(
- "Hash mismatch in database: %s -> spec with hash %s" %
- (hash_key, spec_hash))
- continue # TODO: is skipping the right thing to do?
-
# Insert the brand new spec in the database. Each
# spec has its own copies of its dependency specs.
# TODO: would a more immmutable spec implementation simplify
@@ -290,34 +312,66 @@ class Database(object):
data[hash_key] = InstallRecord.from_dict(spec, rec)
except Exception as e:
- tty.warn("Invalid database reecord:",
- "file: %s" % self._index_path,
- "hash: %s" % hash_key,
- "cause: %s: %s" % (type(e).__name__, str(e)))
- raise
+ invalid_record(hash_key, e)
+
+ # Pass 2: Assign dependencies once all specs are created.
+ for hash_key in data:
+ try:
+ self._assign_dependencies(hash_key, installs, data)
+ except Exception as e:
+ invalid_record(hash_key, e)
+
+ # Pass 3: Mark all specs concrete. Specs representing real
+ # installations must be explicitly marked.
+ # We do this *after* all dependencies are connected because if we
+ # do it *while* we're constructing specs,it causes hashes to be
+ # cached prematurely.
+ for hash_key, rec in data.items():
+ rec.spec._mark_concrete()
self._data = data
def reindex(self, directory_layout):
- """Build database index from scratch based from a directory layout.
+ """Build database index from scratch based on a directory layout.
Locks the DB if it isn't locked already.
"""
- with self.write_transaction():
+ # Special transaction to avoid recursive reindex calls and to
+ # ignore errors if we need to rebuild a corrupt database.
+ def _read_suppress_error():
+ try:
+ if os.path.isfile(self._index_path):
+ self._read_from_yaml(self._index_path)
+ except CorruptDatabaseError as e:
+ self._error = e
+ self._data = {}
+
+ transaction = WriteTransaction(
+ self.lock, _read_suppress_error, self._write, _db_lock_timeout)
+
+ with transaction:
+ if self._error:
+ tty.warn(
+ "Spack database was corrupt. Will rebuild. Error was:",
+ str(self._error))
+ self._error = None
+
old_data = self._data
try:
self._data = {}
# Ask the directory layout to traverse the filesystem.
for spec in directory_layout.all_specs():
- # Create a spec for each known package and add it.
- path = directory_layout.path_for_spec(spec)
- old_info = old_data.get(spec.dag_hash())
+ # Try to recover explicit value from old DB, but
+ # default it to False if DB was corrupt.
explicit = False
- if old_info is not None:
- explicit = old_info.explicit
- self._add(spec, path, directory_layout, explicit=explicit)
+ if old_data is not None:
+ old_info = old_data.get(spec.dag_hash())
+ if old_info is not None:
+ explicit = old_info.explicit
+
+ self._add(spec, directory_layout, explicit=explicit)
self._check_ref_counts()
@@ -336,10 +390,7 @@ class Database(object):
counts = {}
for key, rec in self._data.items():
counts.setdefault(key, 0)
- # XXX(deptype): This checks all dependencies, but build
- # dependencies might be able to be dropped in the
- # future.
- for dep in rec.spec.dependencies():
+ for dep in rec.spec.dependencies(_tracked_deps):
dep_key = dep.dag_hash()
counts.setdefault(dep_key, 0)
counts[dep_key] += 1
@@ -395,54 +446,64 @@ class Database(object):
else:
# The file doesn't exist, try to traverse the directory.
# reindex() takes its own write lock, so no lock here.
- self.reindex(spack.install_layout)
+ self.reindex(spack.store.layout)
- def _add(self, spec, path, directory_layout=None, explicit=False):
- """Add an install record for spec at path to the database.
+ def _add(self, spec, directory_layout=None, explicit=False):
+ """Add an install record for this spec to the database.
- This assumes that the spec is not already installed. It
- updates the ref counts on dependencies of the spec in the DB.
+ Assumes spec is installed in ``layout.path_for_spec(spec)``.
- This operation is in-memory, and does not lock the DB.
+ Also ensures dependencies are present and updated in the DB as
+ either intsalled or missing.
"""
- key = spec.dag_hash()
- if key in self._data:
- rec = self._data[key]
- rec.installed = True
-
- # TODO: this overwrites a previous install path (when path !=
- # self._data[key].path), and the old path still has a
- # dependent in the DB. We could consider re-RPATH-ing the
- # dependents. This case is probably infrequent and may not be
- # worth fixing, but this is where we can discover it.
- rec.path = path
+ if not spec.concrete:
+ raise NonConcreteSpecAddError(
+ "Specs added to DB must be concrete.")
- else:
- self._data[key] = InstallRecord(spec, path, True,
- explicit=explicit)
- for dep in spec.dependencies(('link', 'run')):
- self._increment_ref_count(dep, directory_layout)
+ for dep in spec.dependencies(_tracked_deps):
+ dkey = dep.dag_hash()
+ if dkey not in self._data:
+ self._add(dep, directory_layout, explicit=False)
- def _increment_ref_count(self, spec, directory_layout=None):
- """Recursively examine dependencies and update their DB entries."""
key = spec.dag_hash()
if key not in self._data:
installed = False
path = None
- if directory_layout:
+ if not spec.external and directory_layout:
path = directory_layout.path_for_spec(spec)
- installed = os.path.isdir(path)
+ try:
+ directory_layout.check_installed(spec)
+ installed = True
+ except DirectoryLayoutError as e:
+ tty.warn(
+ 'Dependency missing due to corrupt install directory:',
+ path, str(e))
- self._data[key] = InstallRecord(spec.copy(), path, installed)
+ # Create a new install record with no deps initially.
+ new_spec = spec.copy(deps=False)
+ self._data[key] = InstallRecord(
+ new_spec, path, installed, ref_count=0, explicit=explicit)
- for dep in spec.dependencies('link'):
- self._increment_ref_count(dep)
+ # Connect dependencies from the DB to the new copy.
+ for name, dep in spec.dependencies_dict(_tracked_deps).iteritems():
+ dkey = dep.spec.dag_hash()
+ new_spec._add_dependency(self._data[dkey].spec, dep.deptypes)
+ self._data[dkey].ref_count += 1
- self._data[key].ref_count += 1
+ # Mark concrete once everything is built, and preserve
+ # the original hash of concrete specs.
+ new_spec._mark_concrete()
+ new_spec._hash = key
+
+ else:
+ # If it is already there, mark it as installed.
+ self._data[key].installed = True
+
+ self._data[key].explicit = explicit
@_autospec
- def add(self, spec, path, explicit=False):
+ def add(self, spec, directory_layout, explicit=False):
"""Add spec at path to database, locking and reading DB to sync.
``add()`` will lock and read from the DB on disk.
@@ -451,7 +512,7 @@ class Database(object):
# TODO: ensure that spec is concrete?
# Entire add is transactional.
with self.write_transaction():
- self._add(spec, path, explicit=explicit)
+ self._add(spec, directory_layout, explicit=explicit)
def _get_matching_spec_key(self, spec, **kwargs):
"""Get the exact spec OR get a single spec that matches."""
@@ -481,7 +542,7 @@ class Database(object):
if rec.ref_count == 0 and not rec.installed:
del self._data[key]
- for dep in spec.dependencies('link'):
+ for dep in spec.dependencies(_tracked_deps):
self._decrement_ref_count(dep)
def _remove(self, spec):
@@ -495,7 +556,7 @@ class Database(object):
return rec.spec
del self._data[key]
- for dep in rec.spec.dependencies('link'):
+ for dep in rec.spec.dependencies(_tracked_deps):
self._decrement_ref_count(dep)
# Returns the concrete spec so we know it in the case where a
@@ -528,7 +589,7 @@ class Database(object):
try:
if s.package.extends(extendee_spec):
yield s.package
- except UnknownPackageError:
+ except spack.repository.UnknownPackageError:
continue
# skips unknown packages
# TODO: conditional way to do this instead of catching exceptions
@@ -601,11 +662,11 @@ class Database(object):
class CorruptDatabaseError(SpackError):
+ """Raised when errors are found while reading the database."""
+
- def __init__(self, path, msg=''):
- super(CorruptDatabaseError, self).__init__(
- "Spack database is corrupt: %s. %s." % (path, msg),
- "Try running `spack reindex` to fix.")
+class NonConcreteSpecAddError(SpackError):
+ """Raised when attemptint to add non-concrete spec to DB."""
class InvalidDatabaseVersionError(SpackError):
diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py
index 313bf48f0d..9cf00334a8 100644
--- a/lib/spack/spack/directives.py
+++ b/lib/spack/spack/directives.py
@@ -212,7 +212,10 @@ def _depends_on(pkg, spec, when=None, type=None):
@directive(('dependencies', '_deptypes'))
def depends_on(pkg, spec, when=None, type=None):
- """Creates a dict of deps with specs defining when they apply."""
+ """Creates a dict of deps with specs defining when they apply.
+ This directive is to be used inside a Package definition to declare
+ that the package requires other packages to be built first.
+ @see The section "Dependency specs" in the Spack Packaging Guide."""
_depends_on(pkg, spec, when=when, type=type)
@@ -256,7 +259,7 @@ def provides(pkg, *specs, **kwargs):
@directive('patches')
-def patch(pkg, url_or_filename, level=1, when=None):
+def patch(pkg, url_or_filename, level=1, when=None, **kwargs):
"""Packages can declare patches to apply to source. You can
optionally provide a when spec to indicate that a particular
patch should only be applied when the package's spec meets
@@ -268,7 +271,7 @@ def patch(pkg, url_or_filename, level=1, when=None):
cur_patches = pkg.patches.setdefault(when_spec, [])
# if this spec is identical to some other, then append this
# patch to the existing list.
- cur_patches.append(Patch(pkg, url_or_filename, level))
+ cur_patches.append(Patch.create(pkg, url_or_filename, level, **kwargs))
@directive('variants')
@@ -288,21 +291,20 @@ def variant(pkg, name, default=False, description=""):
@directive('resources')
def resource(pkg, **kwargs):
- """
- Define an external resource to be fetched and staged when building the
+ """Define an external resource to be fetched and staged when building the
package. Based on the keywords present in the dictionary the appropriate
FetchStrategy will be used for the resource. Resources are fetched and
- staged in their own folder inside spack stage area, and then linked into
+ staged in their own folder inside spack stage area, and then moved into
the stage area of the package that needs them.
List of recognized keywords:
* 'when' : (optional) represents the condition upon which the resource is
- needed
- * 'destination' : (optional) path where to link the resource. This path
- must be relative to the main package stage area.
+ needed
+ * 'destination' : (optional) path where to move the resource. This path
+ must be relative to the main package stage area.
* 'placement' : (optional) gives the possibility to fine tune how the
- resource is linked into the main package stage area.
+ resource is moved into the main package stage area.
"""
when = kwargs.get('when', pkg.name)
destination = kwargs.get('destination', "")
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index 0ae6f765f4..28e6584fb2 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -32,7 +32,7 @@ import yaml
from llnl.util.filesystem import join_path, mkdirp
import spack
-from spack.spec import Spec
+import spack.spec
from spack.error import SpackError
@@ -210,7 +210,7 @@ class YamlDirectoryLayout(DirectoryLayout):
"""Read the contents of a file and parse them as a spec"""
try:
with open(path) as f:
- spec = Spec.from_yaml(f)
+ spec = spack.spec.Spec.from_yaml(f)
except Exception as e:
if spack.debug:
raise
@@ -268,6 +268,13 @@ class YamlDirectoryLayout(DirectoryLayout):
if installed_spec == spec:
return path
+ # DAG hashes currently do not include build dependencies.
+ #
+ # TODO: remove this when we do better concretization and don't
+ # ignore build-only deps in hashes.
+ elif installed_spec == spec.copy(deps=('link', 'run')):
+ return path
+
if spec.dag_hash() == installed_spec.dag_hash():
raise SpecHashCollisionError(spec, installed_spec)
else:
@@ -416,7 +423,7 @@ class RemoveFailedError(DirectoryLayoutError):
def __init__(self, installed_spec, prefix, error):
super(RemoveFailedError, self).__init__(
'Could not remove prefix %s for %s : %s'
- % prefix, installed_spec.short_spec, error)
+ % (prefix, installed_spec.short_spec, error))
self.cause = error
diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py
index 613ece2f45..de30a9c7be 100644
--- a/lib/spack/spack/environment.py
+++ b/lib/spack/spack/environment.py
@@ -261,21 +261,22 @@ class EnvironmentModifications(object):
@staticmethod
def from_sourcing_files(*args, **kwargs):
- """
- Creates an instance of EnvironmentModifications that, if executed,
+ """Creates an instance of EnvironmentModifications that, if executed,
has the same effect on the environment as sourcing the files passed as
parameters
- Args:
- *args: list of files to be sourced
-
- Returns:
- instance of EnvironmentModifications
+ :param \*args: list of files to be sourced
+ :rtype: instance of EnvironmentModifications
"""
+
env = EnvironmentModifications()
# Check if the files are actually there
- if not all(os.path.isfile(file) for file in args):
- raise RuntimeError('trying to source non-existing files')
+ files = [line.split(' ')[0] for line in args]
+ non_existing = [file for file in files if not os.path.isfile(file)]
+ if non_existing:
+ message = 'trying to source non-existing files\n'
+ message += '\n'.join(non_existing)
+ raise RuntimeError(message)
# Relevant kwd parameters and formats
info = dict(kwargs)
info.setdefault('shell', '/bin/bash')
diff --git a/lib/spack/spack/error.py b/lib/spack/spack/error.py
index c94875e91a..b6261a05f4 100644
--- a/lib/spack/spack/error.py
+++ b/lib/spack/spack/error.py
@@ -26,6 +26,7 @@ import os
import sys
import llnl.util.tty as tty
import spack
+import inspect
class SpackError(Exception):
@@ -38,19 +39,31 @@ class SpackError(Exception):
self.message = message
self._long_message = long_message
+ # for exceptions raised from child build processes, we save the
+ # traceback as a string and print it in the parent.
+ self.traceback = None
+
@property
def long_message(self):
return self._long_message
def die(self):
+ # basic debug message
+ tty.error(self.message)
+ if self.long_message:
+ print(self.long_message)
+
+ # stack trace, etc. in debug mode.
if spack.debug:
- sys.excepthook(*sys.exc_info())
- os._exit(1)
- else:
- tty.error(self.message)
- if self.long_message:
- print self.long_message
- os._exit(1)
+ if self.traceback:
+ # exception came from a build child, already got
+ # traceback in child, so print it.
+ sys.stderr.write(self.traceback)
+ else:
+ # run parent exception hook.
+ sys.excepthook(*sys.exc_info())
+
+ os._exit(1)
def __str__(self):
msg = self.message
@@ -58,6 +71,16 @@ class SpackError(Exception):
msg += "\n %s" % self._long_message
return msg
+ def __repr__(self):
+ args = [repr(self.message), repr(self.long_message)]
+ args = ','.join(args)
+ qualified_name = inspect.getmodule(
+ self).__name__ + '.' + type(self).__name__
+ return qualified_name + '(' + args + ')'
+
+ def __reduce__(self):
+ return type(self), (self.message, self.long_message)
+
class UnsupportedPlatformError(SpackError):
"""Raised by packages when a platform is not supported"""
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index c69a23033c..5084a68e08 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -116,6 +116,14 @@ class FetchStrategy(object):
def archive(self, destination):
pass # Used to create tarball for mirror.
+ @property
+ def cachable(self):
+ """Return whether the fetcher is capable of caching the
+ resource it retrieves. This generally is determined by
+ whether the resource is identifiably associated with a
+ specific package version."""
+ pass
+
def __str__(self): # Should be human readable URL.
return "FetchStrategy.__str___"
@@ -158,10 +166,20 @@ class URLFetchStrategy(FetchStrategy):
self.digest = digest
self.expand_archive = kwargs.get('expand', True)
+ self.extra_curl_options = kwargs.get('curl_options', [])
+ self._curl = None
+
+ self.extension = kwargs.get('extension', None)
if not self.url:
raise ValueError("URLFetchStrategy requires a url for fetching.")
+ @property
+ def curl(self):
+ if not self._curl:
+ self._curl = which('curl', required=True)
+ return self._curl
+
@_needs_stage
def fetch(self):
self.stage.chdir()
@@ -170,14 +188,13 @@ class URLFetchStrategy(FetchStrategy):
tty.msg("Already downloaded %s" % self.archive_file)
return
- possible_files = self.stage.expected_archive_files
save_file = None
partial_file = None
- if possible_files:
- save_file = self.stage.expected_archive_files[0]
- partial_file = self.stage.expected_archive_files[0] + '.part'
+ if self.stage.save_filename:
+ save_file = self.stage.save_filename
+ partial_file = self.stage.save_filename + '.part'
- tty.msg("Trying to fetch from %s" % self.url)
+ tty.msg("Fetching %s" % self.url)
if partial_file:
save_args = ['-C',
@@ -195,15 +212,21 @@ class URLFetchStrategy(FetchStrategy):
self.url,
]
+ if spack.insecure:
+ curl_args.append('-k')
+
if sys.stdout.isatty():
curl_args.append('-#') # status bar when using a tty
else:
curl_args.append('-sS') # just errors when not.
+ curl_args += self.extra_curl_options
+
# Run curl but grab the mime type from the http headers
- headers = spack.curl(*curl_args, output=str, fail_on_error=False)
+ curl = self.curl
+ headers = curl(*curl_args, output=str, fail_on_error=False)
- if spack.curl.returncode != 0:
+ if curl.returncode != 0:
# clean up archive on failure.
if self.archive_file:
os.remove(self.archive_file)
@@ -211,12 +234,12 @@ class URLFetchStrategy(FetchStrategy):
if partial_file and os.path.exists(partial_file):
os.remove(partial_file)
- if spack.curl.returncode == 22:
+ if curl.returncode == 22:
# This is a 404. Curl will print the error.
raise FailedDownloadError(
self.url, "URL %s was not found!" % self.url)
- elif spack.curl.returncode == 60:
+ elif curl.returncode == 60:
# This is a certificate error. Suggest spack -k
raise FailedDownloadError(
self.url,
@@ -232,7 +255,7 @@ class URLFetchStrategy(FetchStrategy):
# error, but print a spack message too
raise FailedDownloadError(
self.url,
- "Curl failed with error %d" % spack.curl.returncode)
+ "Curl failed with error %d" % curl.returncode)
# Check if we somehow got an HTML file rather than the archive we
# asked for. We only look at the last content type, to handle
@@ -257,6 +280,10 @@ class URLFetchStrategy(FetchStrategy):
"""Path to the source archive within this stage directory."""
return self.stage.archive_file
+ @property
+ def cachable(self):
+ return bool(self.digest)
+
@_needs_stage
def expand(self):
if not self.expand_archive:
@@ -268,10 +295,12 @@ class URLFetchStrategy(FetchStrategy):
self.stage.chdir()
if not self.archive_file:
raise NoArchiveFileError(
- "URLFetchStrategy couldn't find archive file",
+ "Couldn't find archive file",
"Failed on expand() for URL %s" % self.url)
- decompress = decompressor_for(self.archive_file)
+ if not self.extension:
+ self.extension = extension(self.archive_file)
+ decompress = decompressor_for(self.archive_file, self.extension)
# Expand all tarballs in their own directory to contain
# exploding tarballs.
@@ -298,7 +327,8 @@ class URLFetchStrategy(FetchStrategy):
shutil.move(os.path.join(tarball_container, f),
os.path.join(self.stage.path, f))
os.rmdir(tarball_container)
-
+ if not files:
+ os.rmdir(tarball_container)
# Set the wd back to the stage when done.
self.stage.chdir()
@@ -307,7 +337,7 @@ class URLFetchStrategy(FetchStrategy):
if not self.archive_file:
raise NoArchiveFileError("Cannot call archive() before fetching.")
- shutil.copy(self.archive_file, destination)
+ shutil.copyfile(self.archive_file, destination)
@_needs_stage
def check(self):
@@ -362,16 +392,34 @@ class CacheURLFetchStrategy(URLFetchStrategy):
@_needs_stage
def fetch(self):
- super(CacheURLFetchStrategy, self).fetch()
+ path = re.sub('^file://', '', self.url)
+
+ # check whether the cache file exists.
+ if not os.path.isfile(path):
+ raise NoCacheError('No cache of %s' % path)
+
+ self.stage.chdir()
+
+ # remove old symlink if one is there.
+ filename = self.stage.save_filename
+ if os.path.exists(filename):
+ os.remove(filename)
+
+ # Symlink to local cached archive.
+ os.symlink(path, filename)
+
+ # Remove link if checksum fails, or subsequent fetchers
+ # will assume they don't need to download.
if self.digest:
try:
self.check()
except ChecksumError:
- # Future fetchers will assume they don't need to
- # download if the file remains
os.remove(self.archive_file)
raise
+ # Notify the user how we fetched.
+ tty.msg('Using cached archive: %s' % path)
+
class VCSFetchStrategy(FetchStrategy):
@@ -529,8 +577,18 @@ class GitFetchStrategy(VCSFetchStrategy):
def git(self):
if not self._git:
self._git = which('git', required=True)
+
+ # If the user asked for insecure fetching, make that work
+ # with git as well.
+ if spack.insecure:
+ self._git.add_default_env('GIT_SSL_NO_VERIFY', 'true')
+
return self._git
+ @property
+ def cachable(self):
+ return bool(self.commit or self.tag)
+
@_needs_stage
def fetch(self):
self.stage.chdir()
@@ -647,6 +705,10 @@ class SvnFetchStrategy(VCSFetchStrategy):
self._svn = which('svn', required=True)
return self._svn
+ @property
+ def cachable(self):
+ return bool(self.revision)
+
@_needs_stage
def fetch(self):
self.stage.chdir()
@@ -730,6 +792,10 @@ class HgFetchStrategy(VCSFetchStrategy):
self._hg = which('hg', required=True)
return self._hg
+ @property
+ def cachable(self):
+ return bool(self.revision)
+
@_needs_stage
def fetch(self):
self.stage.chdir()
@@ -836,46 +902,59 @@ def for_package_version(pkg, version):
raise InvalidArgsError(pkg, version)
+def from_list_url(pkg):
+ """If a package provides a URL which lists URLs for resources by
+ version, this can can create a fetcher for a URL discovered for
+ the specified package's version."""
+ if pkg.list_url:
+ try:
+ versions = pkg.fetch_remote_versions()
+ try:
+ url_from_list = versions[pkg.version]
+ return URLFetchStrategy(url=url_from_list, digest=None)
+ except KeyError:
+ tty.msg("Can not find version %s in url_list" %
+ self.version)
+ except:
+ tty.msg("Could not determine url from list_url.")
+
+
class FsCache(object):
def __init__(self, root):
self.root = os.path.abspath(root)
def store(self, fetcher, relativeDst):
- unique = False
- uidGroups = [['tag', 'commit'], ['digest'], ['revision']]
- for grp in uidGroups:
- try:
- unique |= any(getattr(fetcher, x) for x in grp)
- except AttributeError:
- pass
- if unique:
- break
- if not unique:
+ # skip fetchers that aren't cachable
+ if not fetcher.cachable:
+ return
+
+ # Don't store things that are already cached.
+ if isinstance(fetcher, CacheURLFetchStrategy):
return
dst = join_path(self.root, relativeDst)
mkdirp(os.path.dirname(dst))
fetcher.archive(dst)
- def fetcher(self, targetPath, digest):
- url = "file://" + join_path(self.root, targetPath)
- return CacheURLFetchStrategy(url, digest)
+ def fetcher(self, targetPath, digest, **kwargs):
+ path = join_path(self.root, targetPath)
+ return CacheURLFetchStrategy(path, digest, **kwargs)
def destroy(self):
shutil.rmtree(self.root, ignore_errors=True)
class FetchError(spack.error.SpackError):
+ """Superclass fo fetcher errors."""
- def __init__(self, msg, long_msg=None):
- super(FetchError, self).__init__(msg, long_msg)
+class NoCacheError(FetchError):
+ """Raised when there is no cached archive for a package."""
-class FailedDownloadError(FetchError):
+class FailedDownloadError(FetchError):
"""Raised wen a download fails."""
-
def __init__(self, url, msg=""):
super(FailedDownloadError, self).__init__(
"Failed to fetch file from URL: %s" % url, msg)
@@ -883,19 +962,14 @@ class FailedDownloadError(FetchError):
class NoArchiveFileError(FetchError):
-
- def __init__(self, msg, long_msg):
- super(NoArchiveFileError, self).__init__(msg, long_msg)
+ """"Raised when an archive file is expected but none exists."""
class NoDigestError(FetchError):
-
- def __init__(self, msg, long_msg=None):
- super(NoDigestError, self).__init__(msg, long_msg)
+ """Raised after attempt to checksum when URL has no digest."""
class InvalidArgsError(FetchError):
-
def __init__(self, pkg, version):
msg = ("Could not construct a fetch strategy for package %s at "
"version %s")
@@ -904,17 +978,11 @@ class InvalidArgsError(FetchError):
class ChecksumError(FetchError):
-
"""Raised when archive fails to checksum."""
- def __init__(self, message, long_msg=None):
- super(ChecksumError, self).__init__(message, long_msg)
-
class NoStageError(FetchError):
-
"""Raised when fetch operations are called before set_stage()."""
-
def __init__(self, method):
super(NoStageError, self).__init__(
"Must call FetchStrategy.set_stage() before calling %s" %
diff --git a/lib/spack/spack/file_cache.py b/lib/spack/spack/file_cache.py
index 0a66166fd8..e37f77d68d 100644
--- a/lib/spack/spack/file_cache.py
+++ b/lib/spack/spack/file_cache.py
@@ -77,10 +77,7 @@ class FileCache(object):
def _get_lock(self, key):
"""Create a lock for a key, if necessary, and return a lock object."""
if key not in self._locks:
- lock_file = self._lock_path(key)
- if not os.path.exists(lock_file):
- touch(lock_file)
- self._locks[key] = Lock(lock_file)
+ self._locks[key] = Lock(self._lock_path(key))
return self._locks[key]
def init_entry(self, key):
@@ -116,7 +113,7 @@ class FileCache(object):
Returns a ReadTransaction context manager and opens the cache file for
reading. You can use it like this:
- with spack.user_cache.read_transaction(key) as cache_file:
+ with file_cache_object.read_transaction(key) as cache_file:
cache_file.read()
"""
diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py
index b875e9da99..9753741c61 100644
--- a/lib/spack/spack/graph.py
+++ b/lib/spack/spack/graph.py
@@ -67,22 +67,20 @@ from heapq import *
from llnl.util.lang import *
from llnl.util.tty.color import *
-import spack
-from spack.spec import Spec
+from spack.spec import *
__all__ = ['topological_sort', 'graph_ascii', 'AsciiGraph', 'graph_dot']
-def topological_sort(spec, **kwargs):
+def topological_sort(spec, reverse=False, deptype=None):
"""Topological sort for specs.
Return a list of dependency specs sorted topologically. The spec
argument is not modified in the process.
"""
- reverse = kwargs.get('reverse', False)
- # XXX(deptype): iterate over a certain kind of dependency. Maybe color
- # edges based on the type of dependency?
+ deptype = canonical_deptype(deptype)
+
if not reverse:
parents = lambda s: s.dependents()
children = lambda s: s.dependencies()
@@ -91,7 +89,7 @@ def topological_sort(spec, **kwargs):
children = lambda s: s.dependents()
# Work on a copy so this is nondestructive.
- spec = spec.copy()
+ spec = spec.copy(deps=deptype)
nodes = spec.index()
topo_order = []
@@ -129,7 +127,7 @@ def find(seq, predicate):
return -1
-# Names of different graph line states. We Record previous line
+# Names of different graph line states. We record previous line
# states so that we can easily determine what to do when connecting.
states = ('node', 'collapse', 'merge-right', 'expand-right', 'back-edge')
NODE, COLLAPSE, MERGE_RIGHT, EXPAND_RIGHT, BACK_EDGE = states
@@ -143,6 +141,7 @@ class AsciiGraph(object):
self.node_character = '*'
self.debug = False
self.indent = 0
+ self.deptype = alldeps
# These are colors in the order they'll be used for edges.
# See llnl.util.tty.color for details on color characters.
@@ -162,6 +161,9 @@ class AsciiGraph(object):
def _write_edge(self, string, index, sub=0):
"""Write a colored edge to the output stream."""
+ # Ignore empty frontier entries (they're just collapsed)
+ if not self._frontier[index]:
+ return
name = self._frontier[index][sub]
edge = "@%s{%s}" % (self._name_to_color[name], string)
self._out.write(edge)
@@ -386,7 +388,7 @@ class AsciiGraph(object):
self._out = ColorStream(sys.stdout, color=color)
# We'll traverse the spec in topo order as we graph it.
- topo_order = topological_sort(spec, reverse=True)
+ topo_order = topological_sort(spec, reverse=True, deptype=self.deptype)
# Work on a copy to be nondestructive
spec = spec.copy()
@@ -420,20 +422,26 @@ class AsciiGraph(object):
if back:
back.sort()
prev_ends = []
+ collapse_l1 = False
for j, (b, d) in enumerate(back):
self._frontier[i].remove(d)
if i - b > 1:
- self._back_edge_line(prev_ends, b, i, False,
- 'left-1')
+ collapse_l1 = any(not e for e in self._frontier)
+ self._back_edge_line(
+ prev_ends, b, i, collapse_l1, 'left-1')
del prev_ends[:]
prev_ends.append(b)
# Check whether we did ALL the deps as back edges,
# in which case we're done.
- collapse = not self._frontier[i]
- if collapse:
+ pop = not self._frontier[i]
+ collapse_l2 = pop
+ if collapse_l1:
+ collapse_l2 = False
+ if pop:
self._frontier.pop(i)
- self._back_edge_line(prev_ends, -1, -1, collapse, 'left-2')
+ self._back_edge_line(
+ prev_ends, -1, -1, collapse_l2, 'left-2')
elif len(self._frontier[i]) > 1:
# Expand forward after doing all back connections
@@ -476,32 +484,28 @@ class AsciiGraph(object):
# Replace node with its dependencies
self._frontier.pop(i)
- if node.dependencies():
- deps = sorted((d.name for d in node.dependencies()),
- reverse=True)
+ deps = node.dependencies(self.deptype)
+ if deps:
+ deps = sorted((d.name for d in deps), reverse=True)
self._connect_deps(i, deps, "new-deps") # anywhere.
elif self._frontier:
self._collapse_line(i)
-def graph_ascii(spec, **kwargs):
- node_character = kwargs.get('node', 'o')
- out = kwargs.pop('out', None)
- debug = kwargs.pop('debug', False)
- indent = kwargs.pop('indent', 0)
- color = kwargs.pop('color', None)
- check_kwargs(kwargs, graph_ascii)
-
+def graph_ascii(spec, node='o', out=None, debug=False,
+ indent=0, color=None, deptype=None):
graph = AsciiGraph()
graph.debug = debug
graph.indent = indent
- graph.node_character = node_character
+ graph.node_character = node
+ if deptype:
+ graph.deptype = canonical_deptype(deptype)
graph.write(spec, color=color, out=out)
-def graph_dot(*specs, **kwargs):
+def graph_dot(specs, deptype=None, static=False, out=None):
"""Generate a graph in dot format of all provided specs.
Print out a dot formatted graph of all the dependencies between
@@ -510,42 +514,73 @@ def graph_dot(*specs, **kwargs):
spack graph --dot qt | dot -Tpdf > spack-graph.pdf
"""
- out = kwargs.pop('out', sys.stdout)
- check_kwargs(kwargs, graph_dot)
+ if out is None:
+ out = sys.stdout
+
+ if deptype is None:
+ deptype = alldeps
out.write('digraph G {\n')
- out.write(' label = "Spack Dependencies"\n')
out.write(' labelloc = "b"\n')
- out.write(' rankdir = "LR"\n')
+ out.write(' rankdir = "TB"\n')
out.write(' ranksep = "5"\n')
+ out.write('node[\n')
+ out.write(' fontname=Monaco,\n')
+ out.write(' penwidth=2,\n')
+ out.write(' fontsize=12,\n')
+ out.write(' margin=.1,\n')
+ out.write(' shape=box,\n')
+ out.write(' fillcolor=lightblue,\n')
+ out.write(' style="rounded,filled"]\n')
+
out.write('\n')
- def quote(string):
+ def q(string):
return '"%s"' % string
if not specs:
- specs = [p.name for p in spack.repo.all_packages()]
- else:
- roots = specs
- specs = set()
- for spec in roots:
- specs.update(Spec(s.name) for s in spec.normalized().traverse())
+ raise ValueError("Must provide specs ot graph_dot")
+
+ # Static graph includes anything a package COULD depend on.
+ if static:
+ names = set.union(*[s.package.possible_dependencies() for s in specs])
+ specs = [Spec(name) for name in names]
- deps = []
+ labeled = set()
+
+ def label(key, label):
+ if key not in labeled:
+ out.write(' "%s" [label="%s"]\n' % (key, label))
+ labeled.add(key)
+
+ deps = set()
for spec in specs:
- out.write(' %-30s [label="%s"]\n' % (quote(spec.name), spec.name))
+ if static:
+ out.write(' "%s" [label="%s"]\n' % (spec.name, spec.name))
+
+ # Skip virtual specs (we'll find out about them from concrete ones.
+ if spec.virtual:
+ continue
- # Skip virtual specs (we'll find out about them from concrete ones.
- if spec.virtual:
- continue
+ # Add edges for each depends_on in the package.
+ for dep_name, dep in spec.package.dependencies.iteritems():
+ deps.add((spec.name, dep_name))
+
+ # If the package provides something, add an edge for that.
+ for provider in set(s.name for s in spec.package.provided):
+ deps.add((provider, spec.name))
+
+ else:
+ def key_label(s):
+ return s.dag_hash(), "%s-%s" % (s.name, s.dag_hash(7))
- # Add edges for each depends_on in the package.
- for dep_name, dep in spec.package.dependencies.iteritems():
- deps.append((spec.name, dep_name))
+ for s in spec.traverse(deptype=deptype):
+ skey, slabel = key_label(s)
+ out.write(' "%s" [label="%s"]\n' % (skey, slabel))
- # If the package provides something, add an edge for that.
- for provider in set(s.name for s in spec.package.provided):
- deps.append((provider, spec.name))
+ for d in s.dependencies(deptype=deptype):
+ dkey, _ = key_label(d)
+ deps.add((skey, dkey))
out.write('\n')
diff --git a/lib/spack/spack/hooks/__init__.py b/lib/spack/spack/hooks/__init__.py
index c7c84defa0..ff4ebc2e57 100644
--- a/lib/spack/spack/hooks/__init__.py
+++ b/lib/spack/spack/hooks/__init__.py
@@ -24,7 +24,7 @@
##############################################################################
"""This package contains modules with hooks for various stages in the
Spack install process. You can add modules here and they'll be
- executaed by package at various times during the package lifecycle.
+ executed by package at various times during the package lifecycle.
Each hook is just a function that takes a package as a parameter.
Hooks are not executed in any particular order.
@@ -41,9 +41,10 @@
features.
"""
import imp
-from llnl.util.lang import memoized, list_modules
-from llnl.util.filesystem import join_path
+
import spack
+from llnl.util.filesystem import join_path
+from llnl.util.lang import memoized, list_modules
@memoized
@@ -70,12 +71,11 @@ class HookRunner(object):
if hasattr(hook, '__call__'):
hook(pkg)
-
#
# Define some functions that can be called to fire off hooks.
#
-pre_install = HookRunner('pre_install')
-post_install = HookRunner('post_install')
+pre_install = HookRunner('pre_install')
+post_install = HookRunner('post_install')
-pre_uninstall = HookRunner('pre_uninstall')
+pre_uninstall = HookRunner('pre_uninstall')
post_uninstall = HookRunner('post_uninstall')
diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py
index 9010b84154..a99099749c 100644
--- a/lib/spack/spack/hooks/licensing.py
+++ b/lib/spack/spack/hooks/licensing.py
@@ -157,6 +157,11 @@ def symlink_license(pkg):
license_dir = os.path.dirname(link_name)
if not os.path.exists(license_dir):
mkdirp(license_dir)
+
+ # If example file already exists, overwrite it with a symlink
+ if os.path.exists(link_name):
+ os.remove(link_name)
+
if os.path.exists(target):
os.symlink(target, link_name)
tty.msg("Added local symlink %s to global license file" %
diff --git a/lib/spack/spack/hooks/dotkit.py b/lib/spack/spack/hooks/module_file_generation.py
index a140646e04..445cea4e91 100644
--- a/lib/spack/spack/hooks/dotkit.py
+++ b/lib/spack/spack/hooks/module_file_generation.py
@@ -26,10 +26,12 @@ import spack.modules
def post_install(pkg):
- dk = spack.modules.Dotkit(pkg.spec)
- dk.write()
+ for item, cls in spack.modules.module_types.iteritems():
+ generator = cls(pkg.spec)
+ generator.write()
def post_uninstall(pkg):
- dk = spack.modules.Dotkit(pkg.spec)
- dk.remove()
+ for item, cls in spack.modules.module_types.iteritems():
+ generator = cls(pkg.spec)
+ generator.remove()
diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py
index 02c1ce3816..6f9736a018 100644
--- a/lib/spack/spack/hooks/sbang.py
+++ b/lib/spack/spack/hooks/sbang.py
@@ -81,8 +81,10 @@ def filter_shebang(path):
tty.warn("Patched overlong shebang in %s" % path)
-def filter_shebangs_in_directory(directory):
- for file in os.listdir(directory):
+def filter_shebangs_in_directory(directory, filenames=None):
+ if filenames is None:
+ filenames = os.listdir(directory)
+ for file in filenames:
path = os.path.join(directory, file)
# only handle files
@@ -104,6 +106,6 @@ def post_install(pkg):
"""This hook edits scripts so that they call /bin/bash
$spack_prefix/bin/sbang instead of something longer than the
shebang limit."""
- if not os.path.isdir(pkg.prefix.bin):
- return
- filter_shebangs_in_directory(pkg.prefix.bin)
+
+ for directory, _, filenames in os.walk(pkg.prefix):
+ filter_shebangs_in_directory(directory, filenames)
diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py
index f053e4405f..97aeef5434 100644
--- a/lib/spack/spack/mirror.py
+++ b/lib/spack/spack/mirror.py
@@ -44,7 +44,7 @@ from spack.version import *
from spack.util.compression import allowed_archive
-def mirror_archive_filename(spec, fetcher):
+def mirror_archive_filename(spec, fetcher, resourceId=None):
"""Get the name of the spec's archive in the mirror."""
if not spec.version.concrete:
raise ValueError("mirror.path requires spec with concrete version.")
@@ -52,7 +52,14 @@ def mirror_archive_filename(spec, fetcher):
if isinstance(fetcher, fs.URLFetchStrategy):
if fetcher.expand_archive:
# If we fetch with a URLFetchStrategy, use URL's archive type
- ext = url.downloaded_file_extension(fetcher.url)
+ ext = url.determine_url_file_extension(fetcher.url)
+ ext = ext or spec.package.versions[spec.package.version].get(
+ 'extension', None)
+ ext = ext.lstrip('.')
+ if not ext:
+ raise MirrorError(
+ "%s version does not specify an extension" % spec.name +
+ " and could not parse extension from %s" % fetcher.url)
else:
# If the archive shouldn't be expanded, don't check extension.
ext = None
@@ -60,15 +67,18 @@ def mirror_archive_filename(spec, fetcher):
# Otherwise we'll make a .tar.gz ourselves
ext = 'tar.gz'
- filename = "%s-%s" % (spec.package.name, spec.version)
- if ext:
- filename += ".%s" % ext
+ if resourceId:
+ filename = "%s-%s" % (resourceId, spec.version) + ".%s" % ext
+ else:
+ filename = "%s-%s" % (spec.package.name, spec.version) + ".%s" % ext
+
return filename
-def mirror_archive_path(spec, fetcher):
+def mirror_archive_path(spec, fetcher, resourceId=None):
"""Get the relative path to the spec's archive within a mirror."""
- return join_path(spec.name, mirror_archive_filename(spec, fetcher))
+ return join_path(
+ spec.name, mirror_archive_filename(spec, fetcher, resourceId))
def get_matching_versions(specs, **kwargs):
@@ -120,27 +130,28 @@ def suggest_archive_basename(resource):
def create(path, specs, **kwargs):
"""Create a directory to be used as a spack mirror, and fill it with
- package archives.
-
- Arguments:
- path Path to create a mirror directory hierarchy in.
- specs Any package versions matching these specs will be added
- to the mirror.
-
- Keyword args:
- no_checksum: If True, do not checkpoint when fetching (default False)
- num_versions: Max number of versions to fetch per spec,
- if spec is ambiguous (default is 0 for all of them)
-
- Return Value:
- Returns a tuple of lists: (present, mirrored, error)
- * present: Package specs that were already present.
- * mirrored: Package specs that were successfully mirrored.
- * error: Package specs that failed to mirror due to some error.
-
- This routine iterates through all known package versions, and
- it creates specs for those versions. If the version satisfies any spec
- in the specs list, it is downloaded and added to the mirror.
+ package archives.
+
+ Arguments:
+ path: Path to create a mirror directory hierarchy in.
+ specs: Any package versions matching these specs will be added \
+ to the mirror.
+
+ Keyword args:
+ no_checksum: If True, do not checkpoint when fetching (default False)
+ num_versions: Max number of versions to fetch per spec, \
+ if spec is ambiguous (default is 0 for all of them)
+
+ Return Value:
+ Returns a tuple of lists: (present, mirrored, error)
+
+ * present: Package specs that were already present.
+ * mirrored: Package specs that were successfully mirrored.
+ * error: Package specs that failed to mirror due to some error.
+
+ This routine iterates through all known package versions, and
+ it creates specs for those versions. If the version satisfies any spec
+ in the specs list, it is downloaded and added to the mirror.
"""
# Make sure nothing is in the way.
if os.path.isfile(path):
@@ -196,8 +207,9 @@ def add_single_spec(spec, mirror_root, categories, **kwargs):
name = spec.format("$_$@")
else:
resource = stage.resource
- archive_path = join_path(
- subdir, suggest_archive_basename(resource))
+ archive_path = os.path.abspath(join_path(
+ mirror_root,
+ mirror_archive_path(spec, fetcher, resource.name)))
name = "{resource} ({pkg}).".format(
resource=resource.name, pkg=spec.format("$_$@"))
subdir = os.path.dirname(archive_path)
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py
index debc6752b4..5e2a840e14 100644
--- a/lib/spack/spack/modules.py
+++ b/lib/spack/spack/modules.py
@@ -40,6 +40,7 @@ module file.
"""
import copy
import datetime
+import itertools
import os
import os.path
import re
@@ -47,19 +48,27 @@ import string
import textwrap
import llnl.util.tty as tty
+from llnl.util.filesystem import join_path, mkdirp
+
import spack
+import spack.compilers # Needed by LmodModules
import spack.config
-from llnl.util.filesystem import join_path, mkdirp
+from spack.util.path import canonicalize_path
from spack.build_environment import parent_class_modules
from spack.build_environment import set_module_variables_for_package
from spack.environment import *
__all__ = ['EnvModule', 'Dotkit', 'TclModule']
-# Registry of all types of modules. Entries created by EnvModule's metaclass
+"""Registry of all types of modules. Entries created by EnvModule's
+ metaclass."""
module_types = {}
-CONFIGURATION = spack.config.get_config('modules')
+"""Module install roots are in config.yaml."""
+_roots = spack.config.get_config('config').get('module_roots', {})
+
+"""Specifics about modules are in modules.yaml"""
+_module_config = spack.config.get_config('modules')
def print_help():
@@ -89,7 +98,7 @@ def inspect_path(prefix):
"""
env = EnvironmentModifications()
# Inspect the prefix to check for the existence of common directories
- prefix_inspections = CONFIGURATION.get('prefix_inspections', {})
+ prefix_inspections = _module_config.get('prefix_inspections', {})
for relative_path, variables in prefix_inspections.items():
expected = join_path(prefix, relative_path)
if os.path.isdir(expected):
@@ -120,7 +129,7 @@ def dependencies(spec, request='all'):
return []
if request == 'direct':
- return spec.dependencies()
+ return spec.dependencies(deptype=('link', 'run'))
# FIXME : during module file creation nodes seem to be visited multiple
# FIXME : times even if cover='nodes' is given. This work around permits
@@ -128,14 +137,13 @@ def dependencies(spec, request='all'):
# FIXME : step among nodes that refer to the same package?
seen = set()
seen_add = seen.add
- l = [xx
- for xx in sorted(
- spec.traverse(order='post',
- depth=True,
- cover='nodes',
- root=False),
- reverse=True)]
- return [xx for ii, xx in l if not (xx in seen or seen_add(xx))]
+ l = sorted(
+ spec.traverse(order='post',
+ cover='nodes',
+ deptype=('link', 'run'),
+ root=False),
+ reverse=True)
+ return [x for x in l if not (x in seen or seen_add(x))]
def update_dictionary_extending_lists(target, update):
@@ -166,7 +174,7 @@ def parse_config_options(module_generator):
module file
"""
# Get the configuration for this kind of generator
- module_configuration = copy.deepcopy(CONFIGURATION.get(
+ module_configuration = copy.deepcopy(_module_config.get(
module_generator.name, {}))
#####
@@ -234,6 +242,10 @@ def filter_blacklisted(specs, module_name):
yield x
+def format_env_var_name(name):
+ return name.replace('-', '_').upper()
+
+
class EnvModule(object):
name = 'env_module'
formats = {}
@@ -242,7 +254,7 @@ class EnvModule(object):
def __init__(cls, name, bases, dict):
type.__init__(cls, name, bases, dict)
- if cls.name != 'env_module' and cls.name in CONFIGURATION[
+ if cls.name != 'env_module' and cls.name in _module_config[
'enable']:
module_types[cls.name] = cls
@@ -265,56 +277,35 @@ class EnvModule(object):
@property
def naming_scheme(self):
try:
- naming_scheme = CONFIGURATION[self.name]['naming_scheme']
+ naming_scheme = _module_config[self.name]['naming_scheme']
except KeyError:
naming_scheme = self.default_naming_format
return naming_scheme
@property
- def tokens(self):
- """Tokens that can be substituted in environment variable values
- and naming schemes
- """
- tokens = {
- 'name': self.spec.name,
- 'version': self.spec.version,
- 'compiler': self.spec.compiler,
- 'prefix': self.spec.package.prefix
- }
- return tokens
-
- @property
- def upper_tokens(self):
- """Tokens that can be substituted in environment variable names"""
- upper_tokens = {
- 'name': self.spec.name.replace('-', '_').upper()
- }
- return upper_tokens
-
- @property
def use_name(self):
"""
Subclasses should implement this to return the name the module command
uses to refer to the package.
"""
- naming_tokens = self.tokens
- naming_scheme = self.naming_scheme
- name = naming_scheme.format(**naming_tokens)
+ name = self.spec.format(self.naming_scheme)
# Not everybody is working on linux...
parts = name.split('/')
name = join_path(*parts)
# Add optional suffixes based on constraints
+ path_elements = [name] + self._get_suffixes()
+ return '-'.join(path_elements)
+
+ def _get_suffixes(self):
configuration, _ = parse_config_options(self)
- suffixes = [name]
+ suffixes = []
for constraint, suffix in configuration.get('suffixes', {}).items():
if constraint in self.spec:
suffixes.append(suffix)
- # Always append the hash to make the module file unique
- hash_length = configuration.pop('hash_length', 7)
+ hash_length = configuration.get('hash_length', 7)
if hash_length != 0:
suffixes.append(self.spec.dag_hash(length=hash_length))
- name = '-'.join(suffixes)
- return name
+ return suffixes
@property
def category(self):
@@ -329,7 +320,7 @@ class EnvModule(object):
@property
def blacklisted(self):
- configuration = CONFIGURATION.get(self.name, {})
+ configuration = _module_config.get(self.name, {})
whitelist_matches = [x
for x in configuration.get('whitelist', [])
if self.spec.satisfies(x)]
@@ -388,6 +379,7 @@ class EnvModule(object):
for mod in modules:
set_module_variables_for_package(package, mod)
set_module_variables_for_package(package, package.module)
+ package.setup_environment(spack_env, env)
package.setup_dependent_package(self.pkg.module, self.spec)
package.setup_dependent_environment(spack_env, env, self.spec)
@@ -451,8 +443,9 @@ class EnvModule(object):
def process_environment_command(self, env):
for command in env:
# Token expansion from configuration file
- name = command.args.get('name', '').format(**self.upper_tokens)
- value = str(command.args.get('value', '')).format(**self.tokens)
+ name = format_env_var_name(
+ self.spec.format(command.args.get('name', '')))
+ value = self.spec.format(str(command.args.get('value', '')))
command.update_args(name=name, value=value)
# Format the line int the module file
try:
@@ -486,7 +479,9 @@ class EnvModule(object):
class Dotkit(EnvModule):
name = 'dotkit'
- path = join_path(spack.share_path, 'dotkit')
+ path = canonicalize_path(
+ _roots.get(name, join_path(spack.share_path, name)))
+
environment_modifications_formats = {
PrependPath: 'dk_alter {name} {value}\n',
RemovePath: 'dk_unalter {name} {value}\n',
@@ -496,7 +491,7 @@ class Dotkit(EnvModule):
autoload_format = 'dk_op {module_file}\n'
default_naming_format = \
- '{name}-{version}-{compiler.name}-{compiler.version}'
+ '${PACKAGE}-${VERSION}-${COMPILERNAME}-${COMPILERVER}'
@property
def file_name(self):
@@ -529,14 +524,8 @@ class Dotkit(EnvModule):
class TclModule(EnvModule):
name = 'tcl'
- path = join_path(spack.share_path, "modules")
- environment_modifications_formats = {
- PrependPath: 'prepend-path --delim "{separator}" {name} \"{value}\"\n',
- AppendPath: 'append-path --delim "{separator}" {name} \"{value}\"\n',
- RemovePath: 'remove-path --delim "{separator}" {name} \"{value}\"\n',
- SetEnv: 'setenv {name} \"{value}\"\n',
- UnsetEnv: 'unsetenv {name}\n'
- }
+ path = canonicalize_path(
+ _roots.get(name, join_path(spack.share_path, 'modules')))
autoload_format = ('if ![ is-loaded {module_file} ] {{\n'
' puts stderr "Autoloading {module_file}"\n'
@@ -546,7 +535,7 @@ class TclModule(EnvModule):
prerequisite_format = 'prereq {module_file}\n'
default_naming_format = \
- '{name}-{version}-{compiler.name}-{compiler.version}'
+ '${PACKAGE}-${VERSION}-${COMPILERNAME}-${COMPILERVER}'
@property
def file_name(self):
@@ -556,11 +545,13 @@ class TclModule(EnvModule):
def header(self):
timestamp = datetime.datetime.now()
# TCL Modulefile header
- header = '#%Module1.0\n'
- header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % timestamp
- header += '##\n'
- header += '## %s\n' % self.spec.short_spec
- header += '##\n'
+ header = """\
+#%%Module1.0
+## Module file created by spack (https://github.com/LLNL/spack) on %s
+##
+## %s
+##
+""" % (timestamp, self.spec.short_spec)
# TODO : category ?
# Short description
@@ -575,8 +566,46 @@ class TclModule(EnvModule):
header += '}\n\n'
return header
+ def process_environment_command(self, env):
+ environment_modifications_formats_colon = {
+ PrependPath: 'prepend-path {name} \"{value}\"\n',
+ AppendPath: 'append-path {name} \"{value}\"\n',
+ RemovePath: 'remove-path {name} \"{value}\"\n',
+ SetEnv: 'setenv {name} \"{value}\"\n',
+ UnsetEnv: 'unsetenv {name}\n'
+ }
+ environment_modifications_formats_general = {
+ PrependPath:
+ 'prepend-path --delim "{separator}" {name} \"{value}\"\n',
+ AppendPath:
+ 'append-path --delim "{separator}" {name} \"{value}\"\n',
+ RemovePath:
+ 'remove-path --delim "{separator}" {name} \"{value}\"\n',
+ SetEnv: 'setenv {name} \"{value}\"\n',
+ UnsetEnv: 'unsetenv {name}\n'
+ }
+ for command in env:
+ # Token expansion from configuration file
+ name = format_env_var_name(
+ self.spec.format(command.args.get('name', '')))
+ value = self.spec.format(str(command.args.get('value', '')))
+ command.update_args(name=name, value=value)
+ # Format the line int the module file
+ try:
+ if command.args.get('separator', ':') == ':':
+ yield environment_modifications_formats_colon[type(
+ command)].format(**command.args)
+ else:
+ yield environment_modifications_formats_general[type(
+ command)].format(**command.args)
+ except KeyError:
+ message = ('Cannot handle command of type {command}: '
+ 'skipping request')
+ details = '{context} at {filename}:{lineno}'
+ tty.warn(message.format(command=type(command)))
+ tty.warn(details.format(**command.args))
+
def module_specific_content(self, configuration):
- naming_tokens = self.tokens
# Conflict
conflict_format = configuration.get('conflict', [])
f = string.Formatter()
@@ -597,5 +626,249 @@ class TclModule(EnvModule):
nformat=self.naming_scheme,
cformat=item))
raise SystemExit('Module generation aborted.')
- line = line.format(**naming_tokens)
+ line = self.spec.format(line)
yield line
+
+# To construct an arbitrary hierarchy of module files:
+# 1. Parse the configuration file and check that all the items in
+# hierarchical_scheme are indeed virtual packages
+# This needs to be done only once at start-up
+# 2. Order the stack as `hierarchical_scheme + ['mpi, 'compiler']
+# 3. Check which of the services are provided by the package
+# -> may be more than one
+# 4. Check which of the services are needed by the package
+# -> this determines where to write the module file
+# 5. For each combination of services in which we have at least one provider
+# here add the appropriate conditional MODULEPATH modifications
+
+
+class LmodModule(EnvModule):
+ name = 'lmod'
+ path = canonicalize_path(
+ _roots.get(name, join_path(spack.share_path, name)))
+
+ environment_modifications_formats = {
+ PrependPath: 'prepend_path("{name}", "{value}")\n',
+ AppendPath: 'append_path("{name}", "{value}")\n',
+ RemovePath: 'remove_path("{name}", "{value}")\n',
+ SetEnv: 'setenv("{name}", "{value}")\n',
+ UnsetEnv: 'unsetenv("{name}")\n'
+ }
+
+ autoload_format = ('if not isloaded("{module_file}") then\n'
+ ' LmodMessage("Autoloading {module_file}")\n'
+ ' load("{module_file}")\n'
+ 'end\n\n')
+
+ prerequisite_format = 'prereq("{module_file}")\n'
+
+ family_format = 'family("{family}")\n'
+
+ path_part_without_hash = join_path('{token.name}', '{token.version}')
+
+ # TODO : Check that extra tokens specified in configuration file
+ # TODO : are actually virtual dependencies
+ configuration = _module_config.get('lmod', {})
+ hierarchy_tokens = configuration.get('hierarchical_scheme', [])
+ hierarchy_tokens = hierarchy_tokens + ['mpi', 'compiler']
+
+ def __init__(self, spec=None):
+ super(LmodModule, self).__init__(spec)
+
+ self.configuration = _module_config.get('lmod', {})
+ hierarchy_tokens = self.configuration.get('hierarchical_scheme', [])
+ # TODO : Check that the extra hierarchy tokens specified in the
+ # TODO : configuration file are actually virtual dependencies
+ self.hierarchy_tokens = hierarchy_tokens + ['mpi', 'compiler']
+
+ # Sets the root directory for this architecture
+ self.modules_root = join_path(LmodModule.path, self.spec.architecture)
+
+ # Retrieve core compilers
+ self.core_compilers = self.configuration.get('core_compilers', [])
+ # Keep track of the requirements that this package has in terms
+ # of virtual packages that participate in the hierarchical structure
+ self.requires = {'compiler': self.spec.compiler}
+ # For each virtual dependency in the hierarchy
+ for x in self.hierarchy_tokens:
+ if x in self.spec and not self.spec.package.provides(
+ x): # if I depend on it
+ self.requires[x] = self.spec[x] # record the actual provider
+ # Check what are the services I need (this will determine where the
+ # module file will be written)
+ self.substitutions = {}
+ self.substitutions.update(self.requires)
+ # TODO : complete substitutions
+ # Check what service I provide to others
+ self.provides = {}
+ # If it is in the list of supported compilers family -> compiler
+ if self.spec.name in spack.compilers.supported_compilers():
+ self.provides['compiler'] = spack.spec.CompilerSpec(str(self.spec))
+ # Special case for llvm
+ if self.spec.name == 'llvm':
+ self.provides['compiler'] = spack.spec.CompilerSpec(str(self.spec))
+ self.provides['compiler'].name = 'clang'
+
+ for x in self.hierarchy_tokens:
+ if self.spec.package.provides(x):
+ self.provides[x] = self.spec[x]
+
+ def _hierarchy_token_combinations(self):
+ """
+ Yields all the relevant combinations that could appear in the hierarchy
+ """
+ for ii in range(len(self.hierarchy_tokens) + 1):
+ for item in itertools.combinations(self.hierarchy_tokens, ii):
+ if 'compiler' in item:
+ yield item
+
+ def _hierarchy_to_be_provided(self):
+ """
+ Filters a list of hierarchy tokens and yields only the one that we
+ need to provide
+ """
+ for item in self._hierarchy_token_combinations():
+ if any(x in self.provides for x in item):
+ yield item
+
+ def token_to_path(self, name, value):
+ # If we are dealing with a core compiler, return 'Core'
+ if name == 'compiler' and str(value) in self.core_compilers:
+ return 'Core'
+ # CompilerSpec does not have an hash
+ if name == 'compiler':
+ return self.path_part_without_hash.format(token=value)
+ # In this case the hierarchy token refers to a virtual provider
+ path = self.path_part_without_hash.format(token=value)
+ path = '-'.join([path, value.dag_hash(length=7)])
+ return path
+
+ @property
+ def file_name(self):
+ parts = [self.token_to_path(x, self.requires[x])
+ for x in self.hierarchy_tokens if x in self.requires]
+ hierarchy_name = join_path(*parts)
+ fullname = join_path(self.modules_root, hierarchy_name,
+ self.use_name + '.lua')
+ return fullname
+
+ @property
+ def use_name(self):
+ path_elements = [self.spec.format("${PACKAGE}/${VERSION}")]
+ # The remaining elements are filename suffixes
+ path_elements.extend(self._get_suffixes())
+ return '-'.join(path_elements)
+
+ def modulepath_modifications(self):
+ # What is available is what we require plus what we provide
+ entry = ''
+ available = {}
+ available.update(self.requires)
+ available.update(self.provides)
+ available_parts = [self.token_to_path(x, available[x])
+ for x in self.hierarchy_tokens if x in available]
+ # Missing parts
+ missing = [x for x in self.hierarchy_tokens if x not in available]
+ # Direct path we provide on top of compilers
+ modulepath = join_path(self.modules_root, *available_parts)
+ env = EnvironmentModifications()
+ env.prepend_path('MODULEPATH', modulepath)
+ for line in self.process_environment_command(env):
+ entry += line
+
+ def local_variable(x):
+ lower, upper = x.lower(), x.upper()
+ fmt = 'local {lower}_name = os.getenv("LMOD_{upper}_NAME")\n'
+ fmt += 'local {lower}_version = os.getenv("LMOD_{upper}_VERSION")\n' # NOQA: ignore=501
+ return fmt.format(lower=lower, upper=upper)
+
+ def set_variables_for_service(env, x):
+ upper = x.upper()
+ s = self.provides[x]
+ name, version = os.path.split(self.token_to_path(x, s))
+
+ env.set('LMOD_{upper}_NAME'.format(upper=upper), name)
+ env.set('LMOD_{upper}_VERSION'.format(upper=upper), version)
+
+ def conditional_modulepath_modifications(item):
+ entry = 'if '
+ needed = []
+ for x in self.hierarchy_tokens:
+ if x in missing:
+ needed.append('{x}_name '.format(x=x))
+ entry += 'and '.join(needed) + 'then\n'
+ entry += ' local t = pathJoin("{root}"'.format(
+ root=self.modules_root)
+ for x in item:
+ if x in missing:
+ entry += ', {lower}_name, {lower}_version'.format(
+ lower=x.lower())
+ else:
+ entry += ', "{x}"'.format(
+ x=self.token_to_path(x, available[x]))
+ entry += ')\n'
+ entry += ' prepend_path("MODULEPATH", t)\n'
+ entry += 'end\n\n'
+ return entry
+
+ if 'compiler' not in self.provides:
+ # Retrieve variables
+ entry += '\n'
+ for x in missing:
+ entry += local_variable(x)
+ entry += '\n'
+ # Conditional modifications
+ conditionals = [x
+ for x in self._hierarchy_to_be_provided()
+ if any(t in missing for t in x)]
+ for item in conditionals:
+ entry += conditional_modulepath_modifications(item)
+
+ # Set environment variables for the services we provide
+ env = EnvironmentModifications()
+ for x in self.provides:
+ set_variables_for_service(env, x)
+ for line in self.process_environment_command(env):
+ entry += line
+
+ return entry
+
+ @property
+ def header(self):
+ timestamp = datetime.datetime.now()
+ # Header as in
+ # https://www.tacc.utexas.edu/research-development/tacc-projects/lmod/advanced-user-guide/more-about-writing-module-files
+ header = "-- -*- lua -*-\n"
+ header += '-- Module file created by spack (https://github.com/LLNL/spack) on %s\n' % timestamp # NOQA: ignore=E501
+ header += '--\n'
+ header += '-- %s\n' % self.spec.short_spec
+ header += '--\n'
+
+ # Short description -> whatis()
+ if self.short_description:
+ header += "whatis([[Name : {name}]])\n".format(name=self.spec.name)
+ header += "whatis([[Version : {version}]])\n".format(
+ version=self.spec.version)
+
+ # Long description -> help()
+ if self.long_description:
+ doc = re.sub(r'"', '\"', self.long_description)
+ header += "help([[{documentation}]])\n".format(documentation=doc)
+
+ # Certain things need to be done only if we provide a service
+ if self.provides:
+ # Add family directives
+ header += '\n'
+ for x in self.provides:
+ header += self.family_format.format(family=x)
+ header += '\n'
+ header += '-- MODULEPATH modifications\n'
+ header += '\n'
+ # Modify MODULEPATH
+ header += self.modulepath_modifications()
+ # Set environment variables for services we provide
+ header += '\n'
+ header += '-- END MODULEPATH modifications\n'
+ header += '\n'
+
+ return header
diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py
index d1d1f32445..4e2fb3bdaa 100644
--- a/lib/spack/spack/multimethod.py
+++ b/lib/spack/spack/multimethod.py
@@ -105,7 +105,17 @@ class SpecMultiMethod(object):
def __get__(self, obj, objtype):
"""This makes __call__ support instance methods."""
- return functools.partial(self.__call__, obj)
+ # Method_list is a list of tuples (constraint, method)
+ # Here we are going to assume that we have at least one
+ # element in the list. The first registered function
+ # will be the one 'wrapped'.
+ wrapped_method = self.method_list[0][1]
+ # Call functools.wraps manually to get all the attributes
+ # we need to be disguised as the wrapped_method
+ func = functools.wraps(wrapped_method)(
+ functools.partial(self.__call__, obj)
+ )
+ return func
def __call__(self, package_self, *args, **kwargs):
"""Find the first method with a spec that matches the
diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py
index 6d70ae80b6..b9a39361da 100644
--- a/lib/spack/spack/operating_systems/linux_distro.py
+++ b/lib/spack/spack/operating_systems/linux_distro.py
@@ -1,5 +1,4 @@
import re
-import platform as py_platform
from spack.architecture import OperatingSystem
@@ -12,8 +11,14 @@ class LinuxDistro(OperatingSystem):
"""
def __init__(self):
- distname, version, _ = py_platform.linux_distribution(
- full_distribution_name=False)
+ try:
+ # This will throw an error if imported on a non-Linux platform.
+ from external.distro import linux_distribution
+ distname, version, _ = linux_distribution(
+ full_distribution_name=False)
+ distname, version = str(distname), str(version)
+ except ImportError as e:
+ distname, version = 'unknown', ''
# Grabs major version from tuple on redhat; on other platforms
# grab the first legal identifier in the version field. On
diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py
index 3e5ab9b2e9..dafb5c1d41 100644
--- a/lib/spack/spack/operating_systems/mac_os.py
+++ b/lib/spack/spack/operating_systems/mac_os.py
@@ -22,7 +22,7 @@ class MacOs(OperatingSystem):
"10.11": "elcapitan",
"10.12": "sierra"}
- mac_ver = py_platform.mac_ver()[0][:-2]
+ mac_ver = '.'.join(py_platform.mac_ver()[0].split('.')[:2])
name = mac_releases.get(mac_ver, "macos")
super(MacOs, self).__init__(name, mac_ver)
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index ff8c8e96bc..7462a73533 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -33,16 +33,21 @@ Homebrew makes it very easy to create packages. For a complete
rundown on spack and how it differs from homebrew, look at the
README.
"""
+import contextlib
+import copy
+import functools
+import inspect
import os
-import sys
import re
+import sys
import textwrap
import time
-import string
+from StringIO import StringIO
+import llnl.util.lock
import llnl.util.tty as tty
import spack
-import spack.build_environment
+import spack.store
import spack.compilers
import spack.directives
import spack.error
@@ -52,26 +57,187 @@ import spack.mirror
import spack.repository
import spack.url
import spack.util.web
-
-from urlparse import urlparse
-from StringIO import StringIO
from llnl.util.filesystem import *
from llnl.util.lang import *
from llnl.util.link_tree import LinkTree
from llnl.util.tty.log import log_output
+from spack import directory_layout
from spack.stage import Stage, ResourceStage, StageComposite
-from spack.util.compression import allowed_archive
+from spack.util.crypto import bit_length
from spack.util.environment import dump_environment
-from spack.util.executable import ProcessError, which
from spack.version import *
-from spack import directory_layout
-
"""Allowed URL schemes for spack packages."""
_ALLOWED_URL_SCHEMES = ["http", "https", "ftp", "file", "git"]
-class Package(object):
+class InstallPhase(object):
+ """Manages a single phase of the installation
+
+ This descriptor stores at creation time the name of the method it should
+ search for execution. The method is retrieved at __get__ time, so that
+ it can be overridden by subclasses of whatever class declared the phases.
+
+ It also provides hooks to execute prerequisite and sanity checks.
+ """
+
+ def __init__(self, name):
+ self.name = name
+ self.preconditions = []
+ self.sanity_checks = []
+
+ def __get__(self, instance, owner):
+ # The caller is a class that is trying to customize
+ # my behavior adding something
+ if instance is None:
+ return self
+ # If instance is there the caller wants to execute the
+ # install phase, thus return a properly set wrapper
+ phase = getattr(instance, self.name)
+
+ @functools.wraps(phase)
+ def phase_wrapper(spec, prefix):
+ # Check instance attributes at the beginning of a phase
+ self._on_phase_start(instance)
+ # Execute phase pre-conditions,
+ # and give them the chance to fail
+ for check in self.preconditions:
+ # Do something sensible at some point
+ check(instance)
+ phase(spec, prefix)
+ # Execute phase sanity_checks,
+ # and give them the chance to fail
+ for check in self.sanity_checks:
+ check(instance)
+ # Check instance attributes at the end of a phase
+ self._on_phase_exit(instance)
+ return phase_wrapper
+
+ def _on_phase_start(self, instance):
+ pass
+
+ def _on_phase_exit(self, instance):
+ # If a phase has a matching last_phase attribute,
+ # stop the installation process raising a StopIteration
+ if getattr(instance, 'last_phase', None) == self.name:
+ raise StopIteration('Stopping at \'{0}\' phase'.format(self.name))
+
+ def copy(self):
+ try:
+ return copy.deepcopy(self)
+ except TypeError:
+ # This bug-fix was not back-ported in Python 2.6
+ # http://bugs.python.org/issue1515
+ other = InstallPhase(self.name)
+ other.preconditions.extend(self.preconditions)
+ other.sanity_checks.extend(self.sanity_checks)
+ return other
+
+
+class PackageMeta(type):
+ """Conveniently transforms attributes to permit extensible phases
+
+ Iterates over the attribute 'phases' and creates / updates private
+ InstallPhase attributes in the class that is being initialized
+ """
+ phase_fmt = '_InstallPhase_{0}'
+
+ _InstallPhase_sanity_checks = {}
+ _InstallPhase_preconditions = {}
+
+ def __new__(meta, name, bases, attr_dict):
+ # Check if phases is in attr dict, then set
+ # install phases wrappers
+ if 'phases' in attr_dict:
+ _InstallPhase_phases = [PackageMeta.phase_fmt.format(x) for x in attr_dict['phases']] # NOQA: ignore=E501
+ for phase_name, callback_name in zip(_InstallPhase_phases, attr_dict['phases']): # NOQA: ignore=E501
+ attr_dict[phase_name] = InstallPhase(callback_name)
+ attr_dict['_InstallPhase_phases'] = _InstallPhase_phases
+
+ def _append_checks(check_name):
+ # Name of the attribute I am going to check it exists
+ attr_name = PackageMeta.phase_fmt.format(check_name)
+ checks = getattr(meta, attr_name)
+ if checks:
+ for phase_name, funcs in checks.items():
+ try:
+ # Search for the phase in the attribute dictionary
+ phase = attr_dict[
+ PackageMeta.phase_fmt.format(phase_name)]
+ except KeyError:
+ # If it is not there it's in the bases
+ # and we added a check. We need to copy
+ # and extend
+ for base in bases:
+ phase = getattr(
+ base,
+ PackageMeta.phase_fmt.format(phase_name),
+ None
+ )
+ attr_dict[PackageMeta.phase_fmt.format(
+ phase_name)] = phase.copy()
+ phase = attr_dict[
+ PackageMeta.phase_fmt.format(phase_name)]
+ getattr(phase, check_name).extend(funcs)
+ # Clear the attribute for the next class
+ setattr(meta, attr_name, {})
+
+ @classmethod
+ def _register_checks(cls, check_type, *args):
+ def _register_sanity_checks(func):
+ attr_name = PackageMeta.phase_fmt.format(check_type)
+ check_list = getattr(meta, attr_name)
+ for item in args:
+ checks = check_list.setdefault(item, [])
+ checks.append(func)
+ setattr(meta, attr_name, check_list)
+ return func
+ return _register_sanity_checks
+
+ @staticmethod
+ def on_package_attributes(**attrs):
+ def _execute_under_condition(func):
+ @functools.wraps(func)
+ def _wrapper(instance):
+ # If all the attributes have the value we require, then
+ # execute
+ if all([getattr(instance, key, None) == value for key, value in attrs.items()]): # NOQA: ignore=E501
+ func(instance)
+ return _wrapper
+ return _execute_under_condition
+
+ @classmethod
+ def precondition(cls, *args):
+ return cls._register_checks('preconditions', *args)
+
+ @classmethod
+ def sanity_check(cls, *args):
+ return cls._register_checks('sanity_checks', *args)
+
+ if all([not hasattr(x, '_register_checks') for x in bases]):
+ attr_dict['_register_checks'] = _register_checks
+
+ if all([not hasattr(x, 'sanity_check') for x in bases]):
+ attr_dict['sanity_check'] = sanity_check
+
+ if all([not hasattr(x, 'precondition') for x in bases]):
+ attr_dict['precondition'] = precondition
+
+ if all([not hasattr(x, 'on_package_attributes') for x in bases]):
+ attr_dict['on_package_attributes'] = on_package_attributes
+
+ # Preconditions
+ _append_checks('preconditions')
+ # Sanity checks
+ _append_checks('sanity_checks')
+ return super(PackageMeta, meta).__new__(meta, name, bases, attr_dict)
+
+ def __init__(cls, name, bases, dict):
+ type.__init__(cls, name, bases, dict)
+ spack.directives.ensure_dicts(cls)
+
+
+class PackageBase(object):
"""This is the superclass for all spack packages.
***The Package class***
@@ -84,9 +250,9 @@ class Package(object):
with the package itself. Packages are written in pure python.
Packages are all submodules of spack.packages. If spack is installed
- in $prefix, all of its python files are in $prefix/lib/spack. Most
- of them are in the spack module, so all the packages live in
- $prefix/lib/spack/spack/packages.
+ in ``$prefix``, all of its python files are in ``$prefix/lib/spack``.
+ Most of them are in the spack module, so all the packages live in
+ ``$prefix/lib/spack/spack/packages``.
All you have to do to create a package is make a new subclass of Package
in this directory. Spack automatically scans the python files there
@@ -95,7 +261,7 @@ class Package(object):
**An example package**
Let's look at the cmake package to start with. This package lives in
- $prefix/lib/spack/spack/packages/cmake.py:
+ ``$prefix/var/spack/repos/builtin/packages/cmake/package.py``:
.. code-block:: python
@@ -118,19 +284,21 @@ class Package(object):
1. The module name, ``cmake``.
* User will refers to this name, e.g. 'spack install cmake'.
- * Corresponds to the name of the file, 'cmake.py', and it can
- include ``_``, ``-``, and numbers (it can even start with a
+ * It can include ``_``, ``-``, and numbers (it can even start with a
number).
2. The class name, "Cmake". This is formed by converting `-` or
``_`` in the module name to camel case. If the name starts with
a number, we prefix the class name with ``_``. Examples:
- Module Name Class Name
- foo_bar FooBar
- docbook-xml DocbookXml
- FooBar Foobar
- 3proxy _3proxy
+ =========== ==========
+ Module Name Class Name
+ =========== ==========
+ foo_bar FooBar
+ docbook-xml DocbookXml
+ FooBar Foobar
+ 3proxy _3proxy
+ =========== ==========
The class name is what spack looks for when it loads a package module.
@@ -139,28 +307,30 @@ class Package(object):
Aside from proper naming, here is the bare minimum set of things you
need when you make a package:
- homepage
- informational URL, so that users know what they're
- installing.
+ homepage:
+ informational URL, so that users know what they're
+ installing.
- url
- URL of the source archive that spack will fetch.
+ url or url_for_version(self, version):
+ If url, then the URL of the source archive that spack will fetch.
+ If url_for_version(), then a method returning the URL required
+ to fetch a particular version.
- install()
- This function tells spack how to build and install the
- software it downloaded.
+ install():
+ This function tells spack how to build and install the
+ software it downloaded.
**Optional Attributes**
You can also optionally add these attributes, if needed:
- list_url
+ list_url:
Webpage to scrape for available version strings. Default is the
directory containing the tarball; use this if the default isn't
correct so that invoking 'spack versions' will work for this
package.
- url_version(self, version)
+ url_version(self, version):
When spack downloads packages at particular versions, it just
converts version to string with str(version). Override this if
your package needs special version formatting in its URL. boost
@@ -177,12 +347,15 @@ class Package(object):
**spack create**
- Most software comes in nicely packaged tarballs, like this one:
- http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
+ Most software comes in nicely packaged tarballs, like this one
+
+ http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
+
Taking a page from homebrew, spack deduces pretty much everything it
- needs to know from the URL above. If you simply type this:
+ needs to know from the URL above. If you simply type this::
spack create http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
+
Spack will download the tarball, generate an md5 hash, figure out the
version and the name of the package from the URL, and create a new
package file for you with all the names and attributes set correctly.
@@ -214,13 +387,13 @@ class Package(object):
you can just run configure or cmake without any additional arguments and
it will find the dependencies automatically.
-
**The Install Function**
The install function is designed so that someone not too terribly familiar
with Python could write a package installer. For example, we put a number
of commands in install scope that you can use almost like shell commands.
- These include make, configure, cmake, rm, rmtree, mkdir, mkdirp, and others.
+ These include make, configure, cmake, rm, rmtree, mkdir, mkdirp, and
+ others.
You can see above in the cmake script that these commands are used to run
configure and make almost like they're used on the command line. The
@@ -235,17 +408,16 @@ class Package(object):
pollute other namespaces, and it allows you to more easily implement an
install function.
- For a full list of commands and variables available in module scope, see the
- add_commands_to_module() function in this class. This is where most of
- them are created and set on the module.
-
+ For a full list of commands and variables available in module scope, see
+ the add_commands_to_module() function in this class. This is where most
+ of them are created and set on the module.
**Parallel Builds**
By default, Spack will run make in parallel when you run make() in your
install function. Spack figures out how many cores are available on
- your system and runs make with -j<cores>. If you do not want this behavior,
- you can explicitly mark a package not to use parallel make:
+ your system and runs make with -j<cores>. If you do not want this
+ behavior, you can explicitly mark a package not to use parallel make:
.. code-block:: python
@@ -254,15 +426,16 @@ class Package(object):
parallel = False
...
- This changes thd default behavior so that make is sequential. If you still
- want to build some parts in parallel, you can do this in your install function:
+ This changes the default behavior so that make is sequential. If you still
+ want to build some parts in parallel, you can do this in your install
+ function:
.. code-block:: python
make(parallel=True)
- Likewise, if you do not supply parallel = True in your Package, you can keep
- the default parallel behavior and run make like this when you want a
+ Likewise, if you do not supply parallel = True in your Package, you can
+ keep the default parallel behavior and run make like this when you want a
sequential build:
.. code-block:: python
@@ -293,41 +466,56 @@ class Package(object):
p.do_restage() # removes the build directory and
# re-expands the archive.
- The convention used here is that a do_* function is intended to be called
- internally by Spack commands (in spack.cmd). These aren't for package
- writers to override, and doing so may break the functionality of the Package
- class.
+ The convention used here is that a ``do_*`` function is intended to be
+ called internally by Spack commands (in spack.cmd). These aren't for
+ package writers to override, and doing so may break the functionality
+ of the Package class.
Package creators override functions like install() (all of them do this),
clean() (some of them do this), and others to provide custom behavior.
-
"""
+ __metaclass__ = PackageMeta
#
# These are default values for instance variables.
#
"""By default we build in parallel. Subclasses can override this."""
parallel = True
+
"""# jobs to use for parallel make. If set, overrides default of ncpus."""
make_jobs = None
+
"""By default do not run tests within package's install()"""
run_tests = False
+
"""Most packages are NOT extendable. Set to True if you want extensions."""
extendable = False
+
+ """When True, add RPATHs for the entire DAG. When False, add RPATHs only
+ for immediate dependencies."""
+ transitive_rpaths = True
+
"""List of prefix-relative file paths (or a single path). If these do
not exist after install, or if they exist but are not files,
sanity checks fail.
"""
sanity_check_is_file = []
+
"""List of prefix-relative directory paths (or a single path). If
these do not exist after install, or if they exist but are not
directories, sanity checks will fail.
"""
sanity_check_is_dir = []
+ """Per-process lock objects for each install prefix."""
+ prefix_locks = {}
+
def __init__(self, spec):
# this determines how the package should be built.
self.spec = spec
+ # Lock on the prefix shared resource. Will be set in prefix property
+ self._prefix_lock = None
+
# Name of package is the name of its module, without the
# containing module names.
self.name = self.module.__name__
@@ -337,9 +525,6 @@ class Package(object):
# Allow custom staging paths for packages
self.path = None
- # Sanity check attributes required by Spack directives.
- spack.directives.ensure_dicts(type(self))
-
# Check versions in the versions dict.
for v in self.versions:
assert (isinstance(v, Version))
@@ -403,6 +588,22 @@ class Package(object):
if self.is_extension:
spack.repo.get(self.extendee_spec)._check_extendable()
+ self.extra_args = {}
+
+ def possible_dependencies(self, visited=None):
+ """Return set of possible transitive dependencies of this package."""
+ if visited is None:
+ visited = set()
+
+ visited.add(self.name)
+ for name in self.dependencies:
+ if name not in visited and not spack.spec.Spec(name).virtual:
+ pkg = spack.repo.get(name)
+ for name in pkg.possible_dependencies(visited):
+ visited.add(name)
+
+ return visited
+
@property
def package_dir(self):
"""Return the directory where the package.py file lives."""
@@ -460,8 +661,13 @@ class Package(object):
# TODO: move this out of here and into some URL extrapolation module?
def url_for_version(self, version):
- """
- Returns a URL that you can download a new version of this package from.
+ """Returns a URL from which the specified version of this package
+ may be downloaded.
+
+ version: class Version
+ The version for which a URL is sought.
+
+ See Class Version (version.py)
"""
if not isinstance(version, Version):
version = Version(version)
@@ -481,7 +687,8 @@ class Package(object):
def _make_resource_stage(self, root_stage, fetcher, resource):
resource_stage_folder = self._resource_stage(resource)
- resource_mirror = join_path(self.name, os.path.basename(fetcher.url))
+ resource_mirror = spack.mirror.mirror_archive_path(
+ self.spec, fetcher, resource.name)
stage = ResourceStage(resource.fetcher,
root=root_stage,
resource=resource,
@@ -496,7 +703,6 @@ class Package(object):
# Construct a path where the stage should build..
s = self.spec
stage_name = "%s-%s-%s" % (s.name, s.version, s.dag_hash())
- # Build the composite stage
stage = Stage(fetcher, mirror_path=mp, name=stage_name, path=self.path)
return stage
@@ -626,7 +832,7 @@ class Package(object):
if not self.is_extension:
raise ValueError(
"is_extension called on package that is not an extension.")
- exts = spack.install_layout.extension_map(self.extendee_spec)
+ exts = spack.store.layout.extension_map(self.extendee_spec)
return (self.name in exts) and (exts[self.name] == self.spec)
def provides(self, vpkg_name):
@@ -647,7 +853,7 @@ class Package(object):
TODO: move this method to database.py?
"""
dependents = []
- for spec in spack.installed_db.query():
+ for spec in spack.store.db.query():
if self.name == spec.name:
continue
# XXX(deptype): Should build dependencies not count here?
@@ -658,6 +864,29 @@ class Package(object):
return dependents
@property
+ def prefix_lock(self):
+ """Prefix lock is a byte range lock on the nth byte of a file.
+
+ The lock file is ``spack.store.db.prefix_lock`` -- the DB
+ tells us what to call it and it lives alongside the install DB.
+
+ n is the sys.maxsize-bit prefix of the DAG hash. This makes
+ likelihood of collision is very low AND it gives us
+ readers-writer lock semantics with just a single lockfile, so no
+ cleanup required.
+ """
+ if self._prefix_lock is None:
+ prefix = self.spec.prefix
+ if prefix not in Package.prefix_locks:
+ Package.prefix_locks[prefix] = llnl.util.lock.Lock(
+ spack.store.db.prefix_lock_path,
+ self.spec.dag_hash_bit_prefix(bit_length(sys.maxsize)), 1)
+
+ self._prefix_lock = Package.prefix_locks[prefix]
+
+ return self._prefix_lock
+
+ @property
def prefix(self):
"""Get the prefix into which this package should be installed."""
return self.spec.prefix
@@ -687,7 +916,7 @@ class Package(object):
Removes the prefix for a package along with any empty parent
directories
"""
- spack.install_layout.remove_install_directory(self.spec)
+ spack.store.layout.remove_install_directory(self.spec)
def do_fetch(self, mirror_only=False):
"""
@@ -714,7 +943,7 @@ class Package(object):
if not ignore_checksum:
raise FetchError("Will not fetch %s" %
- self.spec.format('$_$@'), checksum_msg)
+ self.spec.format('$_$@'), ck_msg)
self.stage.fetch(mirror_only)
@@ -818,12 +1047,35 @@ class Package(object):
return namespace
def do_fake_install(self):
- """Make a fake install directory contaiing a 'fake' file in bin."""
+ """Make a fake install directory containing a 'fake' file in bin."""
+ # FIXME : Make this part of the 'install' behavior ?
mkdirp(self.prefix.bin)
touch(join_path(self.prefix.bin, 'fake'))
+ mkdirp(self.prefix.include)
mkdirp(self.prefix.lib)
mkdirp(self.prefix.man1)
+ def _if_make_target_execute(self, target):
+ try:
+ # Check if we have a makefile
+ file = [x for x in ('Makefile', 'makefile') if os.path.exists(x)]
+ file = file.pop()
+ except IndexError:
+ tty.msg('No Makefile found in the build directory')
+ return
+
+ # Check if 'target' is in the makefile
+ regex = re.compile('^' + target + ':')
+ with open(file, 'r') as f:
+ matches = [line for line in f.readlines() if regex.match(line)]
+
+ if not matches:
+ tty.msg('Target \'' + target + ':\' not found in Makefile')
+ return
+
+ # Execute target
+ inspect.getmodule(self).make(target)
+
def _get_needed_resources(self):
resources = []
# Select the resources that are needed for this build
@@ -841,38 +1093,55 @@ class Package(object):
resource_stage_folder = '-'.join(pieces)
return resource_stage_folder
- install_phases = set(['configure', 'build', 'install', 'provenance'])
+ @contextlib.contextmanager
+ def _prefix_read_lock(self):
+ try:
+ self.prefix_lock.acquire_read(60)
+ yield self
+ finally:
+ self.prefix_lock.release_read()
+
+ @contextlib.contextmanager
+ def _prefix_write_lock(self):
+ try:
+ self.prefix_lock.acquire_write(60)
+ yield self
+ finally:
+ self.prefix_lock.release_write()
def do_install(self,
keep_prefix=False,
keep_stage=False,
- ignore_deps=False,
+ install_deps=True,
skip_patch=False,
verbose=False,
make_jobs=None,
run_tests=False,
fake=False,
explicit=False,
- dirty=False,
- install_phases=install_phases):
+ dirty=None,
+ **kwargs):
"""Called by commands to install a package and its dependencies.
Package implementations should override install() to describe
their build process.
- Args:
- keep_prefix -- Keep install prefix on failure. By default, destroys it.
- keep_stage -- By default, stage is destroyed only if there are no
- exceptions during build. Set to True to keep the stage
- even with exceptions.
- ignore_deps -- Don't install dependencies before installing this
- package
- fake -- Don't really build -- install fake stub files instead.
- skip_patch -- Skip patch stage of build if True.
- verbose -- Display verbose build output (by default, suppresses it)
- dirty -- Don't clean the build environment before installing.
- make_jobs -- Number of make jobs to use for install. Default is ncpus
- run_tests -- Runn tests within the package's install()
+ :param keep_prefix: Keep install prefix on failure. By default, \
+ destroys it.
+ :param keep_stage: By default, stage is destroyed only if there are \
+ no exceptions during build. Set to True to keep the stage
+ even with exceptions.
+ :param install_deps: Install dependencies before installing this \
+ package
+ :param fake: Don't really build; install fake stub files instead.
+ :param skip_patch: Skip patch stage of build if True.
+ :param verbose: Display verbose build output (by default, suppresses \
+ it)
+ :param dirty: Don't clean the build environment before installing.
+ :param make_jobs: Number of make jobs to use for install. Default is \
+ ncpus
+ :param force: Install again, even if already installed.
+ :param run_tests: Run tests within the package's install()
"""
if not self.spec.concrete:
raise ValueError("Can only install concrete packages: %s."
@@ -885,28 +1154,41 @@ class Package(object):
return
# Ensure package is not already installed
- layout = spack.install_layout
- if 'install' in install_phases and layout.check_installed(self.spec):
- tty.msg("%s is already installed in %s" % (self.name, self.prefix))
- rec = spack.installed_db.get_record(self.spec)
- if (not rec.explicit) and explicit:
- with spack.installed_db.write_transaction():
- rec = spack.installed_db.get_record(self.spec)
- rec.explicit = True
- return
+ layout = spack.store.layout
+ with self._prefix_read_lock():
+ if layout.check_installed(self.spec):
+ tty.msg(
+ "%s is already installed in %s" % (self.name, self.prefix))
+ rec = spack.store.db.get_record(self.spec)
+ if (not rec.explicit) and explicit:
+ with spack.store.db.write_transaction():
+ rec = spack.store.db.get_record(self.spec)
+ rec.explicit = True
+ return
+
+ # Dirty argument takes precedence over dirty config setting.
+ if dirty is None:
+ dirty = spack.dirty
+
+ self._do_install_pop_kwargs(kwargs)
tty.msg("Installing %s" % self.name)
# First, install dependencies recursively.
- if not ignore_deps:
- self.do_install_dependencies(keep_prefix=keep_prefix,
- keep_stage=keep_stage,
- ignore_deps=ignore_deps,
- fake=fake,
- skip_patch=skip_patch,
- verbose=verbose,
- make_jobs=make_jobs,
- run_tests=run_tests)
+ if install_deps:
+ for dep in self.spec.dependencies():
+ dep.package.do_install(
+ keep_prefix=keep_prefix,
+ keep_stage=keep_stage,
+ install_deps=install_deps,
+ fake=fake,
+ skip_patch=skip_patch,
+ verbose=verbose,
+ make_jobs=make_jobs,
+ run_tests=run_tests,
+ dirty=dirty,
+ **kwargs
+ )
# Set run_tests flag before starting build.
self.run_tests = run_tests
@@ -915,7 +1197,7 @@ class Package(object):
self.make_jobs = make_jobs
# Then install the package itself.
- def build_process():
+ def build_process(input_stream):
"""Forked for each build. Has its own process and python
module space set up by build_environment.fork()."""
@@ -926,18 +1208,16 @@ class Package(object):
else:
self.do_stage()
- tty.msg("Building %s" % self.name)
+ tty.msg(
+ 'Building {0} [{1}]'.format(self.name, self.build_system_class)
+ )
self.stage.keep = keep_stage
- self.install_phases = install_phases
- self.build_directory = join_path(self.stage.path, 'spack-build')
- self.source_directory = self.stage.source_path
- with self.stage:
+ with contextlib.nested(self.stage, self._prefix_write_lock()):
# Run the pre-install hook in the child process after
# the directory is created.
spack.hooks.pre_install(self)
-
if fake:
self.do_fake_install()
else:
@@ -947,44 +1227,34 @@ class Package(object):
# Save the build environment in a file before building.
env_path = join_path(os.getcwd(), 'spack-build.env')
- try:
- # Redirect I/O to a build log (and optionally to
- # the terminal)
- log_path = join_path(os.getcwd(), 'spack-build.out')
- log_file = open(log_path, 'w')
- with log_output(log_file, verbose, sys.stdout.isatty(),
- True):
- dump_environment(env_path)
- self.install(self.spec, self.prefix)
-
- except ProcessError as e:
- # Annotate ProcessErrors with the location of
- # the build log
- e.build_log = log_path
- raise e
-
- # Ensure that something was actually installed.
- if 'install' in self.install_phases:
- self.sanity_check_prefix()
-
- # Copy provenance into the install directory on success
- if 'provenance' in self.install_phases:
- log_install_path = layout.build_log_path(self.spec)
- env_install_path = layout.build_env_path(self.spec)
- packages_dir = layout.build_packages_path(self.spec)
-
- # Remove first if we're overwriting another build
- # (can happen with spack setup)
- try:
- # log_install_path and env_install_path are here
- shutil.rmtree(packages_dir)
- except:
- pass
-
- install(log_path, log_install_path)
- install(env_path, env_install_path)
- dump_packages(self.spec, packages_dir)
-
+ # Redirect I/O to a build log (and optionally to
+ # the terminal)
+ log_path = join_path(os.getcwd(), 'spack-build.out')
+
+ # FIXME : refactor this assignment
+ self.log_path = log_path
+ self.env_path = env_path
+ dump_environment(env_path)
+
+ # Spawn a daemon that reads from a pipe and redirects
+ # everything to log_path
+ redirection_context = log_output(
+ log_path,
+ echo=verbose,
+ force_color=sys.stdout.isatty(),
+ debug=True,
+ input_stream=input_stream
+ )
+ with redirection_context as log_redirection:
+ for phase_name, phase in zip(self.phases, self._InstallPhase_phases): # NOQA: ignore=E501
+ tty.msg(
+ 'Executing phase : \'{0}\''.format(phase_name) # NOQA: ignore=E501
+ )
+ # Redirect stdout and stderr to daemon pipe
+ with log_redirection:
+ getattr(self, phase)(
+ self.spec, self.prefix)
+ self.log()
# Run post install hooks before build stage is removed.
spack.hooks.post_install(self)
@@ -1000,35 +1270,67 @@ class Package(object):
try:
# Create the install prefix and fork the build process.
- spack.install_layout.create_install_directory(self.spec)
- except directory_layout.InstallDirectoryAlreadyExistsError:
- if 'install' in install_phases:
- # Abort install if install directory exists.
- # But do NOT remove it (you'd be overwriting someone's data)
- tty.warn("Keeping existing install prefix in place.")
- raise
- else:
- # We're not installing anyway, so don't worry if someone
- # else has already written in the install directory
- pass
-
- try:
+ spack.store.layout.create_install_directory(self.spec)
+ # Fork a child to do the actual installation
spack.build_environment.fork(self, build_process, dirty=dirty)
- except:
- # remove the install prefix if anything went wrong during install.
+ # If we installed then we should keep the prefix
+ keep_prefix = True if self.last_phase is None else keep_prefix
+ # note: PARENT of the build process adds the new package to
+ # the database, so that we don't need to re-read from file.
+ spack.store.db.add(
+ self.spec, spack.store.layout, explicit=explicit
+ )
+ except directory_layout.InstallDirectoryAlreadyExistsError:
+ # Abort install if install directory exists.
+ # But do NOT remove it (you'd be overwriting someone else's stuff)
+ tty.warn("Keeping existing install prefix in place.")
+ raise
+ except StopIteration as e:
+ # A StopIteration exception means that do_install
+ # was asked to stop early from clients
+ tty.msg(e.message)
+ tty.msg(
+ 'Package stage directory : {0}'.format(self.stage.source_path)
+ )
+ finally:
+ # Remove the install prefix if anything went wrong during install.
if not keep_prefix:
self.remove_prefix()
- else:
- tty.warn("Keeping install prefix in place despite error.",
- "Spack will think this package is installed. " +
- "Manually remove this directory to fix:",
- self.prefix,
- wrap=False)
- raise
- # note: PARENT of the build process adds the new package to
- # the database, so that we don't need to re-read from file.
- spack.installed_db.add(self.spec, self.prefix, explicit=explicit)
+ def _do_install_pop_kwargs(self, kwargs):
+ """Pops kwargs from do_install before starting the installation
+
+ Args:
+ kwargs:
+ 'stop_at': last installation phase to be executed (or None)
+
+ """
+ self.last_phase = kwargs.pop('stop_at', None)
+ if self.last_phase is not None and self.last_phase not in self.phases:
+ tty.die('\'{0}\' is not an allowed phase for package {1}'
+ .format(self.last_phase, self.name))
+
+ def log(self):
+ # Copy provenance into the install directory on success
+ log_install_path = spack.store.layout.build_log_path(
+ self.spec)
+ env_install_path = spack.store.layout.build_env_path(
+ self.spec)
+ packages_dir = spack.store.layout.build_packages_path(
+ self.spec)
+
+ # Remove first if we're overwriting another build
+ # (can happen with spack setup)
+ try:
+ # log_install_path and env_install_path are inside this
+ shutil.rmtree(packages_dir)
+ except Exception:
+ # FIXME : this potentially catches too many things...
+ pass
+
+ install(self.log_path, log_install_path)
+ install(self.env_path, env_install_path)
+ dump_packages(self.spec, packages_dir)
def sanity_check_prefix(self):
"""This function checks whether install succeeded."""
@@ -1048,20 +1350,16 @@ class Package(object):
check_paths(self.sanity_check_is_dir, 'directory', os.path.isdir)
installed = set(os.listdir(self.prefix))
- installed.difference_update(spack.install_layout.hidden_file_paths)
+ installed.difference_update(
+ spack.store.layout.hidden_file_paths)
if not installed:
raise InstallError(
"Install failed for %s. Nothing was installed!" % self.name)
- def do_install_dependencies(self, **kwargs):
- # Pass along paths of dependencies here
- for dep in self.spec.dependencies():
- dep.package.do_install(**kwargs)
-
@property
def build_log_path(self):
if self.installed:
- return spack.install_layout.build_log_path(self.spec)
+ return spack.store.layout.build_log_path(self.spec)
else:
return join_path(self.stage.source_path, 'spack-build.out')
@@ -1108,20 +1406,20 @@ class Package(object):
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
"""Set up the environment of packages that depend on this one.
- This is similar to `setup_environment`, but it is used to
+ This is similar to ``setup_environment``, but it is used to
modify the compile and runtime environments of packages that
*depend* on this one. This gives packages like Python and
others that follow the extension model a way to implement
common environment or compile-time settings for dependencies.
- By default, this delegates to self.setup_environment()
+ By default, this delegates to ``self.setup_environment()``
- Example :
+ Example:
1. Installing python modules generally requires
- `PYTHONPATH` to point to the lib/pythonX.Y/site-packages
- directory in the module's install prefix. This could
- set that variable.
+ `PYTHONPATH` to point to the lib/pythonX.Y/site-packages
+ directory in the module's install prefix. This could
+ set that variable.
Args:
@@ -1140,7 +1438,6 @@ class Package(object):
This is useful if there are some common steps to installing
all extensions for a certain package.
-
"""
self.setup_environment(spack_env, run_env)
@@ -1188,20 +1485,13 @@ class Package(object):
"""
pass
- def install(self, spec, prefix):
- """
- Package implementations override this with their own configuration
- """
- raise InstallError("Package %s provides no install method!" %
- self.name)
-
def do_uninstall(self, force=False):
if not self.installed:
# prefix may not exist, but DB may be inconsistent. Try to fix by
# removing, but omit hooks.
- specs = spack.installed_db.query(self.spec, installed=True)
+ specs = spack.store.db.query(self.spec, installed=True)
if specs:
- spack.installed_db.remove(specs[0])
+ spack.store.db.remove(specs[0])
tty.msg("Removed stale DB entry for %s" % self.spec.short_spec)
return
else:
@@ -1213,11 +1503,12 @@ class Package(object):
raise PackageStillNeededError(self.spec, dependents)
# Pre-uninstall hook runs first.
- spack.hooks.pre_uninstall(self)
-
- # Uninstalling in Spack only requires removing the prefix.
- self.remove_prefix()
- spack.installed_db.remove(self.spec)
+ with self._prefix_write_lock():
+ spack.hooks.pre_uninstall(self)
+ # Uninstalling in Spack only requires removing the prefix.
+ self.remove_prefix()
+ #
+ spack.store.db.remove(self.spec)
tty.msg("Successfully uninstalled %s" % self.spec.short_spec)
# Once everything else is done, run post install hooks
@@ -1251,8 +1542,8 @@ class Package(object):
"""
self._sanity_check_extension()
- spack.install_layout.check_extension_conflict(self.extendee_spec,
- self.spec)
+ spack.store.layout.check_extension_conflict(
+ self.extendee_spec, self.spec)
# Activate any package dependencies that are also extensions.
if not force:
@@ -1263,7 +1554,7 @@ class Package(object):
self.extendee_spec.package.activate(self, **self.extendee_args)
- spack.install_layout.add_extension(self.extendee_spec, self.spec)
+ spack.store.layout.add_extension(self.extendee_spec, self.spec)
tty.msg("Activated extension %s for %s" %
(self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@")))
@@ -1278,7 +1569,7 @@ class Package(object):
"""
def ignore(filename):
- return (filename in spack.install_layout.hidden_file_paths or
+ return (filename in spack.store.layout.hidden_file_paths or
kwargs.get('ignore', lambda f: False)(filename))
tree = LinkTree(extension.prefix)
@@ -1296,9 +1587,11 @@ class Package(object):
# Allow a force deactivate to happen. This can unlink
# spurious files if something was corrupted.
if not force:
- spack.install_layout.check_activated(self.extendee_spec, self.spec)
+ spack.store.layout.check_activated(
+ self.extendee_spec, self.spec)
- activated = spack.install_layout.extension_map(self.extendee_spec)
+ activated = spack.store.layout.extension_map(
+ self.extendee_spec)
for name, aspec in activated.items():
if aspec == self.spec:
continue
@@ -1314,8 +1607,8 @@ class Package(object):
# redundant activation check -- makes SURE the spec is not
# still activated even if something was wrong above.
if self.activated:
- spack.install_layout.remove_extension(self.extendee_spec,
- self.spec)
+ spack.store.layout.remove_extension(
+ self.extendee_spec, self.spec)
tty.msg("Deactivated extension %s for %s" %
(self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@")))
@@ -1331,7 +1624,7 @@ class Package(object):
"""
def ignore(filename):
- return (filename in spack.install_layout.hidden_file_paths or
+ return (filename in spack.store.layout.hidden_file_paths or
kwargs.get('ignore', lambda f: False)(filename))
tree = LinkTree(extension.prefix)
@@ -1404,6 +1697,16 @@ class Package(object):
return " ".join("-Wl,-rpath,%s" % p for p in self.rpath)
+class Package(PackageBase):
+ phases = ['install']
+ # To be used in UI queries that require to know which
+ # build-system class we are using
+ build_system_class = 'Package'
+ # This will be used as a registration decorator in user
+ # packages, if need be
+ PackageBase.sanity_check('install')(PackageBase.sanity_check_prefix)
+
+
def install_dependency_symlinks(pkg, spec, prefix):
"""Execute a dummy install and flatten dependencies"""
flatten_dependencies(spec, prefix)
@@ -1422,7 +1725,7 @@ def flatten_dependencies(spec, flat_dir):
for dep in spec.traverse(root=False):
name = dep.name
- dep_path = spack.install_layout.path_for_spec(dep)
+ dep_path = spack.store.layout.path_for_spec(dep)
dep_files = LinkTree(dep_path)
os.mkdir(flat_dir + '/' + name)
@@ -1434,16 +1737,6 @@ def flatten_dependencies(spec, flat_dir):
dep_files.merge(flat_dir + '/' + name)
-def validate_package_url(url_string):
- """Determine whether spack can handle a particular URL or not."""
- url = urlparse(url_string)
- if url.scheme not in _ALLOWED_URL_SCHEMES:
- tty.die("Invalid protocol in URL: '%s'" % url_string)
-
- if not allowed_archive(url_string):
- tty.die("Invalid file type in URL: '%s'" % url_string)
-
-
def dump_packages(spec, path):
"""Dump all package information for a spec and its dependencies.
@@ -1461,7 +1754,7 @@ def dump_packages(spec, path):
if node is not spec:
# Locate the dependency package in the install tree and find
# its provenance information.
- source = spack.install_layout.build_packages_path(node)
+ source = spack.store.layout.build_packages_path(node)
source_repo_root = join_path(source, node.namespace)
# There's no provenance installed for the source package. Skip it.
@@ -1514,166 +1807,6 @@ def _hms(seconds):
return ' '.join(parts)
-class StagedPackage(Package):
- """A Package subclass where the install() is split up into stages."""
-
- def install_setup(self):
- """Creates a spack_setup.py script to configure the package later."""
- raise InstallError(
- "Package %s provides no install_setup() method!" % self.name)
-
- def install_configure(self):
- """Runs the configure process."""
- raise InstallError(
- "Package %s provides no install_configure() method!" % self.name)
-
- def install_build(self):
- """Runs the build process."""
- raise InstallError(
- "Package %s provides no install_build() method!" % self.name)
-
- def install_install(self):
- """Runs the install process."""
- raise InstallError(
- "Package %s provides no install_install() method!" % self.name)
-
- def install(self, spec, prefix):
- if 'setup' in self.install_phases:
- self.install_setup()
-
- if 'configure' in self.install_phases:
- self.install_configure()
-
- if 'build' in self.install_phases:
- self.install_build()
-
- if 'install' in self.install_phases:
- self.install_install()
- else:
- # Create a dummy file so the build doesn't fail.
- # That way, the module file will also be created.
- with open(os.path.join(prefix, 'dummy'), 'w'):
- pass
-
-
-# stackoverflow.com/questions/12791997/how-do-you-do-a-simple-chmod-x-from-within-python
-def make_executable(path):
- mode = os.stat(path).st_mode
- mode |= (mode & 0o444) >> 2 # copy R bits to X
- os.chmod(path, mode)
-
-
-class CMakePackage(StagedPackage):
-
- def make_make(self):
- import multiprocessing
- # number of jobs spack will to build with.
- jobs = multiprocessing.cpu_count()
- if not self.parallel:
- jobs = 1
- elif self.make_jobs:
- jobs = self.make_jobs
-
- make = spack.build_environment.MakeExecutable('make', jobs)
- return make
-
- def configure_args(self):
- """Returns package-specific arguments to be provided to
- the configure command.
- """
- return list()
-
- def configure_env(self):
- """Returns package-specific environment under which the
- configure command should be run.
- """
- return dict()
-
- def transitive_inc_path(self):
- return ';'.join(
- os.path.join(dep, 'include')
- for dep in os.environ['SPACK_DEPENDENCIES'].split(os.pathsep)
- )
-
- def install_setup(self):
- cmd = [str(which('cmake'))]
- cmd += spack.build_environment.get_std_cmake_args(self)
- cmd += ['-DCMAKE_INSTALL_PREFIX=%s' % os.environ['SPACK_PREFIX'],
- '-DCMAKE_C_COMPILER=%s' % os.environ['SPACK_CC'],
- '-DCMAKE_CXX_COMPILER=%s' % os.environ['SPACK_CXX'],
- '-DCMAKE_Fortran_COMPILER=%s' % os.environ['SPACK_FC']]
- cmd += self.configure_args()
-
- env = {
- 'PATH': os.environ['PATH'],
- 'SPACK_TRANSITIVE_INCLUDE_PATH': self.transitive_inc_path(),
- 'CMAKE_PREFIX_PATH': os.environ['CMAKE_PREFIX_PATH']
- }
-
- setup_fname = 'spconfig.py'
- with open(setup_fname, 'w') as fout:
- fout.write(r"""#!%s
-#
-
-import sys
-import os
-import subprocess
-
-def cmdlist(str):
- return list(x.strip().replace("'",'') for x in str.split('\n') if x)
-env = dict(os.environ)
-""" % sys.executable)
-
- env_vars = sorted(list(env.keys()))
- for name in env_vars:
- val = env[name]
- if string.find(name, 'PATH') < 0:
- fout.write('env[%s] = %s\n' % (repr(name), repr(val)))
- else:
- if name == 'SPACK_TRANSITIVE_INCLUDE_PATH':
- sep = ';'
- else:
- sep = ':'
-
- fout.write('env[%s] = "%s".join(cmdlist("""\n'
- % (repr(name), sep))
- for part in string.split(val, sep):
- fout.write(' %s\n' % part)
- fout.write('"""))\n')
-
- fout.write("env['CMAKE_TRANSITIVE_INCLUDE_PATH'] = "
- "env['SPACK_TRANSITIVE_INCLUDE_PATH'] # Deprecated\n")
- fout.write('\ncmd = cmdlist("""\n')
- fout.write('%s\n' % cmd[0])
- for arg in cmd[1:]:
- fout.write(' %s\n' % arg)
- fout.write('""") + sys.argv[1:]\n')
- fout.write('\nproc = subprocess.Popen(cmd, env=env)\n')
- fout.write('proc.wait()\n')
- make_executable(setup_fname)
-
- def install_configure(self):
- cmake = which('cmake')
- with working_dir(self.build_directory, create=True):
- env = os.environ
- env.update(self.configure_env())
- env['SPACK_TRANSITIVE_INCLUDE_PATH'] = self.transitive_inc_path()
-
- options = self.configure_args()
- options += spack.build_environment.get_std_cmake_args(self)
- cmake(self.source_directory, *options)
-
- def install_build(self):
- make = self.make_make()
- with working_dir(self.build_directory, create=False):
- make()
-
- def install_install(self):
- make = self.make_make()
- with working_dir(self.build_directory, create=False):
- make('install')
-
-
class FetchError(spack.error.SpackError):
"""Raised when something goes wrong during fetch."""
diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py
index 0bd9f5d29d..ee83748319 100644
--- a/lib/spack/spack/patch.py
+++ b/lib/spack/spack/patch.py
@@ -24,62 +24,106 @@
##############################################################################
import os
-from llnl.util.filesystem import join_path
-
import spack
-import spack.stage
import spack.error
+import spack.stage
+import spack.fetch_strategy as fs
+from llnl.util.filesystem import join_path
from spack.util.executable import which
-# Patch tool for patching archives.
-_patch = which("patch", required=True)
-
class Patch(object):
- """This class describes a patch to be applied to some expanded
- source code."""
+ """Base class to describe a patch that needs to be applied to some
+ expanded source code.
+ """
+
+ @staticmethod
+ def create(pkg, path_or_url, level, **kwargs):
+ """
+ Factory method that creates an instance of some class derived from
+ Patch
+
+ Args:
+ pkg: package that needs to be patched
+ path_or_url: path or url where the patch is found
+ level: patch level
+
+ Returns:
+ instance of some Patch class
+ """
+ # Check if we are dealing with a URL
+ if '://' in path_or_url:
+ return UrlPatch(pkg, path_or_url, level, **kwargs)
+ # Assume patches are stored in the repository
+ return FilePatch(pkg, path_or_url, level)
def __init__(self, pkg, path_or_url, level):
- self.pkg_name = pkg.name
+ # Check on level (must be an integer > 0)
+ if not isinstance(level, int) or not level >= 0:
+ raise ValueError("Patch level needs to be a non-negative integer.")
+ # Attributes shared by all patch subclasses
self.path_or_url = path_or_url
- self.path = None
- self.url = None
self.level = level
+ # self.path needs to be computed by derived classes
+ # before a call to apply
+ self.path = None
if not isinstance(self.level, int) or not self.level >= 0:
raise ValueError("Patch level needs to be a non-negative integer.")
- if '://' in path_or_url:
- self.url = path_or_url
- else:
- pkg_dir = spack.repo.dirname_for_package_name(self.pkg_name)
- self.path = join_path(pkg_dir, path_or_url)
- if not os.path.isfile(self.path):
- raise NoSuchPatchFileError(pkg_name, self.path)
-
def apply(self, stage):
- """Fetch this patch, if necessary, and apply it to the source
- code in the supplied stage.
+ """Apply the patch at self.path to the source code in the
+ supplied stage
+
+ Args:
+ stage: stage for the package that needs to be patched
"""
stage.chdir_to_source()
+ # Use -N to allow the same patches to be applied multiple times.
+ _patch = which("patch", required=True)
+ _patch('-s', '-p', str(self.level), '-i', self.path)
+
+
+class FilePatch(Patch):
+ """Describes a patch that is retrieved from a file in the repository"""
+ def __init__(self, pkg, path_or_url, level):
+ super(FilePatch, self).__init__(pkg, path_or_url, level)
- patch_stage = None
- try:
- if self.url:
- # use an anonymous stage to fetch the patch if it is a URL
- patch_stage = spack.stage.Stage(self.url)
- patch_stage.fetch()
- patch_file = patch_stage.archive_file
- else:
- patch_file = self.path
-
- # Use -N to allow the same patches to be applied multiple times.
- _patch('-s', '-p', str(self.level), '-i', patch_file)
-
- finally:
- if patch_stage:
- patch_stage.destroy()
+ pkg_dir = spack.repo.dirname_for_package_name(pkg.name)
+ self.path = join_path(pkg_dir, path_or_url)
+ if not os.path.isfile(self.path):
+ raise NoSuchPatchFileError(pkg.name, self.path)
+
+
+class UrlPatch(Patch):
+ """Describes a patch that is retrieved from a URL"""
+ def __init__(self, pkg, path_or_url, level, **kwargs):
+ super(UrlPatch, self).__init__(pkg, path_or_url, level)
+ self.url = path_or_url
+ self.md5 = kwargs.get('md5')
+
+ def apply(self, stage):
+ """Retrieve the patch in a temporary stage, computes
+ self.path and calls `super().apply(stage)`
+
+ Args:
+ stage: stage for the package that needs to be patched
+ """
+ fetcher = fs.URLFetchStrategy(self.url, digest=self.md5)
+ mirror = join_path(
+ os.path.dirname(stage.mirror_path),
+ os.path.basename(self.url)
+ )
+ with spack.stage.Stage(fetcher, mirror_path=mirror) as patch_stage:
+ patch_stage.fetch()
+ patch_stage.check()
+ patch_stage.cache_local()
+ patch_stage.expand_archive()
+ self.path = os.path.abspath(
+ os.listdir(patch_stage.path).pop()
+ )
+ super(UrlPatch, self).apply(stage)
class NoSuchPatchFileError(spack.error.SpackError):
diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py
index 0059b49ff1..94e2949e4a 100644
--- a/lib/spack/spack/platforms/cray.py
+++ b/lib/spack/spack/platforms/cray.py
@@ -1,44 +1,28 @@
import os
import re
-import spack.config
import llnl.util.tty as tty
+from spack import build_env_path
from spack.util.executable import which
from spack.architecture import Platform, Target, NoPlatformError
from spack.operating_systems.linux_distro import LinuxDistro
from spack.operating_systems.cnl import Cnl
from llnl.util.filesystem import join_path
-# Craype- module prefixes that are not valid CPU targets.
-NON_TARGETS = ('hugepages', 'network', 'target', 'accel', 'xtpe')
-
-
-def _target_from_clean_env(name):
- '''Return the default back_end target as loaded in a clean login session.
-
- A bash subshell is launched with a wiped environment and the list of loaded
- modules is parsed for the first acceptable CrayPE target.
- '''
- # Based on the incantation:
- # echo "$(env - USER=$USER /bin/bash -l -c 'module list -lt')"
- targets = []
- if name != 'front_end':
- env = which('env')
- env.add_default_arg('-')
- # CAUTION - $USER is generally needed to initialize the environment.
- # There may be other variables needed for general success.
- output = env('USER=%s' % os.environ['USER'],
- '/bin/bash', '--noprofile', '--norc', '-c',
- '. /etc/profile; module list -lt',
- output=str, error=str)
- default_modules = [i for i in output.splitlines()
- if len(i.split()) == 1]
- tty.debug("Found default modules:",
- *[" " + mod for mod in default_modules])
- pattern = 'craype-(?!{0})(\S*)'.format('|'.join(NON_TARGETS))
- for mod in default_modules:
- if 'craype-' in mod:
- targets.extend(re.findall(pattern, mod))
- return targets[0] if targets else None
+
+def _get_modules_in_modulecmd_output(output):
+ '''Return list of valid modules parsed from modulecmd output string.'''
+ return [i for i in output.splitlines()
+ if len(i.split()) == 1]
+
+
+def _fill_craype_targets_from_modules(targets, modules):
+ '''Extend CrayPE CPU targets list with those found in list of modules.'''
+ # Craype- module prefixes that are not valid CPU targets.
+ non_targets = ('hugepages', 'network', 'target', 'accel', 'xtpe')
+ pattern = r'craype-(?!{0})(\S*)'.format('|'.join(non_targets))
+ for mod in modules:
+ if 'craype-' in mod:
+ targets.extend(re.findall(pattern, mod))
class Cray(Platform):
@@ -56,26 +40,26 @@ class Cray(Platform):
'''
super(Cray, self).__init__('cray')
- # Get targets from config or make best guess from environment:
- conf = spack.config.get_config('targets')
+ # Make all craype targets available.
+ for target in self._avail_targets():
+ name = target.replace('-', '_')
+ self.add_target(name, Target(name, 'craype-%s' % target))
+
+ # Get aliased targets from config or best guess from environment:
for name in ('front_end', 'back_end'):
_target = getattr(self, name, None)
if _target is None:
_target = os.environ.get('SPACK_' + name.upper())
- if _target is None:
- _target = conf.get(name)
- if _target is None:
- _target = _target_from_clean_env(name)
- setattr(self, name, _target)
-
+ if _target is None and name == 'back_end':
+ _target = self._default_target_from_env()
if _target is not None:
- self.add_target(name, Target(_target, 'craype-' + _target))
- self.add_target(_target, Target(_target, 'craype-' + _target))
+ safe_name = _target.replace('-', '_')
+ setattr(self, name, safe_name)
+ self.add_target(name, self.targets[safe_name])
if self.back_end is not None:
self.default = self.back_end
- self.add_target(
- 'default', Target(self.default, 'craype-' + self.default))
+ self.add_target('default', self.targets[self.back_end])
else:
raise NoPlatformError()
@@ -90,16 +74,54 @@ class Cray(Platform):
self.add_operating_system(self.front_os, front_distro)
@classmethod
- def setup_platform_environment(self, pkg, env):
+ def setup_platform_environment(cls, pkg, env):
""" Change the linker to default dynamic to be more
similar to linux/standard linker behavior
"""
env.set('CRAYPE_LINK_TYPE', 'dynamic')
- cray_wrapper_names = join_path(spack.build_env_path, 'cray')
+ cray_wrapper_names = join_path(build_env_path, 'cray')
if os.path.isdir(cray_wrapper_names):
env.prepend_path('PATH', cray_wrapper_names)
env.prepend_path('SPACK_ENV_PATH', cray_wrapper_names)
@classmethod
- def detect(self):
+ def detect(cls):
return os.environ.get('CRAYPE_VERSION') is not None
+
+ def _default_target_from_env(self):
+ '''Set and return the default CrayPE target loaded in a clean login
+ session.
+
+ A bash subshell is launched with a wiped environment and the list of
+ loaded modules is parsed for the first acceptable CrayPE target.
+ '''
+ # Based on the incantation:
+ # echo "$(env - USER=$USER /bin/bash -l -c 'module list -lt')"
+ if getattr(self, 'default', None) is None:
+ env = which('env')
+ env.add_default_arg('-')
+ # CAUTION - $USER is generally needed in the sub-environment.
+ # There may be other variables needed for general success.
+ output = env('USER=%s' % os.environ['USER'],
+ 'HOME=%s' % os.environ['HOME'],
+ '/bin/bash', '--noprofile', '--norc', '-c',
+ '. /etc/profile; module list -lt',
+ output=str, error=str)
+ self._defmods = _get_modules_in_modulecmd_output(output)
+ targets = []
+ _fill_craype_targets_from_modules(targets, self._defmods)
+ self.default = targets[0] if targets else None
+ tty.debug("Found default modules:",
+ *[" %s" % mod for mod in self._defmods])
+ return self.default
+
+ def _avail_targets(self):
+ '''Return a list of available CrayPE CPU targets.'''
+ if getattr(self, '_craype_targets', None) is None:
+ module = which('modulecmd', required=True)
+ module.add_default_arg('python')
+ output = module('avail', '-t', 'craype-', output=str, error=str)
+ craype_modules = _get_modules_in_modulecmd_output(output)
+ self._craype_targets = targets = []
+ _fill_craype_targets_from_modules(targets, craype_modules)
+ return self._craype_targets
diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py
index 974ce3a3f9..ffefd36546 100644
--- a/lib/spack/spack/platforms/darwin.py
+++ b/lib/spack/spack/platforms/darwin.py
@@ -1,4 +1,4 @@
-import subprocess
+import platform
from spack.architecture import Platform, Target
from spack.operating_systems.mac_os import MacOs
@@ -22,6 +22,4 @@ class Darwin(Platform):
@classmethod
def detect(self):
- platform = subprocess.Popen(['uname', '-a'], stdout=subprocess.PIPE)
- platform, _ = platform.communicate()
- return 'darwin' in platform.strip().lower()
+ return 'darwin' in platform.system().lower()
diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py
index 38d2cdbfec..cee0cfd6e9 100644
--- a/lib/spack/spack/platforms/linux.py
+++ b/lib/spack/spack/platforms/linux.py
@@ -1,4 +1,3 @@
-import subprocess
import platform
from spack.architecture import Platform, Target
from spack.operating_systems.linux_distro import LinuxDistro
@@ -27,6 +26,4 @@ class Linux(Platform):
@classmethod
def detect(self):
- platform = subprocess.Popen(['uname', '-a'], stdout=subprocess.PIPE)
- platform, _ = platform.communicate()
- return 'linux' in platform.strip().lower()
+ return 'linux' in platform.system().lower()
diff --git a/lib/spack/spack/preferred_packages.py b/lib/spack/spack/preferred_packages.py
index 45a41c8e2b..08f9c3cfa8 100644
--- a/lib/spack/spack/preferred_packages.py
+++ b/lib/spack/spack/preferred_packages.py
@@ -28,9 +28,6 @@ from spack.version import *
class PreferredPackages(object):
- # Arbitrary, but consistent
- _default_order = {'compiler': ['gcc', 'intel', 'clang', 'pgi', 'xlc']}
-
def __init__(self):
self.preferred = spack.config.get_config('packages')
self._spec_for_pkgname_cache = {}
@@ -128,9 +125,6 @@ class PreferredPackages(object):
key = (pkgname, component, second_key)
if key not in self._spec_for_pkgname_cache:
pkglist = self._order_for_package(pkgname, component, second_key)
- if not pkglist:
- if component in self._default_order:
- pkglist = self._default_order[component]
if component == 'compiler':
self._spec_for_pkgname_cache[key] = \
[spack.spec.CompilerSpec(s) for s in pkglist]
diff --git a/lib/spack/spack/provider_index.py b/lib/spack/spack/provider_index.py
index 3f9cd285e7..6bcf98009e 100644
--- a/lib/spack/spack/provider_index.py
+++ b/lib/spack/spack/provider_index.py
@@ -28,10 +28,11 @@ The ``virtual`` module contains utility classes for virtual dependencies.
from itertools import product as iproduct
from pprint import pformat
-import yaml
+import spack.util.spack_yaml as syaml
from yaml.error import MarkedYAMLError
import spack
+import spack.error
class ProviderIndex(object):
@@ -189,23 +190,22 @@ class ProviderIndex(object):
lambda vpkg, pset: [
vpkg.to_node_dict(), [p.to_node_dict() for p in pset]], list)
- yaml.dump({'provider_index': {'providers': provider_list}},
- stream=stream)
+ syaml.dump({'provider_index': {'providers': provider_list}},
+ stream=stream)
@staticmethod
def from_yaml(stream):
try:
- yfile = yaml.load(stream)
+ yfile = syaml.load(stream)
except MarkedYAMLError, e:
raise spack.spec.SpackYAMLError(
"error parsing YAML ProviderIndex cache:", str(e))
if not isinstance(yfile, dict):
- raise spack.spec.SpackYAMLError(
- "YAML ProviderIndex was not a dict.")
+ raise ProviderIndexError("YAML ProviderIndex was not a dict.")
if 'provider_index' not in yfile:
- raise spack.spec.SpackYAMLError(
+ raise ProviderIndexError(
"YAML ProviderIndex does not start with 'provider_index'")
index = ProviderIndex()
@@ -232,7 +232,8 @@ class ProviderIndex(object):
spdict[provided_spec] = opdict[provided_spec]
continue
- spdict[provided_spec] += opdict[provided_spec]
+ spdict[provided_spec] = \
+ spdict[provided_spec].union(opdict[provided_spec])
def remove_provider(self, pkg_name):
"""Remove a provider from the ProviderIndex."""
@@ -291,3 +292,7 @@ def _transform(providers, transform_fun, out_mapping_type=dict):
(name, out_mapping_type([
transform_fun(vpkg, pset) for vpkg, pset in mapiter(mappings)]))
for name, mappings in providers.items())
+
+
+class ProviderIndexError(spack.error.SpackError):
+ """Raised when there is a problem with a ProviderIndex."""
diff --git a/lib/spack/spack/repository.py b/lib/spack/spack/repository.py
index 2d8dc39648..94b79accdb 100644
--- a/lib/spack/spack/repository.py
+++ b/lib/spack/spack/repository.py
@@ -42,9 +42,9 @@ from llnl.util.filesystem import *
import spack
import spack.error
-import spack.config
import spack.spec
from spack.provider_index import ProviderIndex
+from spack.util.path import canonicalize_path
from spack.util.naming import *
#
@@ -94,19 +94,6 @@ class SpackNamespace(ModuleType):
return getattr(self, name)
-def substitute_spack_prefix(path):
- """Replaces instances of $spack with Spack's prefix."""
- return re.sub(r'^\$spack', spack.prefix, path)
-
-
-def canonicalize_path(path):
- """Substitute $spack, expand user home, take abspath."""
- path = substitute_spack_prefix(path)
- path = os.path.expanduser(path)
- path = os.path.abspath(path)
- return path
-
-
class RepoPath(object):
"""A RepoPath is a list of repos that function as one.
@@ -128,6 +115,7 @@ class RepoPath(object):
# If repo_dirs is empty, just use the configuration
if not repo_dirs:
+ import spack.config
repo_dirs = spack.config.get_config('repos')
if not repo_dirs:
raise NoRepoConfiguredError(
@@ -198,15 +186,19 @@ class RepoPath(object):
def get_repo(self, namespace, default=NOT_PROVIDED):
"""Get a repository by namespace.
- Arguments
- namespace
- Look up this namespace in the RepoPath, and return
- it if found.
-
- Optional Arguments
- default
- If default is provided, return it when the namespace
- isn't found. If not, raise an UnknownNamespaceError.
+
+ Arguments:
+
+ namespace:
+
+ Look up this namespace in the RepoPath, and return it if found.
+
+ Optional Arguments:
+
+ default:
+
+ If default is provided, return it when the namespace
+ isn't found. If not, raise an UnknownNamespaceError.
"""
fullspace = '%s.%s' % (self.super_namespace, namespace)
if fullspace not in self.by_namespace:
@@ -628,12 +620,12 @@ class Repo(object):
# Read the old ProviderIndex, or make a new one.
key = self._cache_file
- index_existed = spack.user_cache.init_entry(key)
+ index_existed = spack.misc_cache.init_entry(key)
if index_existed and not self._needs_update:
- with spack.user_cache.read_transaction(key) as f:
+ with spack.misc_cache.read_transaction(key) as f:
self._provider_index = ProviderIndex.from_yaml(f)
else:
- with spack.user_cache.write_transaction(key) as (old, new):
+ with spack.misc_cache.write_transaction(key) as (old, new):
if old:
self._provider_index = ProviderIndex.from_yaml(old)
else:
@@ -709,7 +701,7 @@ class Repo(object):
self._all_package_names = []
# Get index modification time.
- index_mtime = spack.user_cache.mtime(self._cache_file)
+ index_mtime = spack.misc_cache.mtime(self._cache_file)
for pkg_name in os.listdir(self.packages_path):
# Skip non-directories in the package root.
diff --git a/lib/spack/spack/schema/compilers.py b/lib/spack/spack/schema/compilers.py
index 2ffac03a66..282eddf91b 100644
--- a/lib/spack/spack/schema/compilers.py
+++ b/lib/spack/spack/schema/compilers.py
@@ -22,7 +22,11 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-"""Schema for compiler configuration files."""
+"""Schema for compilers.yaml configuration file.
+
+.. literalinclude:: ../spack/schema/compilers.py
+ :lines: 32-
+"""
schema = {
@@ -31,7 +35,7 @@ schema = {
'type': 'object',
'additionalProperties': False,
'patternProperties': {
- 'compilers:?': { # optional colon for overriding site config.
+ 'compilers': {
'type': 'array',
'items': {
'compiler': {
@@ -52,7 +56,11 @@ schema = {
'f77': {'anyOf': [{'type': 'string'},
{'type': 'null'}]},
'fc': {'anyOf': [{'type': 'string'},
- {'type': 'null'}]},
+ {'type': 'null'}]}}},
+ 'flags': {
+ 'type': 'object',
+ 'additionalProperties': False,
+ 'properties': {
'cflags': {'anyOf': [{'type': 'string'},
{'type': 'null'}]},
'cxxflags': {'anyOf': [{'type': 'string'},
@@ -71,7 +79,27 @@ schema = {
{'type': 'null'}]},
'modules': {'anyOf': [{'type': 'string'},
{'type': 'null'},
- {'type': 'array'}]}
+ {'type': 'array'}]},
+ 'environment': {
+ 'type': 'object',
+ 'default': {},
+ 'additionalProperties': False,
+ 'properties': {
+ 'set': {
+ 'type': 'object',
+ 'patternProperties': {
+ r'\w[\w-]*': { # variable name
+ 'type': 'string'
+ }
+ }
+ }
+ }
+ },
+ 'extra_rpaths': {
+ 'type': 'array',
+ 'default': [],
+ 'items': {'type': 'string'}
+ }
},
},
},
diff --git a/lib/spack/spack/schema/config.py b/lib/spack/spack/schema/config.py
new file mode 100644
index 0000000000..e51fa69afe
--- /dev/null
+++ b/lib/spack/spack/schema/config.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
+##############################################################################
+"""Schema for config.yaml configuration file.
+
+.. literalinclude:: ../spack/schema/config.py
+ :lines: 32-
+"""
+
+
+schema = {
+ '$schema': 'http://json-schema.org/schema#',
+ 'title': 'Spack module file configuration file schema',
+ 'type': 'object',
+ 'additionalProperties': False,
+ 'patternProperties': {
+ 'config': {
+ 'type': 'object',
+ 'default': {},
+ 'additionalProperties': False,
+ 'properties': {
+ 'install_tree': {'type': 'string'},
+ 'build_stage': {
+ 'oneOf': [
+ {'type': 'string'},
+ {'type': 'array',
+ 'items': {'type': 'string'}}],
+ },
+ 'module_roots': {
+ 'type': 'object',
+ 'additionalProperties': False,
+ 'properties': {
+ 'tcl': {'type': 'string'},
+ 'lmod': {'type': 'string'},
+ 'dotkit': {'type': 'string'},
+ },
+ },
+ 'source_cache': {'type': 'string'},
+ 'misc_cache': {'type': 'string'},
+ 'verify_ssl': {'type': 'boolean'},
+ 'checksum': {'type': 'boolean'},
+ 'dirty': {'type': 'boolean'},
+ }
+ },
+ },
+}
diff --git a/lib/spack/spack/schema/mirrors.py b/lib/spack/spack/schema/mirrors.py
index ff599b9c7d..60b865bb42 100644
--- a/lib/spack/spack/schema/mirrors.py
+++ b/lib/spack/spack/schema/mirrors.py
@@ -22,7 +22,11 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-"""Schema for mirror configuration files."""
+"""Schema for mirrors.yaml configuration file.
+
+.. literalinclude:: ../spack/schema/mirrors.py
+ :lines: 32-
+"""
schema = {
@@ -31,7 +35,7 @@ schema = {
'type': 'object',
'additionalProperties': False,
'patternProperties': {
- r'mirrors:?': {
+ r'mirrors': {
'type': 'object',
'default': {},
'additionalProperties': False,
diff --git a/lib/spack/spack/schema/modules.py b/lib/spack/spack/schema/modules.py
index f8066919f1..2059e14fa6 100644
--- a/lib/spack/spack/schema/modules.py
+++ b/lib/spack/spack/schema/modules.py
@@ -22,7 +22,11 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-"""Schema for mirror configuration files."""
+"""Schema for modules.yaml configuration file.
+
+.. literalinclude:: ../spack/schema/modules.py
+ :lines: 32-
+"""
schema = {
@@ -123,7 +127,7 @@ schema = {
}
},
'patternProperties': {
- r'modules:?': {
+ r'modules': {
'type': 'object',
'default': {},
'additionalProperties': False,
@@ -139,7 +143,20 @@ schema = {
'default': [],
'items': {
'type': 'string',
- 'enum': ['tcl', 'dotkit']}},
+ 'enum': ['tcl', 'dotkit', 'lmod']}},
+ 'lmod': {
+ 'allOf': [
+ # Base configuration
+ {'$ref': '#/definitions/module_type_configuration'},
+ {
+ 'core_compilers': {
+ '$ref': '#/definitions/array_of_strings'
+ },
+ 'hierarchical_scheme': {
+ '$ref': '#/definitions/array_of_strings'
+ }
+ } # Specific lmod extensions
+ ]},
'tcl': {
'allOf': [
# Base configuration
diff --git a/lib/spack/spack/schema/packages.py b/lib/spack/spack/schema/packages.py
index e19f3f533b..bf5648b1b7 100644
--- a/lib/spack/spack/schema/packages.py
+++ b/lib/spack/spack/schema/packages.py
@@ -22,7 +22,11 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-"""Schema for packages.yaml configuration files."""
+"""Schema for packages.yaml configuration files.
+
+.. literalinclude:: ../spack/schema/packages.py
+ :lines: 32-
+"""
schema = {
@@ -31,7 +35,7 @@ schema = {
'type': 'object',
'additionalProperties': False,
'patternProperties': {
- r'packages:?': {
+ r'packages': {
'type': 'object',
'default': {},
'additionalProperties': False,
diff --git a/lib/spack/spack/schema/repos.py b/lib/spack/spack/schema/repos.py
index 9f01942422..c7a3495ae1 100644
--- a/lib/spack/spack/schema/repos.py
+++ b/lib/spack/spack/schema/repos.py
@@ -22,7 +22,11 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-"""Schema for repository configuration files."""
+"""Schema for repos.yaml configuration file.
+
+.. literalinclude:: ../spack/schema/repos.py
+ :lines: 32-
+"""
schema = {
@@ -31,7 +35,7 @@ schema = {
'type': 'object',
'additionalProperties': False,
'patternProperties': {
- r'repos:?': {
+ r'repos': {
'type': 'array',
'default': [],
'items': {
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 316b7d6a8c..951e9ae652 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -98,11 +98,10 @@ expansion when it is the first character in an id typed on the command line.
import base64
import hashlib
import imp
-import sys
+import ctypes
from StringIO import StringIO
from operator import attrgetter
-import yaml
from yaml.error import MarkedYAMLError
import llnl.util.tty as tty
@@ -112,6 +111,7 @@ from llnl.util.tty.color import *
import spack
import spack.architecture
+import spack.store
import spack.compilers as compilers
import spack.error
import spack.parse
@@ -119,9 +119,45 @@ from spack.build_environment import get_path_from_module, load_module
from spack.util.naming import mod_to_class
from spack.util.prefix import Prefix
from spack.util.string import *
+import spack.util.spack_yaml as syaml
+from spack.util.spack_yaml import syaml_dict
+from spack.util.crypto import prefix_bits
from spack.version import *
from spack.provider_index import ProviderIndex
+__all__ = [
+ 'Spec',
+ 'alldeps',
+ 'nolink',
+ 'nobuild',
+ 'canonical_deptype',
+ 'validate_deptype',
+ 'parse',
+ 'parse_anonymous_spec',
+ 'SpecError',
+ 'SpecParseError',
+ 'DuplicateDependencyError',
+ 'DuplicateVariantError',
+ 'DuplicateCompilerSpecError',
+ 'UnsupportedCompilerError',
+ 'UnknownVariantError',
+ 'DuplicateArchitectureError',
+ 'InconsistentSpecError',
+ 'InvalidDependencyError',
+ 'InvalidDependencyTypeError',
+ 'NoProviderError',
+ 'MultipleProviderError',
+ 'UnsatisfiableSpecError',
+ 'UnsatisfiableSpecNameError',
+ 'UnsatisfiableVersionSpecError',
+ 'UnsatisfiableCompilerSpecError',
+ 'UnsatisfiableVariantSpecError',
+ 'UnsatisfiableCompilerFlagSpecError',
+ 'UnsatisfiableArchitectureSpecError',
+ 'UnsatisfiableProviderSpecError',
+ 'UnsatisfiableDependencySpecError',
+ 'SpackYAMLError',
+ 'AmbiguousHashError']
# Valid pattern for an identifier in Spack
identifier_re = r'\w[\w-]*'
@@ -155,12 +191,49 @@ _any_version = VersionList([':'])
# Special types of dependencies.
alldeps = ('build', 'link', 'run')
-nolink = ('build', 'run')
+nolink = ('build', 'run')
+nobuild = ('link', 'run')
+norun = ('link', 'build')
special_types = {
'alldeps': alldeps,
+ 'all': alldeps, # allow "all" as string but not symbol.
'nolink': nolink,
+ 'nobuild': nobuild,
+ 'norun': norun,
}
+legal_deps = tuple(special_types) + alldeps
+
+"""Max integer helps avoid passing too large a value to cyaml."""
+maxint = 2 ** (ctypes.sizeof(ctypes.c_int) * 8 - 1) - 1
+
+
+def validate_deptype(deptype):
+ if isinstance(deptype, str):
+ if deptype not in legal_deps:
+ raise InvalidDependencyTypeError(
+ "Invalid dependency type: %s" % deptype)
+
+ elif isinstance(deptype, (list, tuple)):
+ for t in deptype:
+ validate_deptype(t)
+
+ elif deptype is None:
+ raise InvalidDependencyTypeError("deptype cannot be None!")
+
+
+def canonical_deptype(deptype):
+ if deptype is None:
+ return alldeps
+
+ elif isinstance(deptype, str):
+ return special_types.get(deptype, (deptype,))
+
+ elif isinstance(deptype, (tuple, list)):
+ return (sum((canonical_deptype(d) for d in deptype), ()))
+
+ return deptype
+
def colorize_spec(spec):
"""Returns a spec colorized according to the colors specified in
@@ -266,9 +339,10 @@ class CompilerSpec(object):
return (self.name, self.versions)
def to_dict(self):
- d = {'name': self.name}
+ d = syaml_dict([('name', self.name)])
d.update(self.versions.to_dict())
- return {'compiler': d}
+
+ return syaml_dict([('compiler', d)])
@staticmethod
def from_dict(d):
@@ -401,10 +475,10 @@ class FlagMap(HashableMap):
def satisfies(self, other, strict=False):
if strict or (self.spec and self.spec._concrete):
- return all(f in self and set(self[f]) <= set(other[f])
+ return all(f in self and set(self[f]) == set(other[f])
for f in other)
else:
- return all(set(self[f]) <= set(other[f])
+ return all(set(self[f]) == set(other[f])
for f in other if (other[f] != [] and f in self))
def constrain(self, other):
@@ -504,6 +578,7 @@ class Spec(object):
self.variants.spec = self
self.namespace = other.namespace
self._hash = other._hash
+ self._cmp_key_cache = other._cmp_key_cache
# Specs are by default not assumed to be normal, but in some
# cases we've read them from a file want to assume normal.
@@ -524,6 +599,14 @@ class Spec(object):
# XXX(deptype): default deptypes
self._add_dependency(spec, ('build', 'link'))
+ def __getattr__(self, item):
+ """Delegate to self.package if the attribute is not in the spec"""
+ # This line is to avoid infinite recursion in case package is
+ # not present among self attributes
+ if item.endswith('libs'):
+ return getattr(self.package, item)
+ raise AttributeError()
+
def get_dependency(self, name):
dep = self._dependencies.get(name)
if dep is not None:
@@ -531,17 +614,8 @@ class Spec(object):
raise InvalidDependencyException(
self.name + " does not depend on " + comma_or(name))
- def _deptype_norm(self, deptype):
- if deptype is None:
- return alldeps
- # Force deptype to be a set object so that we can do set intersections.
- if isinstance(deptype, str):
- # Support special deptypes.
- return special_types.get(deptype, (deptype,))
- return deptype
-
def _find_deps(self, where, deptype):
- deptype = self._deptype_norm(deptype)
+ deptype = canonical_deptype(deptype)
return [dep.spec
for dep in where.values()
@@ -554,7 +628,7 @@ class Spec(object):
return self._find_deps(self._dependents, deptype)
def _find_deps_dict(self, where, deptype):
- deptype = self._deptype_norm(deptype)
+ deptype = canonical_deptype(deptype)
return dict((dep.spec.name, dep)
for dep in where.values()
@@ -783,7 +857,7 @@ class Spec(object):
children in the dependency DAG.
cover [=nodes|edges|paths]
- Determines how extensively to cover the dag. Possible vlaues:
+ Determines how extensively to cover the dag. Possible values:
'nodes': Visit each node in the dag only once. Every node
yielded by this function will be unique.
@@ -858,9 +932,10 @@ class Spec(object):
# Edge traversal yields but skips children of visited nodes
if not (key in visited and cover == 'edges'):
# This code determines direction and yields the children/parents
+
successors = deps
if direction == 'parents':
- successors = self.dependents_dict()
+ successors = self.dependents_dict() # TODO: deptype?
visited.add(key)
for name in sorted(successors):
@@ -890,57 +965,59 @@ class Spec(object):
@property
def prefix(self):
- return Prefix(spack.install_layout.path_for_spec(self))
+ return Prefix(spack.store.layout.path_for_spec(self))
def dag_hash(self, length=None):
- """
- Return a hash of the entire spec DAG, including connectivity.
- """
+ """Return a hash of the entire spec DAG, including connectivity."""
if self._hash:
return self._hash[:length]
else:
- # XXX(deptype): ignore 'build' dependencies here
- yaml_text = yaml.dump(
- self.to_node_dict(), default_flow_style=True, width=sys.maxint)
+ yaml_text = syaml.dump(
+ self.to_node_dict(), default_flow_style=True, width=maxint)
sha = hashlib.sha1(yaml_text)
- b32_hash = base64.b32encode(sha.digest()).lower()[:length]
+ b32_hash = base64.b32encode(sha.digest()).lower()
if self.concrete:
self._hash = b32_hash
- return b32_hash
+ return b32_hash[:length]
- def to_node_dict(self):
- d = {}
+ def dag_hash_bit_prefix(self, bits):
+ """Get the first <bits> bits of the DAG hash as an integer type."""
+ return base32_prefix_bits(self.dag_hash(), bits)
- params = dict((name, v.value) for name, v in self.variants.items())
- params.update(dict((name, value)
- for name, value in self.compiler_flags.items()))
+ def to_node_dict(self):
+ d = syaml_dict()
- if params:
- d['parameters'] = params
+ if self.versions:
+ d.update(self.versions.to_dict())
- if self.dependencies():
- deps = self.dependencies_dict(deptype=('link', 'run'))
- d['dependencies'] = dict(
- (name, {
- 'hash': dspec.spec.dag_hash(),
- 'type': [str(s) for s in dspec.deptypes]})
- for name, dspec in deps.items())
+ if self.compiler:
+ d.update(self.compiler.to_dict())
if self.namespace:
d['namespace'] = self.namespace
+ params = syaml_dict(sorted(
+ (name, v.value) for name, v in self.variants.items()))
+ params.update(sorted(self.compiler_flags.items()))
+ if params:
+ d['parameters'] = params
+
if self.architecture:
- # TODO: Fix the target.to_dict to account for the tuple
- # Want it to be a dict of dicts
d['arch'] = self.architecture.to_dict()
- if self.compiler:
- d.update(self.compiler.to_dict())
-
- if self.versions:
- d.update(self.versions.to_dict())
+ # TODO: restore build dependencies here once we have less picky
+ # TODO: concretization.
+ deps = self.dependencies_dict(deptype=('link', 'run'))
+ if deps:
+ d['dependencies'] = syaml_dict([
+ (name,
+ syaml_dict([
+ ('hash', dspec.spec.dag_hash()),
+ ('type', sorted(str(s) for s in dspec.deptypes))])
+ ) for name, dspec in sorted(deps.items())
+ ])
- return {self.name: d}
+ return syaml_dict([(self.name, d)])
def to_yaml(self, stream=None):
node_list = []
@@ -948,8 +1025,9 @@ class Spec(object):
node = s.to_node_dict()
node[s.name]['hash'] = s.dag_hash()
node_list.append(node)
- return yaml.dump({'spec': node_list},
- stream=stream, default_flow_style=False)
+ return syaml.dump(
+ syaml_dict([('spec', node_list)]),
+ stream=stream, default_flow_style=False)
@staticmethod
def from_node_dict(node):
@@ -1023,7 +1101,7 @@ class Spec(object):
"""
try:
- yfile = yaml.load(stream)
+ yfile = syaml.load(stream)
except MarkedYAMLError as e:
raise SpackYAMLError("error parsing YAML spec:", str(e))
@@ -1278,15 +1356,15 @@ class Spec(object):
# Mark everything in the spec as concrete, as well.
self._mark_concrete()
- def _mark_concrete(self):
+ def _mark_concrete(self, value=True):
"""Mark this spec and its dependencies as concrete.
Only for internal use -- client code should use "concretize"
unless there is a need to force a spec to be concrete.
"""
for s in self.traverse(deptype_query=alldeps):
- s._normal = True
- s._concrete = True
+ s._normal = value
+ s._concrete = value
def concretized(self):
"""This is a non-destructive version of concretize(). First clones,
@@ -1349,12 +1427,11 @@ class Spec(object):
# parser doesn't allow it. Spack must be broken!
raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message)
- def index(self):
+ def index(self, deptype=None):
"""Return DependencyMap that points to all the dependencies in this
spec."""
dm = DependencyMap()
- # XXX(deptype): use a deptype kwarg.
- for spec in self.traverse():
+ for spec in self.traverse(deptype=deptype):
dm[spec.name] = spec
return dm
@@ -1533,6 +1610,10 @@ class Spec(object):
if self._normal and not force:
return False
+ # avoid any assumptions about concreteness when forced
+ if force:
+ self._mark_concrete(False)
+
# Ensure first that all packages & compilers in the DAG exist.
self.validate_names()
# Get all the dependencies into one DependencyMap
@@ -1553,7 +1634,7 @@ class Spec(object):
# actually deps of this package. Raise an error.
extra = set(spec_deps.keys()).difference(visited)
if extra:
- raise InvalidDependencyException(
+ raise InvalidDependencyError(
self.name + " does not depend on " + comma_or(extra))
# Mark the spec as normal once done.
@@ -1865,7 +1946,7 @@ class Spec(object):
"""Return list of any virtual deps in this spec."""
return [spec for spec in self.traverse() if spec.virtual]
- def _dup(self, other, **kwargs):
+ def _dup(self, other, deps=True, cleardeps=True):
"""Copy the spec other into self. This is an overwriting
copy. It does not copy any dependents (parents), but by default
copies dependencies.
@@ -1896,7 +1977,7 @@ class Spec(object):
self.versions = other.versions.copy()
self.architecture = other.architecture
self.compiler = other.compiler.copy() if other.compiler else None
- if kwargs.get('cleardeps', True):
+ if cleardeps:
self._dependents = DependencyMap()
self._dependencies = DependencyMap()
self.compiler_flags = other.compiler_flags.copy()
@@ -1905,20 +1986,17 @@ class Spec(object):
self.external = other.external
self.external_module = other.external_module
self.namespace = other.namespace
- self._hash = other._hash
+
+ self.external = other.external
+ self.external_module = other.external_module
# If we copy dependencies, preserve DAG structure in the new spec
- if kwargs.get('deps', True):
+ if deps:
# This copies the deps from other using _dup(deps=False)
- # XXX(deptype): We can keep different instances of specs here iff
- # it is only a 'build' dependency (from its parent).
- # All other instances must be shared (due to symbol
- # and PATH contention). These should probably search
- # for any existing installation which can satisfy the
- # build and latch onto that because if 3 things need
- # the same build dependency and it is *not*
- # available, we only want to build it once.
- new_nodes = other.flat_dependencies(deptype_query=alldeps)
+ deptypes = alldeps
+ if isinstance(deps, (tuple, list)):
+ deptypes = deps
+ new_nodes = other.flat_dependencies(deptypes=deptypes)
new_nodes[self.name] = self
stack = [other]
@@ -1927,6 +2005,9 @@ class Spec(object):
new_spec = new_nodes[cur_spec.name]
for depspec in cur_spec._dependencies.values():
+ if not any(d in deptypes for d in depspec.deptypes):
+ continue
+
stack.append(depspec.spec)
# XXX(deptype): add any new deptypes that may have appeared
@@ -1935,20 +2016,38 @@ class Spec(object):
new_spec._add_dependency(
new_nodes[depspec.spec.name], depspec.deptypes)
- # Since we preserved structure, we can copy _normal safely.
- self._normal = other._normal
- self._concrete = other._concrete
- self.external = other.external
- self.external_module = other.external_module
+ # These fields are all cached results of expensive operations.
+ # If we preserved the original structure, we can copy them
+ # safely. If not, they need to be recomputed.
+ if deps is True or deps == alldeps:
+ self._hash = other._hash
+ self._cmp_key_cache = other._cmp_key_cache
+ self._normal = other._normal
+ self._concrete = other._concrete
+ else:
+ self._hash = None
+ self._cmp_key_cache = None
+ self._normal = False
+ self._concrete = False
+
return changed
- def copy(self, **kwargs):
+ def copy(self, deps=True):
"""Return a copy of this spec.
- By default, returns a deep copy. Supply dependencies=False
- to get a shallow copy.
+
+ By default, returns a deep copy. To control how dependencies are
+ copied, supply:
+
+ deps=True: deep copy
+
+ deps=False: shallow copy (no dependencies)
+
+ deps=('link', 'build'):
+ only build and link dependencies. Similar for other deptypes.
+
"""
clone = Spec.__new__(Spec)
- clone._dup(self, **kwargs)
+ clone._dup(self, deps=deps)
return clone
@property
@@ -2059,10 +2158,17 @@ class Spec(object):
1. A tuple describing this node in the DAG.
2. The hash of each of this node's dependencies' cmp_keys.
"""
- dep_dict = self.dependencies_dict(deptype=('link', 'run'))
- return self._cmp_node() + (
- tuple(hash(dep_dict[name])
- for name in sorted(dep_dict)),)
+ if self._cmp_key_cache:
+ return self._cmp_key_cache
+
+ dep_tuple = tuple(
+ (d.spec.name, hash(d.spec), tuple(sorted(d.deptypes)))
+ for name, d in sorted(self._dependencies.items()))
+
+ key = (self._cmp_node(), dep_tuple)
+ if self._concrete:
+ self._cmp_key_cache = key
+ return key
def colorized(self):
return colorize_spec(self)
@@ -2085,7 +2191,7 @@ class Spec(object):
$# 7-char prefix of DAG hash with '-' prefix
$$ $
- You can also use full-string versions, which elide the prefixes:
+ You can also use full-string versions, which elide the prefixes::
${PACKAGE} Package name
${VERSION} Version
@@ -2096,22 +2202,27 @@ class Spec(object):
${OPTIONS} Options
${ARCHITECTURE} Architecture
${SHA1} Dependencies 8-char sha1 prefix
+ ${HASH:len} DAG hash with optional length specifier
${SPACK_ROOT} The spack root directory
${SPACK_INSTALL} The default spack install directory,
${SPACK_PREFIX}/opt
+ ${PREFIX} The package prefix
+
+ Note these are case-insensitive: for example you can specify either
+ ``${PACKAGE}`` or ``${package}``.
- Optionally you can provide a width, e.g. $20_ for a 20-wide name.
+ Optionally you can provide a width, e.g. ``$20_`` for a 20-wide name.
Like printf, you can provide '-' for left justification, e.g.
- $-20_ for a left-justified name.
+ ``$-20_`` for a left-justified name.
Anything else is copied verbatim into the output stream.
*Example:* ``$_$@$+`` translates to the name, version, and options
of the package, but no dependencies, arch, or compiler.
- TODO: allow, e.g., $6# to customize short hash length
- TODO: allow, e.g., $## for full hash.
+ TODO: allow, e.g., ``$6#`` to customize short hash length
+ TODO: allow, e.g., ``$##`` for full hash.
"""
color = kwargs.get('color', False)
length = len(format_string)
@@ -2191,6 +2302,7 @@ class Spec(object):
"'%s'" % format_string)
named_str += c
continue
+ named_str = named_str.upper()
if named_str == 'PACKAGE':
name = self.name if self.name else ''
write(fmt % self.name, '@')
@@ -2203,7 +2315,7 @@ class Spec(object):
elif named_str == 'COMPILERNAME':
if self.compiler:
write(fmt % self.compiler.name, '%')
- elif named_str == 'COMPILERVER':
+ elif named_str in ['COMPILERVER', 'COMPILERVERSION']:
if self.compiler:
write(fmt % self.compiler.versions, '%')
elif named_str == 'COMPILERFLAGS':
@@ -2221,7 +2333,16 @@ class Spec(object):
elif named_str == 'SPACK_ROOT':
out.write(fmt % spack.prefix)
elif named_str == 'SPACK_INSTALL':
- out.write(fmt % spack.install_path)
+ out.write(fmt % spack.store.root)
+ elif named_str == 'PREFIX':
+ out.write(fmt % self.prefix)
+ elif named_str.startswith('HASH'):
+ if named_str.startswith('HASH:'):
+ _, hashlen = named_str.split(':')
+ hashlen = int(hashlen)
+ else:
+ hashlen = None
+ out.write(fmt % (self.dag_hash(hashlen)))
named = False
@@ -2275,12 +2396,24 @@ class Spec(object):
def __str__(self):
return self.format() + self.dep_string()
+ def _install_status(self):
+ """Helper for tree to print DB install status."""
+ if not self.concrete:
+ return None
+ try:
+ record = spack.store.db.get_record(self)
+ return record.installed
+ except KeyError:
+ return None
+
def tree(self, **kwargs):
"""Prints out this spec and its dependencies, tree-formatted
with indentation."""
color = kwargs.pop('color', False)
depth = kwargs.pop('depth', False)
- showid = kwargs.pop('ids', False)
+ hashes = kwargs.pop('hashes', True)
+ hlen = kwargs.pop('hashlen', None)
+ install_status = kwargs.pop('install_status', True)
cover = kwargs.pop('cover', 'nodes')
indent = kwargs.pop('indent', 0)
fmt = kwargs.pop('format', '$_$@$%@+$+$=')
@@ -2289,8 +2422,6 @@ class Spec(object):
check_kwargs(kwargs, self.tree)
out = ""
- cur_id = 0
- ids = {}
for d, node in self.traverse(
order='pre', cover=cover, depth=True, deptypes=deptypes):
if prefix is not None:
@@ -2298,11 +2429,17 @@ class Spec(object):
out += " " * indent
if depth:
out += "%-4d" % d
- if not id(node) in ids:
- cur_id += 1
- ids[id(node)] = cur_id
- if showid:
- out += "%-4d" % ids[id(node)]
+ if install_status:
+ status = node._install_status()
+ if status is None:
+ out += " " # Package isn't installed
+ elif status:
+ out += colorize("@g{[+]} ", color=color) # installed
+ else:
+ out += colorize("@r{[-]} ", color=color) # missing
+
+ if hashes:
+ out += colorize('@K{%s} ', color=color) % node.dag_hash(hlen)
out += (" " * d)
if d > 0:
out += "^"
@@ -2416,7 +2553,7 @@ class SpecParser(spack.parse.Parser):
def spec_by_hash(self):
self.expect(ID)
- specs = spack.installed_db.query()
+ specs = spack.store.db.query()
matches = [spec for spec in specs if
spec.dag_hash()[:len(self.token.value)] == self.token.value]
@@ -2457,6 +2594,7 @@ class SpecParser(spack.parse.Parser):
spec._dependencies = DependencyMap()
spec.namespace = spec_namespace
spec._hash = None
+ spec._cmp_key_cache = None
spec._normal = False
spec._concrete = False
@@ -2624,18 +2762,22 @@ def parse_anonymous_spec(spec_like, pkg_name):
return anon_spec
-class SpecError(spack.error.SpackError):
+def base32_prefix_bits(hash_string, bits):
+ """Return the first <bits> bits of a base32 string as an integer."""
+ if bits > len(hash_string) * 5:
+ raise ValueError("Too many bits! Requested %d bit prefix of '%s'."
+ % (bits, hash_string))
- """Superclass for all errors that occur while constructing specs."""
+ hash_bytes = base64.b32decode(hash_string, casefold=True)
+ return prefix_bits(hash_bytes, bits)
- def __init__(self, message):
- super(SpecError, self).__init__(message)
+class SpecError(spack.error.SpackError):
+ """Superclass for all errors that occur while constructing specs."""
-class SpecParseError(SpecError):
+class SpecParseError(SpecError):
"""Wrapper for ParseError for when we're parsing specs."""
-
def __init__(self, parse_error):
super(SpecParseError, self).__init__(parse_error.message)
self.string = parse_error.string
@@ -2643,79 +2785,53 @@ class SpecParseError(SpecError):
class DuplicateDependencyError(SpecError):
-
"""Raised when the same dependency occurs in a spec twice."""
- def __init__(self, message):
- super(DuplicateDependencyError, self).__init__(message)
-
class DuplicateVariantError(SpecError):
-
"""Raised when the same variant occurs in a spec twice."""
- def __init__(self, message):
- super(DuplicateVariantError, self).__init__(message)
-
class DuplicateCompilerSpecError(SpecError):
-
"""Raised when the same compiler occurs in a spec twice."""
- def __init__(self, message):
- super(DuplicateCompilerSpecError, self).__init__(message)
-
class UnsupportedCompilerError(SpecError):
-
"""Raised when the user asks for a compiler spack doesn't know about."""
-
def __init__(self, compiler_name):
super(UnsupportedCompilerError, self).__init__(
"The '%s' compiler is not yet supported." % compiler_name)
class UnknownVariantError(SpecError):
-
"""Raised when the same variant occurs in a spec twice."""
-
def __init__(self, pkg, variant):
super(UnknownVariantError, self).__init__(
"Package %s has no variant %s!" % (pkg, variant))
class DuplicateArchitectureError(SpecError):
-
"""Raised when the same architecture occurs in a spec twice."""
- def __init__(self, message):
- super(DuplicateArchitectureError, self).__init__(message)
-
class InconsistentSpecError(SpecError):
-
"""Raised when two nodes in the same spec DAG have inconsistent
constraints."""
- def __init__(self, message):
- super(InconsistentSpecError, self).__init__(message)
-
-
-class InvalidDependencyException(SpecError):
+class InvalidDependencyError(SpecError):
"""Raised when a dependency in a spec is not actually a dependency
of the package."""
- def __init__(self, message):
- super(InvalidDependencyException, self).__init__(message)
+class InvalidDependencyTypeError(SpecError):
+ """Raised when a dependency type is not a legal Spack dep type."""
-class NoProviderError(SpecError):
+class NoProviderError(SpecError):
"""Raised when there is no package that provides a particular
virtual dependency.
"""
-
def __init__(self, vpkg):
super(NoProviderError, self).__init__(
"No providers found for virtual package: '%s'" % vpkg)
@@ -2723,11 +2839,9 @@ class NoProviderError(SpecError):
class MultipleProviderError(SpecError):
-
"""Raised when there is no package that provides a particular
virtual dependency.
"""
-
def __init__(self, vpkg, providers):
"""Takes the name of the vpkg"""
super(MultipleProviderError, self).__init__(
@@ -2738,10 +2852,8 @@ class MultipleProviderError(SpecError):
class UnsatisfiableSpecError(SpecError):
-
"""Raised when a spec conflicts with package constraints.
Provide the requirement that was violated when raising."""
-
def __init__(self, provided, required, constraint_type):
super(UnsatisfiableSpecError, self).__init__(
"%s does not satisfy %s" % (provided, required))
@@ -2751,89 +2863,70 @@ class UnsatisfiableSpecError(SpecError):
class UnsatisfiableSpecNameError(UnsatisfiableSpecError):
-
"""Raised when two specs aren't even for the same package."""
-
def __init__(self, provided, required):
super(UnsatisfiableSpecNameError, self).__init__(
provided, required, "name")
class UnsatisfiableVersionSpecError(UnsatisfiableSpecError):
-
"""Raised when a spec version conflicts with package constraints."""
-
def __init__(self, provided, required):
super(UnsatisfiableVersionSpecError, self).__init__(
provided, required, "version")
class UnsatisfiableCompilerSpecError(UnsatisfiableSpecError):
-
"""Raised when a spec comiler conflicts with package constraints."""
-
def __init__(self, provided, required):
super(UnsatisfiableCompilerSpecError, self).__init__(
provided, required, "compiler")
class UnsatisfiableVariantSpecError(UnsatisfiableSpecError):
-
"""Raised when a spec variant conflicts with package constraints."""
-
def __init__(self, provided, required):
super(UnsatisfiableVariantSpecError, self).__init__(
provided, required, "variant")
class UnsatisfiableCompilerFlagSpecError(UnsatisfiableSpecError):
-
"""Raised when a spec variant conflicts with package constraints."""
-
def __init__(self, provided, required):
super(UnsatisfiableCompilerFlagSpecError, self).__init__(
provided, required, "compiler_flags")
class UnsatisfiableArchitectureSpecError(UnsatisfiableSpecError):
-
"""Raised when a spec architecture conflicts with package constraints."""
-
def __init__(self, provided, required):
super(UnsatisfiableArchitectureSpecError, self).__init__(
provided, required, "architecture")
class UnsatisfiableProviderSpecError(UnsatisfiableSpecError):
-
"""Raised when a provider is supplied but constraints don't match
a vpkg requirement"""
-
def __init__(self, provided, required):
super(UnsatisfiableProviderSpecError, self).__init__(
provided, required, "provider")
+
# TODO: get rid of this and be more specific about particular incompatible
# dep constraints
-
-
class UnsatisfiableDependencySpecError(UnsatisfiableSpecError):
-
"""Raised when some dependency of constrained specs are incompatible"""
-
def __init__(self, provided, required):
super(UnsatisfiableDependencySpecError, self).__init__(
provided, required, "dependency")
class SpackYAMLError(spack.error.SpackError):
-
def __init__(self, msg, yaml_error):
super(SpackYAMLError, self).__init__(msg, str(yaml_error))
class AmbiguousHashError(SpecError):
-
def __init__(self, msg, *specs):
super(AmbiguousHashError, self).__init__(msg)
for spec in specs:
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 7676cb9ab6..4157511ce0 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -23,12 +23,16 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
+import sys
import errno
+import hashlib
import shutil
import tempfile
+import getpass
from urlparse import urljoin
import llnl.util.tty as tty
+import llnl.util.lock
from llnl.util.filesystem import *
import spack.util.pattern as pattern
@@ -38,8 +42,72 @@ import spack.config
import spack.fetch_strategy as fs
import spack.error
from spack.version import *
+from spack.util.path import canonicalize_path
+from spack.util.crypto import prefix_bits, bit_length
-STAGE_PREFIX = 'spack-stage-'
+_stage_prefix = 'spack-stage-'
+
+
+def _first_accessible_path(paths):
+ """Find a tmp dir that exists that we can access."""
+ for path in paths:
+ try:
+ # try to create the path if it doesn't exist.
+ path = canonicalize_path(path)
+ mkdirp(path)
+
+ # ensure accessible
+ if not can_access(path):
+ continue
+
+ # return it if successful.
+ return path
+
+ except OSError:
+ tty.debug('OSError while checking temporary path: %s' % path)
+ continue
+
+ return None
+
+
+# cached temporary root
+_tmp_root = None
+_use_tmp_stage = True
+
+
+def get_tmp_root():
+ global _tmp_root, _use_tmp_stage
+
+ if not _use_tmp_stage:
+ return None
+
+ if _tmp_root is None:
+ config = spack.config.get_config('config')
+ candidates = config['build_stage']
+ if isinstance(candidates, basestring):
+ candidates = [candidates]
+
+ path = _first_accessible_path(candidates)
+ if not path:
+ raise StageError("No accessible stage paths in %s", candidates)
+
+ # Return None to indicate we're using a local staging area.
+ if path == canonicalize_path(spack.stage_path):
+ _use_tmp_stage = False
+ return None
+
+ # ensure that any temp path is unique per user, so users don't
+ # fight over shared temporary space.
+ user = getpass.getuser()
+ if user not in path:
+ path = os.path.join(path, user, 'spack-stage')
+ else:
+ path = os.path.join(path, 'spack-stage')
+
+ mkdirp(path)
+ _tmp_root = path
+
+ return _tmp_root
class Stage(object):
@@ -49,16 +117,14 @@ class Stage(object):
some source code is downloaded and built before being installed.
It handles fetching the source code, either as an archive to be
expanded or by checking it out of a repository. A stage's
- lifecycle looks like this:
+ lifecycle looks like this::
- ```
- with Stage() as stage: # Context manager creates and destroys the
- # stage directory
- stage.fetch() # Fetch a source archive into the stage.
- stage.expand_archive() # Expand the source archive.
- <install> # Build and install the archive. (handled by
- # user of Stage)
- ```
+ with Stage() as stage: # Context manager creates and destroys the
+ # stage directory
+ stage.fetch() # Fetch a source archive into the stage.
+ stage.expand_archive() # Expand the source archive.
+ <install> # Build and install the archive.
+ # (handled by user of Stage)
When used as a context manager, the stage is automatically
destroyed if no exception is raised by the context. If an
@@ -66,19 +132,17 @@ class Stage(object):
destroyed, for potential reuse later.
You can also use the stage's create/destroy functions manually,
- like this:
-
- ```
- stage = Stage()
- try:
- stage.create() # Explicitly create the stage directory.
- stage.fetch() # Fetch a source archive into the stage.
- stage.expand_archive() # Expand the source archive.
- <install> # Build and install the archive. (handled by
- # user of Stage)
- finally:
- stage.destroy() # Explicitly destroy the stage directory.
- ```
+ like this::
+
+ stage = Stage()
+ try:
+ stage.create() # Explicitly create the stage directory.
+ stage.fetch() # Fetch a source archive into the stage.
+ stage.expand_archive() # Expand the source archive.
+ <install> # Build and install the archive.
+ # (handled by user of Stage)
+ finally:
+ stage.destroy() # Explicitly destroy the stage directory.
If spack.use_tmp_stage is True, spack will attempt to create
stages in a tmp directory. Otherwise, stages are created directly
@@ -92,8 +156,13 @@ class Stage(object):
similar, and are intended to persist for only one run of spack.
"""
- def __init__(self, url_or_fetch_strategy,
- name=None, mirror_path=None, keep=False, path=None):
+ """Shared dict of all stage locks."""
+ stage_locks = {}
+
+ def __init__(
+ self, url_or_fetch_strategy,
+ name=None, mirror_path=None, keep=False, path=None, lock=True,
+ alternate_fetchers=None):
"""Create a stage object.
Parameters:
url_or_fetch_strategy
@@ -129,6 +198,7 @@ class Stage(object):
self.fetcher.set_stage(self)
# self.fetcher can change with mirrors.
self.default_fetcher = self.fetcher
+ self.alternate_fetchers = alternate_fetchers
# used for mirrored archives of repositories.
self.skip_checksum_for_mirror = True
@@ -137,9 +207,8 @@ class Stage(object):
# TODO : won't be the same as the temporary stage area in tmp_root
self.name = name
if name is None:
- self.name = STAGE_PREFIX + next(tempfile._get_candidate_names())
+ self.name = _stage_prefix + next(tempfile._get_candidate_names())
self.mirror_path = mirror_path
- self.tmp_root = find_tmp_root()
# Try to construct here a temporary name for the stage directory
# If this is a named stage, then construct a named path.
@@ -151,6 +220,20 @@ class Stage(object):
# Flag to decide whether to delete the stage folder on exit or not
self.keep = keep
+ # File lock for the stage directory. We use one file for all
+ # stage locks. See Spec.prefix_lock for details on this approach.
+ self._lock = None
+ if lock:
+ if self.name not in Stage.stage_locks:
+ sha1 = hashlib.sha1(self.name).digest()
+ lock_id = prefix_bits(sha1, bit_length(sys.maxsize))
+ stage_lock_path = join_path(spack.stage_path, '.lock')
+
+ Stage.stage_locks[self.name] = llnl.util.lock.Lock(
+ stage_lock_path, lock_id, 1)
+
+ self._lock = Stage.stage_locks[self.name]
+
def __enter__(self):
"""
Entering a stage context will create the stage directory
@@ -158,6 +241,8 @@ class Stage(object):
Returns:
self
"""
+ if self._lock is not None:
+ self._lock.acquire_write(timeout=60)
self.create()
return self
@@ -179,6 +264,9 @@ class Stage(object):
if exc_type is None and not self.keep:
self.destroy()
+ if self._lock is not None:
+ self._lock.release_write()
+
def _need_to_create_path(self):
"""Makes sure nothing weird has happened since the last time we
looked at path. Returns True if path already exists and is ok.
@@ -194,10 +282,11 @@ class Stage(object):
# Path looks ok, but need to check the target of the link.
if os.path.islink(self.path):
- real_path = os.path.realpath(self.path)
- real_tmp = os.path.realpath(self.tmp_root)
+ tmp_root = get_tmp_root()
+ if tmp_root is not None:
+ real_path = os.path.realpath(self.path)
+ real_tmp = os.path.realpath(tmp_root)
- if spack.use_tmp_stage:
# If we're using a tmp dir, it's a link, and it points at the
# right spot, then keep it.
if (real_path.startswith(real_tmp) and
@@ -220,9 +309,9 @@ class Stage(object):
def expected_archive_files(self):
"""Possible archive file paths."""
paths = []
- if isinstance(self.fetcher, fs.URLFetchStrategy):
+ if isinstance(self.default_fetcher, fs.URLFetchStrategy):
paths.append(os.path.join(
- self.path, os.path.basename(self.fetcher.url)))
+ self.path, os.path.basename(self.default_fetcher.url)))
if self.mirror_path:
paths.append(os.path.join(
@@ -231,18 +320,18 @@ class Stage(object):
return paths
@property
+ def save_filename(self):
+ possible_filenames = self.expected_archive_files
+ if possible_filenames:
+ # This prefers using the URL associated with the default fetcher if
+ # available, so that the fetched resource name matches the remote
+ # name
+ return possible_filenames[0]
+
+ @property
def archive_file(self):
"""Path to the source archive within this stage directory."""
- paths = []
- if isinstance(self.fetcher, fs.URLFetchStrategy):
- paths.append(os.path.join(
- self.path, os.path.basename(self.fetcher.url)))
-
- if self.mirror_path:
- paths.append(os.path.join(
- self.path, os.path.basename(self.mirror_path)))
-
- for path in paths:
+ for path in self.expected_archive_files:
if os.path.exists(path):
return path
else:
@@ -305,8 +394,12 @@ class Stage(object):
# then use the same digest. `spack mirror` ensures that
# the checksum will be the same.
digest = None
+ expand = True
+ extension = None
if isinstance(self.default_fetcher, fs.URLFetchStrategy):
digest = self.default_fetcher.digest
+ expand = self.default_fetcher.expand_archive
+ extension = self.default_fetcher.extension
# Have to skip the checksum for things archived from
# repositories. How can this be made safer?
@@ -314,27 +407,17 @@ class Stage(object):
# Add URL strategies for all the mirrors with the digest
for url in urls:
- fetchers.insert(0, fs.URLFetchStrategy(url, digest))
- fetchers.insert(0, spack.fetch_cache.fetcher(self.mirror_path,
- digest))
-
- # Look for the archive in list_url
- package_name = os.path.dirname(self.mirror_path)
- pkg = spack.repo.get(package_name)
- if pkg.list_url is not None and pkg.url is not None:
- try:
- archive_version = spack.url.parse_version(
- self.default_fetcher.url)
- versions = pkg.fetch_remote_versions()
- try:
- url_from_list = versions[Version(archive_version)]
- fetchers.append(fs.URLFetchStrategy(
- url_from_list, digest))
- except KeyError:
- tty.msg("Can not find version %s in url_list" %
- archive_version)
- except:
- tty.msg("Could not determine url from list_url.")
+ fetchers.insert(
+ 0, fs.URLFetchStrategy(
+ url, digest, expand=expand, extension=extension))
+ if self.default_fetcher.cachable:
+ fetchers.insert(
+ 0, spack.fetch_cache.fetcher(
+ self.mirror_path, digest, expand=expand,
+ extension=extension))
+
+ if self.alternate_fetchers:
+ fetchers.extend(self.alternate_fetchers)
for fetcher in fetchers:
try:
@@ -342,6 +425,9 @@ class Stage(object):
self.fetcher = fetcher
self.fetcher.fetch()
break
+ except spack.fetch_strategy.NoCacheError as e:
+ # Don't bother reporting when something is not cached.
+ continue
except spack.error.SpackError as e:
tty.msg("Fetching from %s failed." % fetcher)
tty.debug(e)
@@ -385,11 +471,11 @@ class Stage(object):
"""
path = self.source_path
if not path:
- tty.die("Attempt to chdir before expanding archive.")
+ raise StageError("Attempt to chdir before expanding archive.")
else:
os.chdir(path)
if not os.listdir(path):
- tty.die("Archive was empty for %s" % self.name)
+ raise StageError("Archive was empty for %s" % self.name)
def restage(self):
"""Removes the expanded archive path if it exists, then re-expands
@@ -398,26 +484,29 @@ class Stage(object):
self.fetcher.reset()
def create(self):
- """
- Creates the stage directory
+ """Creates the stage directory.
- If self.tmp_root evaluates to False, the stage directory is
- created directly under spack.stage_path, otherwise this will
- attempt to create a stage in a temporary directory and link it
- into spack.stage_path.
+ If get_tmp_root() is None, the stage directory is created
+ directly under spack.stage_path, otherwise this will attempt to
+ create a stage in a temporary directory and link it into
+ spack.stage_path.
Spack will use the first writable location in spack.tmp_dirs
to create a stage. If there is no valid location in tmp_dirs,
fall back to making the stage inside spack.stage_path.
+
"""
# Create the top-level stage directory
mkdirp(spack.stage_path)
- remove_dead_links(spack.stage_path)
+ remove_if_dead_link(self.path)
+
# If a tmp_root exists then create a directory there and then link it
# in the stage area, otherwise create the stage directory in self.path
if self._need_to_create_path():
- if self.tmp_root:
- tmp_dir = tempfile.mkdtemp('', STAGE_PREFIX, self.tmp_root)
+ tmp_root = get_tmp_root()
+ if tmp_root is not None:
+ tmp_dir = tempfile.mkdtemp('', _stage_prefix, tmp_root)
+ tty.debug('link %s -> %s' % (self.path, tmp_dir))
os.symlink(tmp_dir, self.path)
else:
mkdirp(self.path)
@@ -513,6 +602,10 @@ class StageComposite:
def archive_file(self):
return self[0].archive_file
+ @property
+ def mirror_path(self):
+ return self[0].mirror_path
+
class DIYStage(object):
"""Simple class that allows any directory to be a spack stage."""
@@ -538,7 +631,7 @@ class DIYStage(object):
def chdir_to_source(self):
self.chdir()
- def fetch(self, mirror_only):
+ def fetch(self, *args, **kwargs):
tty.msg("No need to fetch for DIY.")
def check(self):
@@ -578,25 +671,6 @@ def purge():
remove_linked_tree(stage_path)
-def find_tmp_root():
- if spack.use_tmp_stage:
- for tmp in spack.tmp_dirs:
- try:
- # Replace %u with username
- expanded = expand_user(tmp)
-
- # try to create a directory for spack stuff
- mkdirp(expanded)
-
- # return it if successful.
- return expanded
-
- except OSError:
- continue
-
- return None
-
-
class StageError(spack.error.SpackError):
""""Superclass for all errors encountered during staging."""
diff --git a/lib/spack/spack/store.py b/lib/spack/spack/store.py
new file mode 100644
index 0000000000..3f559315d2
--- /dev/null
+++ b/lib/spack/spack/store.py
@@ -0,0 +1,75 @@
+##############################################################################
+# 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
+##############################################################################
+"""Components that manage Spack's installation tree.
+
+An install tree, or "build store" consists of two parts:
+
+ 1. A package database that tracks what is installed.
+ 2. A directory layout that determines how the installations
+ are laid out.
+
+The store contains all the install prefixes for packages installed by
+Spack. The simplest store could just contain prefixes named by DAG hash,
+but we use a fancier directory layout to make browsing the store and
+debugging easier.
+
+The directory layout is currently hard-coded to be a YAMLDirectoryLayout,
+so called because it stores build metadata within each prefix, in
+`spec.yaml` files. In future versions of Spack we may consider allowing
+install trees to define their own layouts with some per-tree
+configuration.
+
+"""
+import os
+import spack
+import spack.config
+from spack.util.path import canonicalize_path
+from spack.database import Database
+from spack.directory_layout import YamlDirectoryLayout
+
+__author__ = "Benedikt Hegner (CERN)"
+__all__ = ['db', 'layout', 'root']
+
+#
+# Read in the config
+#
+config = spack.config.get_config("config")
+
+#
+# Set up the install path
+#
+root = canonicalize_path(
+ config.get('install_tree', os.path.join(spack.opt_path, 'spack')))
+
+#
+# Set up the installed packages database
+#
+db = Database(root)
+
+#
+# This controls how spack lays out install prefixes and
+# stage directories.
+#
+layout = YamlDirectoryLayout(root)
diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py
index db683917b5..c0a4c7354f 100644
--- a/lib/spack/spack/test/__init__.py
+++ b/lib/spack/spack/test/__init__.py
@@ -41,7 +41,7 @@ test_names = [
'cc',
'cmd.find',
'cmd.module',
- 'cmd.test_install',
+ 'cmd.install',
'cmd.uninstall',
'concretize',
'concretize_preferences',
@@ -53,6 +53,7 @@ test_names = [
'git_fetch',
'hg_fetch',
'install',
+ 'library_list',
'link_tree',
'lock',
'make_executable',
@@ -77,7 +78,7 @@ test_names = [
'url_substitution',
'versions',
'provider_index',
- 'yaml',
+ 'spack_yaml',
# This test needs to be last until global compiler cache is fixed.
'cmd.test_compiler_cmd',
]
@@ -106,25 +107,33 @@ def run(names, outputDir, verbose=False):
sys.exit(1)
tally = Tally()
- for test in names:
- module = 'spack.test.' + test
- print(module)
- tty.msg("Running test: %s" % test)
+ modules = ['spack.test.' + test for test in names]
+ runOpts = ["--with-%s" % spack.test.tally_plugin.Tally.name]
- runOpts = ["--with-%s" % spack.test.tally_plugin.Tally.name]
-
- if outputDir:
- xmlOutputFname = "unittests-{0}.xml".format(test)
- xmlOutputPath = join_path(outputDir, xmlOutputFname)
- runOpts += ["--with-xunit",
- "--xunit-file={0}".format(xmlOutputPath)]
- argv = [""] + runOpts + [module]
- nose.run(argv=argv, addplugins=[tally])
+ if outputDir:
+ xmlOutputFname = "unittests-{0}.xml".format(test)
+ xmlOutputPath = join_path(outputDir, xmlOutputFname)
+ runOpts += ["--with-xunit",
+ "--xunit-file={0}".format(xmlOutputPath)]
+ argv = [""] + runOpts + modules
+ nose.run(argv=argv, addplugins=[tally])
succeeded = not tally.failCount and not tally.errorCount
- tty.msg("Tests Complete.", "%5d tests run" % tally.numberOfTestsRun,
- "%5d failures" % tally.failCount, "%5d errors" % tally.errorCount)
+ tty.msg(
+ "Tests Complete.",
+ "%5d tests run" % tally.numberOfTestsRun,
+ "%5d failures" % tally.failCount,
+ "%5d errors" % tally.errorCount
+ )
+
+ if tally.fail_list:
+ items = [x for x in tally.fail_list]
+ tty.msg('List of failing tests:', *items)
+
+ if tally.error_list:
+ items = [x for x in tally.error_list]
+ tty.msg('List of tests with errors:', *items)
if succeeded:
tty.info("OK", format='g')
diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py
index f3e4bb31d2..74b6b31654 100644
--- a/lib/spack/spack/test/cc.py
+++ b/lib/spack/spack/test/cc.py
@@ -51,7 +51,7 @@ test_command = [
'arg5', 'arg6']
-class CompilerTest(unittest.TestCase):
+class CompilerWrapperTest(unittest.TestCase):
def setUp(self):
self.cc = Executable(join_path(spack.build_env_path, "cc"))
@@ -223,6 +223,8 @@ class CompilerTest(unittest.TestCase):
def test_dep_include(self):
"""Ensure a single dependency include directory is added."""
os.environ['SPACK_DEPENDENCIES'] = self.dep4
+ os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+ os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
self.check_cc('dump-args', test_command,
self.realcc + ' ' +
'-Wl,-rpath,' + self.prefix + '/lib ' +
@@ -233,6 +235,8 @@ class CompilerTest(unittest.TestCase):
def test_dep_lib(self):
"""Ensure a single dependency RPATH is added."""
os.environ['SPACK_DEPENDENCIES'] = self.dep2
+ os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+ os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
self.check_cc('dump-args', test_command,
self.realcc + ' ' +
'-Wl,-rpath,' + self.prefix + '/lib ' +
@@ -241,10 +245,34 @@ class CompilerTest(unittest.TestCase):
'-Wl,-rpath,' + self.dep2 + '/lib64 ' +
' '.join(test_command))
+ def test_dep_lib_no_rpath(self):
+ """Ensure a single dependency link flag is added with no dep RPATH."""
+ os.environ['SPACK_DEPENDENCIES'] = self.dep2
+ os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+ self.check_cc('dump-args', test_command,
+ self.realcc + ' ' +
+ '-Wl,-rpath,' + self.prefix + '/lib ' +
+ '-Wl,-rpath,' + self.prefix + '/lib64 ' +
+ '-L' + self.dep2 + '/lib64 ' +
+ ' '.join(test_command))
+
+ def test_dep_lib_no_lib(self):
+ """Ensure a single dependency RPATH is added with no -L."""
+ os.environ['SPACK_DEPENDENCIES'] = self.dep2
+ os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+ self.check_cc('dump-args', test_command,
+ self.realcc + ' ' +
+ '-Wl,-rpath,' + self.prefix + '/lib ' +
+ '-Wl,-rpath,' + self.prefix + '/lib64 ' +
+ '-Wl,-rpath,' + self.dep2 + '/lib64 ' +
+ ' '.join(test_command))
+
def test_all_deps(self):
"""Ensure includes and RPATHs for all deps are added. """
os.environ['SPACK_DEPENDENCIES'] = ':'.join([
self.dep1, self.dep2, self.dep3, self.dep4])
+ os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+ os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
# This is probably more constrained than it needs to be; it
# checks order within prepended args and doesn't strictly have
@@ -273,6 +301,8 @@ class CompilerTest(unittest.TestCase):
"""Ensure no (extra) -I args or -Wl, are passed in ld mode."""
os.environ['SPACK_DEPENDENCIES'] = ':'.join([
self.dep1, self.dep2, self.dep3, self.dep4])
+ os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+ os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
self.check_ld('dump-args', test_command,
'ld ' +
@@ -290,10 +320,46 @@ class CompilerTest(unittest.TestCase):
' '.join(test_command))
+ def test_ld_deps_no_rpath(self):
+ """Ensure SPACK_RPATH_DEPS controls RPATHs for ld."""
+ os.environ['SPACK_DEPENDENCIES'] = ':'.join([
+ self.dep1, self.dep2, self.dep3, self.dep4])
+ os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+
+ self.check_ld('dump-args', test_command,
+ 'ld ' +
+ '-rpath ' + self.prefix + '/lib ' +
+ '-rpath ' + self.prefix + '/lib64 ' +
+
+ '-L' + self.dep3 + '/lib64 ' +
+ '-L' + self.dep2 + '/lib64 ' +
+ '-L' + self.dep1 + '/lib ' +
+
+ ' '.join(test_command))
+
+ def test_ld_deps_no_link(self):
+ """Ensure SPACK_LINK_DEPS controls -L for ld."""
+ os.environ['SPACK_DEPENDENCIES'] = ':'.join([
+ self.dep1, self.dep2, self.dep3, self.dep4])
+ os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+
+ self.check_ld('dump-args', test_command,
+ 'ld ' +
+ '-rpath ' + self.prefix + '/lib ' +
+ '-rpath ' + self.prefix + '/lib64 ' +
+
+ '-rpath ' + self.dep3 + '/lib64 ' +
+ '-rpath ' + self.dep2 + '/lib64 ' +
+ '-rpath ' + self.dep1 + '/lib ' +
+
+ ' '.join(test_command))
+
def test_ld_deps_reentrant(self):
"""Make sure ld -r is handled correctly on OS's where it doesn't
support rpaths."""
os.environ['SPACK_DEPENDENCIES'] = ':'.join([self.dep1])
+ os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
+ os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
os.environ['SPACK_SHORT_SPEC'] = "foo@1.2=linux-x86_64"
reentrant_test_command = ['-r'] + test_command
diff --git a/lib/spack/spack/test/cmd/find.py b/lib/spack/spack/test/cmd/find.py
index fa82db7733..4788da8ec6 100644
--- a/lib/spack/spack/test/cmd/find.py
+++ b/lib/spack/spack/test/cmd/find.py
@@ -52,5 +52,3 @@ class FindTest(unittest.TestCase):
args.implicit = True
q_args = query_arguments(args)
self.assertEqual(q_args['explicit'], False)
- args.explicit = True
- self.assertRaises(SystemExit, query_arguments, args)
diff --git a/lib/spack/spack/test/cmd/test_install.py b/lib/spack/spack/test/cmd/install.py
index 39287d5d6d..591bf02340 100644
--- a/lib/spack/spack/test/cmd/test_install.py
+++ b/lib/spack/spack/test/cmd/install.py
@@ -23,20 +23,23 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import StringIO
+import argparse
+import codecs
import collections
-import os
-import unittest
import contextlib
+import unittest
+import llnl.util.filesystem
import spack
import spack.cmd
+import spack.cmd.install as install
FILE_REGISTRY = collections.defaultdict(StringIO.StringIO)
# Monkey-patch open to write module files to a StringIO instance
@contextlib.contextmanager
-def mock_open(filename, mode):
+def mock_open(filename, mode, *args):
if not mode == 'wb':
message = 'test.test_install : unexpected opening mode for mock_open'
raise RuntimeError(message)
@@ -51,11 +54,6 @@ def mock_open(filename, mode):
handle.close()
-# The use of __import__ is necessary to maintain a name with hyphen (which
-# cannot be an identifier in python)
-test_install = __import__("spack.cmd.test-install", fromlist=['test_install'])
-
-
class MockSpec(object):
def __init__(self, name, version, hashStr=None):
@@ -107,6 +105,8 @@ class MockPackage(object):
self.build_log_path = buildLogPath
def do_install(self, *args, **kwargs):
+ for x in self.spec.dependencies():
+ x.package.do_install(*args, **kwargs)
self.installed = True
@@ -124,36 +124,28 @@ class MockPackageDb(object):
def mock_fetch_log(path):
return []
-specX = MockSpec('X', "1.2.0")
-specY = MockSpec('Y', "2.3.8")
+specX = MockSpec('X', '1.2.0')
+specY = MockSpec('Y', '2.3.8')
specX._dependencies['Y'] = spack.DependencySpec(specY, spack.alldeps)
pkgX = MockPackage(specX, 'logX')
pkgY = MockPackage(specY, 'logY')
-
-
-class MockArgs(object):
-
- def __init__(self, package):
- self.package = package
- self.jobs = None
- self.no_checksum = False
- self.output = None
+specX.package = pkgX
+specY.package = pkgY
# TODO: add test(s) where Y fails to install
-class TestInstallTest(unittest.TestCase):
- """
- Tests test-install where X->Y
- """
+class InstallTestJunitLog(unittest.TestCase):
+ """Tests test-install where X->Y"""
def setUp(self):
- super(TestInstallTest, self).setUp()
-
+ super(InstallTestJunitLog, self).setUp()
+ install.PackageBase = MockPackage
# Monkey patch parse specs
+
def monkey_parse_specs(x, concretize):
- if x == 'X':
+ if x == ['X']:
return [specX]
- elif x == 'Y':
+ elif x == ['Y']:
return [specY]
return []
@@ -161,11 +153,12 @@ class TestInstallTest(unittest.TestCase):
spack.cmd.parse_specs = monkey_parse_specs
# Monkey patch os.mkdirp
- self.os_mkdir = os.mkdir
- os.mkdir = lambda x: True
+ self.mkdirp = llnl.util.filesystem.mkdirp
+ llnl.util.filesystem.mkdirp = lambda x: True
# Monkey patch open
- test_install.open = mock_open
+ self.codecs_open = codecs.open
+ codecs.open = mock_open
# Clean FILE_REGISTRY
FILE_REGISTRY.clear()
@@ -180,21 +173,24 @@ class TestInstallTest(unittest.TestCase):
def tearDown(self):
# Remove the monkey patched test_install.open
- test_install.open = open
+ codecs.open = self.codecs_open
# Remove the monkey patched os.mkdir
- os.mkdir = self.os_mkdir
- del self.os_mkdir
+ llnl.util.filesystem.mkdirp = self.mkdirp
+ del self.mkdirp
# Remove the monkey patched parse_specs
spack.cmd.parse_specs = self.parse_specs
del self.parse_specs
- super(TestInstallTest, self).tearDown()
+ super(InstallTestJunitLog, self).tearDown()
spack.repo = self.saved_db
def test_installing_both(self):
- test_install.test_install(None, MockArgs('X'))
+ parser = argparse.ArgumentParser()
+ install.setup_parser(parser)
+ args = parser.parse_args(['--log-format=junit', 'X'])
+ install.install(parser, args)
self.assertEqual(len(FILE_REGISTRY), 1)
for _, content in FILE_REGISTRY.items():
self.assertTrue('tests="2"' in content)
@@ -204,7 +200,10 @@ class TestInstallTest(unittest.TestCase):
def test_dependency_already_installed(self):
pkgX.installed = True
pkgY.installed = True
- test_install.test_install(None, MockArgs('X'))
+ parser = argparse.ArgumentParser()
+ install.setup_parser(parser)
+ args = parser.parse_args(['--log-format=junit', 'X'])
+ install.install(parser, args)
self.assertEqual(len(FILE_REGISTRY), 1)
for _, content in FILE_REGISTRY.items():
self.assertTrue('tests="2"' in content)
diff --git a/lib/spack/spack/test/cmd/module.py b/lib/spack/spack/test/cmd/module.py
index 3a0ce32e6c..39f9c5649f 100644
--- a/lib/spack/spack/test/cmd/module.py
+++ b/lib/spack/spack/test/cmd/module.py
@@ -34,7 +34,7 @@ class TestModule(spack.test.mock_database.MockDatabase):
def _get_module_files(self, args):
return [modules.module_types[args.module_type](spec).file_name
- for spec in args.specs]
+ for spec in args.specs()]
def test_module_common_operations(self):
parser = argparse.ArgumentParser()
diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py
index 4ccb9ddbf4..6a86a1543f 100644
--- a/lib/spack/spack/test/cmd/uninstall.py
+++ b/lib/spack/spack/test/cmd/uninstall.py
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import spack.test.mock_database
-
+import spack.store
from spack.cmd.uninstall import uninstall
@@ -51,7 +51,7 @@ class TestUninstall(spack.test.mock_database.MockDatabase):
args = MockArgs(['callpath'], all=True, dependents=True)
uninstall(parser, args)
- all_specs = spack.install_layout.all_specs()
+ all_specs = spack.store.layout.all_specs()
self.assertEqual(len(all_specs), 7)
# query specs with multiple configurations
mpileaks_specs = [s for s in all_specs if s.satisfies('mpileaks')]
diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py
index 2c8bedc33f..575e912609 100644
--- a/lib/spack/spack/test/concretize_preferences.py
+++ b/lib/spack/spack/test/concretize_preferences.py
@@ -104,3 +104,10 @@ class ConcretizePreferencesTest(MockPackagesTest):
self.update_packages('all', 'providers', {'mpi': ['zmpi']})
spec = self.concretize('mpileaks')
self.assertTrue('zmpi', spec)
+
+ def test_develop(self):
+ """Test conretization with develop version
+ """
+ spec = Spec('builtin.mock.develop-test')
+ spec.concretize()
+ self.assertEqual(spec.version, spack.spec.Version('0.2.15'))
diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py
index 0822e44db8..adc0795916 100644
--- a/lib/spack/spack/test/config.py
+++ b/lib/spack/spack/test/config.py
@@ -24,87 +24,147 @@
##############################################################################
import os
import shutil
+import getpass
+import yaml
from tempfile import mkdtemp
import spack
import spack.config
+from spack.util.path import canonicalize_path
from ordereddict_backport import OrderedDict
from spack.test.mock_packages_test import *
# Some sample compiler config data
-a_comps = [
- {'compiler': {
- 'paths': {
- "cc": "/gcc473",
- "cxx": "/g++473",
- "f77": None,
- "fc": None
- },
- 'modules': None,
- 'spec': 'gcc@4.7.3',
- 'operating_system': 'CNL10'
- }},
- {'compiler': {
- 'paths': {
- "cc": "/gcc450",
- "cxx": "/g++450",
- "f77": 'gfortran',
- "fc": 'gfortran'
- },
- 'modules': None,
- 'spec': 'gcc@4.5.0',
- 'operating_system': 'CNL10'
- }},
- {'compiler': {
- 'paths': {
- "cc": "<overwritten>",
- "cxx": "<overwritten>",
- "f77": '<overwritten>',
- "fc": '<overwritten>'},
- 'modules': None,
- 'spec': 'clang@3.3',
- 'operating_system': 'CNL10'
- }}
-]
-
-b_comps = [
- {'compiler': {
- 'paths': {
- "cc": "/icc100",
- "cxx": "/icp100",
- "f77": None,
- "fc": None
- },
- 'modules': None,
- 'spec': 'icc@10.0',
- 'operating_system': 'CNL10'
- }},
- {'compiler': {
- 'paths': {
- "cc": "/icc111",
- "cxx": "/icp111",
- "f77": 'ifort',
- "fc": 'ifort'
- },
- 'modules': None,
- 'spec': 'icc@11.1',
- 'operating_system': 'CNL10'
- }},
- {'compiler': {
- 'paths': {
- "cc": "<overwritten>",
- "cxx": "<overwritten>",
- "f77": '<overwritten>',
- "fc": '<overwritten>'},
- 'modules': None,
- 'spec': 'clang@3.3',
- 'operating_system': 'CNL10'
- }}
-]
+a_comps = {
+ 'compilers': [
+ {'compiler': {
+ 'paths': {
+ "cc": "/gcc473",
+ "cxx": "/g++473",
+ "f77": None,
+ "fc": None
+ },
+ 'modules': None,
+ 'spec': 'gcc@4.7.3',
+ 'operating_system': 'CNL10'
+ }},
+ {'compiler': {
+ 'paths': {
+ "cc": "/gcc450",
+ "cxx": "/g++450",
+ "f77": 'gfortran',
+ "fc": 'gfortran'
+ },
+ 'modules': None,
+ 'spec': 'gcc@4.5.0',
+ 'operating_system': 'CNL10'
+ }},
+ {'compiler': {
+ 'paths': {
+ "cc": "/gcc422",
+ "cxx": "/g++422",
+ "f77": 'gfortran',
+ "fc": 'gfortran'
+ },
+ 'flags': {
+ "cppflags": "-O0 -fpic",
+ "fflags": "-f77",
+ },
+ 'modules': None,
+ 'spec': 'gcc@4.2.2',
+ 'operating_system': 'CNL10'
+ }},
+ {'compiler': {
+ 'paths': {
+ "cc": "<overwritten>",
+ "cxx": "<overwritten>",
+ "f77": '<overwritten>',
+ "fc": '<overwritten>'},
+ 'modules': None,
+ 'spec': 'clang@3.3',
+ 'operating_system': 'CNL10'
+ }}
+ ]
+}
+
+b_comps = {
+ 'compilers': [
+ {'compiler': {
+ 'paths': {
+ "cc": "/icc100",
+ "cxx": "/icp100",
+ "f77": None,
+ "fc": None
+ },
+ 'modules': None,
+ 'spec': 'icc@10.0',
+ 'operating_system': 'CNL10'
+ }},
+ {'compiler': {
+ 'paths': {
+ "cc": "/icc111",
+ "cxx": "/icp111",
+ "f77": 'ifort',
+ "fc": 'ifort'
+ },
+ 'modules': None,
+ 'spec': 'icc@11.1',
+ 'operating_system': 'CNL10'
+ }},
+ {'compiler': {
+ 'paths': {
+ "cc": "/icc123",
+ "cxx": "/icp123",
+ "f77": 'ifort',
+ "fc": 'ifort'
+ },
+ 'flags': {
+ "cppflags": "-O3",
+ "fflags": "-f77rtl",
+ },
+ 'modules': None,
+ 'spec': 'icc@12.3',
+ 'operating_system': 'CNL10'
+ }},
+ {'compiler': {
+ 'paths': {
+ "cc": "<overwritten>",
+ "cxx": "<overwritten>",
+ "f77": '<overwritten>',
+ "fc": '<overwritten>'},
+ 'modules': None,
+ 'spec': 'clang@3.3',
+ 'operating_system': 'CNL10'
+ }}
+ ]
+}
# Some Sample repo data
-repos_low = ["/some/path"]
-repos_high = ["/some/other/path"]
+repos_low = {'repos': ["/some/path"]}
+repos_high = {'repos': ["/some/other/path"]}
+
+
+# sample config data
+config_low = {
+ 'config': {
+ 'install_tree': 'install_tree_path',
+ 'build_stage': ['path1', 'path2', 'path3']}}
+
+config_override_all = {
+ 'config:': {
+ 'install_tree:': 'override_all'}}
+
+config_override_key = {
+ 'config': {
+ 'install_tree:': 'override_key'}}
+
+config_merge_list = {
+ 'config': {
+ 'build_stage': ['patha', 'pathb']}}
+
+config_override_list = {
+ 'config': {
+ 'build_stage:': ['patha', 'pathb']}}
class ConfigTest(MockPackagesTest):
@@ -112,73 +172,183 @@ class ConfigTest(MockPackagesTest):
def setUp(self):
super(ConfigTest, self).setUp()
self.tmp_dir = mkdtemp('.tmp', 'spack-config-test-')
+ self.a_comp_specs = [
+ ac['compiler']['spec'] for ac in a_comps['compilers']]
+ self.b_comp_specs = [
+ bc['compiler']['spec'] for bc in b_comps['compilers']]
+
spack.config.config_scopes = OrderedDict()
- spack.config.ConfigScope(
- 'test_low_priority', os.path.join(self.tmp_dir, 'low'))
- spack.config.ConfigScope('test_high_priority',
- os.path.join(self.tmp_dir, 'high'))
+ for priority in ['low', 'high']:
+ scope_dir = os.path.join(self.tmp_dir, priority)
+ spack.config.ConfigScope(priority, scope_dir)
def tearDown(self):
super(ConfigTest, self).tearDown()
shutil.rmtree(self.tmp_dir, True)
- def check_config(self, comps, *compiler_names):
+ def write_config_file(self, config, data, scope):
+ scope_dir = os.path.join(self.tmp_dir, scope)
+ mkdirp(scope_dir)
+
+ path = os.path.join(scope_dir, config + '.yaml')
+ with open(path, 'w') as f:
+ print yaml
+ yaml.dump(data, f)
+
+ def check_compiler_config(self, comps, *compiler_names):
"""Check that named compilers in comps match Spack's config."""
config = spack.config.get_config('compilers')
compiler_list = ['cc', 'cxx', 'f77', 'fc']
+ flag_list = ['cflags', 'cxxflags', 'fflags', 'cppflags',
+ 'ldflags', 'ldlibs']
param_list = ['modules', 'paths', 'spec', 'operating_system']
for compiler in config:
conf = compiler['compiler']
if conf['spec'] in compiler_names:
- comp = None
- for c in comps:
- if c['compiler']['spec'] == conf['spec']:
- comp = c['compiler']
- break
+ comp = next((c['compiler'] for c in comps if
+ c['compiler']['spec'] == conf['spec']), None)
if not comp:
self.fail('Bad config spec')
for p in param_list:
self.assertEqual(conf[p], comp[p])
+ for f in flag_list:
+ expected = comp.get('flags', {}).get(f, None)
+ actual = conf.get('flags', {}).get(f, None)
+ self.assertEqual(expected, actual)
for c in compiler_list:
expected = comp['paths'][c]
actual = conf['paths'][c]
self.assertEqual(expected, actual)
def test_write_list_in_memory(self):
- spack.config.update_config('repos', repos_low, 'test_low_priority')
- spack.config.update_config('repos', repos_high, 'test_high_priority')
+ spack.config.update_config('repos', repos_low['repos'], scope='low')
+ spack.config.update_config('repos', repos_high['repos'], scope='high')
+
config = spack.config.get_config('repos')
- self.assertEqual(config, repos_high + repos_low)
+ self.assertEqual(config, repos_high['repos'] + repos_low['repos'])
def test_write_key_in_memory(self):
# Write b_comps "on top of" a_comps.
- spack.config.update_config('compilers', a_comps, 'test_low_priority')
- spack.config.update_config('compilers', b_comps, 'test_high_priority')
+ spack.config.update_config(
+ 'compilers', a_comps['compilers'], scope='low')
+ spack.config.update_config(
+ 'compilers', b_comps['compilers'], scope='high')
# Make sure the config looks how we expect.
- self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0')
- self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3')
+ self.check_compiler_config(a_comps['compilers'], *self.a_comp_specs)
+ self.check_compiler_config(b_comps['compilers'], *self.b_comp_specs)
def test_write_key_to_disk(self):
# Write b_comps "on top of" a_comps.
- spack.config.update_config('compilers', a_comps, 'test_low_priority')
- spack.config.update_config('compilers', b_comps, 'test_high_priority')
+ spack.config.update_config(
+ 'compilers', a_comps['compilers'], scope='low')
+ spack.config.update_config(
+ 'compilers', b_comps['compilers'], scope='high')
# Clear caches so we're forced to read from disk.
spack.config.clear_config_caches()
# Same check again, to ensure consistency.
- self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0')
- self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3')
+ self.check_compiler_config(a_comps['compilers'], *self.a_comp_specs)
+ self.check_compiler_config(b_comps['compilers'], *self.b_comp_specs)
def test_write_to_same_priority_file(self):
# Write b_comps in the same file as a_comps.
- spack.config.update_config('compilers', a_comps, 'test_low_priority')
- spack.config.update_config('compilers', b_comps, 'test_low_priority')
+ spack.config.update_config(
+ 'compilers', a_comps['compilers'], scope='low')
+ spack.config.update_config(
+ 'compilers', b_comps['compilers'], scope='low')
# Clear caches so we're forced to read from disk.
spack.config.clear_config_caches()
# Same check again, to ensure consistency.
- self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0')
- self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3')
+ self.check_compiler_config(a_comps['compilers'], *self.a_comp_specs)
+ self.check_compiler_config(b_comps['compilers'], *self.b_comp_specs)
+
+ def check_canonical(self, var, expected):
+ """Ensure that <expected> is substituted properly for <var> in strings
+ containing <var> in various positions."""
+ path = '/foo/bar/baz'
+
+ self.assertEqual(canonicalize_path(var + path),
+ expected + path)
+
+ self.assertEqual(canonicalize_path(path + var),
+ path + '/' + expected)
+
+ self.assertEqual(canonicalize_path(path + var + path),
+ expected + path)
+
+ def test_substitute_config_variables(self):
+ prefix = spack.prefix.lstrip('/')
+
+ self.assertEqual(os.path.join('/foo/bar/baz', prefix),
+ canonicalize_path('/foo/bar/baz/$spack'))
+
+ self.assertEqual(os.path.join(spack.prefix, 'foo/bar/baz'),
+ canonicalize_path('$spack/foo/bar/baz/'))
+
+ self.assertEqual(os.path.join('/foo/bar/baz', prefix, 'foo/bar/baz'),
+ canonicalize_path('/foo/bar/baz/$spack/foo/bar/baz/'))
+
+ self.assertEqual(os.path.join('/foo/bar/baz', prefix),
+ canonicalize_path('/foo/bar/baz/${spack}'))
+
+ self.assertEqual(os.path.join(spack.prefix, 'foo/bar/baz'),
+ canonicalize_path('${spack}/foo/bar/baz/'))
+
+ self.assertEqual(
+ os.path.join('/foo/bar/baz', prefix, 'foo/bar/baz'),
+ canonicalize_path('/foo/bar/baz/${spack}/foo/bar/baz/'))
+
+ self.assertNotEqual(
+ os.path.join('/foo/bar/baz', prefix, 'foo/bar/baz'),
+ canonicalize_path('/foo/bar/baz/${spack/foo/bar/baz/'))
+
+ def test_substitute_user(self):
+ user = getpass.getuser()
+ self.assertEqual('/foo/bar/' + user + '/baz',
+ canonicalize_path('/foo/bar/$user/baz'))
+
+ def test_substitute_tempdir(self):
+ tempdir = tempfile.gettempdir()
+ self.assertEqual(tempdir, canonicalize_path('$tempdir'))
+ self.assertEqual(tempdir + '/foo/bar/baz',
+ canonicalize_path('$tempdir/foo/bar/baz'))
+
+ def test_read_config(self):
+ self.write_config_file('config', config_low, 'low')
+ self.assertEqual(spack.config.get_config('config'),
+ config_low['config'])
+
+ def test_read_config_override_all(self):
+ self.write_config_file('config', config_low, 'low')
+ self.write_config_file('config', config_override_all, 'high')
+ self.assertEqual(spack.config.get_config('config'), {
+ 'install_tree': 'override_all'
+ })
+
+ def test_read_config_override_key(self):
+ self.write_config_file('config', config_low, 'low')
+ self.write_config_file('config', config_override_key, 'high')
+ self.assertEqual(spack.config.get_config('config'), {
+ 'install_tree': 'override_key',
+ 'build_stage': ['path1', 'path2', 'path3']
+ })
+
+ def test_read_config_merge_list(self):
+ self.write_config_file('config', config_low, 'low')
+ self.write_config_file('config', config_merge_list, 'high')
+ self.assertEqual(spack.config.get_config('config'), {
+ 'install_tree': 'install_tree_path',
+ 'build_stage': ['patha', 'pathb', 'path1', 'path2', 'path3']
+ })
+
+ def test_read_config_override_list(self):
+ self.write_config_file('config', config_low, 'low')
+ self.write_config_file('config', config_override_list, 'high')
+ self.assertEqual(spack.config.get_config('config'), {
+ 'install_tree': 'install_tree_path',
+ 'build_stage': ['patha', 'pathb']
+ })
diff --git a/lib/spack/spack/test/data/sourceme_parameters.sh b/lib/spack/spack/test/data/sourceme_parameters.sh
new file mode 100644
index 0000000000..3826eb092b
--- /dev/null
+++ b/lib/spack/spack/test/data/sourceme_parameters.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+if [[ "$1" == "intel64" ]] ; then
+ export FOO='intel64'
+else
+ export FOO='default'
+fi \ No newline at end of file
diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py
index 22b1f17890..1a1281e10e 100644
--- a/lib/spack/spack/test/database.py
+++ b/lib/spack/spack/test/database.py
@@ -26,10 +26,11 @@
These tests check the database is functioning properly,
both in memory and in its file
"""
-import os.path
import multiprocessing
+import os.path
import spack
+import spack.store
from llnl.util.filesystem import join_path
from llnl.util.tty.colify import colify
from spack.test.mock_database import MockDatabase
@@ -40,16 +41,16 @@ def _print_ref_counts():
recs = []
def add_rec(spec):
- cspecs = spack.installed_db.query(spec, installed=any)
+ cspecs = spack.store.db.query(spec, installed=any)
if not cspecs:
recs.append("[ %-7s ] %-20s-" % ('', spec))
else:
key = cspecs[0].dag_hash()
- rec = spack.installed_db.get_record(cspecs[0])
+ rec = spack.store.db.get_record(cspecs[0])
recs.append("[ %-7s ] %-20s%d" % (key[:7], spec, rec.ref_count))
- with spack.installed_db.read_transaction():
+ with spack.store.db.read_transaction():
add_rec('mpileaks ^mpich')
add_rec('callpath ^mpich')
add_rec('mpich')
@@ -82,22 +83,22 @@ class DatabaseTest(MockDatabase):
def test_010_all_install_sanity(self):
"""Ensure that the install layout reflects what we think it does."""
- all_specs = spack.install_layout.all_specs()
+ all_specs = spack.store.layout.all_specs()
self.assertEqual(len(all_specs), 13)
# query specs with multiple configurations
mpileaks_specs = [s for s in all_specs if s.satisfies('mpileaks')]
callpath_specs = [s for s in all_specs if s.satisfies('callpath')]
- mpi_specs = [s for s in all_specs if s.satisfies('mpi')]
+ mpi_specs = [s for s in all_specs if s.satisfies('mpi')]
self.assertEqual(len(mpileaks_specs), 3)
self.assertEqual(len(callpath_specs), 3)
self.assertEqual(len(mpi_specs), 3)
# query specs with single configurations
- dyninst_specs = [s for s in all_specs if s.satisfies('dyninst')]
+ dyninst_specs = [s for s in all_specs if s.satisfies('dyninst')]
libdwarf_specs = [s for s in all_specs if s.satisfies('libdwarf')]
- libelf_specs = [s for s in all_specs if s.satisfies('libelf')]
+ libelf_specs = [s for s in all_specs if s.satisfies('libelf')]
self.assertEqual(len(dyninst_specs), 1)
self.assertEqual(len(libdwarf_specs), 1)
@@ -113,34 +114,54 @@ class DatabaseTest(MockDatabase):
def test_015_write_and_read(self):
# write and read DB
- with spack.installed_db.write_transaction():
- specs = spack.installed_db.query()
- recs = [spack.installed_db.get_record(s) for s in specs]
+ with spack.store.db.write_transaction():
+ specs = spack.store.db.query()
+ recs = [spack.store.db.get_record(s) for s in specs]
for spec, rec in zip(specs, recs):
- new_rec = spack.installed_db.get_record(spec)
+ new_rec = spack.store.db.get_record(spec)
self.assertEqual(new_rec.ref_count, rec.ref_count)
self.assertEqual(new_rec.spec, rec.spec)
self.assertEqual(new_rec.path, rec.path)
self.assertEqual(new_rec.installed, rec.installed)
+ def _check_merkleiness(self):
+ """Ensure the spack database is a valid merkle graph."""
+ all_specs = spack.store.db.query(installed=any)
+
+ seen = {}
+ for spec in all_specs:
+ for dep in spec.dependencies():
+ hash_key = dep.dag_hash()
+ if hash_key not in seen:
+ seen[hash_key] = id(dep)
+ else:
+ self.assertEqual(seen[hash_key], id(dep))
+
def _check_db_sanity(self):
"""Utiilty function to check db against install layout."""
- expected = sorted(spack.install_layout.all_specs())
- actual = sorted(self.installed_db.query())
+ expected = sorted(spack.store.layout.all_specs())
+ actual = sorted(self.install_db.query())
self.assertEqual(len(expected), len(actual))
for e, a in zip(expected, actual):
self.assertEqual(e, a)
+ self._check_merkleiness()
+
def test_020_db_sanity(self):
"""Make sure query() returns what's actually in the db."""
self._check_db_sanity()
+ def test_025_reindex(self):
+ """Make sure reindex works and ref counts are valid."""
+ spack.store.db.reindex(spack.store.layout)
+ self._check_db_sanity()
+
def test_030_db_sanity_from_another_process(self):
def read_and_modify():
self._check_db_sanity() # check that other process can read DB
- with self.installed_db.write_transaction():
+ with self.install_db.write_transaction():
self._mock_remove('mpileaks ^zmpi')
p = multiprocessing.Process(target=read_and_modify, args=())
@@ -148,40 +169,40 @@ class DatabaseTest(MockDatabase):
p.join()
# ensure child process change is visible in parent process
- with self.installed_db.read_transaction():
- self.assertEqual(len(self.installed_db.query('mpileaks ^zmpi')), 0)
+ with self.install_db.read_transaction():
+ self.assertEqual(len(self.install_db.query('mpileaks ^zmpi')), 0)
def test_040_ref_counts(self):
"""Ensure that we got ref counts right when we read the DB."""
- self.installed_db._check_ref_counts()
+ self.install_db._check_ref_counts()
def test_050_basic_query(self):
"""Ensure querying database is consistent with what is installed."""
# query everything
- self.assertEqual(len(spack.installed_db.query()), 13)
+ self.assertEqual(len(spack.store.db.query()), 13)
# query specs with multiple configurations
- mpileaks_specs = self.installed_db.query('mpileaks')
- callpath_specs = self.installed_db.query('callpath')
- mpi_specs = self.installed_db.query('mpi')
+ mpileaks_specs = self.install_db.query('mpileaks')
+ callpath_specs = self.install_db.query('callpath')
+ mpi_specs = self.install_db.query('mpi')
self.assertEqual(len(mpileaks_specs), 3)
self.assertEqual(len(callpath_specs), 3)
self.assertEqual(len(mpi_specs), 3)
# query specs with single configurations
- dyninst_specs = self.installed_db.query('dyninst')
- libdwarf_specs = self.installed_db.query('libdwarf')
- libelf_specs = self.installed_db.query('libelf')
+ dyninst_specs = self.install_db.query('dyninst')
+ libdwarf_specs = self.install_db.query('libdwarf')
+ libelf_specs = self.install_db.query('libelf')
self.assertEqual(len(dyninst_specs), 1)
self.assertEqual(len(libdwarf_specs), 1)
self.assertEqual(len(libelf_specs), 1)
# Query by dependency
- self.assertEqual(len(self.installed_db.query('mpileaks ^mpich')), 1)
- self.assertEqual(len(self.installed_db.query('mpileaks ^mpich2')), 1)
- self.assertEqual(len(self.installed_db.query('mpileaks ^zmpi')), 1)
+ self.assertEqual(len(self.install_db.query('mpileaks ^mpich')), 1)
+ self.assertEqual(len(self.install_db.query('mpileaks ^mpich2')), 1)
+ self.assertEqual(len(self.install_db.query('mpileaks ^zmpi')), 1)
def _check_remove_and_add_package(self, spec):
"""Remove a spec from the DB, then add it and make sure everything's
@@ -189,13 +210,13 @@ class DatabaseTest(MockDatabase):
removed, that it's back when added again, and that ref
counts are consistent.
"""
- original = self.installed_db.query()
- self.installed_db._check_ref_counts()
+ original = self.install_db.query()
+ self.install_db._check_ref_counts()
# Remove spec
- concrete_spec = self.installed_db.remove(spec)
- self.installed_db._check_ref_counts()
- remaining = self.installed_db.query()
+ concrete_spec = self.install_db.remove(spec)
+ self.install_db._check_ref_counts()
+ remaining = self.install_db.query()
# ensure spec we removed is gone
self.assertEqual(len(original) - 1, len(remaining))
@@ -203,13 +224,14 @@ class DatabaseTest(MockDatabase):
self.assertTrue(concrete_spec not in remaining)
# add it back and make sure everything is ok.
- self.installed_db.add(concrete_spec, "")
- installed = self.installed_db.query()
- self.assertEqual(len(installed), len(original))
+ self.install_db.add(concrete_spec, spack.store.layout)
+ installed = self.install_db.query()
+ self.assertTrue(concrete_spec in installed)
+ self.assertEqual(installed, original)
# sanity check against direcory layout and check ref counts.
self._check_db_sanity()
- self.installed_db._check_ref_counts()
+ self.install_db._check_ref_counts()
def test_060_remove_and_add_root_package(self):
self._check_remove_and_add_package('mpileaks ^mpich')
@@ -218,95 +240,95 @@ class DatabaseTest(MockDatabase):
self._check_remove_and_add_package('dyninst')
def test_080_root_ref_counts(self):
- rec = self.installed_db.get_record('mpileaks ^mpich')
+ rec = self.install_db.get_record('mpileaks ^mpich')
# Remove a top-level spec from the DB
- self.installed_db.remove('mpileaks ^mpich')
+ self.install_db.remove('mpileaks ^mpich')
# record no longer in DB
self.assertEqual(
- self.installed_db.query('mpileaks ^mpich', installed=any), [])
+ self.install_db.query('mpileaks ^mpich', installed=any), [])
# record's deps have updated ref_counts
self.assertEqual(
- self.installed_db.get_record('callpath ^mpich').ref_count, 0)
- self.assertEqual(self.installed_db.get_record('mpich').ref_count, 1)
+ self.install_db.get_record('callpath ^mpich').ref_count, 0)
+ self.assertEqual(self.install_db.get_record('mpich').ref_count, 1)
# Put the spec back
- self.installed_db.add(rec.spec, rec.path)
+ self.install_db.add(rec.spec, spack.store.layout)
# record is present again
self.assertEqual(
- len(self.installed_db.query('mpileaks ^mpich', installed=any)), 1)
+ len(self.install_db.query('mpileaks ^mpich', installed=any)), 1)
# dependencies have ref counts updated
self.assertEqual(
- self.installed_db.get_record('callpath ^mpich').ref_count, 1)
- self.assertEqual(self.installed_db.get_record('mpich').ref_count, 2)
+ self.install_db.get_record('callpath ^mpich').ref_count, 1)
+ self.assertEqual(self.install_db.get_record('mpich').ref_count, 2)
def test_090_non_root_ref_counts(self):
- self.installed_db.get_record('mpileaks ^mpich')
- self.installed_db.get_record('callpath ^mpich')
+ self.install_db.get_record('mpileaks ^mpich')
+ self.install_db.get_record('callpath ^mpich')
# "force remove" a non-root spec from the DB
- self.installed_db.remove('callpath ^mpich')
+ self.install_db.remove('callpath ^mpich')
# record still in DB but marked uninstalled
self.assertEqual(
- self.installed_db.query('callpath ^mpich', installed=True), [])
+ self.install_db.query('callpath ^mpich', installed=True), [])
self.assertEqual(
- len(self.installed_db.query('callpath ^mpich', installed=any)), 1)
+ len(self.install_db.query('callpath ^mpich', installed=any)), 1)
# record and its deps have same ref_counts
- self.assertEqual(self.installed_db.get_record(
+ self.assertEqual(self.install_db.get_record(
'callpath ^mpich', installed=any).ref_count, 1)
- self.assertEqual(self.installed_db.get_record('mpich').ref_count, 2)
+ self.assertEqual(self.install_db.get_record('mpich').ref_count, 2)
# remove only dependent of uninstalled callpath record
- self.installed_db.remove('mpileaks ^mpich')
+ self.install_db.remove('mpileaks ^mpich')
# record and parent are completely gone.
self.assertEqual(
- self.installed_db.query('mpileaks ^mpich', installed=any), [])
+ self.install_db.query('mpileaks ^mpich', installed=any), [])
self.assertEqual(
- self.installed_db.query('callpath ^mpich', installed=any), [])
+ self.install_db.query('callpath ^mpich', installed=any), [])
# mpich ref count updated properly.
- mpich_rec = self.installed_db.get_record('mpich')
+ mpich_rec = self.install_db.get_record('mpich')
self.assertEqual(mpich_rec.ref_count, 0)
def test_100_no_write_with_exception_on_remove(self):
def fail_while_writing():
- with self.installed_db.write_transaction():
+ with self.install_db.write_transaction():
self._mock_remove('mpileaks ^zmpi')
raise Exception()
- with self.installed_db.read_transaction():
+ with self.install_db.read_transaction():
self.assertEqual(
- len(self.installed_db.query('mpileaks ^zmpi', installed=any)),
+ len(self.install_db.query('mpileaks ^zmpi', installed=any)),
1)
self.assertRaises(Exception, fail_while_writing)
# reload DB and make sure zmpi is still there.
- with self.installed_db.read_transaction():
+ with self.install_db.read_transaction():
self.assertEqual(
- len(self.installed_db.query('mpileaks ^zmpi', installed=any)),
+ len(self.install_db.query('mpileaks ^zmpi', installed=any)),
1)
def test_110_no_write_with_exception_on_install(self):
def fail_while_writing():
- with self.installed_db.write_transaction():
+ with self.install_db.write_transaction():
self._mock_install('cmake')
raise Exception()
- with self.installed_db.read_transaction():
+ with self.install_db.read_transaction():
self.assertEqual(
- self.installed_db.query('cmake', installed=any), [])
+ self.install_db.query('cmake', installed=any), [])
self.assertRaises(Exception, fail_while_writing)
# reload DB and make sure cmake was not written.
- with self.installed_db.read_transaction():
+ with self.install_db.read_transaction():
self.assertEqual(
- self.installed_db.query('cmake', installed=any), [])
+ self.install_db.query('cmake', installed=any), [])
diff --git a/lib/spack/spack/test/directory_layout.py b/lib/spack/spack/test/directory_layout.py
index 2d0565acae..fdaa43464b 100644
--- a/lib/spack/spack/test/directory_layout.py
+++ b/lib/spack/spack/test/directory_layout.py
@@ -91,22 +91,33 @@ class DirectoryLayoutTest(MockPackagesTest):
# Make sure spec file can be read back in to get the original spec
spec_from_file = self.layout.read_spec(spec_path)
- self.assertEqual(spec, spec_from_file)
- self.assertTrue(spec.eq_dag, spec_from_file)
+
+ # currently we don't store build dependency information when
+ # we write out specs to the filesystem.
+
+ # TODO: fix this when we can concretize more loosely based on
+ # TODO: what is installed. We currently omit these to
+ # TODO: increase reuse of build dependencies.
+ stored_deptypes = ('link', 'run')
+ expected = spec.copy(deps=stored_deptypes)
+ self.assertEqual(expected, spec_from_file)
+ self.assertTrue(expected.eq_dag, spec_from_file)
self.assertTrue(spec_from_file.concrete)
# Ensure that specs that come out "normal" are really normal.
with open(spec_path) as spec_file:
read_separately = Spec.from_yaml(spec_file.read())
- read_separately.normalize()
- self.assertEqual(read_separately, spec_from_file)
+ # TODO: revise this when build deps are in dag_hash
+ norm = read_separately.normalized().copy(deps=stored_deptypes)
+ self.assertEqual(norm, spec_from_file)
- read_separately.concretize()
- self.assertEqual(read_separately, spec_from_file)
+ # TODO: revise this when build deps are in dag_hash
+ conc = read_separately.concretized().copy(deps=stored_deptypes)
+ self.assertEqual(conc, spec_from_file)
# Make sure the hash of the read-in spec is the same
- self.assertEqual(spec.dag_hash(), spec_from_file.dag_hash())
+ self.assertEqual(expected.dag_hash(), spec_from_file.dag_hash())
# Ensure directories are properly removed
self.layout.remove_install_directory(spec)
diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py
index 9b5d75f273..2b499869c5 100644
--- a/lib/spack/spack/test/environment.py
+++ b/lib/spack/spack/test/environment.py
@@ -30,6 +30,7 @@ from llnl.util.filesystem import join_path
from spack.environment import EnvironmentModifications
from spack.environment import SetEnv, UnsetEnv
from spack.environment import RemovePath, PrependPath, AppendPath
+from spack.util.environment import filter_system_paths, filter_system_bin_paths
class EnvironmentTest(unittest.TestCase):
@@ -59,6 +60,41 @@ class EnvironmentTest(unittest.TestCase):
env.apply_modifications()
self.assertRaises(KeyError, os.environ.__getitem__, 'UNSET_ME')
+ def test_filter_system_paths(self):
+ filtered = filter_system_paths([
+ '/usr/local/Cellar/gcc/5.3.0/lib',
+ '/usr/local/lib',
+ '/usr/local/include',
+ '/usr/local/lib64',
+ '/usr/local/opt/some-package/lib',
+ '/usr/opt/lib',
+ '/lib',
+ '/lib64',
+ '/include',
+ '/opt/some-package/include',
+ ])
+ self.assertEqual(filtered,
+ ['/usr/local/Cellar/gcc/5.3.0/lib',
+ '/usr/local/opt/some-package/lib',
+ '/usr/opt/lib',
+ '/opt/some-package/include'])
+
+ filtered = filter_system_bin_paths([
+ '/usr/local/Cellar/gcc/5.3.0/bin',
+ '/usr/local/bin',
+ '/usr/local/opt/some-package/bin',
+ '/usr/opt/bin',
+ '/bin',
+ '/opt/some-package/bin',
+ ])
+ self.assertEqual(filtered,
+ ['/usr/local/bin',
+ '/bin',
+ '/usr/local/Cellar/gcc/5.3.0/bin',
+ '/usr/local/opt/some-package/bin',
+ '/usr/opt/bin',
+ '/opt/some-package/bin'])
+
def test_set_path(self):
env = EnvironmentModifications()
env.set_path('A', ['foo', 'bar', 'baz'])
@@ -119,7 +155,8 @@ class EnvironmentTest(unittest.TestCase):
'spack', 'test', 'data')
files = [
join_path(datadir, 'sourceme_first.sh'),
- join_path(datadir, 'sourceme_second.sh')
+ join_path(datadir, 'sourceme_second.sh'),
+ join_path(datadir, 'sourceme_parameters.sh intel64')
]
env = EnvironmentModifications.from_sourcing_files(*files)
modifications = env.group_by_name()
@@ -134,6 +171,11 @@ class EnvironmentTest(unittest.TestCase):
self.assertEqual(len(modifications['NEW_VAR']), 1)
self.assertTrue(isinstance(modifications['NEW_VAR'][0], SetEnv))
self.assertEqual(modifications['NEW_VAR'][0].value, 'new')
+
+ self.assertEqual(len(modifications['FOO']), 1)
+ self.assertTrue(isinstance(modifications['FOO'][0], SetEnv))
+ self.assertEqual(modifications['FOO'][0].value, 'intel64')
+
# Unset variables
self.assertEqual(len(modifications['EMPTY_PATH_LIST']), 1)
self.assertTrue(isinstance(
diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py
index 0d1a8fe949..7aff98cc54 100644
--- a/lib/spack/spack/test/git_fetch.py
+++ b/lib/spack/spack/test/git_fetch.py
@@ -56,12 +56,13 @@ class GitFetchTest(MockPackagesTest):
def try_fetch(self, rev, test_file, args):
"""Tries to:
- 1. Fetch the repo using a fetch strategy constructed with
- supplied args.
- 2. Check if the test_file is in the checked out repository.
- 3. Assert that the repository is at the revision supplied.
- 4. Add and remove some files, then reset the repo, and
- ensure it's all there again.
+
+ 1. Fetch the repo using a fetch strategy constructed with
+ supplied args.
+ 2. Check if the test_file is in the checked out repository.
+ 3. Assert that the repository is at the revision supplied.
+ 4. Add and remove some files, then reset the repo, and
+ ensure it's all there again.
"""
self.pkg.versions[ver('git')] = args
diff --git a/lib/spack/spack/test/hg_fetch.py b/lib/spack/spack/test/hg_fetch.py
index 44af6730a1..03e35ea093 100644
--- a/lib/spack/spack/test/hg_fetch.py
+++ b/lib/spack/spack/test/hg_fetch.py
@@ -52,12 +52,13 @@ class HgFetchTest(MockPackagesTest):
def try_fetch(self, rev, test_file, args):
"""Tries to:
- 1. Fetch the repo using a fetch strategy constructed with
- supplied args.
- 2. Check if the test_file is in the checked out repository.
- 3. Assert that the repository is at the revision supplied.
- 4. Add and remove some files, then reset the repo, and
- ensure it's all there again.
+
+ 1. Fetch the repo using a fetch strategy constructed with
+ supplied args.
+ 2. Check if the test_file is in the checked out repository.
+ 3. Assert that the repository is at the revision supplied.
+ 4. Add and remove some files, then reset the repo, and
+ ensure it's all there again.
"""
self.pkg.versions[ver('hg')] = args
diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py
index 232d5aeeaf..0524c14cfd 100644
--- a/lib/spack/spack/test/install.py
+++ b/lib/spack/spack/test/install.py
@@ -26,6 +26,7 @@ import shutil
import tempfile
import spack
+import spack.store
from llnl.util.filesystem import *
from spack.directory_layout import YamlDirectoryLayout
from spack.database import Database
@@ -49,11 +50,11 @@ class InstallTest(MockPackagesTest):
# Use a fake install directory to avoid conflicts bt/w
# installed pkgs and mock packages.
self.tmpdir = tempfile.mkdtemp()
- self.orig_layout = spack.install_layout
- self.orig_db = spack.installed_db
+ self.orig_layout = spack.store.layout
+ self.orig_db = spack.store.db
- spack.install_layout = YamlDirectoryLayout(self.tmpdir)
- spack.installed_db = Database(self.tmpdir)
+ spack.store.layout = YamlDirectoryLayout(self.tmpdir)
+ spack.store.db = Database(self.tmpdir)
def tearDown(self):
super(InstallTest, self).tearDown()
@@ -63,8 +64,8 @@ class InstallTest(MockPackagesTest):
spack.do_checksum = True
# restore spack's layout.
- spack.install_layout = self.orig_layout
- spack.installed_db = self.orig_db
+ spack.store.layout = self.orig_layout
+ spack.store.db = self.orig_db
shutil.rmtree(self.tmpdir, ignore_errors=True)
def fake_fetchify(self, pkg):
@@ -91,7 +92,7 @@ class InstallTest(MockPackagesTest):
pkg.remove_prefix()
raise
- def test_install_environment(self):
+ def test_store(self):
spec = Spec('cmake-client').concretized()
for s in spec.traverse():
diff --git a/lib/spack/spack/test/library_list.py b/lib/spack/spack/test/library_list.py
new file mode 100644
index 0000000000..7fc2fd222f
--- /dev/null
+++ b/lib/spack/spack/test/library_list.py
@@ -0,0 +1,111 @@
+##############################################################################
+# 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
+##############################################################################
+
+import unittest
+
+from llnl.util.filesystem import LibraryList
+
+
+class LibraryListTest(unittest.TestCase):
+ def setUp(self):
+ l = [
+ '/dir1/liblapack.a',
+ '/dir2/libfoo.dylib',
+ '/dir1/libblas.a',
+ '/dir3/libbar.so',
+ 'libbaz.so'
+ ]
+ self.liblist = LibraryList(l)
+
+ def test_repr(self):
+ x = eval(repr(self.liblist))
+ self.assertEqual(self.liblist, x)
+
+ def test_joined_and_str(self):
+ s1 = self.liblist.joined()
+ self.assertEqual(
+ s1,
+ '/dir1/liblapack.a /dir2/libfoo.dylib /dir1/libblas.a /dir3/libbar.so libbaz.so' # NOQA: ignore=E501
+ )
+ s2 = str(self.liblist)
+ self.assertEqual(s1, s2)
+ s3 = self.liblist.joined(';')
+ self.assertEqual(
+ s3,
+ '/dir1/liblapack.a;/dir2/libfoo.dylib;/dir1/libblas.a;/dir3/libbar.so;libbaz.so' # NOQA: ignore=E501
+ )
+
+ def test_flags(self):
+ search_flags = self.liblist.search_flags
+ self.assertTrue('-L/dir1' in search_flags)
+ self.assertTrue('-L/dir2' in search_flags)
+ self.assertTrue('-L/dir3' in search_flags)
+ self.assertTrue(isinstance(search_flags, str))
+
+ link_flags = self.liblist.link_flags
+ self.assertEqual(
+ link_flags,
+ '-llapack -lfoo -lblas -lbar -lbaz'
+ )
+
+ ld_flags = self.liblist.ld_flags
+ self.assertEqual(ld_flags, search_flags + ' ' + link_flags)
+
+ def test_paths_manipulation(self):
+ names = self.liblist.names
+ self.assertEqual(names, ['lapack', 'foo', 'blas', 'bar', 'baz'])
+
+ directories = self.liblist.directories
+ self.assertEqual(directories, ['/dir1', '/dir2', '/dir3'])
+
+ def test_get_item(self):
+ a = self.liblist[0]
+ self.assertEqual(a, '/dir1/liblapack.a')
+
+ b = self.liblist[:]
+ self.assertEqual(type(b), type(self.liblist))
+ self.assertEqual(self.liblist, b)
+ self.assertTrue(self.liblist is not b)
+
+ def test_add(self):
+ pylist = [
+ '/dir1/liblapack.a', # removed from the final list
+ '/dir2/libbaz.so',
+ '/dir4/libnew.a'
+ ]
+ another = LibraryList(pylist)
+ l = self.liblist + another
+ self.assertEqual(len(l), 7)
+ # Invariant : l == l + l
+ self.assertEqual(l, l + l)
+ # Always produce an instance of LibraryList
+ self.assertEqual(
+ type(self.liblist),
+ type(self.liblist + pylist)
+ )
+ self.assertEqual(
+ type(pylist + self.liblist),
+ type(self.liblist)
+ )
diff --git a/lib/spack/spack/test/lock.py b/lib/spack/spack/test/lock.py
index fb96539897..4f62cd85e9 100644
--- a/lib/spack/spack/test/lock.py
+++ b/lib/spack/spack/test/lock.py
@@ -25,6 +25,7 @@
"""
These tests ensure that our lock works correctly.
"""
+import os
import shutil
import tempfile
import unittest
@@ -44,7 +45,6 @@ class LockTest(unittest.TestCase):
def setUp(self):
self.tempdir = tempfile.mkdtemp()
self.lock_path = join_path(self.tempdir, 'lockfile')
- touch(self.lock_path)
def tearDown(self):
shutil.rmtree(self.tempdir, ignore_errors=True)
@@ -64,98 +64,237 @@ class LockTest(unittest.TestCase):
#
# Process snippets below can be composed into tests.
#
- def acquire_write(self, barrier):
- lock = Lock(self.lock_path)
- lock.acquire_write() # grab exclusive lock
- barrier.wait()
- barrier.wait() # hold the lock until exception raises in other procs.
-
- def acquire_read(self, barrier):
- lock = Lock(self.lock_path)
- lock.acquire_read() # grab shared lock
- barrier.wait()
- barrier.wait() # hold the lock until exception raises in other procs.
-
- def timeout_write(self, barrier):
- lock = Lock(self.lock_path)
- barrier.wait() # wait for lock acquire in first process
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- barrier.wait()
+ def acquire_write(self, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(self.lock_path, start, length)
+ lock.acquire_write() # grab exclusive lock
+ barrier.wait()
+ barrier.wait() # hold the lock until timeout in other procs.
+ return fn
+
+ def acquire_read(self, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(self.lock_path, start, length)
+ lock.acquire_read() # grab shared lock
+ barrier.wait()
+ barrier.wait() # hold the lock until timeout in other procs.
+ return fn
+
+ def timeout_write(self, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(self.lock_path, start, length)
+ barrier.wait() # wait for lock acquire in first process
+ self.assertRaises(LockError, lock.acquire_write, 0.1)
+ barrier.wait()
+ return fn
- def timeout_read(self, barrier):
- lock = Lock(self.lock_path)
- barrier.wait() # wait for lock acquire in first process
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait()
+ def timeout_read(self, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(self.lock_path, start, length)
+ barrier.wait() # wait for lock acquire in first process
+ self.assertRaises(LockError, lock.acquire_read, 0.1)
+ barrier.wait()
+ return fn
#
# Test that exclusive locks on other processes time out when an
# exclusive lock is held.
#
def test_write_lock_timeout_on_write(self):
- self.multiproc_test(self.acquire_write, self.timeout_write)
+ self.multiproc_test(self.acquire_write(), self.timeout_write())
def test_write_lock_timeout_on_write_2(self):
self.multiproc_test(
- self.acquire_write, self.timeout_write, self.timeout_write)
+ self.acquire_write(), self.timeout_write(), self.timeout_write())
def test_write_lock_timeout_on_write_3(self):
self.multiproc_test(
- self.acquire_write, self.timeout_write, self.timeout_write,
- self.timeout_write)
+ self.acquire_write(), self.timeout_write(), self.timeout_write(),
+ self.timeout_write())
+
+ def test_write_lock_timeout_on_write_ranges(self):
+ self.multiproc_test(
+ self.acquire_write(0, 1), self.timeout_write(0, 1))
+
+ def test_write_lock_timeout_on_write_ranges_2(self):
+ self.multiproc_test(
+ self.acquire_write(0, 64), self.acquire_write(65, 1),
+ self.timeout_write(0, 1), self.timeout_write(63, 1))
+
+ def test_write_lock_timeout_on_write_ranges_3(self):
+ self.multiproc_test(
+ self.acquire_write(0, 1), self.acquire_write(1, 1),
+ self.timeout_write(), self.timeout_write(), self.timeout_write())
+
+ def test_write_lock_timeout_on_write_ranges_4(self):
+ self.multiproc_test(
+ self.acquire_write(0, 1), self.acquire_write(1, 1),
+ self.acquire_write(2, 456), self.acquire_write(500, 64),
+ self.timeout_write(), self.timeout_write(), self.timeout_write())
#
# Test that shared locks on other processes time out when an
# exclusive lock is held.
#
def test_read_lock_timeout_on_write(self):
- self.multiproc_test(self.acquire_write, self.timeout_read)
+ self.multiproc_test(self.acquire_write(), self.timeout_read())
def test_read_lock_timeout_on_write_2(self):
self.multiproc_test(
- self.acquire_write, self.timeout_read, self.timeout_read)
+ self.acquire_write(), self.timeout_read(), self.timeout_read())
def test_read_lock_timeout_on_write_3(self):
self.multiproc_test(
- self.acquire_write, self.timeout_read, self.timeout_read,
- self.timeout_read)
+ self.acquire_write(), self.timeout_read(), self.timeout_read(),
+ self.timeout_read())
+
+ def test_read_lock_timeout_on_write_ranges(self):
+ """small write lock, read whole file."""
+ self.multiproc_test(self.acquire_write(0, 1), self.timeout_read())
+
+ def test_read_lock_timeout_on_write_ranges_2(self):
+ """small write lock, small read lock"""
+ self.multiproc_test(self.acquire_write(0, 1), self.timeout_read(0, 1))
+
+ def test_read_lock_timeout_on_write_ranges_3(self):
+ """two write locks, overlapping read locks"""
+ self.multiproc_test(
+ self.acquire_write(0, 1), self.acquire_write(64, 128),
+ self.timeout_read(0, 1), self.timeout_read(128, 256))
#
# Test that exclusive locks time out when shared locks are held.
#
def test_write_lock_timeout_on_read(self):
- self.multiproc_test(self.acquire_read, self.timeout_write)
+ self.multiproc_test(self.acquire_read(), self.timeout_write())
def test_write_lock_timeout_on_read_2(self):
self.multiproc_test(
- self.acquire_read, self.timeout_write, self.timeout_write)
+ self.acquire_read(), self.timeout_write(), self.timeout_write())
def test_write_lock_timeout_on_read_3(self):
self.multiproc_test(
- self.acquire_read, self.timeout_write, self.timeout_write,
- self.timeout_write)
+ self.acquire_read(), self.timeout_write(), self.timeout_write(),
+ self.timeout_write())
+
+ def test_write_lock_timeout_on_read_ranges(self):
+ self.multiproc_test(self.acquire_read(0, 1), self.timeout_write())
+
+ def test_write_lock_timeout_on_read_ranges_2(self):
+ self.multiproc_test(self.acquire_read(0, 1), self.timeout_write(0, 1))
+
+ def test_write_lock_timeout_on_read_ranges_3(self):
+ self.multiproc_test(
+ self.acquire_read(0, 1), self.acquire_read(10, 1),
+ self.timeout_write(0, 1), self.timeout_write(10, 1))
+
+ def test_write_lock_timeout_on_read_ranges_4(self):
+ self.multiproc_test(
+ self.acquire_read(0, 64),
+ self.timeout_write(10, 1), self.timeout_write(32, 1))
+
+ def test_write_lock_timeout_on_read_ranges_5(self):
+ self.multiproc_test(
+ self.acquire_read(64, 128),
+ self.timeout_write(65, 1), self.timeout_write(127, 1),
+ self.timeout_write(90, 10))
#
# Test that exclusive locks time while lots of shared locks are held.
#
def test_write_lock_timeout_with_multiple_readers_2_1(self):
self.multiproc_test(
- self.acquire_read, self.acquire_read, self.timeout_write)
+ self.acquire_read(), self.acquire_read(), self.timeout_write())
def test_write_lock_timeout_with_multiple_readers_2_2(self):
self.multiproc_test(
- self.acquire_read, self.acquire_read, self.timeout_write,
- self.timeout_write)
+ self.acquire_read(), self.acquire_read(), self.timeout_write(),
+ self.timeout_write())
def test_write_lock_timeout_with_multiple_readers_3_1(self):
self.multiproc_test(
- self.acquire_read, self.acquire_read, self.acquire_read,
- self.timeout_write)
+ self.acquire_read(), self.acquire_read(), self.acquire_read(),
+ self.timeout_write())
def test_write_lock_timeout_with_multiple_readers_3_2(self):
self.multiproc_test(
- self.acquire_read, self.acquire_read, self.acquire_read,
- self.timeout_write, self.timeout_write)
+ self.acquire_read(), self.acquire_read(), self.acquire_read(),
+ self.timeout_write(), self.timeout_write())
+
+ def test_write_lock_timeout_with_multiple_readers_2_1_ranges(self):
+ self.multiproc_test(
+ self.acquire_read(0, 10), self.acquire_read(5, 10),
+ self.timeout_write(5, 5))
+
+ def test_write_lock_timeout_with_multiple_readers_2_3_ranges(self):
+ self.multiproc_test(
+ self.acquire_read(0, 10), self.acquire_read(5, 15),
+ self.timeout_write(0, 1), self.timeout_write(11, 3),
+ self.timeout_write(7, 1))
+
+ def test_write_lock_timeout_with_multiple_readers_3_1_ranges(self):
+ self.multiproc_test(
+ self.acquire_read(0, 5), self.acquire_read(5, 5),
+ self.acquire_read(10, 5),
+ self.timeout_write(0, 15))
+
+ def test_write_lock_timeout_with_multiple_readers_3_2_ranges(self):
+ self.multiproc_test(
+ self.acquire_read(0, 5), self.acquire_read(5, 5),
+ self.acquire_read(10, 5),
+ self.timeout_write(3, 10), self.timeout_write(5, 1))
+
+ #
+ # Test that read can be upgraded to write.
+ #
+ def test_upgrade_read_to_write(self):
+ # ensure lock file exists the first time, so we open it read-only
+ # to begin wtih.
+ touch(self.lock_path)
+
+ lock = Lock(self.lock_path)
+ self.assertTrue(lock._reads == 0)
+ self.assertTrue(lock._writes == 0)
+
+ lock.acquire_read()
+ self.assertTrue(lock._reads == 1)
+ self.assertTrue(lock._writes == 0)
+ self.assertTrue(lock._file.mode == 'r+')
+
+ lock.acquire_write()
+ self.assertTrue(lock._reads == 1)
+ self.assertTrue(lock._writes == 1)
+ self.assertTrue(lock._file.mode == 'r+')
+
+ lock.release_write()
+ self.assertTrue(lock._reads == 1)
+ self.assertTrue(lock._writes == 0)
+ self.assertTrue(lock._file.mode == 'r+')
+
+ lock.release_read()
+ self.assertTrue(lock._reads == 0)
+ self.assertTrue(lock._writes == 0)
+ self.assertTrue(lock._file is None)
+
+ #
+ # Test that read-only file can be read-locked but not write-locked.
+ #
+ def test_upgrade_read_to_write_fails_with_readonly_file(self):
+ # ensure lock file exists the first time, so we open it read-only
+ # to begin wtih.
+ touch(self.lock_path)
+ os.chmod(self.lock_path, 0444)
+
+ lock = Lock(self.lock_path)
+ self.assertTrue(lock._reads == 0)
+ self.assertTrue(lock._writes == 0)
+
+ lock.acquire_read()
+ self.assertTrue(lock._reads == 1)
+ self.assertTrue(lock._writes == 0)
+ self.assertTrue(lock._file.mode == 'r')
+
+ self.assertRaises(LockError, lock.acquire_write)
#
# Longer test case that ensures locks are reusable. Ordering is
diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py
index d6d7b30b7c..f9ff190468 100644
--- a/lib/spack/spack/test/mirror.py
+++ b/lib/spack/spack/test/mirror.py
@@ -52,9 +52,10 @@ class MirrorTest(MockPackagesTest):
def set_up_package(self, name, MockRepoClass, url_attr):
"""Set up a mock package to be mirrored.
- Each package needs us to:
- 1. Set up a mock repo/archive to fetch from.
- 2. Point the package's version args at that repo.
+ Each package needs us to:
+
+ 1. Set up a mock repo/archive to fetch from.
+ 2. Point the package's version args at that repo.
"""
# Set up packages to point at mock repos.
spec = Spec(name)
diff --git a/lib/spack/spack/test/mock_database.py b/lib/spack/spack/test/mock_database.py
index d5867f06ec..1eaec2b598 100644
--- a/lib/spack/spack/test/mock_database.py
+++ b/lib/spack/spack/test/mock_database.py
@@ -26,6 +26,7 @@ import shutil
import tempfile
import spack
+import spack.store
from spack.spec import Spec
from spack.database import Database
from spack.directory_layout import YamlDirectoryLayout
@@ -41,7 +42,7 @@ class MockDatabase(MockPackagesTest):
pkg.do_install(fake=True)
def _mock_remove(self, spec):
- specs = spack.installed_db.query(spec)
+ specs = spack.store.db.query(spec)
assert len(specs) == 1
spec = specs[0]
spec.package.do_uninstall(spec)
@@ -54,17 +55,17 @@ class MockDatabase(MockPackagesTest):
# Make a fake install directory
self.install_path = tempfile.mkdtemp()
- self.spack_install_path = spack.install_path
- spack.install_path = self.install_path
+ self.spack_install_path = spack.store.root
+ spack.store.root = self.install_path
self.install_layout = YamlDirectoryLayout(self.install_path)
- self.spack_install_layout = spack.install_layout
- spack.install_layout = self.install_layout
+ self.spack_install_layout = spack.store.layout
+ spack.store.layout = self.install_layout
# Make fake database and fake install directory.
- self.installed_db = Database(self.install_path)
- self.spack_installed_db = spack.installed_db
- spack.installed_db = self.installed_db
+ self.install_db = Database(self.install_path)
+ self.spack_install_db = spack.store.db
+ spack.store.db = self.install_db
# make a mock database with some packages installed note that
# the ref count for dyninst here will be 3, as it's recycled
@@ -90,18 +91,18 @@ class MockDatabase(MockPackagesTest):
#
# Transaction used to avoid repeated writes.
- with spack.installed_db.write_transaction():
+ with spack.store.db.write_transaction():
self._mock_install('mpileaks ^mpich')
self._mock_install('mpileaks ^mpich2')
self._mock_install('mpileaks ^zmpi')
def tearDown(self):
- with spack.installed_db.write_transaction():
- for spec in spack.installed_db.query():
+ with spack.store.db.write_transaction():
+ for spec in spack.store.db.query():
spec.package.do_uninstall(spec)
super(MockDatabase, self).tearDown()
shutil.rmtree(self.install_path)
- spack.install_path = self.spack_install_path
- spack.install_layout = self.spack_install_layout
- spack.installed_db = self.spack_installed_db
+ spack.store.root = self.spack_install_path
+ spack.store.layout = self.spack_install_layout
+ spack.store.db = self.spack_install_db
diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py
index 82c2712b0e..a1919cd437 100644
--- a/lib/spack/spack/test/mock_packages_test.py
+++ b/lib/spack/spack/test/mock_packages_test.py
@@ -136,6 +136,31 @@ compilers:
f77: None
fc: None
modules: 'None'
+- compiler:
+ spec: gcc@4.7.2
+ operating_system: redhat6
+ paths:
+ cc: /path/to/gcc472
+ cxx: /path/to/g++472
+ f77: /path/to/gfortran472
+ fc: /path/to/gfortran472
+ flags:
+ cflags: -O0
+ cxxflags: -O0
+ fflags: -O0
+ modules: 'None'
+- compiler:
+ spec: clang@3.5
+ operating_system: redhat6
+ paths:
+ cc: /path/to/clang35
+ cxx: /path/to/clang++35
+ f77: None
+ fc: None
+ flags:
+ cflags: -O3
+ cxxflags: -O3
+ modules: 'None'
""".format(linux_os_name, linux_os_version)
mock_packages_config = """\
@@ -155,6 +180,27 @@ packages:
externalmodule@1.0%gcc@4.5.0: external-module
"""
+mock_config = """\
+config:
+ install_tree: $spack/opt/spack
+ build_stage:
+ - $tempdir
+ - /nfs/tmp2/$user
+ - $spack/var/spack/stage
+ source_cache: $spack/var/spack/cache
+ misc_cache: ~/.spack/cache
+ verify_ssl: true
+ checksum: true
+ dirty: True
+"""
+
+# these are written out to mock config files.
+mock_configs = {
+ 'config.yaml': mock_config,
+ 'compilers.yaml': mock_compiler_config,
+ 'packages.yaml': mock_packages_config,
+}
+
class MockPackagesTest(unittest.TestCase):
@@ -165,23 +211,22 @@ class MockPackagesTest(unittest.TestCase):
self.db = RepoPath(spack.mock_packages_path)
spack.repo.swap(self.db)
- spack.config.clear_config_caches()
- self.real_scopes = spack.config.config_scopes
-
# Mock up temporary configuration directories
self.temp_config = tempfile.mkdtemp()
self.mock_site_config = os.path.join(self.temp_config, 'site')
self.mock_user_config = os.path.join(self.temp_config, 'user')
mkdirp(self.mock_site_config)
mkdirp(self.mock_user_config)
- for confs in [('compilers.yaml', mock_compiler_config),
- ('packages.yaml', mock_packages_config)]:
- conf_yaml = os.path.join(self.mock_site_config, confs[0])
+ for filename, data in mock_configs.items():
+ conf_yaml = os.path.join(self.mock_site_config, filename)
with open(conf_yaml, 'w') as f:
- f.write(confs[1])
+ f.write(data)
# TODO: Mocking this up is kind of brittle b/c ConfigScope
# TODO: constructor modifies config_scopes. Make it cleaner.
+ spack.config.clear_config_caches()
+ self.real_scopes = spack.config.config_scopes
+
spack.config.config_scopes = OrderedDict()
spack.config.ConfigScope('site', self.mock_site_config)
spack.config.ConfigScope('user', self.mock_user_config)
@@ -216,6 +261,7 @@ class MockPackagesTest(unittest.TestCase):
"""Restore the real packages path after any test."""
spack.repo.swap(self.db)
spack.config.config_scopes = self.real_scopes
+
shutil.rmtree(self.temp_config, ignore_errors=True)
spack.config.clear_config_caches()
diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py
index 5e280d8e43..42f072debb 100644
--- a/lib/spack/spack/test/modules.py
+++ b/lib/spack/spack/test/modules.py
@@ -27,6 +27,8 @@ from contextlib import contextmanager
import StringIO
import spack.modules
+import spack.spec
+import llnl.util.filesystem
from spack.test.mock_packages_test import MockPackagesTest
FILE_REGISTRY = collections.defaultdict(StringIO.StringIO)
@@ -49,105 +51,10 @@ def mock_open(filename, mode):
handle.close()
-configuration_autoload_direct = {
- 'enable': ['tcl'],
- 'tcl': {
- 'all': {
- 'autoload': 'direct'
- }
- }
-}
-
-configuration_autoload_all = {
- 'enable': ['tcl'],
- 'tcl': {
- 'all': {
- 'autoload': 'all'
- }
- }
-}
-
-configuration_prerequisites_direct = {
- 'enable': ['tcl'],
- 'tcl': {
- 'all': {
- 'prerequisites': 'direct'
- }
- }
-}
-
-configuration_prerequisites_all = {
- 'enable': ['tcl'],
- 'tcl': {
- 'all': {
- 'prerequisites': 'all'
- }
- }
-}
-
-configuration_alter_environment = {
- 'enable': ['tcl'],
- 'tcl': {
- 'all': {
- 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']},
- 'environment': {
- 'set': {'{name}_ROOT': '{prefix}'}
- }
- },
- 'platform=test target=x86_64': {
- 'environment': {
- 'set': {'FOO': 'foo'},
- 'unset': ['BAR']
- }
- },
- 'platform=test target=x86_32': {
- 'load': ['foo/bar']
- }
- }
-}
-
-configuration_blacklist = {
- 'enable': ['tcl'],
- 'tcl': {
- 'whitelist': ['zmpi'],
- 'blacklist': ['callpath', 'mpi'],
- 'all': {
- 'autoload': 'direct'
- }
- }
-}
-
-configuration_conflicts = {
- 'enable': ['tcl'],
- 'tcl': {
- 'naming_scheme': '{name}/{version}-{compiler.name}',
- 'all': {
- 'conflict': ['{name}', 'intel/14.0.1']
- }
- }
-}
-
-configuration_wrong_conflicts = {
- 'enable': ['tcl'],
- 'tcl': {
- 'naming_scheme': '{name}/{version}-{compiler.name}',
- 'all': {
- 'conflict': ['{name}/{compiler.name}']
- }
- }
-}
-
-configuration_suffix = {
- 'enable': ['tcl'],
- 'tcl': {
- 'mpileaks': {
- 'suffixes': {
- '+debug': 'foo',
- '~debug': 'bar'
- }
- }
- }
-}
+# Spec strings that will be used throughout the tests
+mpich_spec_string = 'mpich@3.0.4'
+mpileaks_spec_string = 'mpileaks'
+libdwarf_spec_string = 'libdwarf arch=x64-linux'
class HelperFunctionsTests(MockPackagesTest):
@@ -187,61 +94,198 @@ class HelperFunctionsTests(MockPackagesTest):
self.assertTrue('CPATH' in names)
-class TclTests(MockPackagesTest):
+class ModuleFileGeneratorTests(MockPackagesTest):
+ """
+ Base class to test module file generators. Relies on child having defined
+ a 'factory' attribute to create an instance of the generator to be tested.
+ """
def setUp(self):
- super(TclTests, self).setUp()
- self.configuration_obj = spack.modules.CONFIGURATION
+ super(ModuleFileGeneratorTests, self).setUp()
+ self.configuration_instance = spack.modules._module_config
+ self.module_types_instance = spack.modules.module_types
spack.modules.open = mock_open
+ spack.modules.mkdirp = lambda x: None
# Make sure that a non-mocked configuration will trigger an error
- spack.modules.CONFIGURATION = None
+ spack.modules._module_config = None
+ spack.modules.module_types = {self.factory.name: self.factory}
def tearDown(self):
del spack.modules.open
- spack.modules.CONFIGURATION = self.configuration_obj
- super(TclTests, self).tearDown()
+ spack.modules.module_types = self.module_types_instance
+ spack.modules._module_config = self.configuration_instance
+ spack.modules.mkdirp = llnl.util.filesystem.mkdirp
+ super(ModuleFileGeneratorTests, self).tearDown()
def get_modulefile_content(self, spec):
spec.concretize()
- generator = spack.modules.TclModule(spec)
+ generator = self.factory(spec)
generator.write()
content = FILE_REGISTRY[generator.file_name].split('\n')
+ generator.remove()
return content
+
+class TclTests(ModuleFileGeneratorTests):
+
+ factory = spack.modules.TclModule
+
+ configuration_autoload_direct = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'all': {
+ 'autoload': 'direct'
+ }
+ }
+ }
+
+ configuration_autoload_all = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'all': {
+ 'autoload': 'all'
+ }
+ }
+ }
+
+ configuration_prerequisites_direct = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'all': {
+ 'prerequisites': 'direct'
+ }
+ }
+ }
+
+ configuration_prerequisites_all = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'all': {
+ 'prerequisites': 'all'
+ }
+ }
+ }
+
+ configuration_alter_environment = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'all': {
+ 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']},
+ 'environment': {
+ 'set': {'${PACKAGE}_ROOT': '${PREFIX}'}
+ }
+ },
+ 'platform=test target=x86_64': {
+ 'environment': {
+ 'set': {'FOO': 'foo'},
+ 'unset': ['BAR']
+ }
+ },
+ 'platform=test target=x86_32': {
+ 'load': ['foo/bar']
+ }
+ }
+ }
+
+ configuration_blacklist = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'whitelist': ['zmpi'],
+ 'blacklist': ['callpath', 'mpi'],
+ 'all': {
+ 'autoload': 'direct'
+ }
+ }
+ }
+
+ configuration_conflicts = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'naming_scheme': '${PACKAGE}/${VERSION}-${COMPILERNAME}',
+ 'all': {
+ 'conflict': ['${PACKAGE}', 'intel/14.0.1']
+ }
+ }
+ }
+
+ configuration_wrong_conflicts = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'naming_scheme': '${PACKAGE}/${VERSION}-${COMPILERNAME}',
+ 'all': {
+ 'conflict': ['${PACKAGE}/${COMPILERNAME}']
+ }
+ }
+ }
+
+ configuration_suffix = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'mpileaks': {
+ 'suffixes': {
+ '+debug': 'foo',
+ '~debug': 'bar'
+ }
+ }
+ }
+ }
+
def test_simple_case(self):
- spack.modules.CONFIGURATION = configuration_autoload_direct
- spec = spack.spec.Spec('mpich@3.0.4')
+ spack.modules._module_config = self.configuration_autoload_direct
+ spec = spack.spec.Spec(mpich_spec_string)
content = self.get_modulefile_content(spec)
self.assertTrue('module-whatis "mpich @3.0.4"' in content)
self.assertRaises(TypeError, spack.modules.dependencies,
spec, 'non-existing-tag')
def test_autoload(self):
- spack.modules.CONFIGURATION = configuration_autoload_direct
- spec = spack.spec.Spec('mpileaks')
+ spack.modules._module_config = self.configuration_autoload_direct
+ spec = spack.spec.Spec(mpileaks_spec_string)
content = self.get_modulefile_content(spec)
self.assertEqual(len([x for x in content if 'is-loaded' in x]), 2)
self.assertEqual(len([x for x in content if 'module load ' in x]), 2)
- spack.modules.CONFIGURATION = configuration_autoload_all
- spec = spack.spec.Spec('mpileaks')
+ spack.modules._module_config = self.configuration_autoload_all
+ spec = spack.spec.Spec(mpileaks_spec_string)
content = self.get_modulefile_content(spec)
self.assertEqual(len([x for x in content if 'is-loaded' in x]), 5)
self.assertEqual(len([x for x in content if 'module load ' in x]), 5)
+ # dtbuild1 has
+ # - 1 ('run',) dependency
+ # - 1 ('build','link') dependency
+ # - 1 ('build',) dependency
+ # Just make sure the 'build' dependency is not there
+ spack.modules._module_config = self.configuration_autoload_direct
+ spec = spack.spec.Spec('dtbuild1')
+ content = self.get_modulefile_content(spec)
+ self.assertEqual(len([x for x in content if 'is-loaded' in x]), 2)
+ self.assertEqual(len([x for x in content if 'module load ' in x]), 2)
+
+ # dtbuild1 has
+ # - 1 ('run',) dependency
+ # - 1 ('build','link') dependency
+ # - 1 ('build',) dependency
+ # Just make sure the 'build' dependency is not there
+ spack.modules._module_config = self.configuration_autoload_all
+ spec = spack.spec.Spec('dtbuild1')
+ content = self.get_modulefile_content(spec)
+ self.assertEqual(len([x for x in content if 'is-loaded' in x]), 2)
+ self.assertEqual(len([x for x in content if 'module load ' in x]), 2)
+
def test_prerequisites(self):
- spack.modules.CONFIGURATION = configuration_prerequisites_direct
+ spack.modules._module_config = self.configuration_prerequisites_direct
spec = spack.spec.Spec('mpileaks arch=x86-linux')
content = self.get_modulefile_content(spec)
self.assertEqual(len([x for x in content if 'prereq' in x]), 2)
- spack.modules.CONFIGURATION = configuration_prerequisites_all
+ spack.modules._module_config = self.configuration_prerequisites_all
spec = spack.spec.Spec('mpileaks arch=x86-linux')
content = self.get_modulefile_content(spec)
self.assertEqual(len([x for x in content if 'prereq' in x]), 5)
def test_alter_environment(self):
- spack.modules.CONFIGURATION = configuration_alter_environment
+ spack.modules._module_config = self.configuration_alter_environment
spec = spack.spec.Spec('mpileaks platform=test target=x86_64')
content = self.get_modulefile_content(spec)
self.assertEqual(
@@ -271,7 +315,7 @@ class TclTests(MockPackagesTest):
len([x for x in content if 'setenv LIBDWARF_ROOT' in x]), 1)
def test_blacklist(self):
- spack.modules.CONFIGURATION = configuration_blacklist
+ spack.modules._module_config = self.configuration_blacklist
spec = spack.spec.Spec('mpileaks ^zmpi')
content = self.get_modulefile_content(spec)
self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1)
@@ -285,7 +329,7 @@ class TclTests(MockPackagesTest):
self.assertEqual(len([x for x in content if 'module load ' in x]), 1)
def test_conflicts(self):
- spack.modules.CONFIGURATION = configuration_conflicts
+ spack.modules._module_config = self.configuration_conflicts
spec = spack.spec.Spec('mpileaks')
content = self.get_modulefile_content(spec)
self.assertEqual(
@@ -295,11 +339,11 @@ class TclTests(MockPackagesTest):
self.assertEqual(
len([x for x in content if x == 'conflict intel/14.0.1']), 1)
- spack.modules.CONFIGURATION = configuration_wrong_conflicts
+ spack.modules._module_config = self.configuration_wrong_conflicts
self.assertRaises(SystemExit, self.get_modulefile_content, spec)
def test_suffixes(self):
- spack.modules.CONFIGURATION = configuration_suffix
+ spack.modules._module_config = self.configuration_suffix
spec = spack.spec.Spec('mpileaks+debug arch=x86-linux')
spec.concretize()
generator = spack.modules.TclModule(spec)
@@ -311,28 +355,158 @@ class TclTests(MockPackagesTest):
self.assertTrue('bar' in generator.use_name)
-configuration_dotkit = {
- 'enable': ['dotkit'],
- 'dotkit': {
- 'all': {
- 'prerequisites': 'direct'
+class LmodTests(ModuleFileGeneratorTests):
+ factory = spack.modules.LmodModule
+
+ configuration_autoload_direct = {
+ 'enable': ['lmod'],
+ 'lmod': {
+ 'all': {
+ 'autoload': 'direct'
+ }
}
}
-}
+
+ configuration_autoload_all = {
+ 'enable': ['lmod'],
+ 'lmod': {
+ 'all': {
+ 'autoload': 'all'
+ }
+ }
+ }
+
+ configuration_no_hash = {
+ 'enable': ['lmod'],
+ 'lmod': {
+ 'hash_length': 0
+ }
+ }
+
+ configuration_alter_environment = {
+ 'enable': ['lmod'],
+ 'lmod': {
+ 'all': {
+ 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']}
+ },
+ 'platform=test target=x86_64': {
+ 'environment': {
+ 'set': {'FOO': 'foo'},
+ 'unset': ['BAR']
+ }
+ },
+ 'platform=test target=x86_32': {
+ 'load': ['foo/bar']
+ }
+ }
+ }
+
+ configuration_blacklist = {
+ 'enable': ['lmod'],
+ 'lmod': {
+ 'blacklist': ['callpath'],
+ 'all': {
+ 'autoload': 'direct'
+ }
+ }
+ }
+
+ def test_simple_case(self):
+ spack.modules._module_config = self.configuration_autoload_direct
+ spec = spack.spec.Spec(mpich_spec_string)
+ content = self.get_modulefile_content(spec)
+ self.assertTrue('-- -*- lua -*-' in content)
+ self.assertTrue('whatis([[Name : mpich]])' in content)
+ self.assertTrue('whatis([[Version : 3.0.4]])' in content)
+
+ def test_autoload(self):
+ spack.modules._module_config = self.configuration_autoload_direct
+ spec = spack.spec.Spec(mpileaks_spec_string)
+ content = self.get_modulefile_content(spec)
+ self.assertEqual(
+ len([x for x in content if 'if not isloaded(' in x]), 2)
+ self.assertEqual(len([x for x in content if 'load(' in x]), 2)
+
+ spack.modules._module_config = self.configuration_autoload_all
+ spec = spack.spec.Spec(mpileaks_spec_string)
+ content = self.get_modulefile_content(spec)
+ self.assertEqual(
+ len([x for x in content if 'if not isloaded(' in x]), 5)
+ self.assertEqual(len([x for x in content if 'load(' in x]), 5)
+
+ def test_alter_environment(self):
+ spack.modules._module_config = self.configuration_alter_environment
+ spec = spack.spec.Spec('mpileaks platform=test target=x86_64')
+ content = self.get_modulefile_content(spec)
+ self.assertEqual(
+ len([x
+ for x in content
+ if x.startswith('prepend_path("CMAKE_PREFIX_PATH"')]), 0)
+ self.assertEqual(
+ len([x for x in content if 'setenv("FOO", "foo")' in x]), 1)
+ self.assertEqual(
+ len([x for x in content if 'unsetenv("BAR")' in x]), 1)
+
+ spec = spack.spec.Spec('libdwarf %clang platform=test target=x86_32')
+ content = self.get_modulefile_content(spec)
+ print('\n'.join(content))
+ self.assertEqual(
+ len([x
+ for x in content
+ if x.startswith('prepend-path("CMAKE_PREFIX_PATH"')]), 0)
+ self.assertEqual(
+ len([x for x in content if 'setenv("FOO", "foo")' in x]), 0)
+ self.assertEqual(
+ len([x for x in content if 'unsetenv("BAR")' in x]), 0)
+
+ def test_blacklist(self):
+ spack.modules._module_config = self.configuration_blacklist
+ spec = spack.spec.Spec(mpileaks_spec_string)
+ content = self.get_modulefile_content(spec)
+ self.assertEqual(
+ len([x for x in content if 'if not isloaded(' in x]), 1)
+ self.assertEqual(len([x for x in content if 'load(' in x]), 1)
+
+ def test_no_hash(self):
+ # Make sure that virtual providers (in the hierarchy) always
+ # include a hash. Make sure that the module file for the spec
+ # does not include a hash if hash_length is 0.
+ spack.modules._module_config = self.configuration_no_hash
+ spec = spack.spec.Spec(mpileaks_spec_string)
+ spec.concretize()
+ module = spack.modules.LmodModule(spec)
+ path = module.file_name
+ mpiSpec = spec['mpi']
+ mpiElement = "{0}/{1}-{2}/".format(
+ mpiSpec.name, mpiSpec.version, mpiSpec.dag_hash(length=7))
+ self.assertTrue(mpiElement in path)
+ mpileaksSpec = spec
+ mpileaksElement = "{0}/{1}.lua".format(
+ mpileaksSpec.name, mpileaksSpec.version)
+ self.assertTrue(path.endswith(mpileaksElement))
class DotkitTests(MockPackagesTest):
+ configuration_dotkit = {
+ 'enable': ['dotkit'],
+ 'dotkit': {
+ 'all': {
+ 'prerequisites': 'direct'
+ }
+ }
+ }
+
def setUp(self):
super(DotkitTests, self).setUp()
- self.configuration_obj = spack.modules.CONFIGURATION
+ self.configuration_obj = spack.modules._module_config
spack.modules.open = mock_open
# Make sure that a non-mocked configuration will trigger an error
- spack.modules.CONFIGURATION = None
+ spack.modules._module_config = None
def tearDown(self):
del spack.modules.open
- spack.modules.CONFIGURATION = self.configuration_obj
+ spack.modules._module_config = self.configuration_obj
super(DotkitTests, self).tearDown()
def get_modulefile_content(self, spec):
@@ -343,7 +517,7 @@ class DotkitTests(MockPackagesTest):
return content
def test_dotkit(self):
- spack.modules.CONFIGURATION = configuration_dotkit
+ spack.modules._module_config = self.configuration_dotkit
spec = spack.spec.Spec('mpileaks arch=x86-linux')
content = self.get_modulefile_content(spec)
self.assertTrue('#c spack' in content)
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/lib/spack/spack/test/provider_index.py b/lib/spack/spack/test/provider_index.py
index 9847dd05a6..d785038899 100644
--- a/lib/spack/spack/test/provider_index.py
+++ b/lib/spack/spack/test/provider_index.py
@@ -24,7 +24,7 @@
##############################################################################
"""Tests for provider index cache files.
-Tests assume that mock packages provide this:
+Tests assume that mock packages provide this::
{'blas': {
blas: set([netlib-blas, openblas, openblas-with-lapack])},
diff --git a/lib/spack/spack/test/yaml.py b/lib/spack/spack/test/spack_yaml.py
index dedbd15d10..fbbb7b8e60 100644
--- a/lib/spack/spack/test/yaml.py
+++ b/lib/spack/spack/test/spack_yaml.py
@@ -56,7 +56,7 @@ test_data = {
])}
-class YamlTest(unittest.TestCase):
+class SpackYamlTest(unittest.TestCase):
def setUp(self):
self.data = syaml.load(test_file)
@@ -90,3 +90,19 @@ class YamlTest(unittest.TestCase):
check(self.data['config_file']['some_list'][2], 8, 8)
check(self.data['config_file']['another_list'], 10, 10)
check(self.data['config_file']['some_key'], 11, 11)
+
+ def test_yaml_aliases(self):
+ aliased_list_1 = ['foo']
+ aliased_list_2 = []
+ dict_with_aliases = {
+ 'a': aliased_list_1,
+ 'b': aliased_list_1,
+ 'c': aliased_list_1,
+ 'd': aliased_list_2,
+ 'e': aliased_list_2,
+ 'f': aliased_list_2,
+ }
+ string = syaml.dump(dict_with_aliases)
+
+ # ensure no YAML aliases appear in syaml dumps.
+ self.assertFalse('*id' in string)
diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py
index 8f61c7ac76..0bc63bcf0f 100644
--- a/lib/spack/spack/test/spec_dag.py
+++ b/lib/spack/spack/test/spec_dag.py
@@ -241,15 +241,15 @@ class SpecDagTest(MockPackagesTest):
def test_invalid_dep(self):
spec = Spec('libelf ^mpich')
- self.assertRaises(spack.spec.InvalidDependencyException,
+ self.assertRaises(spack.spec.InvalidDependencyError,
spec.normalize)
spec = Spec('libelf ^libdwarf')
- self.assertRaises(spack.spec.InvalidDependencyException,
+ self.assertRaises(spack.spec.InvalidDependencyError,
spec.normalize)
spec = Spec('mpich ^dyninst ^libelf')
- self.assertRaises(spack.spec.InvalidDependencyException,
+ self.assertRaises(spack.spec.InvalidDependencyError,
spec.normalize)
def test_equal(self):
@@ -495,3 +495,65 @@ class SpecDagTest(MockPackagesTest):
traversal = dag.traverse(deptype='run')
self.assertEqual([x.name for x in traversal], names)
+
+ def test_using_ordered_dict(self):
+ """ Checks that dicts are ordered
+
+ Necessary to make sure that dag_hash is stable across python
+ versions and processes.
+ """
+ def descend_and_check(iterable, level=0):
+ from spack.util.spack_yaml import syaml_dict
+ from collections import Iterable, Mapping
+ if isinstance(iterable, Mapping):
+ self.assertTrue(isinstance(iterable, syaml_dict))
+ return descend_and_check(iterable.values(), level=level + 1)
+ max_level = level
+ for value in iterable:
+ if isinstance(value, Iterable) and not isinstance(value, str):
+ nlevel = descend_and_check(value, level=level + 1)
+ if nlevel > max_level:
+ max_level = nlevel
+ return max_level
+
+ specs = ['mpileaks ^zmpi', 'dttop', 'dtuse']
+ for spec in specs:
+ dag = Spec(spec)
+ dag.normalize()
+ level = descend_and_check(dag.to_node_dict())
+ # level just makes sure we are doing something here
+ self.assertTrue(level >= 5)
+
+ def test_hash_bits(self):
+ """Ensure getting first n bits of a base32-encoded DAG hash works."""
+
+ # RFC 4648 base32 decode table
+ b32 = dict((j, i) for i, j in enumerate('abcdefghijklmnopqrstuvwxyz'))
+ b32.update(dict((j, i) for i, j in enumerate('234567', 26)))
+
+ # some package hashes
+ tests = [
+ '35orsd4cenv743hg4i5vxha2lzayycby',
+ '6kfqtj7dap3773rxog6kkmoweix5gpwo',
+ 'e6h6ff3uvmjbq3azik2ckr6ckwm3depv',
+ 'snz2juf4ij7sv77cq3vs467q6acftmur',
+ '4eg47oedi5bbkhpoxw26v3oe6vamkfd7',
+ 'vrwabwj6umeb5vjw6flx2rnft3j457rw']
+
+ for test_hash in tests:
+ # string containing raw bits of hash ('1' and '0')
+ expected = ''.join([format(b32[c], '#07b').replace('0b', '')
+ for c in test_hash])
+
+ for bits in (1, 2, 3, 4, 7, 8, 9, 16, 64, 117, 128, 160):
+ actual_int = spack.spec.base32_prefix_bits(test_hash, bits)
+ fmt = "#0%sb" % (bits + 2)
+ actual = format(actual_int, fmt).replace('0b', '')
+
+ self.assertEqual(expected[:bits], actual)
+
+ self.assertRaises(
+ ValueError, spack.spec.base32_prefix_bits, test_hash, 161)
+
+ self.assertRaises(
+ ValueError, spack.spec.base32_prefix_bits, test_hash, 256)
diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py
index 3079288c77..d4eb9e057f 100644
--- a/lib/spack/spack/test/spec_syntax.py
+++ b/lib/spack/spack/test/spec_syntax.py
@@ -24,34 +24,34 @@
##############################################################################
import unittest
-import spack.spec
+import spack.spec as sp
from spack.parse import Token
from spack.spec import *
# Sample output for a complex lexing.
-complex_lex = [Token(ID, 'mvapich_foo'),
- Token(DEP),
- Token(ID, '_openmpi'),
- Token(AT),
- Token(ID, '1.2'),
- Token(COLON),
- Token(ID, '1.4'),
- Token(COMMA),
- Token(ID, '1.6'),
- Token(PCT),
- Token(ID, 'intel'),
- Token(AT),
- Token(ID, '12.1'),
- Token(COLON),
- Token(ID, '12.6'),
- Token(ON),
- Token(ID, 'debug'),
- Token(OFF),
- Token(ID, 'qt_4'),
- Token(DEP),
- Token(ID, 'stackwalker'),
- Token(AT),
- Token(ID, '8.1_1e')]
+complex_lex = [Token(sp.ID, 'mvapich_foo'),
+ Token(sp.DEP),
+ Token(sp.ID, '_openmpi'),
+ Token(sp.AT),
+ Token(sp.ID, '1.2'),
+ Token(sp.COLON),
+ Token(sp.ID, '1.4'),
+ Token(sp.COMMA),
+ Token(sp.ID, '1.6'),
+ Token(sp.PCT),
+ Token(sp.ID, 'intel'),
+ Token(sp.AT),
+ Token(sp.ID, '12.1'),
+ Token(sp.COLON),
+ Token(sp.ID, '12.6'),
+ Token(sp.ON),
+ Token(sp.ID, 'debug'),
+ Token(sp.OFF),
+ Token(sp.ID, 'qt_4'),
+ Token(sp.DEP),
+ Token(sp.ID, 'stackwalker'),
+ Token(sp.AT),
+ Token(sp.ID, '8.1_1e')]
class SpecSyntaxTest(unittest.TestCase):
@@ -74,16 +74,16 @@ class SpecSyntaxTest(unittest.TestCase):
"""
if spec is None:
spec = expected
- output = spack.spec.parse(spec)
+ output = sp.parse(spec)
parsed = (" ".join(str(spec) for spec in output))
self.assertEqual(expected, parsed)
def check_lex(self, tokens, spec):
"""Check that the provided spec parses to the provided token list."""
- lex_output = SpecLexer().lex(spec)
+ lex_output = sp.SpecLexer().lex(spec)
for tok, spec_tok in zip(tokens, lex_output):
- if tok.type == ID:
+ if tok.type == sp.ID:
self.assertEqual(tok, spec_tok)
else:
# Only check the type for non-identifiers.
diff --git a/lib/spack/spack/test/stage.py b/lib/spack/spack/test/stage.py
index ec661bfe50..64cfa222db 100644
--- a/lib/spack/spack/test/stage.py
+++ b/lib/spack/spack/test/stage.py
@@ -27,64 +27,93 @@ Test that the Stage class works correctly.
"""
import os
import shutil
-import unittest
+import tempfile
from contextlib import *
import spack
+import spack.stage
from llnl.util.filesystem import *
from spack.stage import Stage
from spack.util.executable import which
+from spack.test.mock_packages_test import *
-test_files_dir = os.path.realpath(join_path(spack.stage_path, '.test'))
-test_tmp_path = os.path.realpath(join_path(test_files_dir, 'tmp'))
-
-archive_dir = 'test-files'
-archive_name = archive_dir + '.tar.gz'
-archive_dir_path = join_path(test_files_dir, archive_dir)
-archive_url = 'file://' + join_path(test_files_dir, archive_name)
-readme_name = 'README.txt'
-test_readme = join_path(archive_dir_path, readme_name)
-readme_text = "hello world!\n"
-
-stage_name = 'spack-test-stage'
+_test_tmp_path = None
@contextmanager
def use_tmp(use_tmp):
- """Allow some test code to be executed with spack.use_tmp_stage
- set to a certain value. Context manager makes sure it's reset
- on failure.
+ """Allow some test code to be executed such that spack will either use or
+ not use temporary space for stages.
"""
- old_tmp = spack.use_tmp_stage
- spack.use_tmp_stage = use_tmp
+ # mock up config
+ assert(_test_tmp_path is not None)
+
+ if use_tmp:
+ path = _test_tmp_path # use temporary stage
+ else:
+ path = spack.stage_path # Use Spack's stage dir (no links)
+
+ spack.config.update_config(
+ 'config', {'build_stage': [path]}, scope='user')
+
yield
- spack.use_tmp_stage = old_tmp
-class StageTest(unittest.TestCase):
+class StageTest(MockPackagesTest):
def setUp(self):
"""This sets up a mock archive to fetch, and a mock temp space for use
by the Stage class. It doesn't actually create the Stage -- that
is done by individual tests.
"""
- if os.path.exists(test_files_dir):
- shutil.rmtree(test_files_dir)
+ super(StageTest, self).setUp()
+
+ global _test_tmp_path
+
+ #
+ # Mock up a stage area that looks like this:
+ #
+ # TMPDIR/ test_files_dir
+ # tmp/ test_tmp_path (where stage should be)
+ # test-files/ archive_dir_path
+ # README.txt test_readme (contains "hello world!\n")
+ # test-files.tar.gz archive_url = file:///path/to/this
+ #
+ self.test_files_dir = tempfile.mkdtemp()
+ self.test_tmp_path = os.path.realpath(
+ os.path.join(self.test_files_dir, 'tmp'))
+ _test_tmp_path = self.test_tmp_path
+
+ # set _test_tmp_path as the default test directory to use for stages.
+ spack.config.update_config(
+ 'config', {'build_stage': [_test_tmp_path]}, scope='user')
+
+ self.archive_dir = 'test-files'
+ self.archive_name = self.archive_dir + '.tar.gz'
+ archive_dir_path = os.path.join(self.test_files_dir,
+ self.archive_dir)
+ self.archive_url = 'file://' + os.path.join(self.test_files_dir,
+ self.archive_name)
+ test_readme = join_path(archive_dir_path, 'README.txt')
+ self.readme_text = "hello world!\n"
+
+ self.stage_name = 'spack-test-stage'
- mkdirp(test_files_dir)
mkdirp(archive_dir_path)
- mkdirp(test_tmp_path)
+ mkdirp(self.test_tmp_path)
with open(test_readme, 'w') as readme:
- readme.write(readme_text)
+ readme.write(self.readme_text)
- with working_dir(test_files_dir):
- tar = which('tar')
- tar('czf', archive_name, archive_dir)
+ with working_dir(self.test_files_dir):
+ tar = which('tar', required=True)
+ tar('czf', self.archive_name, self.archive_dir)
# Make spack use the test environment for tmp stuff.
- self.old_tmp_dirs = spack.tmp_dirs
- spack.tmp_dirs = [test_tmp_path]
+ self._old_tmp_root = spack.stage._tmp_root
+ self._old_use_tmp_stage = spack.stage._use_tmp_stage
+ spack.stage._tmp_root = None
+ spack.stage._use_tmp_stage = True
# record this since this test changes to directories that will
# be removed.
@@ -92,13 +121,16 @@ class StageTest(unittest.TestCase):
def tearDown(self):
"""Blows away the test environment directory."""
- shutil.rmtree(test_files_dir)
+ super(StageTest, self).tearDown()
+
+ shutil.rmtree(self.test_files_dir, ignore_errors=True)
# chdir back to original working dir
os.chdir(self.working_dir)
# restore spack's original tmp environment
- spack.tmp_dirs = self.old_tmp_dirs
+ spack.stage._tmp_root = self._old_tmp_root
+ spack.stage._use_tmp_stage = self._old_use_tmp_stage
def get_stage_path(self, stage, stage_name):
"""Figure out where a stage should be living. This depends on
@@ -120,7 +152,7 @@ class StageTest(unittest.TestCase):
# Ensure stage was created in the spack stage directory
self.assertTrue(os.path.isdir(stage_path))
- if spack.use_tmp_stage:
+ if spack.stage.get_tmp_root():
# Check that the stage dir is really a symlink.
self.assertTrue(os.path.islink(stage_path))
@@ -130,8 +162,8 @@ class StageTest(unittest.TestCase):
self.assertFalse(os.path.islink(target))
# Make sure the directory is in the place we asked it to
- # be (see setUp and tearDown)
- self.assertTrue(target.startswith(test_tmp_path))
+ # be (see setUp, tearDown, and use_tmp)
+ self.assertTrue(target.startswith(self.test_tmp_path))
else:
# Make sure the stage path is NOT a link for a non-tmp stage
@@ -139,24 +171,24 @@ class StageTest(unittest.TestCase):
def check_fetch(self, stage, stage_name):
stage_path = self.get_stage_path(stage, stage_name)
- self.assertTrue(archive_name in os.listdir(stage_path))
- self.assertEqual(join_path(stage_path, archive_name),
+ self.assertTrue(self.archive_name in os.listdir(stage_path))
+ self.assertEqual(join_path(stage_path, self.archive_name),
stage.fetcher.archive_file)
def check_expand_archive(self, stage, stage_name):
stage_path = self.get_stage_path(stage, stage_name)
- self.assertTrue(archive_name in os.listdir(stage_path))
- self.assertTrue(archive_dir in os.listdir(stage_path))
+ self.assertTrue(self.archive_name in os.listdir(stage_path))
+ self.assertTrue(self.archive_dir in os.listdir(stage_path))
self.assertEqual(
- join_path(stage_path, archive_dir),
+ join_path(stage_path, self.archive_dir),
stage.source_path)
- readme = join_path(stage_path, archive_dir, readme_name)
+ readme = join_path(stage_path, self.archive_dir, 'README.txt')
self.assertTrue(os.path.isfile(readme))
with open(readme) as file:
- self.assertEqual(readme_text, file.read())
+ self.assertEqual(self.readme_text, file.read())
def check_chdir(self, stage, stage_name):
stage_path = self.get_stage_path(stage, stage_name)
@@ -165,7 +197,7 @@ class StageTest(unittest.TestCase):
def check_chdir_to_source(self, stage, stage_name):
stage_path = self.get_stage_path(stage, stage_name)
self.assertEqual(
- join_path(os.path.realpath(stage_path), archive_dir),
+ join_path(os.path.realpath(stage_path), self.archive_dir),
os.getcwd())
def check_destroy(self, stage, stage_name):
@@ -176,76 +208,76 @@ class StageTest(unittest.TestCase):
self.assertFalse(os.path.exists(stage_path))
# tmp stage needs to remove tmp dir too.
- if spack.use_tmp_stage:
+ if spack.stage._use_tmp_stage:
target = os.path.realpath(stage_path)
self.assertFalse(os.path.exists(target))
def test_setup_and_destroy_name_with_tmp(self):
with use_tmp(True):
- with Stage(archive_url, name=stage_name) as stage:
- self.check_setup(stage, stage_name)
- self.check_destroy(stage, stage_name)
+ with Stage(self.archive_url, name=self.stage_name) as stage:
+ self.check_setup(stage, self.stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_setup_and_destroy_name_without_tmp(self):
with use_tmp(False):
- with Stage(archive_url, name=stage_name) as stage:
- self.check_setup(stage, stage_name)
- self.check_destroy(stage, stage_name)
+ with Stage(self.archive_url, name=self.stage_name) as stage:
+ self.check_setup(stage, self.stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_setup_and_destroy_no_name_with_tmp(self):
with use_tmp(True):
- with Stage(archive_url) as stage:
+ with Stage(self.archive_url) as stage:
self.check_setup(stage, None)
self.check_destroy(stage, None)
def test_setup_and_destroy_no_name_without_tmp(self):
with use_tmp(False):
- with Stage(archive_url) as stage:
+ with Stage(self.archive_url) as stage:
self.check_setup(stage, None)
self.check_destroy(stage, None)
def test_chdir(self):
- with Stage(archive_url, name=stage_name) as stage:
+ with Stage(self.archive_url, name=self.stage_name) as stage:
stage.chdir()
- self.check_setup(stage, stage_name)
- self.check_chdir(stage, stage_name)
- self.check_destroy(stage, stage_name)
+ self.check_setup(stage, self.stage_name)
+ self.check_chdir(stage, self.stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_fetch(self):
- with Stage(archive_url, name=stage_name) as stage:
+ with Stage(self.archive_url, name=self.stage_name) as stage:
stage.fetch()
- self.check_setup(stage, stage_name)
- self.check_chdir(stage, stage_name)
- self.check_fetch(stage, stage_name)
- self.check_destroy(stage, stage_name)
+ self.check_setup(stage, self.stage_name)
+ self.check_chdir(stage, self.stage_name)
+ self.check_fetch(stage, self.stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_expand_archive(self):
- with Stage(archive_url, name=stage_name) as stage:
+ with Stage(self.archive_url, name=self.stage_name) as stage:
stage.fetch()
- self.check_setup(stage, stage_name)
- self.check_fetch(stage, stage_name)
+ self.check_setup(stage, self.stage_name)
+ self.check_fetch(stage, self.stage_name)
stage.expand_archive()
- self.check_expand_archive(stage, stage_name)
- self.check_destroy(stage, stage_name)
+ self.check_expand_archive(stage, self.stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_expand_archive_with_chdir(self):
- with Stage(archive_url, name=stage_name) as stage:
+ with Stage(self.archive_url, name=self.stage_name) as stage:
stage.fetch()
- self.check_setup(stage, stage_name)
- self.check_fetch(stage, stage_name)
+ self.check_setup(stage, self.stage_name)
+ self.check_fetch(stage, self.stage_name)
stage.expand_archive()
stage.chdir_to_source()
- self.check_expand_archive(stage, stage_name)
- self.check_chdir_to_source(stage, stage_name)
- self.check_destroy(stage, stage_name)
+ self.check_expand_archive(stage, self.stage_name)
+ self.check_chdir_to_source(stage, self.stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_restage(self):
- with Stage(archive_url, name=stage_name) as stage:
+ with Stage(self.archive_url, name=self.stage_name) as stage:
stage.fetch()
stage.expand_archive()
stage.chdir_to_source()
- self.check_expand_archive(stage, stage_name)
- self.check_chdir_to_source(stage, stage_name)
+ self.check_expand_archive(stage, self.stage_name)
+ self.check_chdir_to_source(stage, self.stage_name)
# Try to make a file in the old archive dir
with open('foobar', 'w') as file:
@@ -255,40 +287,44 @@ class StageTest(unittest.TestCase):
# Make sure the file is not there after restage.
stage.restage()
- self.check_chdir(stage, stage_name)
- self.check_fetch(stage, stage_name)
+ self.check_chdir(stage, self.stage_name)
+ self.check_fetch(stage, self.stage_name)
stage.chdir_to_source()
- self.check_chdir_to_source(stage, stage_name)
+ self.check_chdir_to_source(stage, self.stage_name)
self.assertFalse('foobar' in os.listdir(stage.source_path))
- self.check_destroy(stage, stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_no_keep_without_exceptions(self):
- with Stage(archive_url, name=stage_name, keep=False) as stage:
+ with Stage(self.archive_url,
+ name=self.stage_name, keep=False) as stage:
pass
- self.check_destroy(stage, stage_name)
+ self.check_destroy(stage, self.stage_name)
def test_keep_without_exceptions(self):
- with Stage(archive_url, name=stage_name, keep=True) as stage:
+ with Stage(self.archive_url,
+ name=self.stage_name, keep=True) as stage:
pass
- path = self.get_stage_path(stage, stage_name)
+ path = self.get_stage_path(stage, self.stage_name)
self.assertTrue(os.path.isdir(path))
def test_no_keep_with_exceptions(self):
try:
- with Stage(archive_url, name=stage_name, keep=False) as stage:
+ with Stage(self.archive_url,
+ name=self.stage_name, keep=False) as stage:
raise Exception()
- path = self.get_stage_path(stage, stage_name)
+ path = self.get_stage_path(stage, self.stage_name)
self.assertTrue(os.path.isdir(path))
except:
pass # ignore here.
def test_keep_exceptions(self):
try:
- with Stage(archive_url, name=stage_name, keep=True) as stage:
+ with Stage(self.archive_url,
+ name=self.stage_name, keep=True) as stage:
raise Exception()
- path = self.get_stage_path(stage, stage_name)
+ path = self.get_stage_path(stage, self.stage_name)
self.assertTrue(os.path.isdir(path))
except:
pass # ignore here.
diff --git a/lib/spack/spack/test/svn_fetch.py b/lib/spack/spack/test/svn_fetch.py
index 9ef7593ed1..01ffc488a7 100644
--- a/lib/spack/spack/test/svn_fetch.py
+++ b/lib/spack/spack/test/svn_fetch.py
@@ -63,12 +63,13 @@ class SvnFetchTest(MockPackagesTest):
def try_fetch(self, rev, test_file, args):
"""Tries to:
- 1. Fetch the repo using a fetch strategy constructed with
- supplied args.
- 2. Check if the test_file is in the checked out repository.
- 3. Assert that the repository is at the revision supplied.
- 4. Add and remove some files, then reset the repo, and
- ensure it's all there again.
+
+ 1. Fetch the repo using a fetch strategy constructed with
+ supplied args.
+ 2. Check if the test_file is in the checked out repository.
+ 3. Assert that the repository is at the revision supplied.
+ 4. Add and remove some files, then reset the repo, and
+ ensure it's all there again.
"""
self.pkg.versions[ver('svn')] = args
diff --git a/lib/spack/spack/test/tally_plugin.py b/lib/spack/spack/test/tally_plugin.py
index 808694d186..d848f2cb9f 100644
--- a/lib/spack/spack/test/tally_plugin.py
+++ b/lib/spack/spack/test/tally_plugin.py
@@ -35,6 +35,8 @@ class Tally(Plugin):
self.successCount = 0
self.failCount = 0
self.errorCount = 0
+ self.error_list = []
+ self.fail_list = []
@property
def numberOfTestsRun(self):
@@ -52,9 +54,11 @@ class Tally(Plugin):
def addError(self, test, err):
self.errorCount += 1
+ self.error_list.append(test)
def addFailure(self, test, err):
self.failCount += 1
+ self.fail_list.append(test)
def finalize(self, result):
pass
diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py
index 41d72e7c34..c1d427783c 100644
--- a/lib/spack/spack/test/versions.py
+++ b/lib/spack/spack/test/versions.py
@@ -392,6 +392,7 @@ class VersionsTest(unittest.TestCase):
self.assertEqual(v.dotted, '1.2.3')
self.assertEqual(v.dashed, '1-2-3')
self.assertEqual(v.underscored, '1_2_3')
+ self.assertEqual(v.joined, '123')
def test_repr_and_str(self):
@@ -428,3 +429,6 @@ class VersionsTest(unittest.TestCase):
self.assertEqual(str(b), '1_2-3')
# Raise TypeError on tuples
self.assertRaises(TypeError, b.__getitem__, 1, 2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index 02c9c04380..8842495613 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -142,7 +142,7 @@ def split_url_extension(path):
return prefix, ext, suffix
-def downloaded_file_extension(path):
+def determine_url_file_extension(path):
"""This returns the type of archive a URL refers to. This is
sometimes confusing because of URLs like:
@@ -160,8 +160,6 @@ def downloaded_file_extension(path):
return 'tar.gz'
prefix, ext, suffix = split_url_extension(path)
- if not ext:
- raise UrlParseError("Cannot deduce archive type in %s" % path, path)
return ext
@@ -325,7 +323,7 @@ def parse_name_and_version(path):
def insensitize(string):
"""Change upper and lowercase letters to be case insensitive in
- the provided string. e.g., 'a' because '[Aa]', 'B' becomes
+ the provided string. e.g., 'a' becomes '[Aa]', 'B' becomes
'[bB]', etc. Use for building regexes."""
def to_ins(match):
char = match.group(1)
diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py
index 64554ab2f7..806465dc4e 100644
--- a/lib/spack/spack/util/compression.py
+++ b/lib/spack/spack/util/compression.py
@@ -40,11 +40,15 @@ def allowed_archive(path):
return any(path.endswith(t) for t in ALLOWED_ARCHIVE_TYPES)
-def decompressor_for(path):
+def decompressor_for(path, extension=None):
"""Get the appropriate decompressor for a path."""
- if path.endswith(".zip"):
+ if ((extension and re.match(r'\.?zip$', extension)) or
+ path.endswith('.zip')):
unzip = which('unzip', required=True)
return unzip
+ if extension and re.match(r'gz', extension):
+ gunzip = which('gunzip', required=True)
+ return gunzip
tar = which('tar', required=True)
tar.add_default_arg('-xf')
return tar
diff --git a/lib/spack/spack/util/crypto.py b/lib/spack/spack/util/crypto.py
index 22777fdb68..d074716022 100644
--- a/lib/spack/spack/util/crypto.py
+++ b/lib/spack/spack/util/crypto.py
@@ -100,3 +100,24 @@ class Checker(object):
self.sum = checksum(
self.hash_fun, filename, block_size=self.block_size)
return self.sum == self.hexdigest
+
+
+def prefix_bits(byte_array, bits):
+ """Return the first <bits> bits of a byte array as an integer."""
+ result = 0
+ n = 0
+ for i, b in enumerate(byte_array):
+ n += 8
+ result = (result << 8) | ord(b)
+ if n >= bits:
+ break
+
+ result >>= (n - bits)
+ return result
+
+
+def bit_length(num):
+ """Number of bits required to represent an integer in binary."""
+ s = bin(num)
+ s = s.lstrip('-0b')
+ return len(s)
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index f23110d2d9..15eb52d8e2 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -24,6 +24,24 @@
##############################################################################
import os
+system_paths = ['/', '/usr/', '/usr/local']
+suffixes = ['lib', 'lib64', 'include']
+system_dirs = [os.path.join(p, s) for s in suffixes for p in system_paths]
+system_bins = [os.path.join(p, 'bin') for p in system_paths]
+
+
+def filter_system_paths(paths):
+ return [p for p in paths if p not in system_dirs]
+
+
+def filter_system_bin_paths(paths):
+ # Turn the iterable into a list. Assume it's a list from here on.
+ _paths = list(paths)
+ bins = [p for p in _paths if p in system_bins]
+ nobins = [p for p in _paths if p not in system_bins]
+ # put bins infront as PATH is set by: prepend_path('PATH', item)
+ return bins + nobins
+
def get_path(name):
path = os.environ.get(name, "").strip()
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py
index 5c27b92df5..63bbbb7c92 100644
--- a/lib/spack/spack/util/executable.py
+++ b/lib/spack/spack/util/executable.py
@@ -26,7 +26,6 @@
import os
import re
import subprocess
-import inspect
import llnl.util.tty as tty
import spack
@@ -40,6 +39,7 @@ class Executable(object):
def __init__(self, name):
self.exe = name.split(' ')
+ self.default_env = {}
self.returncode = None
if not self.exe:
@@ -48,6 +48,9 @@ class Executable(object):
def add_default_arg(self, arg):
self.exe.append(arg)
+ def add_default_env(self, key, value):
+ self.default_env[key] = value
+
@property
def command(self):
return ' '.join(self.exe)
@@ -103,7 +106,13 @@ class Executable(object):
fail_on_error = kwargs.pop("fail_on_error", True)
ignore_errors = kwargs.pop("ignore_errors", ())
+ # environment
env = kwargs.get('env', None)
+ if env is None:
+ env = os.environ.copy()
+ env.update(self.default_env)
+ else:
+ env = self.default_env.copy().update(env)
# TODO: This is deprecated. Remove in a future version.
return_output = kwargs.pop("return_output", False)
@@ -149,6 +158,7 @@ class Executable(object):
cmd_line = "'%s'" % "' '".join(
map(lambda arg: arg.replace("'", "'\"'\"'"), cmd))
+
tty.debug(cmd_line)
try:
@@ -173,11 +183,11 @@ class Executable(object):
result += err
return result
- except OSError, e:
+ except OSError as e:
raise ProcessError(
"%s: %s" % (self.exe[0], e.strerror), "Command: " + cmd_line)
- except subprocess.CalledProcessError, e:
+ except subprocess.CalledProcessError as e:
if fail_on_error:
raise ProcessError(
str(e), "\nExit status %d when invoking command: %s" %
@@ -185,11 +195,11 @@ class Executable(object):
finally:
if close_ostream:
- output.close()
+ ostream.close()
if close_estream:
- error.close()
+ estream.close()
if close_istream:
- input.close()
+ istream.close()
def __eq__(self, other):
return self.exe == other.exe
@@ -226,74 +236,4 @@ def which(name, **kwargs):
class ProcessError(spack.error.SpackError):
-
- def __init__(self, msg, long_message=None):
- # These are used for detailed debugging information for
- # package builds. They're built up gradually as the exception
- # propagates.
- self.package_context = _get_package_context()
- self.build_log = None
-
- super(ProcessError, self).__init__(msg, long_message)
-
- @property
- def long_message(self):
- msg = self._long_message
- if msg:
- msg += "\n\n"
-
- if self.build_log:
- msg += "See build log for details:\n"
- msg += " %s" % self.build_log
-
- if self.package_context:
- if msg:
- msg += "\n\n"
- msg += '\n'.join(self.package_context)
-
- return msg
-
-
-def _get_package_context():
- """Return some context for an error message when the build fails.
-
- This should be called within a ProcessError when the exception is
- thrown.
-
- Args:
- process_error -- A ProcessError raised during install()
-
- This function inspects the stack to find where we failed in the
- package file, and it adds detailed context to the long_message
- from there.
-
- """
- lines = []
-
- # Walk up the stack
- for f in inspect.stack():
- frame = f[0]
-
- # Find a frame with 'self' in the local variables.
- if 'self' not in frame.f_locals:
- continue
-
- # Look only at a frame in a subclass of spack.Package
- obj = frame.f_locals['self']
- if type(obj) != spack.Package and isinstance(obj, spack.Package):
- break
- else:
- # Didn't find anything
- return lines
-
- # Build a message showing where in install we failed.
- lines.append("%s:%d, in %s:" % (
- inspect.getfile(frame.f_code), frame.f_lineno, frame.f_code.co_name
- ))
-
- sourcelines, start = inspect.getsourcelines(frame)
- for i, line in enumerate(sourcelines):
- mark = ">> " if start + i == frame.f_lineno else " "
- lines.append(" %s%-5d%s" % (mark, start + i, line.rstrip()))
-
- return lines
+ """ProcessErrors are raised when Executables exit with an error code."""
diff --git a/lib/spack/spack/util/path.py b/lib/spack/spack/util/path.py
new file mode 100644
index 0000000000..7235f6b756
--- /dev/null
+++ b/lib/spack/spack/util/path.py
@@ -0,0 +1,72 @@
+##############################################################################
+# 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
+##############################################################################
+"""Utilities for managing paths in Spack.
+"""
+import os
+import re
+import spack
+import getpass
+import tempfile
+
+__all__ = [
+ 'substitute_config_variables',
+ 'canonicalize_path']
+
+# Substitutions to perform
+replacements = {
+ 'spack': spack.prefix,
+ 'user': getpass.getuser(),
+ 'tempdir': tempfile.gettempdir(),
+}
+
+
+def substitute_config_variables(path):
+ """Substitute placeholders into paths.
+
+ Spack allows paths in configs to have some placeholders, as follows:
+
+ - $spack The Spack instance's prefix
+ - $user The current user's username
+ - $tempdir Default temporary directory returned by tempfile.gettempdir()
+
+ These are substituted case-insensitively into the path, and users can
+ use either ``$var`` or ``${var}`` syntax for the variables.
+
+ """
+ # Look up replacements for re.sub in the replacements dict.
+ def repl(match):
+ m = match.group(0).strip('${}')
+ return replacements.get(m.lower(), match.group(0))
+
+ # Replace $var or ${var}.
+ return re.sub(r'(\$\w+\b|\$\{\w+\})', repl, path)
+
+
+def canonicalize_path(path):
+ """Substitute config vars, expand user home, take abspath."""
+ path = substitute_config_variables(path)
+ path = os.path.expanduser(path)
+ path = os.path.abspath(path)
+ return path
diff --git a/lib/spack/spack/util/pattern.py b/lib/spack/spack/util/pattern.py
index c36445193c..b5731ccf08 100644
--- a/lib/spack/spack/util/pattern.py
+++ b/lib/spack/spack/util/pattern.py
@@ -31,15 +31,15 @@ def composite(interface=None, method_list=None, container=list):
"""Returns a class decorator that patches a class adding all the methods
it needs to be a composite for a given interface.
- :param interface: class exposing the interface to which the composite
- object must conform. Only non-private and non-special methods will be
- taken into account
+ :param interface: class exposing the interface to which the composite \
+ object must conform. Only non-private and non-special methods will \
+ be taken into account
:param method_list: names of methods that should be part of the composite
- :param container: container for the composite object (default = list).
- Must fulfill the MutableSequence contract. The composite class will expose
- the container API to manage object composition
+ :param container: container for the composite object (default = list). \
+ Must fulfill the MutableSequence contract. The composite class will \
+ expose the container API to manage object composition
:return: class decorator
"""
@@ -140,3 +140,9 @@ class Bunch(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
+
+
+class Args(Bunch):
+ """Subclass of Bunch to write argparse args more naturally."""
+ def __init__(self, *flags, **kwargs):
+ super(Args, self).__init__(flags=tuple(flags), kwargs=kwargs)
diff --git a/lib/spack/spack/util/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py
index 7bcdf2d61f..c27db52066 100644
--- a/lib/spack/spack/util/spack_yaml.py
+++ b/lib/spack/spack/util/spack_yaml.py
@@ -32,6 +32,10 @@
"""
import yaml
+try:
+ from yaml import CLoader as Loader, CDumper as Dumper
+except ImportError as e:
+ from yaml import Loader, Dumper
from yaml.nodes import *
from yaml.constructor import ConstructorError
from ordereddict_backport import OrderedDict
@@ -64,7 +68,7 @@ def mark(obj, node):
obj._end_mark = node.end_mark
-class OrderedLineLoader(yaml.Loader):
+class OrderedLineLoader(Loader):
"""YAML loader that preserves order and line numbers.
Mappings read in by this loader behave like an ordered dict.
@@ -87,7 +91,9 @@ class OrderedLineLoader(yaml.Loader):
value = value.encode('ascii')
except UnicodeEncodeError:
pass
+
value = syaml_str(value)
+
mark(value, node)
return value
@@ -156,7 +162,7 @@ OrderedLineLoader.add_constructor(
u'tag:yaml.org,2002:str', OrderedLineLoader.construct_yaml_str)
-class OrderedLineDumper(yaml.Dumper):
+class OrderedLineDumper(Dumper):
"""Dumper that preserves ordering and formats ``syaml_*`` objects.
This dumper preserves insertion ordering ``syaml_dict`` objects
@@ -196,6 +202,11 @@ class OrderedLineDumper(yaml.Dumper):
node.flow_style = best_style
return node
+ def ignore_aliases(self, _data):
+ """Make the dumper NEVER print YAML aliases."""
+ return True
+
+
# Make our special objects look like normal YAML ones.
OrderedLineDumper.add_representer(syaml_dict, OrderedLineDumper.represent_dict)
OrderedLineDumper.add_representer(syaml_list, OrderedLineDumper.represent_list)
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index 29ed6e0d32..935532266f 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -227,7 +227,16 @@ def find_versions_of_archive(*archive_urls, **kwargs):
# We'll be a bit more liberal and just look for the archive
# part, not the full path.
- regexes.append(os.path.basename(url_regex))
+ url_regex = os.path.basename(url_regex)
+
+ # We need to add a $ anchor to the end of the regex to prevent
+ # Spack from picking up signature files like:
+ # .asc
+ # .md5
+ # .sha256
+ # .sig
+ # However, SourceForge downloads still need to end in '/download'.
+ regexes.append(url_regex + '(\/download)?$')
# Build a dict version -> URL from any links that match the wildcards.
versions = {}
diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py
index e1311eb0d9..0d68a709e8 100644
--- a/lib/spack/spack/version.py
+++ b/lib/spack/spack/version.py
@@ -49,6 +49,7 @@ from bisect import bisect_left
from functools import wraps
from functools_backport import total_ordering
+from spack.util.spack_yaml import syaml_dict
__all__ = ['Version', 'VersionRange', 'VersionList', 'ver']
@@ -106,6 +107,10 @@ def coerced(method):
return coercing_method
+def _numeric_lt(self0, other):
+ """Compares two versions, knowing they're both numeric"""
+
+
@total_ordering
class Version(object):
"""Class to represent versions"""
@@ -141,6 +146,10 @@ class Version(object):
def dashed(self):
return '-'.join(str(x) for x in self.version)
+ @property
+ def joined(self):
+ return ''.join(str(x) for x in self.version)
+
def up_to(self, index):
"""Return a version string up to the specified component, exclusive.
e.g., if this is 10.8.2, self.up_to(2) will return '10.8'.
@@ -153,13 +162,35 @@ class Version(object):
def highest(self):
return self
+ def isnumeric(self):
+ """Tells if this version is numeric (vs. a non-numeric version). A
+ version will be numeric as long as the first section of it is,
+ even if it contains non-numerica portions.
+
+ Some numeric versions:
+ 1
+ 1.1
+ 1.1a
+ 1.a.1b
+ Some non-numeric versions:
+ develop
+ system
+ myfavoritebranch
+ """
+ return isinstance(self.version[0], numbers.Integral)
+
+ def isdevelop(self):
+ """Triggers on the special case of the `@develop` version."""
+ return self.string == 'develop'
+
@coerced
def satisfies(self, other):
- """A Version 'satisfies' another if it is at least as specific and has a
- common prefix. e.g., we want gcc@4.7.3 to satisfy a request for
- gcc@4.7 so that when a user asks to build with gcc@4.7, we can find
- a suitable compiler.
+ """A Version 'satisfies' another if it is at least as specific and has
+ a common prefix. e.g., we want gcc@4.7.3 to satisfy a request for
+ gcc@4.7 so that when a user asks to build with gcc@4.7, we can find
+ a suitable compiler.
"""
+
nself = len(self.version)
nother = len(other.version)
return nother <= nself and self.version[:nother] == other.version
@@ -223,6 +254,27 @@ class Version(object):
def concrete(self):
return self
+ def _numeric_lt(self, other):
+ """Compares two versions, knowing they're both numeric"""
+ # Standard comparison of two numeric versions
+ for a, b in zip(self.version, other.version):
+ if a == b:
+ continue
+ else:
+ # Numbers are always "newer" than letters.
+ # This is for consistency with RPM. See patch
+ # #60884 (and details) from bugzilla #50977 in
+ # the RPM project at rpm.org. Or look at
+ # rpmvercmp.c if you want to see how this is
+ # implemented there.
+ if type(a) != type(b):
+ return type(b) == int
+ else:
+ return a < b
+ # If the common prefix is equal, the one
+ # with more segments is bigger.
+ return len(self.version) < len(other.version)
+
@coerced
def __lt__(self, other):
"""Version comparison is designed for consistency with the way RPM
@@ -238,30 +290,33 @@ class Version(object):
if self.version == other.version:
return False
- # dev is __gt__ than anything but itself.
- if other.string == 'develop':
- return True
-
- # If lhs is dev then it can't be < than anything
- if self.string == 'develop':
- return False
-
- for a, b in zip(self.version, other.version):
- if a == b:
- continue
- else:
- # Numbers are always "newer" than letters. This is for
- # consistency with RPM. See patch #60884 (and details)
- # from bugzilla #50977 in the RPM project at rpm.org.
- # Or look at rpmvercmp.c if you want to see how this is
- # implemented there.
- if type(a) != type(b):
- return type(b) == int
- else:
- return a < b
-
- # If the common prefix is equal, the one with more segments is bigger.
- return len(self.version) < len(other.version)
+ # First priority: anything < develop
+ sdev = self.isdevelop()
+ if sdev:
+ return False # source = develop, it can't be < anything
+
+ # Now we know !sdev
+ odev = other.isdevelop()
+ if odev:
+ return True # src < dst
+
+ # now we know neither self nor other isdevelop().
+
+ # Principle: Non-numeric is less than numeric
+ # (so numeric will always be preferred by default)
+ if self.isnumeric():
+ if other.isnumeric():
+ return self._numeric_lt(other)
+ else: # self = numeric; other = non-numeric
+ # Numeric > Non-numeric (always)
+ return False
+ else:
+ if other.isnumeric(): # self = non-numeric, other = numeric
+ # non-numeric < numeric (always)
+ return True
+ else: # Both non-numeric
+ # Maybe consider other ways to compare here...
+ return self.string < other.string
@coerced
def __eq__(self, other):
@@ -388,12 +443,12 @@ class VersionRange(object):
@coerced
def satisfies(self, other):
- """
- A VersionRange satisfies another if some version in this range
+ """A VersionRange satisfies another if some version in this range
would satisfy some version in the other range. To do this it must
either:
- a) Overlap with the other range
- b) The start of this range satisfies the end of the other range.
+
+ a) Overlap with the other range
+ b) The start of this range satisfies the end of the other range.
This is essentially the same as overlaps(), but overlaps assumes
that its arguments are specific. That is, 4.7 is interpreted as
@@ -401,6 +456,7 @@ class VersionRange(object):
by 4.7.3.5, etc.
Rationale:
+
If a user asks for gcc@4.5:4.7, and a package is only compatible with
gcc@4.7.3:4.8, then that package should be able to build under the
constraints. Just using overlaps() would not work here.
@@ -591,9 +647,13 @@ class VersionList(object):
def to_dict(self):
"""Generate human-readable dict for YAML."""
if self.concrete:
- return {'version': str(self[0])}
+ return syaml_dict([
+ ('version', str(self[0]))
+ ])
else:
- return {'versions': [str(v) for v in self]}
+ return syaml_dict([
+ ('versions', [str(v) for v in self])
+ ])
@staticmethod
def from_dict(dictionary):
diff --git a/share/spack/csh/convert-pyext.sh b/share/spack/csh/convert-pyext.sh
deleted file mode 100644
index a48bcdbcca..0000000000
--- a/share/spack/csh/convert-pyext.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash --noprofile
-PYEXT_REGEX=".*/.*/package.py"
-
-find var/spack/repos/builtin/packages/ -type f -regextype sed -regex ${PYEXT_REGEX} -exec \
- sed -i 's/python('\''setup.py'\'', /setup_py(/' {} \;
diff --git a/share/spack/qa/changed_files b/share/spack/qa/changed_files
new file mode 100755
index 0000000000..c1fa55c053
--- /dev/null
+++ b/share/spack/qa/changed_files
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+#
+# Description:
+# Returns a list of changed files.
+#
+# Usage:
+# changed_files [<directory> ...]
+# changed_files [<file> ...]
+# changed_files ["*.<extension>" ...]
+#
+# Options:
+# Directories, files, or globs to search for changed files.
+#
+
+# Move to root directory of Spack
+# Allows script to be run from anywhere
+SPACK_ROOT="$(dirname "$0")/../../.."
+cd "$SPACK_ROOT"
+
+# Add changed files that have been committed since branching off of develop
+changed=($(git diff --name-only --diff-filter=ACMR develop... -- "$@"))
+# Add changed files that have been staged but not yet committed
+changed+=($(git diff --name-only --diff-filter=ACMR --cached -- "$@"))
+# Add changed files that are unstaged
+changed+=($(git diff --name-only --diff-filter=ACMR -- "$@"))
+# Add new files that are untracked
+changed+=($(git ls-files --exclude-standard --other -- "$@"))
+
+# Return array
+# Ensure that each file in the array is unique
+printf '%s\n' "${changed[@]}" | sort -u
diff --git a/share/spack/qa/check_dependencies b/share/spack/qa/check_dependencies
new file mode 100755
index 0000000000..e999463b03
--- /dev/null
+++ b/share/spack/qa/check_dependencies
@@ -0,0 +1,96 @@
+#!/usr/bin/env bash
+#
+# Description:
+# Check to see if dependencies are installed.
+# If not, warn the user and tell them how to
+# install these dependencies.
+#
+# Usage:
+# check-deps <dep> ...
+#
+# Options:
+# One or more dependencies. Must use name of binary.
+
+for dep in "$@"; do
+ if ! which $dep &> /dev/null; then
+ # Map binary name to package name
+ case $dep in
+ sphinx-apidoc|sphinx-build)
+ spack_package=py-sphinx
+ pip_package=sphinx
+ ;;
+ coverage)
+ spack_package=py-coverage
+ pip_package=coverage
+ ;;
+ flake8)
+ spack_package=py-flake8
+ pip_package=flake8
+ ;;
+ dot)
+ spack_package=graphviz
+ ;;
+ git)
+ spack_package=git
+ ;;
+ hg)
+ spack_package=mercurial
+ pip_package=mercurial
+ ;;
+ svn)
+ spack_package=subversion
+ ;;
+ *)
+ spack_package=$dep
+ pip_package=$dep
+ ;;
+ esac
+
+ echo "ERROR: $dep is required to run this script."
+ echo
+
+ if [[ $spack_package ]]; then
+ echo "To install with Spack, run:"
+ echo " $ spack install $spack_package"
+ fi
+
+ if [[ $pip_package ]]; then
+ echo "To install with pip, run:"
+ echo " $ pip install $pip_package"
+ fi
+
+ if [[ $spack_package || $pip_package ]]; then
+ echo "Then add the bin directory to your PATH."
+ fi
+
+ exit 1
+ fi
+
+ # Flake8 and Sphinx require setuptools in order to run.
+ # Otherwise, they print out this error message:
+ #
+ # Traceback (most recent call last):
+ # File: "/usr/bin/flake8", line 5, in <module>
+ # from pkg_resources import load_entry_point
+ # ImportError: No module named pkg_resources
+ #
+ # Print a more useful error message if setuptools not found.
+ if [[ $dep == flake8 || $dep == sphinx* ]]; then
+ # Find which Python is being run
+ # Spack-installed packages have a hard-coded shebang
+ python_cmd=$(head -n 1 $(which $dep) | cut -c 3-)
+ # May not have a shebang
+ if [[ $python_cmd != *python* ]]; then
+ python_cmd=python
+ fi
+ # Check if setuptools is in the PYTHONPATH
+ if ! $python_cmd -c "import setuptools" 2> /dev/null; then
+ echo "ERROR: setuptools is required to run $dep."
+ echo "Please add it to your PYTHONPATH."
+
+ exit 1
+ fi
+ fi
+done
+
+echo "Dependencies found."
diff --git a/share/spack/qa/run-doc-tests b/share/spack/qa/run-doc-tests
new file mode 100755
index 0000000000..ca892d7eb4
--- /dev/null
+++ b/share/spack/qa/run-doc-tests
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+#
+# Description:
+# Builds Spack documentation and checks for
+# possible syntax errors. Treats warnings as
+# fatal errors.
+#
+# Usage:
+# run-doc-tests
+#
+# Notes:
+# Requires sphinx, graphviz, git, mercurial, and subversion.
+#
+
+QA_DIR="$(dirname "$0")"
+SPACK_ROOT="$QA_DIR/../../.."
+DOC_DIR="$SPACK_ROOT/lib/spack/docs"
+
+# Array of dependencies
+deps=(
+ sphinx-apidoc
+ sphinx-build
+ dot
+ git
+ hg
+ svn
+)
+
+# Check for dependencies
+"$QA_DIR/check_dependencies" "${deps[@]}" || exit 1
+
+# Add Spack to the PATH.
+export PATH="$SPACK_ROOT/bin:$PATH"
+
+# Move to documentation directory
+# Allows script to be run from anywhere
+cd "$DOC_DIR"
+
+# Treat warnings as fatal errors
+make clean --silent
+make SPHINXOPTS=-W JOBS=1
diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8
deleted file mode 100755
index e41cd0d471..0000000000
--- a/share/spack/qa/run-flake8
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-#
-# This script runs source code style checks on Spack.
-#
-# To run it, you'll need to have the Python flake8 installed locally.
-#
-PYTHONPATH=./lib/spack:$PYTHONPATH
-
-flake8="$(which flake8)"
-if [[ ! $flake8 ]]; then
- echo "ERROR: flake8 is required to run this script."
- exit 1
-fi
-
-# Move to Spack root; allows script to be run from anywhere
-cd "$(dirname "$0")/../../.."
-
-# Add changed files that have been committed since branching off of develop
-changed=($(git diff --name-only --find-renames develop... -- '*.py'))
-# Add changed files that have been staged but not yet committed
-changed+=($(git diff --name-only --find-renames --cached -- '*.py'))
-# Add changed files that are unstaged
-changed+=($(git diff --name-only --find-renames -- '*.py'))
-
-# Ensure that each file in the array is unique
-changed=($(printf '%s\n' "${changed[@]}" | sort -u))
-
-function cleanup {
- # Restore original package files after modifying them.
- for file in "${changed[@]}"; do
- if [[ -e "${file}.sbak~" ]]; then
- mv "${file}.sbak~" "${file}"
- fi
- done
-}
-
-# Cleanup temporary files upon exit or when script is killed
-trap cleanup EXIT SIGINT SIGTERM
-
-# Add approved style exemptions to the changed packages.
-for file in "${changed[@]}"; do
- # Make a backup to restore later
- cp "$file" "$file.sbak~"
-
- #
- # Exemptions for package.py files
- #
- if [[ $file = *package.py ]]; then
- # Exempt lines with urls and descriptions from overlong line errors.
- perl -i -pe 's/^(\s*homepage\s*=.*)$/\1 # NOQA: ignore=E501/' $file
- perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file
- perl -i -pe 's/^(\s*version\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
- perl -i -pe 's/^(\s*variant\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
- perl -i -pe 's/^(\s*depends_on\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
- perl -i -pe 's/^(\s*extends\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
-
- # Exempt '@when' decorated functions from redefinition errors.
- perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file
- fi
-
- #
- # Exemptions for all files
- #
- perl -i -pe 's/^(.*(https?|file)\:.*)$/\1 # NOQA: ignore=E501/' $file
-done
-
-if [[ "${changed[@]}" ]]; then
- echo =======================================================
- echo flake8: running flake8 code checks on spack.
- echo
- echo Modified files:
- echo "${changed[@]}" | perl -pe 's/^/ /;s/ +/\n /g'
- echo =======================================================
- if flake8 --format pylint "${changed[@]}"; then
- echo "Flake8 checks were clean."
- else
- echo "Flake8 found errors."
- exit 1
- fi
-else
- echo No core framework files modified.
-fi
-
-exit 0
diff --git a/share/spack/qa/run-flake8-tests b/share/spack/qa/run-flake8-tests
new file mode 100755
index 0000000000..83469eeb9d
--- /dev/null
+++ b/share/spack/qa/run-flake8-tests
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+#
+# Description:
+# Runs source code style checks on Spack.
+# See $SPACK_ROOT/.flake8 for a list of
+# approved exceptions.
+#
+# Usage:
+# run-flake8-tests
+#
+# Notes:
+# Requires flake8.
+#
+
+QA_DIR="$(dirname "$0")"
+SPACK_ROOT="$QA_DIR/../../.."
+
+# Array of dependencies
+deps=(
+ flake8
+)
+
+# Check for dependencies
+"$QA_DIR/check_dependencies" "${deps[@]}" || exit 1
+
+# Add Spack to the PATH.
+export PATH="$SPACK_ROOT/bin:$PATH"
+
+exec spack flake8
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index 33fb1bfae2..6da919e18d 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -1,20 +1,46 @@
#!/usr/bin/env bash
#
-# This script runs Spack unit tests.
+# Description:
+# Runs Spack unit tests.
#
-# It should be executed from the top-level directory of the repo,
-# e.g.:
+# Usage:
+# run-unit-tests [test ...]
#
-# share/spack/qa/run-unit-tests
+# Options:
+# Optionally add one or more unit tests
+# to only run these tests.
#
-# To run it, you'll need to have the Python coverage installed locally.
+# Notes:
+# Requires coverage, git, mercurial, and subversion.
#
-# Regular spack setup and tests
-. ./share/spack/setup-env.sh
+QA_DIR="$(dirname "$0")"
+SPACK_ROOT="$QA_DIR/../../.."
+
+# Array of dependencies
+deps=(
+ coverage
+ git
+ hg
+ svn
+)
+
+# Check for dependencies
+"$QA_DIR/check_dependencies" "${deps[@]}" || exit 1
+
+# Add Spack to the PATH.
+export PATH="$SPACK_ROOT/bin:$PATH"
+
+# Move to root directory of Spack
+# Allows script to be run from anywhere
+cd "$SPACK_ROOT"
+
+# Run integration tests
+# TODO: should these be separated into a different test suite?
+source "$SPACK_ROOT/share/spack/setup-env.sh"
spack compilers
spack config get compilers
spack install -v libdwarf
# Run unit tests with code coverage
-coverage run bin/spack test
+coverage run bin/spack test "$@"
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 2eb1dfecb3..f602ea627e 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -189,5 +189,7 @@ _sp_prefix=$(cd "$(dirname $(dirname $_sp_share_dir))" && pwd)
_spack_pathadd PATH "${_sp_prefix%/}/bin"
_sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())')
-_spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type"
-_spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type"
+_sp_dotkit_root=$(spack-python -c "print(spack.util.path.canonicalize_path(spack.config.get_config('config').get('module_roots', {}).get('dotkit')))")
+_sp_tcl_root=$(spack-python -c "print(spack.util.path.canonicalize_path(spack.config.get_config('config').get('module_roots', {}).get('tcl')))")
+_spack_pathadd DK_NODE "${_sp_dotkit_root%/}/$_sp_sys_type"
+_spack_pathadd MODULEPATH "${_sp_tcl_root%/}/$_sp_sys_type"
diff --git a/var/spack/repos/builtin.mock/packages/develop-test/package.py b/var/spack/repos/builtin.mock/packages/develop-test/package.py
new file mode 100644
index 0000000000..0c693c60fb
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/develop-test/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# 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 DevelopTest(Package):
+ """Dummy package with develop version"""
+ homepage = "http://www.openblas.net"
+ url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
+
+ version('develop', git='https://github.com/dummy/repo.git')
+ version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/externalvirtual/package.py b/var/spack/repos/builtin.mock/packages/externalvirtual/package.py
index 1f3553014b..6310a17bc9 100644
--- a/var/spack/repos/builtin.mock/packages/externalvirtual/package.py
+++ b/var/spack/repos/builtin.mock/packages/externalvirtual/package.py
@@ -31,8 +31,10 @@ class Externalvirtual(Package):
version('1.0', '1234567890abcdef1234567890abcdef')
version('2.0', '234567890abcdef1234567890abcdef1')
+ version('2.1', '34567890abcdef1234567890abcdef12')
+ version('2.2', '4567890abcdef1234567890abcdef123')
- provides('stuff')
+ provides('stuff', when='@1.0:')
def install(self, spec, prefix):
pass
diff --git a/lib/spack/spack/hooks/tclmodule.py b/var/spack/repos/builtin.mock/packages/othervirtual/package.py
index 2c88810c97..83bc07df98 100644
--- a/lib/spack/spack/hooks/tclmodule.py
+++ b/var/spack/repos/builtin.mock/packages/othervirtual/package.py
@@ -22,14 +22,16 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import spack.modules
+from spack import *
-def post_install(pkg):
- dk = spack.modules.TclModule(pkg.spec)
- dk.write()
+class Othervirtual(Package):
+ homepage = "http://somewhere.com"
+ url = "http://somewhere.com/stuff-1.0.tar.gz"
+ version('1.0', '67890abcdef1234567890abcdef12345')
-def post_uninstall(pkg):
- dk = spack.modules.TclModule(pkg.spec)
- dk.remove()
+ provides('stuff')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py
index b0ccba1009..0b474285ce 100644
--- a/var/spack/repos/builtin/packages/ImageMagick/package.py
+++ b/var/spack/repos/builtin/packages/ImageMagick/package.py
@@ -26,38 +26,32 @@ from spack import *
class Imagemagick(Package):
- """ImageMagick is a image processing library"""
- homepage = "http://www.imagemagic.org"
+ """ImageMagick is a software suite to create, edit, compose,
+ or convert bitmap images."""
- # -------------------------------------------------------------------------
- # 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")
+ homepage = "http://www.imagemagick.org"
+ url = "https://github.com/ImageMagick/ImageMagick/archive/7.0.2-7.tar.gz"
- # -------------------------------------------------------------------------
- # *-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")
+ version('7.0.2-7', 'c59cdc8df50e481b2bd1afe09ac24c08')
+ version('7.0.2-6', 'aa5689129c39a5146a3212bf5f26d478')
depends_on('jpeg')
+ depends_on('pango')
depends_on('libtool', type='build')
depends_on('libpng')
depends_on('freetype')
depends_on('fontconfig')
depends_on('libtiff')
+ depends_on('ghostscript')
+ depends_on('ghostscript-fonts')
+
+ 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)
+ gs_font_dir = join_path(spec['ghostscript-fonts'].prefix.share, "font")
+ configure('--prefix={0}'.format(prefix),
+ '--with-gs-font-dir={0}'.format(gs_font_dir))
make()
- make("install")
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py
index e880a3aa66..a0899084d0 100644
--- a/var/spack/repos/builtin/packages/R/package.py
+++ b/var/spack/repos/builtin/packages/R/package.py
@@ -58,7 +58,7 @@ class R(Package):
# Concrete dependencies
depends_on('readline')
depends_on('ncurses')
- depends_on('icu')
+ depends_on('icu4c')
depends_on('glib')
depends_on('zlib')
depends_on('bzip2')
diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py
new file mode 100644
index 0000000000..76fa044982
--- /dev/null
+++ b/var/spack/repos/builtin/packages/abinit/package.py
@@ -0,0 +1,175 @@
+##############################################################################
+# 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
+##############################################################################
+#
+# Author: Matteo Giantomassi <matteo.giantomassiNOSPAM AT uclouvain.be>
+# Date: October 11, 2016
+
+from spack import *
+
+
+class Abinit(Package):
+ """ABINIT is a package whose main program allows one to find the total
+ energy, charge density and electronic structure of systems made of
+ electrons and nuclei (molecules and periodic solids) within
+ Density Functional Theory (DFT), using pseudopotentials and a planewave
+ or wavelet basis. ABINIT also includes options to optimize the geometry
+ according to the DFT forces and stresses, or to perform molecular dynamics
+ simulations using these forces, or to generate dynamical matrices,
+ Born effective charges, and dielectric tensors, based on Density-Functional
+ Perturbation Theory, and many more properties. Excited states can be
+ computed within the Many-Body Perturbation Theory (the GW approximation and
+ the Bethe-Salpeter equation), and Time-Dependent Density Functional Theory
+ (for molecules). In addition to the main ABINIT code, different utility
+ programs are provided.
+ """
+
+ homepage = "http://www.abinit.org"
+ url = "http://ftp.abinit.org/abinit-8.0.8b.tar.gz"
+
+ # Versions before 8.0.8b are not supported.
+ version("8.0.8b", "abc9e303bfa7f9f43f95598f87d84d5d")
+
+ variant('mpi', default=True,
+ description='Builds with MPI support. Requires MPI2+')
+ variant('openmp', default=False,
+ description='Enables OpenMP threads. Use threaded FFTW3')
+ variant('scalapack', default=False,
+ description='Enables scalapack support. Requires MPI')
+ # variant('elpa', default=False,
+ # description='Uses elpa instead of scalapack. Requires MPI')
+
+ # TODO: To be tested.
+ # It was working before the last `git pull` but now all tests crash.
+ # For the time being, the default is netcdf3 and the internal fallbacks
+ variant('hdf5', default=False,
+ description='Enables HDF5+Netcdf4 with MPI. WARNING: experimental')
+
+ # Add dependencies
+ # currently one cannot forward options to virtual packages, see #1712.
+ # depends_on("blas", when="~openmp")
+ # depends_on("blas+openmp", when="+openmp")
+ depends_on('blas')
+ depends_on("lapack")
+
+ # Require MPI2+
+ depends_on("mpi@2:", when="+mpi")
+
+ depends_on("scalapack", when="+scalapack+mpi")
+ # depends_on("elpa", when="+elpa+mpi~openmp")
+ # depends_on("elpa+openmp", when="+elpa+mpi+openmp")
+
+ depends_on("fftw+float", when="~openmp")
+ depends_on("fftw+float+openmp", when="+openmp")
+
+ depends_on("netcdf-fortran", when="+hdf5")
+ depends_on("hdf5+mpi", when='+mpi+hdf5') # required for NetCDF-4 support
+
+ # pin libxc version
+ depends_on("libxc@2.2.1")
+
+ def validate(self, spec):
+ """
+ Checks if incompatible variants have been activated at the same time
+
+ :param spec: spec of the package
+ :raises RuntimeError: in case of inconsistencies
+ """
+ error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active'
+
+ if '+scalapack' in spec and '~mpi' in spec:
+ raise RuntimeError(error.format(variant='scalapack'))
+
+ if '+elpa' in spec and ('~mpi' in spec or '~scalapack' in spec):
+ raise RuntimeError(error.format(variant='elpa'))
+
+ def install(self, spec, prefix):
+ self.validate(spec)
+
+ options = ['--prefix=%s' % prefix]
+ oapp = options.append
+
+ if '+mpi' in spec:
+ # MPI version:
+ # let the configure script auto-detect MPI support from mpi_prefix
+ oapp("--with-mpi-prefix=%s" % spec["mpi"].prefix)
+ oapp("--enable-mpi=yes")
+ oapp("--enable-mpi-io=yes")
+
+ # Activate OpenMP in Abinit Fortran code.
+ if '+openmp' in spec:
+ oapp('--enable-openmp=yes')
+
+ # BLAS/LAPACK
+ if '+scalapack' in spec:
+ oapp("--with-linalg-flavor=custom+scalapack")
+ linalg = (spec['scalapack'].scalapack_libs +
+ spec['lapack'].lapack_libs + spec['blas'].blas_libs)
+
+ # elif '+elpa' in spec:
+ else:
+ oapp("--with-linalg-flavor=custom")
+ linalg = spec['lapack'].lapack_libs + spec['blas'].blas_libs
+
+ oapp("--with-linalg-libs=%s" % linalg.ld_flags)
+
+ # FFTW3: use sequential or threaded version if +openmp
+ fftflavor, fftlibs = "fftw3", "-lfftw3 -lfftw3f"
+ if '+openmp' in spec:
+ fftflavor = "fftw3-threads"
+ fftlibs = "-lfftw3_omp -lfftw3 -lfftw3f"
+
+ options.extend([
+ "--with-fft-flavor=%s" % fftflavor,
+ "--with-fft-incs=-I%s" % spec["fftw"].prefix.include,
+ "--with-fft-libs=-L%s %s" % (spec["fftw"].prefix.lib, fftlibs),
+ ])
+ oapp("--with-dft-flavor=atompaw+libxc")
+
+ # LibXC library
+ options.extend([
+ "with_libxc_incs=-I%s" % spec["libxc"].prefix.include,
+ "with_libxc_libs=-L%s -lxcf90 -lxc" % spec["libxc"].prefix.lib,
+ ])
+
+ # Netcdf4/HDF5
+ if "+hdf5" in spec:
+ oapp("--with-trio-flavor=netcdf")
+ hdf_libs = "-L%s -lhdf5_hl -lhdf5" % spec["hdf5"].prefix.lib
+ options.extend([
+ "--with-netcdf-incs=-I%s" % (
+ spec["netcdf-fortran"].prefix.include),
+ "--with-netcdf-libs=-L%s -lnetcdff -lnetcdf %s" % (
+ spec["netcdf-fortran"].prefix.lib, hdf_libs),
+ ])
+ else:
+ # Use internal fallbacks (netcdf3)
+ oapp("--with-trio-flavor=netcdf-fallback")
+
+ configure(*options)
+ make()
+
+ # make("check")
+ # make("tests_in")
+ make("install")
diff --git a/var/spack/repos/builtin/packages/adios/adios_1100.patch b/var/spack/repos/builtin/packages/adios/adios_1100.patch
new file mode 100644
index 0000000000..7a9f857c32
--- /dev/null
+++ b/var/spack/repos/builtin/packages/adios/adios_1100.patch
@@ -0,0 +1,29 @@
+From 3b21a8a4150962c6938baeceacd04f619cea2fbc Mon Sep 17 00:00:00 2001
+From: Norbert Podhorszki <pnorbert@ornl.gov>
+Date: Thu, 1 Sep 2016 16:26:23 -0400
+Subject: [PATCH] ifdef around 'bool' type. hdf5 1.10 defines bool and breaks
+ compiling bp2h5.c
+
+---
+ utils/bp2h5/bp2h5.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/utils/bp2h5/bp2h5.c b/utils/bp2h5/bp2h5.c
+index 9c500c7..fa746bd 100644
+--- a/utils/bp2h5/bp2h5.c
++++ b/utils/bp2h5/bp2h5.c
+@@ -43,9 +43,11 @@
+ #include "dmalloc.h"
+ #endif
+
+-typedef int bool;
+-#define false 0
+-#define true 1
++#ifndef bool
++ typedef int bool;
++# define false 0
++# define true 1
++#endif
+
+ bool noindex = false; // do no print array indices with data
+ bool printByteAsChar = false; // print 8 bit integer arrays as string
diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py
index 59e0a451a9..e240ce0858 100644
--- a/var/spack/repos/builtin/packages/adios/package.py
+++ b/var/spack/repos/builtin/packages/adios/package.py
@@ -1,41 +1,131 @@
-import os
+##############################################################################
+# 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 Adios(Package):
- """
- The Adaptable IO System (ADIOS) provides a simple,
+ """The Adaptable IO System (ADIOS) provides a simple,
flexible way for scientists to describe the
data in their code that may need to be written,
- read, or processed outside of the running simulation
+ read, or processed outside of the running simulation.
"""
homepage = "http://www.olcf.ornl.gov/center-projects/adios/"
- url = "https://github.com/ornladios/ADIOS/archive/v1.9.0.tar.gz"
+ url = "https://github.com/ornladios/ADIOS/archive/v1.10.0.tar.gz"
+ version('develop', git='https://github.com/ornladios/ADIOS.git',
+ branch='master')
+ version('1.10.0', 'eff450a4c0130479417cfd63186957f3')
version('1.9.0', '310ff02388bbaa2b1c1710ee970b5678')
+ variant('shared', default=True,
+ description='Builds a shared version of the library')
+
+ variant('fortran', default=False,
+ description='Enable Fortran bindings support')
+
+ variant('mpi', default=True, description='Enable MPI support')
+ variant('infiniband', default=False, description='Enable infiniband support')
+
+ # transforms
+ variant('zlib', default=True, description='Enable szip transform support')
+ variant('szip', default=False, description='Enable szip transform support')
+ # transports and serial file converters
+ variant('hdf5', default=False, description='Enable parallel HDF5 transport and serial bp2h5 converter')
+
# Lots of setting up here for this package
# module swap PrgEnv-intel PrgEnv-$COMP
- # module load cray-netcdf/4.3.3.1
# module load cray-hdf5/1.8.14
# module load python/2.7.10
- depends_on('hdf5')
- depends_on('mxml')
+
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('python', type='build')
+
+ depends_on('mpi', when='+mpi')
+ depends_on('mxml@2.9:')
+ # optional transformations
+ depends_on('zlib', when='+zlib')
+ depends_on('szip', when='+szip')
+ # optional transports & file converters
+ depends_on('hdf5@1.8:+mpi', when='+hdf5')
+
+ # Fix ADIOS <=1.10.0 compile error on HDF5 1.10+
+ # https://github.com/ornladios/ADIOS/commit/3b21a8a41509
+ # https://github.com/LLNL/spack/issues/1683
+ patch('adios_1100.patch', when='@:1.10.0^hdf5@1.10:')
+
+ def validate(self, spec):
+ """
+ Checks if incompatible variants have been activated at the same time
+ :param spec: spec of the package
+ :raises RuntimeError: in case of inconsistencies
+ """
+ if '+fortran' in spec and not self.compiler.fc:
+ msg = 'cannot build a fortran variant without a fortran compiler'
+ raise RuntimeError(msg)
def install(self, spec, prefix):
- configure_args = ["--prefix=%s" % prefix,
- "--with-mxml=%s" % spec['mxml'].prefix,
- "--with-hdf5=%s" % spec['hdf5'].prefix,
- "--with-netcdf=%s" % os.environ["NETCDF_DIR"],
- "--with-infiniband=no",
- "MPICC=cc", "MPICXX=CC", "MPIFC=ftn",
- "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"]
-
- if spec.satisfies('%gcc'):
- configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"])
-
- configure(*configure_args)
+ self.validate(spec)
+ # Handle compilation after spec validation
+ extra_args = []
+
+ # required, otherwise building its python bindings on ADIOS will fail
+ extra_args.append("CFLAGS=-fPIC")
+
+ # always build external MXML, even in ADIOS 1.10.0+
+ extra_args.append('--with-mxml=%s' % spec['mxml'].prefix)
+
+ if '+shared' in spec:
+ extra_args.append('--enable-shared')
+
+ if '+mpi' in spec:
+ extra_args.append('--with-mpi')
+ if '+infiniband' in spec:
+ extra_args.append('--with-infiniband')
+ else:
+ extra_args.append('--with-infiniband=no')
+
+ if '+fortran' in spec:
+ extra_args.append('--enable-fortran')
+ else:
+ extra_args.append('--disable-fortran')
+
+ if '+zlib' in spec:
+ extra_args.append('--with-zlib=%s' % spec['zlib'].prefix)
+ if '+szip' in spec:
+ extra_args.append('--with-szip=%s' % spec['szip'].prefix)
+ if '+hdf5' in spec:
+ extra_args.append('--with-phdf5=%s' % spec['hdf5'].prefix)
+
+ sh = which('sh')
+ sh('./autogen.sh')
+
+ configure("--prefix=%s" % prefix,
+ *extra_args)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/ant/package.py b/var/spack/repos/builtin/packages/ant/package.py
new file mode 100644
index 0000000000..81a0e089e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ant/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 Ant(Package):
+ """Apache Ant is a Java library and command-line tool whose mission is to
+ drive processes described in build files as targets and extension points
+ dependent upon each other
+ """
+
+ homepage = "http://ant.apache.org/"
+ url = "http://apache.claz.org/ant/source/apache-ant-1.9.7-src.tar.gz"
+
+ version('1.9.7', 'a2fd9458c76700b7be51ef12f07d4bb1')
+
+ depends_on('jdk')
+
+ def install(self, spec, prefix):
+ env['ANT_HOME'] = self.prefix
+ bash = which('bash')
+ bash('./build.sh', 'install')
diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py
index 891061c62f..804460ce14 100644
--- a/var/spack/repos/builtin/packages/antlr/package.py
+++ b/var/spack/repos/builtin/packages/antlr/package.py
@@ -26,6 +26,11 @@ from spack import *
class Antlr(Package):
+ """ANTLR (ANother Tool for Language Recognition) is a powerful parser
+ generator for reading, processing, executing, or translating structured
+ text or binary files. It's widely used to build languages, tools, and
+ frameworks. From a grammar, ANTLR generates a parser that can build and
+ walk parse trees."""
homepage = "http://www.antlr.org"
url = "https://github.com/antlr/antlr/tarball/v2.7.7"
diff --git a/var/spack/repos/builtin/packages/ape/package.py b/var/spack/repos/builtin/packages/ape/package.py
index b1647798b5..48e436804f 100644
--- a/var/spack/repos/builtin/packages/ape/package.py
+++ b/var/spack/repos/builtin/packages/ape/package.py
@@ -45,6 +45,13 @@ class Ape(Package):
'--with-libxc-prefix=%s' % spec['libxc'].prefix
])
+ # When preprocessor expands macros (i.e. CFLAGS) defined as quoted
+ # strings the result may be > 132 chars and is terminated.
+ # This will look to a compiler as an Unterminated character constant
+ # and produce Line truncated errors. To vercome this, add flags to
+ # let compiler know that the entire line is meaningful.
+ # TODO: For the lack of better approach, assume that clang is mixed
+ # with GNU fortran.
if spec.satisfies('%clang') or spec.satisfies('%gcc'):
args.extend([
'FCFLAGS=-O2 -ffree-line-length-none'
diff --git a/var/spack/repos/builtin/packages/applewmproto/package.py b/var/spack/repos/builtin/packages/applewmproto/package.py
new file mode 100644
index 0000000000..8d7e360bfb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/applewmproto/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Applewmproto(Package):
+ """Apple Rootless Window Management Extension.
+
+ This extension defines a protcol that allows X window managers
+ to better interact with the Mac OS X Aqua user interface when
+ running X11 in a rootless mode."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/applewmproto"
+ url = "https://www.x.org/archive/individual/proto/applewmproto-1.4.2.tar.gz"
+
+ version('1.4.2', 'ecc8a4424a893ce120f5652dba62e9e6')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/appres/package.py b/var/spack/repos/builtin/packages/appres/package.py
new file mode 100644
index 0000000000..47a9c5bb54
--- /dev/null
+++ b/var/spack/repos/builtin/packages/appres/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Appres(Package):
+ """The appres program prints the resources seen by an application (or
+ subhierarchy of an application) with the specified class and instance
+ names. It can be used to determine which resources a particular
+ program will load."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/appres"
+ url = "https://www.x.org/archive/individual/app/appres-1.0.4.tar.gz"
+
+ version('1.0.4', 'f82aabe6bbb8960781b63c6945bb361b')
+
+ depends_on('libx11')
+ depends_on('libxt')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py
index 4356f60aca..2336da4520 100644
--- a/var/spack/repos/builtin/packages/armadillo/package.py
+++ b/var/spack/repos/builtin/packages/armadillo/package.py
@@ -33,6 +33,7 @@ class Armadillo(Package):
homepage = "http://arma.sourceforge.net/"
url = "http://sourceforge.net/projects/arma/files/armadillo-7.200.1.tar.xz"
+ version('7.500.0', '7d316fdf3c3c7ea92b64704180ae315d')
version('7.200.2', 'b21585372d67a8876117fd515d8cf0a2')
version('7.200.1', 'ed86d6df0058979e107502e1fe3e469e')
@@ -46,18 +47,20 @@ class Armadillo(Package):
depends_on('hdf5', when='+hdf5')
def install(self, spec, prefix):
+ arpack = find_libraries(['libarpack'], root=spec[
+ 'arpack-ng'].prefix.lib, shared=True)
+ superlu = find_libraries(['libsuperlu'], root=spec[
+ 'superlu'].prefix, shared=False, recurse=True)
cmake_args = [
# ARPACK support
- '-DARPACK_LIBRARY={0}/libarpack.{1}'.format(
- spec['arpack-ng'].prefix.lib, dso_suffix),
+ '-DARPACK_LIBRARY={0}'.format(arpack.joined()),
# BLAS support
- '-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_shared_lib),
+ '-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_libs.joined()),
# LAPACK support
- '-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_shared_lib),
+ '-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_libs.joined()),
# SuperLU support
'-DSuperLU_INCLUDE_DIR={0}'.format(spec['superlu'].prefix.include),
- '-DSuperLU_LIBRARY={0}/libsuperlu.a'.format(
- spec['superlu'].prefix.lib64),
+ '-DSuperLU_LIBRARY={0}'.format(superlu.joined()),
# HDF5 support
'-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF')
]
diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py
index 728c2345f2..87ab2bbaac 100644
--- a/var/spack/repos/builtin/packages/arpack-ng/package.py
+++ b/var/spack/repos/builtin/packages/arpack-ng/package.py
@@ -26,8 +26,7 @@ from spack import *
class ArpackNg(Package):
- """
- ARPACK-NG is a collection of Fortran77 subroutines designed to solve large
+ """ARPACK-NG is a collection of Fortran77 subroutines designed to solve large
scale eigenvalue problems.
Important Features:
@@ -53,6 +52,7 @@ class ArpackNg(Package):
arpack-ng is replacing arpack almost everywhere.
"""
+
homepage = 'https://github.com/opencollab/arpack-ng'
url = 'https://github.com/opencollab/arpack-ng/archive/3.3.0.tar.gz'
@@ -88,17 +88,16 @@ class ArpackNg(Package):
options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
# Make sure we use Spack's blas/lapack:
+ lapack_libs = spec['lapack'].lapack_libs.joined(';')
+ blas_libs = spec['blas'].blas_libs.joined(';')
+
options.extend([
'-DLAPACK_FOUND=true',
- '-DLAPACK_INCLUDE_DIRS=%s' % spec['lapack'].prefix.include,
- '-DLAPACK_LIBRARIES=%s' % (
- spec['lapack'].lapack_shared_lib if '+shared' in spec else
- spec['lapack'].lapack_static_lib),
+ '-DLAPACK_INCLUDE_DIRS={0}'.format(spec['lapack'].prefix.include),
+ '-DLAPACK_LIBRARIES={0}'.format(lapack_libs),
'-DBLAS_FOUND=true',
- '-DBLAS_INCLUDE_DIRS=%s' % spec['blas'].prefix.include,
- '-DBLAS_LIBRARIES=%s' % (
- spec['blas'].blas_shared_lib if '+shared' in spec else
- spec['blas'].blas_static_lib)
+ '-DBLAS_INCLUDE_DIRS={0}'.format(spec['blas'].prefix.include),
+ '-DBLAS_LIBRARIES={0}'.format(blas_libs)
])
if '+mpi' in spec:
@@ -129,19 +128,12 @@ class ArpackNg(Package):
'F77=%s' % spec['mpi'].mpif77
])
- if '+shared' in spec:
- options.extend([
- '--with-blas=%s' % to_link_flags(
- spec['blas'].blas_shared_lib),
- '--with-lapack=%s' % to_link_flags(
- spec['lapack'].lapack_shared_lib)
- ])
- else:
- options.extend([
- '--with-blas=%s' % spec['blas'].blas_static_lib,
- '--with-lapack=%s' % spec['lapack'].lapack_static_lib,
- '--enable-shared=no'
- ])
+ options.extend([
+ '--with-blas={0}'.format(spec['blas'].blas_libs.ld_flags),
+ '--with-lapack={0}'.format(spec['lapack'].lapack_libs.ld_flags)
+ ])
+ if '+shared' not in spec:
+ options.append('--enable-shared=no')
bootstrap()
configure(*options)
diff --git a/var/spack/repos/builtin/packages/asciidoc/package.py b/var/spack/repos/builtin/packages/asciidoc/package.py
index be8db684f5..811d34afa8 100644
--- a/var/spack/repos/builtin/packages/asciidoc/package.py
+++ b/var/spack/repos/builtin/packages/asciidoc/package.py
@@ -26,8 +26,9 @@ from spack import *
class Asciidoc(Package):
- """ A presentable text document format for writing articles, UNIX man
+ """A presentable text document format for writing articles, UNIX man
pages and other small to medium sized documents."""
+
homepage = "http://asciidoc.org"
url = "http://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz"
diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py
index 815c184577..31e1efb591 100644
--- a/var/spack/repos/builtin/packages/astyle/package.py
+++ b/var/spack/repos/builtin/packages/astyle/package.py
@@ -25,28 +25,24 @@
from spack import *
-class Astyle(Package):
- """
- A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI,
+class Astyle(MakefilePackage):
+ """A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI,
Objective-C, C#, and Java Source Code.
"""
+
homepage = "http://astyle.sourceforge.net/"
- url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz"
+ url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz"
version('2.04', '30b1193a758b0909d06e7ee8dd9627f6')
- def install(self, spec, prefix):
+ parallel = False
- with working_dir('src'):
- # we need to edit the makefile in place to set compiler:
- make_file = join_path(self.stage.source_path,
- 'build', 'gcc', 'Makefile')
- filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, make_file)
+ def build_directory(self):
+ return join_path(self.stage.source_path, 'build', self.compiler.name)
- make('-f',
- make_file,
- parallel=False)
+ def edit(self, spec, prefix):
+ makefile = join_path(self.build_directory(), 'Makefile')
+ filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, makefile)
- mkdirp(self.prefix.bin)
- install(join_path(self.stage.source_path, 'src', 'bin', 'astyle'),
- self.prefix.bin)
+ def install_args(self):
+ return ['prefix={0}'.format(prefix)]
diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py
index d5b6933ec3..0a7d48774d 100644
--- a/var/spack/repos/builtin/packages/atk/package.py
+++ b/var/spack/repos/builtin/packages/atk/package.py
@@ -42,7 +42,7 @@ class Atk(Package):
def url_for_version(self, version):
"""Handle atk's version-based custom URLs."""
url = 'http://ftp.gnome.org/pub/gnome/sources/atk'
- return 'url+/%s/atk-%s.tar.xz' % (version.up_to(2), version)
+ return url + '/%s/atk-%s.tar.xz' % (version.up_to(2), version)
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py
index f9d5da6166..89b61b3ecb 100644
--- a/var/spack/repos/builtin/packages/atlas/package.py
+++ b/var/spack/repos/builtin/packages/atlas/package.py
@@ -37,6 +37,9 @@ class Atlas(Package):
"""
homepage = "http://math-atlas.sourceforge.net/"
+ version('3.10.3', 'd6ce4f16c2ad301837cfb3dade2f7cef',
+ url='https://sourceforge.net/projects/math-atlas/files/Stable/3.10.3/atlas3.10.3.tar.bz2')
+
version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da',
url='https://sourceforge.net/projects/math-atlas/files/Stable/3.10.2/atlas3.10.2.tar.bz2', preferred=True)
# not all packages (e.g. Trilinos@12.6.3) stopped using deprecated in 3.6.0
@@ -51,6 +54,7 @@ class Atlas(Package):
url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2')
variant('shared', default=True, description='Builds shared library')
+ variant('pthread', default=False, description='Use multithreaded libraries')
provides('blas')
provides('lapack')
@@ -107,18 +111,32 @@ class Atlas(Package):
make("install")
self.install_test()
- def setup_dependent_package(self, module, dspec):
+ @property
+ def blas_libs(self):
# libsatlas.[so,dylib,dll ] contains all serial APIs (serial lapack,
# serial BLAS), and all ATLAS symbols needed to support them. Whereas
# libtatlas.[so,dylib,dll ] is parallel (multithreaded) version.
- name = 'libsatlas.%s' % dso_suffix
- libdir = find_library_path(name,
- self.prefix.lib64,
- self.prefix.lib)
-
+ is_threaded = '+pthread' in self.spec
if '+shared' in self.spec:
- self.spec.blas_shared_lib = join_path(libdir, name)
- self.spec.lapack_shared_lib = self.spec.blas_shared_lib
+ to_find = ['libtatlas'] if is_threaded else ['libsatlas']
+ shared = True
+ else:
+ interfaces = [
+ 'libptcblas',
+ 'libptf77blas'
+ ] if is_threaded else [
+ 'libcblas',
+ 'libf77blas'
+ ]
+ to_find = ['liblapack'] + interfaces + ['libatlas']
+ shared = False
+ return find_libraries(
+ to_find, root=self.prefix, shared=shared, recurse=True
+ )
+
+ @property
+ def lapack_libs(self):
+ return self.blas_libs
def install_test(self):
source_file = join_path(os.path.dirname(self.module.__file__),
@@ -126,9 +144,8 @@ class Atlas(Package):
blessed_file = join_path(os.path.dirname(self.module.__file__),
'test_cblas_dgemm.output')
- include_flags = ["-I%s" % join_path(self.spec.prefix, "include")]
- link_flags = ["-L%s" % join_path(self.spec.prefix, "lib"),
- "-lsatlas"]
+ include_flags = ["-I%s" % self.spec.prefix.include]
+ link_flags = self.lapack_libs.ld_flags.split()
output = compile_c_and_execute(source_file, include_flags, link_flags)
compare_output_file(output, blessed_file)
diff --git a/var/spack/repos/builtin/packages/atompaw/package.py b/var/spack/repos/builtin/packages/atompaw/package.py
new file mode 100644
index 0000000000..17d0ef8209
--- /dev/null
+++ b/var/spack/repos/builtin/packages/atompaw/package.py
@@ -0,0 +1,63 @@
+##############################################################################
+# 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 Atompaw(Package):
+ """A Projector Augmented Wave (PAW) code for generating
+ atom-centered functions.
+
+ Official website: http://pwpaw.wfu.edu
+
+ User's guide: ~/doc/atompaw-usersguide.pdf
+ """
+ homepage = "http://users.wfu.edu/natalie/papers/pwpaw/man.html"
+ url = "http://users.wfu.edu/natalie/papers/pwpaw/atompaw-4.0.0.13.tar.gz"
+
+ version('4.0.0.13', 'af4a042380356f6780183c4b325aad1d')
+ version('3.1.0.3', 'c996a277e11707887177f47bbb229aa6')
+
+ depends_on("lapack")
+ depends_on("blas")
+
+ # pin libxc version
+ depends_on("libxc@2.2.1")
+
+ def install(self, spec, prefix):
+ options = ['--prefix=%s' % prefix]
+
+ linalg = spec['lapack'].lapack_libs + spec['blas'].blas_libs
+ options.extend([
+ "--with-linalg-libs=%s" % linalg.ld_flags,
+ "--enable-libxc",
+ "--with-libxc-incs=-I%s" % spec["libxc"].prefix.include,
+ "--with-libxc-libs=-L%s -lxcf90 -lxc" % spec["libxc"].prefix.lib,
+ ])
+
+ configure(*options)
+ make(parallel=False) # parallel build fails
+ make("check")
+ make("install")
diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py
index 2de1c390db..b6aba8c03f 100644
--- a/var/spack/repos/builtin/packages/autoconf/package.py
+++ b/var/spack/repos/builtin/packages/autoconf/package.py
@@ -25,15 +25,15 @@
from spack import *
-class Autoconf(Package):
- """
- Autoconf -- system configuration part of autotools
- """
+class Autoconf(AutotoolsPackage):
+ """Autoconf -- system configuration part of autotools"""
homepage = 'https://www.gnu.org/software/autoconf/'
url = 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz'
version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b')
version('2.62', '6c1f3b3734999035d77da5024aab4fbd')
+ version('2.59', 'd4d45eaa1769d45e59dcb131a4af17a0')
+ version('2.13', '9de56d4a161a723228220b0f425dc711')
depends_on('m4', type='build')
@@ -52,8 +52,3 @@ class Autoconf(Package):
'ifnames']
for name in executables:
setattr(module, name, self._make_executable(name))
-
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/bamtools/package.py b/var/spack/repos/builtin/packages/bamtools/package.py
new file mode 100644
index 0000000000..7bb1985003
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bamtools/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Bamtools(Package):
+ """C++ API & command-line toolkit for working with BAM data."""
+
+ homepage = "https://github.com/pezmaster31/bamtools"
+ url = "https://github.com/pezmaster31/bamtools/archive/v2.4.0.tar.gz"
+
+ version('2.4.0', '6139d00c1b1fe88fe15d094d8a74d8b9')
+ version('2.3.0', 'd327df4ba037d6eb8beef65d7da75ebc')
+ version('2.2.3', '6eccd3e45e4ba12a68daa3298998e76d')
+
+ depends_on('cmake', type='build')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('..', *std_cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/bash-completion/package.py b/var/spack/repos/builtin/packages/bash-completion/package.py
new file mode 100644
index 0000000000..666a1bef13
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bash-completion/package.py
@@ -0,0 +1,64 @@
+##############################################################################
+# 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 BashCompletion(Package):
+ """Programmable completion functions for bash."""
+ homepage = "https://github.com/scop/bash-completion"
+ url = "https://github.com/scop/bash-completion/archive/2.3.tar.gz"
+
+ version('2.3', '67e50f5f3c804350b43f2b664c33dde811d24292')
+ version('develop', git='https://github.com/scop/bash-completion.git')
+
+ # Build dependencies
+ depends_on('automake', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('libtool', type='build')
+
+ # Other dependencies
+ depends_on('bash@4.1:', type='run')
+
+ def install(self, spec, prefix):
+ make_args = ['--prefix=%s' % prefix]
+
+ autoreconf('-i')
+ configure(*make_args)
+ make()
+ # make("check") # optional, requires dejagnu and tcllib
+ make("install",
+ parallel=False)
+
+ # Guidelines for individual user as provided by the author at
+ # https://github.com/scop/bash-completion
+ print('=====================================================')
+ print('Bash completion has been installed. To use it, please')
+ print('include the following lines in your ~/.bash_profile :')
+ print('')
+ print('# Use bash-completion, if available')
+ print('[[ $PS1 && -f %s/share/bash-completion/bash_completion ]] && \ ' % prefix) # NOQA: ignore=E501
+ print(' . %s/share/bash-completion/bash_completion' % prefix)
+ print('')
+ print('=====================================================')
diff --git a/var/spack/repos/builtin/packages/bazel/cc_configure.patch b/var/spack/repos/builtin/packages/bazel/cc_configure.patch
new file mode 100644
index 0000000000..3e108c3b5e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bazel/cc_configure.patch
@@ -0,0 +1,28 @@
+--- bazel-0.3.1/tools/cpp/cc_configure.bzl 2016-10-13 14:00:32.118358387 +0200
++++ bazel-0.3.1/tools/cpp/cc_configure.bzl 2016-10-13 13:52:45.342610147 +0200
+@@ -173,8 +173,23 @@
+ else:
+ inc_dirs = result.stderr[index1 + 1:index2].strip()
+
+- return [repository_ctx.path(_cxx_inc_convert(p))
+- for p in inc_dirs.split("\n")]
++ default_inc_directories = [
++ repository_ctx.path(_cxx_inc_convert(p))
++ for p in inc_dirs.split("\n")
++ ]
++
++ env = repository_ctx.os.environ
++ if "SPACK_DEPENDENCIES" in env:
++ for dep in env["SPACK_DEPENDENCIES"].split(":"):
++ path = dep + "/include"
++ # path = repository_ctx.os.path.join(dep, "include")
++ # if not repository_ctx.os.path.exists(path):
++ # continue
++ default_inc_directories.append(
++ repository_ctx.path(_cxx_inc_convert(path))
++ )
++
++ return default_inc_directories
+
+ def _add_option_if_supported(repository_ctx, cc, option):
+ """Checks that `option` is supported by the C compiler."""
diff --git a/var/spack/repos/builtin/packages/bazel/fix_env_handling.patch b/var/spack/repos/builtin/packages/bazel/fix_env_handling.patch
new file mode 100644
index 0000000000..9be9f97d69
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bazel/fix_env_handling.patch
@@ -0,0 +1,119 @@
+diff -pu bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java
+--- bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java 2016-09-14 11:56:01.565756979 +0200
++++ bazel-0.3.1/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java 2016-09-14 12:04:13.292839801 +0200
+@@ -92,5 +92,115 @@ public class BazelConfiguration extends
+ if (tmpdir != null) {
+ builder.put("TMPDIR", tmpdir);
+ }
++
++ String spack_prefix = System.getenv("SPACK_PREFIX");
++ if (spack_prefix != null) {
++ builder.put("SPACK_PREFIX", spack_prefix);
++ }
++
++ String spack_env_path = System.getenv("SPACK_ENV_PATH");
++ if (spack_env_path != null) {
++ builder.put("SPACK_ENV_PATH", spack_env_path);
++ }
++
++ String spack_debug_log_dir = System.getenv("SPACK_DEBUG_LOG_DIR");
++ if (spack_debug_log_dir != null) {
++ builder.put("SPACK_DEBUG_LOG_DIR", spack_debug_log_dir);
++ }
++
++ String spack_compiler_spec = System.getenv("SPACK_COMPILER_SPEC");
++ if (spack_compiler_spec != null) {
++ builder.put("SPACK_COMPILER_SPEC", spack_compiler_spec);
++ }
++
++ String spack_cc_rpath_arg = System.getenv("SPACK_CC_RPATH_ARG");
++ if (spack_cc_rpath_arg != null) {
++ builder.put("SPACK_CC_RPATH_ARG", spack_cc_rpath_arg);
++ }
++
++ String spack_cxx_rpath_arg = System.getenv("SPACK_CXX_RPATH_ARG");
++ if (spack_cxx_rpath_arg != null) {
++ builder.put("SPACK_CXX_RPATH_ARG", spack_cxx_rpath_arg);
++ }
++
++ String spack_f77_rpath_arg = System.getenv("SPACK_F77_RPATH_ARG");
++ if (spack_f77_rpath_arg != null) {
++ builder.put("SPACK_F77_RPATH_ARG", spack_f77_rpath_arg);
++ }
++
++ String spack_fc_rpath_arg = System.getenv("SPACK_FC_RPATH_ARG");
++ if (spack_fc_rpath_arg != null) {
++ builder.put("SPACK_FC_RPATH_ARG", spack_fc_rpath_arg);
++ }
++
++ String spack_short_spec = System.getenv("SPACK_SHORT_SPEC");
++ if (spack_short_spec != null) {
++ builder.put("SPACK_SHORT_SPEC", spack_short_spec);
++ }
++
++ String spack_cc = System.getenv("SPACK_CC");
++ if (spack_cc != null) {
++ builder.put("SPACK_CC", spack_cc);
++ }
++
++ String spack_cxx = System.getenv("SPACK_CXX");
++ if (spack_cxx != null) {
++ builder.put("SPACK_CXX", spack_cxx);
++ }
++
++ String spack_f77 = System.getenv("SPACK_F77");
++ if (spack_f77 != null) {
++ builder.put("SPACK_F77", spack_f77);
++ }
++
++ String spack_fc = System.getenv("SPACK_FC");
++ if (spack_fc != null) {
++ builder.put("SPACK_FC", spack_fc);
++ }
++
++ String spack_cflags = System.getenv("SPACK_CFLAGS");
++ if (spack_cflags != null) {
++ builder.put("SPACK_CFLAGS", spack_cflags);
++ }
++
++ String spack_cxxflags = System.getenv("SPACK_CXXFLAGS");
++ if (spack_cxxflags != null) {
++ builder.put("SPACK_CXXFLAGS", spack_cxxflags);
++ }
++
++ String spack_fcflags = System.getenv("SPACK_FCFLAGS");
++ if (spack_fcflags != null) {
++ builder.put("SPACK_FCFLAGS", spack_fcflags);
++ }
++
++ String spack_fflags = System.getenv("SPACK_FFLAGS");
++ if (spack_fflags != null) {
++ builder.put("SPACK_FFLAGS", spack_fflags);
++ }
++
++ String spack_ldflags = System.getenv("SPACK_LDFLAGS");
++ if (spack_ldflags != null) {
++ builder.put("SPACK_LDFLAGS", spack_ldflags);
++ }
++
++ String spack_ldlibs = System.getenv("SPACK_LDLIBS");
++ if (spack_ldlibs != null) {
++ builder.put("SPACK_LDLIBS", spack_ldlibs);
++ }
++
++ String spack_debug = System.getenv("SPACK_DEBUG");
++ if (spack_debug != null) {
++ builder.put("SPACK_DEBUG", spack_debug);
++ }
++
++ String spack_test_command = System.getenv("SPACK_TEST_COMMAND");
++ if (spack_test_command != null) {
++ builder.put("SPACK_TEST_COMMAND", spack_test_command);
++ }
++
++ String spack_dependencies = System.getenv("SPACK_DEPENDENCIES");
++ if (spack_dependencies != null) {
++ builder.put("SPACK_DEPENDENCIES", spack_dependencies);
++ }
+ }
+ }
diff --git a/var/spack/repos/builtin/packages/bazel/link.patch b/var/spack/repos/builtin/packages/bazel/link.patch
new file mode 100644
index 0000000000..69d100f62c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bazel/link.patch
@@ -0,0 +1,133 @@
+--- bazel-0.3.1/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java 2016-07-29 10:22:16.000000000 +0200
++++ bazel-0.3.1/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java 2016-10-13 15:21:35.036617890 +0200
+@@ -214,6 +214,130 @@
+ .getParentDirectory()
+ .getPathString());
+ }
++
++ String path = System.getenv("PATH");
++ result.put("PATH", path == null ? "/bin:/usr/bin" : path);
++
++ String ldLibraryPath = System.getenv("LD_LIBRARY_PATH");
++ if (ldLibraryPath != null) {
++ result.put("LD_LIBRARY_PATH", ldLibraryPath);
++ }
++
++ String tmpdir = System.getenv("TMPDIR");
++ if (tmpdir != null) {
++ result.put("TMPDIR", tmpdir);
++ }
++
++ String spack_prefix = System.getenv("SPACK_PREFIX");
++ if (spack_prefix != null) {
++ result.put("SPACK_PREFIX", spack_prefix);
++ }
++
++ String spack_env_path = System.getenv("SPACK_ENV_PATH");
++ if (spack_env_path != null) {
++ result.put("SPACK_ENV_PATH", spack_env_path);
++ }
++
++ String spack_debug_log_dir = System.getenv("SPACK_DEBUG_LOG_DIR");
++ if (spack_debug_log_dir != null) {
++ result.put("SPACK_DEBUG_LOG_DIR", spack_debug_log_dir);
++ }
++
++ String spack_compiler_spec = System.getenv("SPACK_COMPILER_SPEC");
++ if (spack_compiler_spec != null) {
++ result.put("SPACK_COMPILER_SPEC", spack_compiler_spec);
++ }
++
++ String spack_cc_rpath_arg = System.getenv("SPACK_CC_RPATH_ARG");
++ if (spack_cc_rpath_arg != null) {
++ result.put("SPACK_CC_RPATH_ARG", spack_cc_rpath_arg);
++ }
++
++ String spack_cxx_rpath_arg = System.getenv("SPACK_CXX_RPATH_ARG");
++ if (spack_cxx_rpath_arg != null) {
++ result.put("SPACK_CXX_RPATH_ARG", spack_cxx_rpath_arg);
++ }
++
++ String spack_f77_rpath_arg = System.getenv("SPACK_F77_RPATH_ARG");
++ if (spack_f77_rpath_arg != null) {
++ result.put("SPACK_F77_RPATH_ARG", spack_f77_rpath_arg);
++ }
++
++ String spack_fc_rpath_arg = System.getenv("SPACK_FC_RPATH_ARG");
++ if (spack_fc_rpath_arg != null) {
++ result.put("SPACK_FC_RPATH_ARG", spack_fc_rpath_arg);
++ }
++
++ String spack_short_spec = System.getenv("SPACK_SHORT_SPEC");
++ if (spack_short_spec != null) {
++ result.put("SPACK_SHORT_SPEC", spack_short_spec);
++ }
++
++ String spack_cc = System.getenv("SPACK_CC");
++ if (spack_cc != null) {
++ result.put("SPACK_CC", spack_cc);
++ }
++
++ String spack_cxx = System.getenv("SPACK_CXX");
++ if (spack_cxx != null) {
++ result.put("SPACK_CXX", spack_cxx);
++ }
++
++ String spack_f77 = System.getenv("SPACK_F77");
++ if (spack_f77 != null) {
++ result.put("SPACK_F77", spack_f77);
++ }
++
++ String spack_fc = System.getenv("SPACK_FC");
++ if (spack_fc != null) {
++ result.put("SPACK_FC", spack_fc);
++ }
++
++ String spack_cflags = System.getenv("SPACK_CFLAGS");
++ if (spack_cflags != null) {
++ result.put("SPACK_CFLAGS", spack_cflags);
++ }
++
++ String spack_cxxflags = System.getenv("SPACK_CXXFLAGS");
++ if (spack_cxxflags != null) {
++ result.put("SPACK_CXXFLAGS", spack_cxxflags);
++ }
++
++ String spack_fcflags = System.getenv("SPACK_FCFLAGS");
++ if (spack_fcflags != null) {
++ result.put("SPACK_FCFLAGS", spack_fcflags);
++ }
++
++ String spack_fflags = System.getenv("SPACK_FFLAGS");
++ if (spack_fflags != null) {
++ result.put("SPACK_FFLAGS", spack_fflags);
++ }
++
++ String spack_ldflags = System.getenv("SPACK_LDFLAGS");
++ if (spack_ldflags != null) {
++ result.put("SPACK_LDFLAGS", spack_ldflags);
++ }
++
++ String spack_ldlibs = System.getenv("SPACK_LDLIBS");
++ if (spack_ldlibs != null) {
++ result.put("SPACK_LDLIBS", spack_ldlibs);
++ }
++
++ String spack_debug = System.getenv("SPACK_DEBUG");
++ if (spack_debug != null) {
++ result.put("SPACK_DEBUG", spack_debug);
++ }
++
++ String spack_test_command = System.getenv("SPACK_TEST_COMMAND");
++ if (spack_test_command != null) {
++ result.put("SPACK_TEST_COMMAND", spack_test_command);
++ }
++
++ String spack_dependencies = System.getenv("SPACK_DEPENDENCIES");
++ if (spack_dependencies != null) {
++ result.put("SPACK_DEPENDENCIES", spack_dependencies);
++ }
++
+ return result.build();
+ }
+
diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py
new file mode 100644
index 0000000000..94ac73cbd2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bazel/package.py
@@ -0,0 +1,89 @@
+##############################################################################
+# 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 *
+from multiprocessing import cpu_count
+from spack.util.environment import env_flag
+from spack.build_environment import SPACK_NO_PARALLEL_MAKE
+
+
+class Bazel(Package):
+ """Bazel is Google's own build tool"""
+
+ homepage = "https://www.bazel.io"
+ url = "https://github.com/bazelbuild/bazel/archive/0.3.1.tar.gz"
+
+ version('0.3.1', '5c959467484a7fc7dd2e5e4a1e8e866b')
+ version('0.3.0', '33a2cb457d28e1bee9282134769b9283')
+ version('0.2.3', '393a491d690e43caaba88005efe6da91')
+ version('0.2.2b', '75081804f073cbd194da1a07b16cba5f')
+ version('0.2.2', '644bc4ea7f429d835e74f255dc1054e6')
+
+ depends_on('jdk@8:')
+ patch('fix_env_handling.patch')
+ patch('link.patch')
+ patch('cc_configure.patch')
+
+ def install(self, spec, prefix):
+ bash = which('bash')
+ bash('-c', './compile.sh')
+ mkdir(prefix.bin)
+ install('output/bazel', prefix.bin)
+
+ def setup_dependent_package(self, module, dep_spec):
+ class BazelExecutable(Executable):
+ """Special callable executable object for bazel so the user can
+ specify parallel or not on a per-invocation basis. Using
+ 'parallel' as a kwarg will override whatever the package's
+ global setting is, so you can either default to true or false
+ and override particular calls.
+
+ Note that if the SPACK_NO_PARALLEL_MAKE env var is set it
+ overrides everything.
+ """
+
+ def __init__(self, name, command, jobs):
+ super(BazelExecutable, self).__init__(name)
+ self.bazel_command = command
+ self.jobs = jobs
+
+ def __call__(self, *args, **kwargs):
+ disable = env_flag(SPACK_NO_PARALLEL_MAKE)
+ parallel = ((not disable) and
+ kwargs.get('parallel', self.jobs > 1))
+
+ jobs = "--jobs=1"
+ if parallel:
+ jobs = "--jobs=%d" % self.jobs
+
+ args = (self.bazel_command,) + (jobs,) + args
+
+ return super(BazelExecutable, self).__call__(*args, **kwargs)
+
+ jobs = cpu_count()
+ if not dep_spec.package.parallel:
+ jobs = 1
+ elif dep_spec.package.make_jobs:
+ jobs = dep_spec.package.make_jobs
+ module.bazel = BazelExecutable('bazel', 'build', jobs)
diff --git a/var/spack/repos/builtin/packages/bdftopcf/package.py b/var/spack/repos/builtin/packages/bdftopcf/package.py
new file mode 100644
index 0000000000..095f0c1bd4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bdftopcf/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Bdftopcf(Package):
+ """bdftopcf is a font compiler for the X server and font server. Fonts
+ in Portable Compiled Format can be read by any architecture, although
+ the file is structured to allow one particular architecture to read
+ them directly without reformatting. This allows fast reading on the
+ appropriate machine, but the files are still portable (but read more
+ slowly) on other machines."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/bdftopcf"
+ url = "https://www.x.org/archive/individual/app/bdftopcf-1.0.5.tar.gz"
+
+ version('1.0.5', '456416d33e0d41a96b5a3725d99e1be3')
+
+ depends_on('libxfont')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/bedtools2/package.py b/var/spack/repos/builtin/packages/bedtools2/package.py
new file mode 100644
index 0000000000..46f3185154
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bedtools2/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 Bedtools2(Package):
+ """Collectively, the bedtools utilities are a swiss-army knife of
+ tools for a wide-range of genomics analysis tasks. The most
+ widely-used tools enable genome arithmetic: that is, set theory
+ on the genome."""
+
+ homepage = "https://github.com/arq5x/bedtools2"
+ url = "https://github.com/arq5x/bedtools2/archive/v2.26.0.tar.gz"
+
+ version('2.26.0', '52227e7efa6627f0f95d7d734973233d')
+ version('2.25.0', '534fb4a7bf0d0c3f05be52a0160d8e3d')
+
+ depends_on('zlib')
+
+ def install(self, spec, prefix):
+ make("prefix=%s" % prefix, "install")
diff --git a/var/spack/repos/builtin/packages/beforelight/package.py b/var/spack/repos/builtin/packages/beforelight/package.py
new file mode 100644
index 0000000000..37a91f5614
--- /dev/null
+++ b/var/spack/repos/builtin/packages/beforelight/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Beforelight(Package):
+ """The beforelight program is a sample implementation of a screen saver
+ for X servers supporting the MIT-SCREEN-SAVER extension. It is only
+ recommended for use as a code sample, as it does not include features
+ such as screen locking or configurability."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/beforelight"
+ url = "https://www.x.org/archive/individual/app/beforelight-1.0.5.tar.gz"
+
+ version('1.0.5', 'f0433eb6df647f36bbb5b38fb2beb22a')
+
+ depends_on('libx11')
+ depends_on('libxscrnsaver')
+ depends_on('libxt')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/bigreqsproto/package.py b/var/spack/repos/builtin/packages/bigreqsproto/package.py
new file mode 100644
index 0000000000..61fd9c5121
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bigreqsproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Bigreqsproto(Package):
+ """Big Requests Extension.
+
+ This extension defines a protocol to enable the use of requests
+ that exceed 262140 bytes in length."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/bigreqsproto"
+ url = "https://www.x.org/archive/individual/proto/bigreqsproto-1.1.2.tar.gz"
+
+ version('1.1.2', '9b83369ac7a5eb2bf54c8f34db043a0e')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index e329e6fd7a..bf49ca9405 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -31,9 +31,9 @@ class Binutils(Package):
homepage = "http://www.gnu.org/software/binutils/"
url = "https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
- # 2.26 is incompatible with py-pillow build for some reason.
+ version('2.27', '2869c9bf3e60ee97c74ac2a6bf4e9d68')
version('2.26', '64146a0faa3b411ba774f47d41de239f')
- version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66', preferred=True)
+ version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66')
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b')
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
diff --git a/var/spack/repos/builtin/packages/bitmap/package.py b/var/spack/repos/builtin/packages/bitmap/package.py
new file mode 100644
index 0000000000..55fdacefd5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bitmap/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Bitmap(Package):
+ """bitmap, bmtoa, atobm - X bitmap (XBM) editor and converter utilities."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/bitmap"
+ url = "https://www.x.org/archive/individual/app/bitmap-1.0.8.tar.gz"
+
+ version('1.0.8', '0ca600041bb0836ae7c9f5db5ce09091')
+
+ depends_on('libx11')
+ depends_on('libxmu')
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt')
+
+ depends_on('xbitmaps', type='build')
+ depends_on('xproto@7.0.25:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/bliss/Makefile.spack.patch b/var/spack/repos/builtin/packages/bliss/Makefile.spack.patch
new file mode 100644
index 0000000000..4f4441bbe9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bliss/Makefile.spack.patch
@@ -0,0 +1,62 @@
+--- old/Makefile.spack
++++ new/Makefile.spack
+@@ -0,0 +1,59 @@
++# Set PREFIX to the install location for both building and installing
++# Set GMP_PREFIX to the location where GMP is installed
++
++SRCS = \
++ bliss_C.cc \
++ defs.cc \
++ graph.cc \
++ heap.cc \
++ orbit.cc \
++ partition.cc \
++ timer.cc \
++ uintseqhash.cc \
++ utils.cc
++
++all: libbliss.la bliss libbliss_gmp.la bliss_gmp
++
++libbliss.la: $(SRCS:%.cc=%.lo)
++ libtool --mode=link --tag=CXX c++ -g -O3 \
++ -rpath $(PREFIX)/lib -o $@ $^
++libbliss_gmp.la: $(SRCS:%.cc=%.gmp.lo)
++ libtool --mode=link --tag=CXX c++ -g -O3 \
++ -rpath $(PREFIX)/lib -o $@ $^ -L$(GMP_PREFIX)/lib -lgmp
++
++bliss: bliss.lo libbliss.la
++ libtool --mode=link --tag=CXX c++ -g -O3 -o $@ $^
++
++bliss_gmp: bliss.gmp.lo libbliss_gmp.la
++ libtool --mode=link --tag=CXX c++ -g -O3 -o $@ $^
++
++%.lo: %.cc
++ libtool --mode=compile --tag=CXX c++ -g -O3 -o $@ -c $*.cc
++%.gmp.lo: %.cc
++ libtool --mode=compile --tag=CXX c++ -g -O3 -o $@ \
++ -c -DBLISS_USE_GMP $*.cc
++
++install:
++ mkdir -p $(PREFIX)/bin
++ mkdir -p $(PREFIX)/include/bliss
++ mkdir -p $(PREFIX)/lib
++ libtool --mode=install cp bliss $(PREFIX)/bin/bliss
++ libtool --mode=install cp bliss_gmp $(PREFIX)/bin/bliss_gmp
++ libtool --mode=install cp bignum.hh $(PREFIX)/include/bliss/bignum.hh
++ libtool --mode=install cp bliss_C.h $(PREFIX)/include/bliss/bliss_C.h
++ libtool --mode=install cp defs.hh $(PREFIX)/include/bliss/defs.hh
++ libtool --mode=install cp graph.hh $(PREFIX)/include/bliss/graph.hh
++ libtool --mode=install cp heap.hh $(PREFIX)/include/bliss/heap.hh
++ libtool --mode=install cp kqueue.hh $(PREFIX)/include/bliss/kqueue.hh
++ libtool --mode=install cp kstack.hh $(PREFIX)/include/bliss/kstack.hh
++ libtool --mode=install cp orbit.hh $(PREFIX)/include/bliss/orbit.hh
++ libtool --mode=install cp partition.hh \
++ $(PREFIX)/include/bliss/partition.hh
++ libtool --mode=install cp timer.hh $(PREFIX)/include/bliss/timer.hh
++ libtool --mode=install cp uintseqhash.hh \
++ $(PREFIX)/include/bliss/uintseqhash.hh
++ libtool --mode=install cp utils.hh $(PREFIX)/include/bliss/utils.hh
++ libtool --mode=install cp libbliss.la $(PREFIX)/lib/libbliss.la
++ libtool --mode=install cp libbliss_gmp.la $(PREFIX)/lib/libbliss_gmp.la
++
++.PHONY: all install
diff --git a/var/spack/repos/builtin/packages/bliss/package.py b/var/spack/repos/builtin/packages/bliss/package.py
new file mode 100644
index 0000000000..a81a806807
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bliss/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Bliss(Package):
+ """bliss: A Tool for Computing Automorphism Groups and Canonical
+ Labelings of Graphs"""
+
+ homepage = "http://www.tcs.hut.fi/Software/bliss/"
+ url = "http://www.tcs.hut.fi/Software/bliss/bliss-0.73.zip"
+
+ version('0.73', '72f2e310786923b5c398ba0fc40b42ce')
+
+ # Note: Bliss can also be built without gmp, but we don't support this yet
+
+ depends_on("gmp")
+ depends_on("libtool", type='build')
+
+ patch("Makefile.spack.patch")
+
+ def install(self, spec, prefix):
+ # The Makefile isn't portable; use our own instead
+ makeargs = ["-f", "Makefile.spack",
+ "PREFIX=%s" % prefix, "GMP_PREFIX=%s" % spec["gmp"].prefix]
+ make(*makeargs)
+ make("install", *makeargs)
diff --git a/var/spack/repos/builtin/packages/blitz/package.py b/var/spack/repos/builtin/packages/blitz/package.py
index c92e49a732..16ad3bc2ab 100644
--- a/var/spack/repos/builtin/packages/blitz/package.py
+++ b/var/spack/repos/builtin/packages/blitz/package.py
@@ -25,16 +25,9 @@
from spack import *
-class Blitz(Package):
+class Blitz(AutotoolsPackage):
"""N-dimensional arrays for C++"""
homepage = "http://github.com/blitzpp/blitz"
- url = "https://github.com/blitzpp/blitz/tarball/1.0.0"
+ url = "https://github.com/blitzpp/blitz/tarball/1.0.0"
version('1.0.0', '9f040b9827fe22228a892603671a77af')
-
- # No dependencies
-
- def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 690a05a150..309184101b 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -23,9 +23,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import spack
import sys
import os
+from glob import glob
class Boost(Package):
@@ -42,6 +42,7 @@ class Boost(Package):
list_url = "http://sourceforge.net/projects/boost/files/boost/"
list_depth = 2
+ version('1.62.0', '5fb94629535c19e48703bdb2b2e9490f')
version('1.61.0', '6095876341956f65f9d35939ccea1a9f')
version('1.60.0', '65a840e1a0b13a558ff19eeb2c4f0cbe')
version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87')
@@ -110,13 +111,16 @@ class Boost(Package):
description="Additionally build shared libraries")
variant('multithreaded', default=True,
description="Build multi-threaded versions of libraries")
- variant('singlethreaded', default=True,
+ variant('singlethreaded', default=False,
description="Build single-threaded versions of libraries")
- variant('icu_support', default=False,
- description="Include ICU support (for regex/locale libraries)")
- variant('graph', default=False, description="Build the Boost Graph library")
-
- depends_on('icu', when='+icu_support')
+ variant('icu', default=False,
+ description="Build with Unicode and ICU suport")
+ variant('graph', default=False,
+ description="Build the Boost Graph library")
+ variant('taggedlayout', default=False,
+ description="Augment library names with build options")
+
+ depends_on('icu4c', when='+icu')
depends_on('python', when='+python')
depends_on('mpi', when='+mpi')
depends_on('bzip2', when='+iostreams')
@@ -143,6 +147,8 @@ class Boost(Package):
'icpc': 'intel',
'clang++': 'clang'}
+ if spec.satisfies('@1.47:'):
+ toolsets['icpc'] += '-linux'
for cc, toolset in toolsets.iteritems():
if cc in self.compiler.cxx_names:
return toolset
@@ -150,6 +156,26 @@ class Boost(Package):
# fallback to gcc if no toolset found
return 'gcc'
+ def bjam_python_line(self, spec):
+ from os.path import dirname, splitext
+ pydir = 'python%s.%s*' % spec['python'].version.version[:2]
+ incs = join_path(spec['python'].prefix.include, pydir, "pyconfig.h")
+ incs = glob(incs)
+ incs = " ".join([dirname(u) for u in incs])
+
+ pylib = 'libpython%s.%s*' % spec['python'].version.version[:2]
+ all_libs = join_path(spec['python'].prefix.lib, pylib)
+ libs = [u for u in all_libs if splitext(u)[1] == dso_suffix]
+ if len(libs) == 0:
+ libs = [u for u in all_libs if splitext(u)[1] == '.a']
+
+ libs = " ".join(libs)
+ return 'using python : %s : %s : %s : %s ;\n' % (
+ spec['python'].version.up_to(2),
+ join_path(spec['python'].prefix.bin, 'python'),
+ incs, libs
+ )
+
def determine_bootstrap_options(self, spec, withLibs, options):
boostToolsetId = self.determine_toolset(spec)
options.append('--with-toolset=%s' % boostToolsetId)
@@ -160,17 +186,22 @@ class Boost(Package):
join_path(spec['python'].prefix.bin, 'python'))
with open('user-config.jam', 'w') as f:
- compiler_wrapper = join_path(spack.build_env_path, 'c++')
- f.write("using {0} : : {1} ;\n".format(boostToolsetId,
- compiler_wrapper))
+ # Boost may end up using gcc even though clang+gfortran is set in
+ # compilers.yaml. Make sure this does not happen:
+ if not spec.satisfies('%intel'):
+ # using intel-linux : : spack_cxx in user-config.jam leads to
+ # error: at project-config.jam:12
+ # error: duplicate initialization of intel-linux with the following parameters: # noqa
+ # error: version = <unspecified>
+ # error: previous initialization at ./user-config.jam:1
+ f.write("using {0} : : {1} ;\n".format(boostToolsetId,
+ spack_cxx))
if '+mpi' in spec:
f.write('using mpi : %s ;\n' %
join_path(spec['mpi'].prefix.bin, 'mpicxx'))
if '+python' in spec:
- f.write('using python : %s : %s ;\n' %
- (spec['python'].version,
- join_path(spec['python'].prefix.bin, 'python')))
+ f.write(self.bjam_python_line(spec))
def determine_b2_options(self, spec, options):
if '+debug' in spec:
@@ -198,16 +229,35 @@ class Boost(Package):
if '+singlethreaded' in spec:
threadingOpts.append('single')
if not threadingOpts:
- raise RuntimeError("""At least one of {singlethreaded,
- multithreaded} must be enabled""")
+ raise RuntimeError("At least one of {singlethreaded, " +
+ "multithreaded} must be enabled")
+
+ if '+taggedlayout' in spec:
+ layout = 'tagged'
+ else:
+ if len(threadingOpts) > 1:
+ raise RuntimeError("Cannot build both single and " +
+ "multi-threaded targets with system layout")
+ layout = 'system'
options.extend([
- 'toolset=%s' % self.determine_toolset(spec),
'link=%s' % ','.join(linkTypes),
- '--layout=tagged'])
+ '--layout=%s' % layout
+ ])
+
+ if not spec.satisfies('%intel'):
+ options.extend([
+ 'toolset=%s' % self.determine_toolset(spec)
+ ])
return threadingOpts
+ def add_buildopt_symlinks(self, prefix):
+ with working_dir(prefix.lib):
+ for lib in os.listdir(os.curdir):
+ prefix, remainder = lib.split('.', 1)
+ symlink(lib, '%s-mt.%s' % (prefix, remainder))
+
def install(self, spec, prefix):
# On Darwin, Boost expects the Darwin libtool. However, one of the
# dependencies may have pulled in Spack's GNU libtool, and these two
@@ -266,11 +316,16 @@ class Boost(Package):
threadingOpts = self.determine_b2_options(spec, b2_options)
+ b2('--clean')
+
# In theory it could be done on one call but it fails on
# Boost.MPI if the threading options are not separated.
for threadingOpt in threadingOpts:
b2('install', 'threading=%s' % threadingOpt, *b2_options)
+ if '+multithreaded' in spec and '~taggedlayout' in spec:
+ self.add_buildopt_symlinks(prefix)
+
# The shared libraries are not installed correctly
# on Darwin; correct this
if (sys.platform == 'darwin') and ('+shared' in spec):
diff --git a/var/spack/repos/builtin/packages/bpp-core/package.py b/var/spack/repos/builtin/packages/bpp-core/package.py
index 40360a03b3..f716a2ee05 100644
--- a/var/spack/repos/builtin/packages/bpp-core/package.py
+++ b/var/spack/repos/builtin/packages/bpp-core/package.py
@@ -33,7 +33,7 @@ class BppCore(Package):
version('2.2.0', '5789ed2ae8687d13664140cd77203477')
- depends_on('cmake')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake('-DBUILD_TESTING=FALSE', '.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/bpp-phyl/package.py b/var/spack/repos/builtin/packages/bpp-phyl/package.py
index 62db8d5545..4ff77f1540 100644
--- a/var/spack/repos/builtin/packages/bpp-phyl/package.py
+++ b/var/spack/repos/builtin/packages/bpp-phyl/package.py
@@ -33,7 +33,7 @@ class BppPhyl(Package):
version('2.2.0', '5c40667ec0bf37e0ecaba321be932770')
- depends_on('cmake')
+ depends_on('cmake', type='build')
depends_on('bpp-core')
depends_on('bpp-seq')
diff --git a/var/spack/repos/builtin/packages/bpp-seq/package.py b/var/spack/repos/builtin/packages/bpp-seq/package.py
index 7132c668b3..15c99da2b1 100644
--- a/var/spack/repos/builtin/packages/bpp-seq/package.py
+++ b/var/spack/repos/builtin/packages/bpp-seq/package.py
@@ -33,7 +33,7 @@ class BppSeq(Package):
version('2.2.0', '44adef0ff4d5ca4e69ccf258c9270633')
- depends_on('cmake')
+ depends_on('cmake', type='build')
depends_on('bpp-core')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/bpp-suite/package.py b/var/spack/repos/builtin/packages/bpp-suite/package.py
index 41e90e375d..d15030622e 100644
--- a/var/spack/repos/builtin/packages/bpp-suite/package.py
+++ b/var/spack/repos/builtin/packages/bpp-suite/package.py
@@ -34,9 +34,8 @@ class BppSuite(Package):
version('2.2.0', 'd8b29ad7ccf5bd3a7beb701350c9e2a4')
- # FIXME: Add dependencies if required.
- depends_on('cmake')
- depends_on('texinfo')
+ depends_on('cmake', type='build')
+ depends_on('texinfo', type='build')
depends_on('bpp-core')
depends_on('bpp-seq')
depends_on('bpp-phyl')
diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py
index ddb8d2fd03..12c7838f63 100644
--- a/var/spack/repos/builtin/packages/cairo/package.py
+++ b/var/spack/repos/builtin/packages/cairo/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Cairo(Package):
+class Cairo(AutotoolsPackage):
"""Cairo is a 2D graphics library with support for multiple output
devices."""
homepage = "http://cairographics.org"
@@ -37,11 +37,10 @@ class Cairo(Package):
depends_on("glib")
depends_on("pixman")
depends_on("freetype")
+ depends_on("pkg-config", type="build")
depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig.
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix,
- "--disable-trace", # can cause problems with libiberty
- "--enable-tee")
- make()
- make("install")
+ def configure_args(self):
+ args = ["--disable-trace", # can cause problems with libiberty
+ "--enable-tee"]
+ return args
diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py
index e5aed5ed65..113bef61b8 100644
--- a/var/spack/repos/builtin/packages/caliper/package.py
+++ b/var/spack/repos/builtin/packages/caliper/package.py
@@ -26,8 +26,7 @@ from spack import *
class Caliper(Package):
- """
- Caliper is a generic context annotation system. It gives programmers the
+ """Caliper is a generic context annotation system. It gives programmers the
ability to provide arbitrary program context information to (performance)
tools at runtime.
"""
diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py
index 9c9c035325..66e1197669 100644
--- a/var/spack/repos/builtin/packages/cantera/package.py
+++ b/var/spack/repos/builtin/packages/cantera/package.py
@@ -85,8 +85,9 @@ class Cantera(Package):
# BLAS/LAPACK support
if '+lapack' in spec:
+ lapack_blas = spec['lapack'].lapack_libs + spec['blas'].blas_libs
options.extend([
- 'blas_lapack_libs=lapack,blas',
+ 'blas_lapack_libs={0}'.format(','.join(lapack_blas.names)),
'blas_lapack_dir={0}'.format(spec['lapack'].prefix.lib)
])
@@ -95,8 +96,7 @@ class Cantera(Package):
options.extend([
'build_thread_safe=yes',
'boost_inc_dir={0}'.format(spec['boost'].prefix.include),
- 'boost_lib_dir={0}'.format(spec['boost'].prefix.lib),
- 'boost_thread_lib=boost_thread-mt,boost_system-mt'
+ 'boost_lib_dir={0}'.format(spec['boost'].prefix.lib)
])
else:
options.append('build_thread_safe=no')
diff --git a/var/spack/repos/builtin/packages/cask/package.py b/var/spack/repos/builtin/packages/cask/package.py
index 67cc48ab2a..5a5bfaa5f1 100644
--- a/var/spack/repos/builtin/packages/cask/package.py
+++ b/var/spack/repos/builtin/packages/cask/package.py
@@ -37,6 +37,8 @@ class Cask(Package):
homepage = "http://cask.readthedocs.io/en/latest/"
url = "https://github.com/cask/cask/archive/v0.7.4.tar.gz"
+ version('0.8.1', '25196468a7ce634cfff14733678be6ba')
+ # version 0.8.0 is broken
version('0.7.4', 'c973a7db43bc980dd83759a5864a1260')
depends_on('emacs', type=nolink)
diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
index cbf36c3b61..06e752d199 100644
--- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
@@ -57,14 +57,13 @@ class CbtfArgonavis(Package):
version('1.6', branch='master',
git='https://github.com/OpenSpeedShop/cbtf-argonavis.git')
- depends_on("cmake@3.0.2", type='build')
+ depends_on("cmake@3.0.2:", type='build')
depends_on("boost@1.50.0:")
depends_on("papi")
- depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
+ depends_on("mrnet@5.0.1:+lwthreads")
depends_on("cbtf")
depends_on("cbtf-krell")
- depends_on("cuda@6.0.37")
- # depends_on("cuda")
+ depends_on("cuda")
parallel = False
diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py
index 6f15c3f835..efcd7200d8 100644
--- a/var/spack/repos/builtin/packages/cbtf-krell/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py
@@ -74,7 +74,7 @@ class CbtfKrell(Package):
description="Build mpi experiment collector for mpich MPI.")
# Dependencies for cbtf-krell
- depends_on("cmake@3.0.2", type='build')
+ depends_on("cmake@3.0.2:", type='build')
# For binutils service
depends_on("binutils@2.24+krellpatch")
@@ -82,7 +82,7 @@ class CbtfKrell(Package):
# collectionTool
depends_on("boost@1.50.0:")
depends_on("dyninst@8.2.1:")
- depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
+ depends_on("mrnet@5.0.1:+lwthreads")
depends_on("xerces-c@3.1.1:")
depends_on("cbtf")
@@ -138,34 +138,22 @@ class CbtfKrell(Package):
# openmpi
if '+openmpi' in spec:
- MPIOptions.extend([
- '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix
- ])
+ MPIOptions.append('-DOPENMPI_DIR=%s' % spec['openmpi'].prefix)
# mpich
if '+mpich' in spec:
- MPIOptions.extend([
- '-DMPICH_DIR=%s' % spec['mpich'].prefix
- ])
+ MPIOptions.append('-DMPICH_DIR=%s' % spec['mpich'].prefix)
# mpich2
if '+mpich2' in spec:
- MPIOptions.extend([
- '-DMPICH2_DIR=%s' % spec['mpich2'].prefix
- ])
+ MPIOptions.append('-DMPICH2_DIR=%s' % spec['mpich2'].prefix)
# mvapich
if '+mvapich' in spec:
- MPIOptions.extend([
- '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix
- ])
+ MPIOptions.append('-DMVAPICH_DIR=%s' % spec['mvapich'].prefix)
# mvapich2
if '+mvapich2' in spec:
- MPIOptions.extend([
- '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix
- ])
+ MPIOptions.append('-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix)
# mpt
if '+mpt' in spec:
- MPIOptions.extend([
- '-DMPT_DIR=%s' % spec['mpt'].prefix
- ])
+ MPIOptions.append('-DMPT_DIR=%s' % spec['mpt'].prefix)
cmakeOptions.extend(MPIOptions)
diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
index b614a325f9..2b4e887325 100644
--- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
@@ -55,9 +55,9 @@ class CbtfLanl(Package):
version('1.6', branch='master',
git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl')
- depends_on("cmake@3.0.2", type='build')
+ depends_on("cmake@3.0.2:", type='build')
# Dependencies for cbtf-krell
- depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
+ depends_on("mrnet@5.0.1:+lwthreads")
depends_on("xerces-c@3.1.1:")
depends_on("cbtf")
depends_on("cbtf-krell")
diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py
index bc3116bf2a..a711a918ca 100644
--- a/var/spack/repos/builtin/packages/cbtf/package.py
+++ b/var/spack/repos/builtin/packages/cbtf/package.py
@@ -63,9 +63,9 @@ class Cbtf(Package):
variant('runtime', default=False,
description="build only the runtime libraries and collectors.")
- depends_on("cmake@3.0.2", type='build')
+ depends_on("cmake@3.0.2:", type='build')
depends_on("boost@1.50.0:")
- depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
+ depends_on("mrnet@5.0.1:+lwthreads")
depends_on("xerces-c@3.1.1:")
# Work around for spack libxml2 package bug, take off python when fixed
depends_on("libxml2+python")
diff --git a/var/spack/repos/builtin/packages/cdd/Makefile.spack.patch b/var/spack/repos/builtin/packages/cdd/Makefile.spack.patch
new file mode 100644
index 0000000000..4c97187a57
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cdd/Makefile.spack.patch
@@ -0,0 +1,22 @@
+--- old/Makefile.spack
++++ new/Makefile.spack
+@@ -0,0 +1,19 @@
++# Set PREFIX to the install location for both building and installing
++
++all: cdd dplex_test
++
++cdd: cdd.lo cddio.lo cddarith.lo dplex.lo setoper.lo
++ libtool --mode=link --tag=CC cc -g -O2 -o $@ $^
++
++dplex_test: dplex.lo dplex_test.lo setoper.lo
++ libtool --mode=link --tag=CC cc -g -O2 -o $@ $^
++
++%.lo: %.c
++ libtool --mode=compile --tag=CC cc -g -O2 -c $*.c
++
++install:
++ mkdir -p $(PREFIX)/bin
++ libtool --mode=install cp cdd $(PREFIX)/bin/cdd
++ libtool --mode=install cp dplex_test $(PREFIX)/bin/dplex_test
++
++.PHONY: all install
diff --git a/var/spack/repos/builtin/packages/cdd/package.py b/var/spack/repos/builtin/packages/cdd/package.py
new file mode 100644
index 0000000000..4a0a0aefef
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cdd/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Cdd(Package):
+ """The program cdd+ (cdd, respectively) is a C++ (ANSI C)
+ implementation of the Double Description Method [MRTT53] for
+ generating all vertices (i.e. extreme points) and extreme rays of
+ a general convex polyhedron given by a system of linear
+ inequalities"""
+ homepage = "https://www.inf.ethz.ch/personal/fukudak/cdd_home/cdd.html"
+ url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-061a.tar.gz"
+
+ version('0.61a', '22c24a7a9349dd7ec0e24531925a02d9')
+
+ depends_on("libtool", type="build")
+
+ patch("Makefile.spack.patch")
+
+ def url_for_version(self, version):
+ url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-{0}.tar.gz"
+ return url.format(version.joined)
+
+ def install(self, spec, prefix):
+ # The Makefile isn't portable; use our own instead
+ makeargs = ["-f", "Makefile.spack", "PREFIX=%s" % prefix]
+ make(*makeargs)
+ make("install", *makeargs)
diff --git a/var/spack/repos/builtin/packages/cddlib/package.py b/var/spack/repos/builtin/packages/cddlib/package.py
new file mode 100644
index 0000000000..ced5f46d1f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cddlib/package.py
@@ -0,0 +1,58 @@
+##############################################################################
+# 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 Cddlib(Package):
+ """The C-library cddlib is a C implementation of the Double Description
+ Method of Motzkin et al. for generating all vertices (i.e. extreme points)
+ and extreme rays of a general convex polyhedron in R^d given by a system
+ of linear inequalities"""
+ homepage = "https://www.inf.ethz.ch/personal/fukudak/cdd_home/"
+ # This is the original download url. It is currently down [2016-08-23],
+ # but should be reinstated or updated once the issue is resolved.
+ # url = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cddlib-094h.tar.gz"
+ url = "http://pkgs.fedoraproject.org/lookaside/pkgs/cddlib/cddlib-094h.tar.gz/1467d270860bbcb26d3ebae424690e7c/cddlib-094h.tar.gz"
+
+ def url_for_version(self, version):
+ # Since the commit id is part of the version, we can't
+ # auto-generate the string, and we need to explicitly list all
+ # known versions here. Currently, there is only one version.
+ if str(version) == '0.94h':
+ return "http://pkgs.fedoraproject.org/lookaside/pkgs/cddlib/cddlib-094h.tar.gz/1467d270860bbcb26d3ebae424690e7c/cddlib-094h.tar.gz"
+ raise InstallError("Unsupported version %s" % str(version))
+
+ version('0.94h', '1467d270860bbcb26d3ebae424690e7c')
+
+ # Note: It should be possible to build cddlib also without gmp
+
+ depends_on("gmp")
+ depends_on("libtool", type="build")
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py
index 7400c3a56c..775dc31cf3 100644
--- a/var/spack/repos/builtin/packages/cdo/package.py
+++ b/var/spack/repos/builtin/packages/cdo/package.py
@@ -30,13 +30,88 @@ class Cdo(Package):
Climate and NWP model Data. """
homepage = "https://code.zmaw.de/projects/cdo"
- url = "https://code.zmaw.de/attachments/download/10198/cdo-1.6.9.tar.gz"
- version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2')
+ version('1.7.2', 'f08e4ce8739a4f2b63fc81a24db3ee31', url='https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz')
+ version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2', url='https://code.zmaw.de/attachments/download/10198/cdo-1.6.9.tar.gz')
- depends_on('netcdf')
+ variant('szip', default=True, description='Enable szip compression for GRIB1')
+ variant('hdf5', default=False, description='Enable HDF5 support')
+ variant('netcdf', default=True, description='Enable NetCDF support')
+ variant('udunits2', default=True, description='Enable UDUNITS2 support')
+ variant('grib', default=True, description='Enable GRIB_API support')
+ variant('libxml2', default=True, description='Enable libxml2 support')
+ variant('proj', default=True, description='Enable PROJ library for cartographic projections')
+ variant('curl', default=True, description='Enable curl support')
+ variant('fftw', default=True, description='Enable support for fftw3')
+ variant('magics', default=True, description='Enable Magics library support')
+
+ depends_on('szip', when='+szip')
+ depends_on('netcdf', when='+netcdf')
+ depends_on('hdf5+threadsafe', when='+hdf5')
+ depends_on('udunits2', when='+udunits2')
+ depends_on('grib-api', when='+grib')
+ depends_on('libxml2', when='+libxml2')
+ depends_on('proj', when='+proj')
+ depends_on('curl', when='+curl')
+ depends_on('fftw', when='+fftw')
+ depends_on('magics', when='+magics')
def install(self, spec, prefix):
- configure('--prefix={0}'.format(prefix))
+ config_args = ["--prefix=" + prefix,
+ "--enable-shared",
+ "--enable-static"]
+
+ if '+szip' in spec:
+ config_args.append('--with-szlib=' + spec['szip'].prefix)
+ else:
+ config_args.append('--without-szlib')
+
+ if '+hdf5' in spec:
+ config_args.append('--with-hdf5=' + spec['hdf5'].prefix)
+ else:
+ config_args.append('--without-hdf5')
+
+ if '+netcdf' in spec:
+ config_args.append('--with-netcdf=' + spec['netcdf'].prefix)
+ else:
+ config_args.append('--without-netcdf')
+
+ if '+udunits2' in spec:
+ config_args.append('--with-udunits2=' + spec['udunits2'].prefix)
+ else:
+ config_args.append('--without-udunits2')
+
+ if '+grib' in spec:
+ config_args.append('--with-grib_api=' + spec['grib-api'].prefix)
+ else:
+ config_args.append('--without-grib_api')
+
+ if '+libxml2' in spec:
+ config_args.append('--with-libxml2=' + spec['libxml2'].prefix)
+ else:
+ config_args.append('--without-libxml2')
+
+ if '+proj' in spec:
+ config_args.append('--with-proj=' + spec['proj'].prefix)
+ else:
+ config_args.append('--without-proj')
+
+ if '+curl' in spec:
+ config_args.append('--with-curl=' + spec['curl'].prefix)
+ else:
+ config_args.append('--without-curl')
+
+ if '+fftw' in spec:
+ config_args.append('--with-fftw3')
+ else:
+ config_args.append('--without-fftw3')
+
+ if '+magics' in spec:
+ config_args.append('--with-magics=' + spec['magics'].prefix)
+ else:
+ config_args.append('--without-magics')
+
+ configure(*config_args)
+
make()
make('install')
diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py
index 716e0103d1..0ce6ec593c 100644
--- a/var/spack/repos/builtin/packages/cereal/package.py
+++ b/var/spack/repos/builtin/packages/cereal/package.py
@@ -39,6 +39,7 @@ class Cereal(Package):
homepage = "http://uscilab.github.io/cereal/"
url = "https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz"
+ version('1.2.1', '64476ed74c19068ee543b53ad3992261')
version('1.2.0', 'e372c9814696481dbdb7d500e1410d2b')
version('1.1.2', '34d4ad174acbff005c36d4d10e48cbb9')
version('1.1.1', '0ceff308c38f37d5b5f6df3927451c27')
diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py
index c68b3ffc0d..79af31ae21 100644
--- a/var/spack/repos/builtin/packages/cfitsio/package.py
+++ b/var/spack/repos/builtin/packages/cfitsio/package.py
@@ -26,16 +26,17 @@ from spack import *
class Cfitsio(Package):
- """
- CFITSIO is a library of C and Fortran subroutines for reading and writing
+ """CFITSIO is a library of C and Fortran subroutines for reading and writing
data files in FITS (Flexible Image Transport System) data format.
"""
+
homepage = 'http://heasarc.gsfc.nasa.gov/fitsio/'
+
version('3.370', 'abebd2d02ba5b0503c633581e3bfa116')
- def url_for_version(self, v):
+ def url_for_version(self, version):
url = 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio{0}.tar.gz'
- return url.format(str(v).replace('.', ''))
+ return url.format(version.joined)
def install(self, spec, prefix):
configure('--prefix=' + prefix)
diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py
index e522b4a5a0..a16572246b 100644
--- a/var/spack/repos/builtin/packages/cgal/package.py
+++ b/var/spack/repos/builtin/packages/cgal/package.py
@@ -22,59 +22,87 @@
# 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 Cgal(Package):
- """CGAL is a software project that provides easy access to efficient and
- reliable geometric algorithms in the form of a C++ library. CGAL
- is used in various areas needing geometric computation, such as
- geographic information systems, computer aided design, molecular
- biology, medical imaging, computer graphics, and robotics.
-
+ """The Computational Geometry Algorithms Library (CGAL) is a C++ library
+ that aims to provide easy access to efficient and reliable algorithms in
+ computational geometry. CGAL is used in various areas needing geometric
+ computation, such as geographic information systems, computer aided design,
+ molecular biology, medical imaging, computer graphics, and robotics.
"""
homepage = 'http://www.cgal.org/'
url = 'https://github.com/CGAL/cgal/archive/releases/CGAL-4.7.tar.gz'
+ version('4.9', '7b628db3e5614347f776c046b7666089')
version('4.7', '4826714810f3b4c65cac96b90fb03b67')
version('4.6.3', 'e8ee2ecc8d2b09b94a121c09257b576d')
- # Installation instructions :
- # http://doc.cgal.org/latest/Manual/installation.html
variant('shared', default=True,
description='Enables the build of shared libraries')
variant('debug', default=False,
description='Builds a debug version of the libraries')
- depends_on('boost')
- depends_on('mpfr')
+ # ---- See "7 CGAL Libraries" at:
+ # http://doc.cgal.org/latest/Manual/installation.html
+
+ # The CORE library provides exact arithmetic for geometric computations.
+ # See: http://cs.nyu.edu/exact/core_pages/
+ # http://cs.nyu.edu/exact/core_pages/svn-core.html
+ variant('core', default=False,
+ description='Build the CORE library for algebraic numbers')
+ variant('imageio', default=False,
+ description='Build utilities to read/write image files')
+ variant('demos', default=False,
+ description='Build CGAL demos')
+
+ # Essential Third Party Libraries
+ depends_on('boost+thread+system')
depends_on('gmp')
+ depends_on('mpfr')
+
+ # Required for CGAL_ImageIO
+ # depends_on('opengl', when='+imageio') # not yet in Spack
depends_on('zlib')
- depends_on('cmake', type='build')
- # FIXME : Qt5 dependency missing (needs Qt5 and OpenGL)
- # FIXME : Optional third party libraries missing
+ # Optional to build CGAL_Qt5 (demos)
+ # depends_on('opengl', when='+demos') # not yet in Spack
+ depends_on('qt@5:', when='+demos')
- def install(self, spec, prefix):
+ # Optional Third Party Libraries
+ # depends_on('leda')
+ # depends_on('mpfi')
+ # depends_on('rs')
+ # depends_on('rs3')
+ # depends_on('ntl')
+ # depends_on('eigen')
+ # depends_on('libqglviewer')
+ # depends_on('esbtl')
+ # depends_on('intel-tbb')
- options = []
- options.extend(std_cmake_args)
- # CGAL supports only Release and Debug build type. Any other build type
- # will raise an error at configure time
- if '+debug' in spec:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
- else:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
+ # Build dependencies
+ depends_on('cmake', type='build')
+
+ def install(self, spec, prefix):
+ # Installation instructions:
+ # http://doc.cgal.org/latest/Manual/installation.html
- if '+shared' in spec:
- options.append('-DBUILD_SHARED_LIBS:BOOL=ON')
- else:
- options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
+ options = std_cmake_args + [
+ # CGAL supports only Release and Debug build type. Any
+ # other build type will raise an error at configure time
+ '-DCMAKE_BUILD_TYPE:STRING=%s' %
+ ('Debug' if '+debug' in spec else 'Release'),
+ '-DBUILD_SHARED_LIBS:BOOL=%s' %
+ ('ON' if '+shared' in spec else 'OFF'),
+ '-DWITH_CGAL_Core:BOOL=%s' %
+ ('YES' if '+core' in spec else 'NO'),
+ '-DWITH_CGAL_ImageIO:BOOL=%s' %
+ ('YES' if '+imageio' in spec else 'NO'),
+ '-DWITH_CGAL_Qt5:BOOL=%s' %
+ ('YES' if '+demos' in spec else 'NO')]
- build_directory = join_path(self.stage.path, 'spack-build')
- source_directory = self.stage.source_path
- with working_dir(build_directory, create=True):
- cmake(source_directory, *options)
+ with working_dir('spack-build', create=True):
+ cmake('..', *options)
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/charm/mpi.patch b/var/spack/repos/builtin/packages/charm/mpi.patch
new file mode 100644
index 0000000000..e909d5f876
--- /dev/null
+++ b/var/spack/repos/builtin/packages/charm/mpi.patch
@@ -0,0 +1,19 @@
+--- old/src/scripts/configure
++++ new/src/scripts/configure
+@@ -3293,10 +3293,16 @@
+ test_link "whether -lmpi" "ok" "no" "-lmpi"
+ if test $pass -eq 1
+ then
+ add_flag CMK_SYSLIBS='"$CMK_SYSLIBS -lmpi"' "mpi lib"
+ else
++ test_link "whether -lmpi -lmpi_cxx" "ok" "no" "-lmpi -lmpi_cxx"
++ if test $pass -eq 1
++ then
++ add_flag CMK_SYSLIBS='"$CMK_SYSLIBS -lmpi -lmpi_cxx"' "mpi lib"
++ else
+ echo "Error: can not find mpi library"
+ test_finish 1
++ fi
+ fi
+ fi
+ else
diff --git a/var/spack/repos/builtin/packages/charm/package.py b/var/spack/repos/builtin/packages/charm/package.py
new file mode 100644
index 0000000000..1ec53c2138
--- /dev/null
+++ b/var/spack/repos/builtin/packages/charm/package.py
@@ -0,0 +1,190 @@
+##############################################################################
+# 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
+##############################################################################
+
+import os
+import platform
+import shutil
+import sys
+from spack import *
+
+
+class Charm(Package):
+ """Charm++ is a parallel programming framework in C++ supported by
+ an adaptive runtime system, which enhances user productivity and
+ allows programs to run portably from small multicore computers
+ (your laptop) to the largest supercomputers."""
+
+ homepage = "http://charmplusplus.org"
+ url = "http://charm.cs.illinois.edu/distrib/charm-6.7.1.tar.gz"
+
+ version("6.7.1", "a8e20cf85e9c8721158f5bbd0ade48d9")
+ version("6.7.0", "35a39a7975f1954a7db2d76736158231")
+ version("6.6.1", "9554230f741e2599deaaac4d9d93d7ab")
+ version("6.6.0", "31e95901b3f7324d52107e6ad000fcc8")
+ version("6.5.1", "034d99458474a3ab96d8bede8a691a5d")
+
+ # Support OpenMPI; see
+ # <https://charm.cs.illinois.edu/redmine/issues/1206>
+ patch("mpi.patch")
+ # Ignore compiler warnings while configuring
+ patch("strictpass.patch")
+
+ # Communication mechanisms (choose exactly one)
+ # TODO: Support Blue Gene/Q PAMI, Cray GNI, Cray shmem, CUDA
+ variant("mpi", default=False,
+ description="Use MPI as communication mechanism")
+ variant("multicore", default=False,
+ description="Disable inter-node communication")
+ variant("net", default=False,
+ description="Use net communication mechanism")
+ variant("netlrts", default=True,
+ description="Use netlrts communication mechanism")
+ variant("verbs", default=False,
+ description="Use Infiniband as communication mechanism")
+
+ # Other options
+ # Something is off with PAPI -- there are build errors. Maybe
+ # Charm++ expects a particular version?
+ variant("papi", default=False, description="Enable PAPI integration")
+ variant("smp", default=True,
+ description=(
+ "Enable SMP parallelism (does not work with +multicore)"))
+ variant("tcp", default=False,
+ description="Use TCP as transport mechanism (requires +net)")
+
+ # Note: We could add variants for AMPI, LIBS, bigemulator, msa, Tau
+ # Note: We could support shared libraries
+
+ depends_on("mpi", when="+mpi")
+ depends_on("papi", when="+papi")
+
+ def install(self, spec, prefix):
+ target = "charm++"
+
+ # Note: Turn this into a multi-valued variant, once these
+ # exist in Spack
+ if sum(["+mpi" in spec,
+ "+multicore" in spec,
+ "+net" in spec,
+ "+netlrts" in spec,
+ "+verbs" in spec]) != 1:
+ raise InstallError(
+ "Exactly one communication mechanism "
+ "(+mpi, +multicore, +net, +netlrts, or +verbs) "
+ "must be enabled")
+ if "+mpi" in spec:
+ comm = "mpi"
+ if "+multicore" in spec:
+ comm = "multicore"
+ if "+net" in spec:
+ comm = "net"
+ if "+netlrts" in spec:
+ comm = "netlrts"
+ if "+verbs" in spec:
+ comm = "verbs"
+
+ plat = sys.platform
+ if plat.startswith("linux"):
+ plat = "linux"
+ mach = platform.machine()
+
+ # Define Charm++ version names for various (plat, mach, comm)
+ # combinations. Note that not all combinations are supported.
+ versions = {
+ ("darwin", "i386", "multicore"): "multicore-darwin-x86",
+ ("darwin", "i386", "net"): "net-darwin-x86",
+ ("darwin", "x86_64", "mpi"): "mpi-darwin-x86_64",
+ ("darwin", "x86_64", "multicore"): "multicore-darwin-x86_64",
+ ("darwin", "x86_64", "net"): "net-darwin-x86_64",
+ ("darwin", "x86_64", "netlrts"): "netlrts-darwin-x86_64",
+ ("linux", "i386", "mpi"): "mpi-linux",
+ ("linux", "i386", "multicore"): "multicore-linux32",
+ ("linux", "i386", "net"): "net-linux",
+ ("linux", "i386", "netlrts"): "netlrts-linux",
+ ("linux", "x86_64", "mpi"): "mpi-linux-x86_64",
+ ("linux", "x86_64", "multicore"): "multicore-linux64",
+ ("linux", "x86_64", "net"): "net-linux-x86_64",
+ ("linux", "x86_64", "netlrts"): "netlrts-linux-x86_64",
+ ("linux", "x86_64", "verbs"): "verbs-linux-x86_64",
+ }
+ if (plat, mach, comm) not in versions:
+ raise InstallError(
+ "The communication mechanism %s is not supported "
+ "on a %s platform with a %s CPU" %
+ (comm, plat, mach))
+ version = versions[(plat, mach, comm)]
+
+ # We assume that Spack's compiler wrappers make this work. If
+ # not, then we need to query the compiler vendor from Spack
+ # here.
+ compiler = "gcc"
+
+ options = [compiler,
+ "--with-production", # Note: turn this into a variant
+ "-j%d" % make_jobs,
+ "--destination=%s" % prefix]
+ if "+mpi" in spec:
+ options.append("--basedir=%s" % spec["mpi"].prefix)
+ if "+papi" in spec:
+ options.extend(["papi", "--basedir=%s" % spec["papi"].prefix])
+ if "+smp" in spec:
+ if "+multicore" in spec:
+ # This is a Charm++ limitation; it would lead to a
+ # build error
+ raise InstallError("Cannot combine +smp with +multicore")
+ options.append("smp")
+ if "+tcp" in spec:
+ if "+net" not in spec:
+ # This is a Charm++ limitation; it would lead to a
+ # build error
+ raise InstallError(
+ "The +tcp variant requires "
+ "the +net communication mechanism")
+ options.append("tcp")
+
+ # Call "make" via the build script
+ # Note: This builds Charm++ in the "tmp" subdirectory of the
+ # install directory. Maybe we could set up a symbolic link
+ # back to the build tree to prevent this? Alternatively, we
+ # could dissect the build script; the build instructions say
+ # this wouldn't be difficult.
+ build = Executable(join_path(".", "build"))
+ build(target, version, *options)
+
+ # Charm++'s install script does not copy files, it only creates
+ # symbolic links. Fix this.
+ for dirpath, dirnames, filenames in os.walk(prefix):
+ for filename in filenames:
+ filepath = join_path(dirpath, filename)
+ if os.path.islink(filepath):
+ tmppath = filepath + ".tmp"
+ # Skip dangling symbolic links
+ try:
+ shutil.copy2(filepath, tmppath)
+ os.remove(filepath)
+ os.rename(tmppath, filepath)
+ except:
+ pass
+ shutil.rmtree(join_path(prefix, "tmp"))
diff --git a/var/spack/repos/builtin/packages/charm/strictpass.patch b/var/spack/repos/builtin/packages/charm/strictpass.patch
new file mode 100644
index 0000000000..44aa4fbd38
--- /dev/null
+++ b/var/spack/repos/builtin/packages/charm/strictpass.patch
@@ -0,0 +1,16 @@
+--- old/src/scripts/configure
++++ new/src/scripts/configure
+@@ -2146,13 +2146,6 @@
+ test_result $? "$1" "$2" "$3"
+ strictpass=$pass
+ strictfail=$fail
+- if test $pass -eq 1
+- then
+- if cat out | grep -i "warn" > /dev/null 2>&1
+- then
+- strictpass="0" && strictfail="1"
+- fi
+- fi
+ cat out >> $charmout
+ /bin/rm -f out
+ }
diff --git a/var/spack/repos/builtin/packages/cityhash/package.py b/var/spack/repos/builtin/packages/cityhash/package.py
index d6d7f51558..85d948cc57 100644
--- a/var/spack/repos/builtin/packages/cityhash/package.py
+++ b/var/spack/repos/builtin/packages/cityhash/package.py
@@ -27,6 +27,8 @@ from spack.util.environment import *
class Cityhash(Package):
+ """CityHash, a family of hash functions for strings."""
+
homepage = "https://github.com/google/cityhash"
url = "https://github.com/google/cityhash"
diff --git a/var/spack/repos/builtin/packages/clhep/darwin/CLHEP.patch b/var/spack/repos/builtin/packages/clhep/darwin/CLHEP.patch
new file mode 100644
index 0000000000..ca1d96574a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/clhep/darwin/CLHEP.patch
@@ -0,0 +1,11 @@
+--- CLHEP/CMakeLists.txt 2016-06-20 14:41:12.000000000 -0500
++++ CLHEP/CMakeLists.txt 2016-06-20 14:40:57.000000000 -0500
+@@ -37,7 +37,7 @@
+ # If Policy CMP0042 exists, use OLD to prefer the use of install names
+ # instead of the new @rpath default.
+ if(POLICY CMP0042)
+- cmake_policy(SET CMP0042 NEW)
++ cmake_policy(SET CMP0042 OLD)
+ endif()
+
+ set(CMAKE_MODULE_PATH
diff --git a/var/spack/repos/builtin/packages/clhep/package.py b/var/spack/repos/builtin/packages/clhep/package.py
new file mode 100644
index 0000000000..02a9da9e27
--- /dev/null
+++ b/var/spack/repos/builtin/packages/clhep/package.py
@@ -0,0 +1,81 @@
+##############################################################################
+# 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 Clhep(Package):
+ """CLHEP is a C++ Class Library for High Energy Physics. """
+ homepage = "http://proj-clhep.web.cern.ch/proj-clhep/"
+ url = "http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/clhep-2.2.0.5.tgz"
+ list_url = "https://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/"
+
+ version('2.3.2.2', '567b304b0fa017e1e9fbf199f456ebe9')
+ version('2.3.1.1', '16efca7641bc118c9d217cc96fe90bf5')
+ version('2.3.1.0', 'b084934fc26a4182a08c09c292e19161')
+ version('2.3.0.0', 'a00399a2ca867f2be902c22fc71d7e2e')
+ version('2.2.0.8', '5a23ed3af785ac100a25f6cb791846af')
+ version('2.2.0.5', '1584e8ce6ebf395821aed377df315c7c')
+ version('2.2.0.4', '71d2c7c2e39d86a0262e555148de01c1')
+
+ variant('debug', default=False, description="Switch to the debug version of CLHEP.")
+ variant('cxx11', default=True, description="Compile using c++11 dialect.")
+ variant('cxx14', default=False, description="Compile using c++14 dialect.")
+
+ depends_on('cmake@2.8.12.2:', when='@2.2.0.4:2.3.0.0', type='build')
+ depends_on('cmake@3.2:', when='@2.3.0.1:', type='build')
+
+ def patch(self):
+ filter_file('SET CMP0042 OLD',
+ 'SET CMP0042 NEW',
+ '%s/%s/CLHEP/CMakeLists.txt'
+ % (self.stage.path, self.spec.version))
+
+ def install(self, spec, prefix):
+ # Handle debug
+ # Pull out the BUILD_TYPE so we can change it (Release is default)
+ cmake_args = [arg for arg in std_cmake_args if 'BUILD_TYPE' not in arg]
+ build_type = 'Debug' if '+debug' in spec else 'MinSizeRel'
+ cmake_args.extend(['-DCMAKE_BUILD_TYPE=' + build_type])
+
+ if '+cxx11' in spec:
+ env['CXXFLAGS'] = self.compiler.cxx11_flag
+ cmake_args.append('-DCLHEP_BUILD_CXXSTD=' +
+ self.compiler.cxx11_flag)
+
+ if '+cxx14' in spec:
+ env['CXXFLAGS'] = self.compiler.cxx14_flag
+ cmake_args.append('-DCLHEP_BUILD_CXXSTD=' +
+ self.compiler.cxx14_flag)
+
+ # Note that the tar file is unusual in that there's a
+ # CLHEP directory (addtional layer)
+ cmake_args.append("../CLHEP")
+
+ # Run cmake in a build directory
+ with working_dir('build', create=True):
+ cmake(*cmake_args)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch b/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch
new file mode 100644
index 0000000000..afe6f871ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch
@@ -0,0 +1,23 @@
+diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
+index eb9602a..edca154 100644
+--- a/Modules/Compiler/Intel-C.cmake
++++ b/Modules/Compiler/Intel-C.cmake
+@@ -16,14 +16,14 @@ endif()
+
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
+ set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11")
+- set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11")
++ set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11")
+ endif()
+
+-if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
++if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
+ set(CMAKE_C90_STANDARD_COMPILE_OPTION "${_std}=c89")
+- set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=c89")
++ set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=gnu89")
+ set(CMAKE_C99_STANDARD_COMPILE_OPTION "${_std}=c99")
+- set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=c99")
++ set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=gnu99")
+ endif()
+
+ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index 90a7c20d19..93bdb72050 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -31,6 +31,7 @@ class Cmake(Package):
homepage = 'https://www.cmake.org'
url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz'
+ version('3.6.1', 'd6dd661380adacdb12f41b926ec99545')
version('3.6.0', 'aa40fbecf49d99c083415c2411d12db9')
version('3.5.2', '701386a1b5ec95f8d1075ecf96383e02')
version('3.5.1', 'ca051f4a66375c89d1a524e726da0296')
@@ -41,19 +42,28 @@ class Cmake(Package):
version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f')
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
- variant('ncurses', default=True,
- description='Enables the build of the ncurses gui')
- variant('openssl', default=True,
- description="Enables CMake's OpenSSL features")
- variant('qt', default=False, description='Enables the build of cmake-gui')
- variant('doc', default=False,
- description='Enables the generation of html and man page docs')
-
- depends_on('ncurses', when='+ncurses')
- depends_on('openssl', when='+openssl')
- depends_on('qt', when='+qt')
+ variant('ownlibs', default=True, description='Use CMake-provided third-party libraries')
+ variant('qt', default=False, description='Enables the build of cmake-gui')
+ variant('doc', default=False, description='Enables the generation of html and man page documentation')
+ variant('openssl', default=True, description="Enables CMake's OpenSSL features")
+ variant('ncurses', default=True, description='Enables the build of the ncurses gui')
+
+ depends_on('curl', when='~ownlibs')
+ depends_on('expat', when='~ownlibs')
+ # depends_on('jsoncpp', when='~ownlibs') # circular dependency
+ depends_on('zlib', when='~ownlibs')
+ depends_on('bzip2', when='~ownlibs')
+ depends_on('xz', when='~ownlibs')
+ depends_on('libarchive', when='~ownlibs')
+ depends_on('qt', when='+qt')
depends_on('python@2.7.11:', when='+doc', type='build')
- depends_on('py-sphinx', when='+doc', type='build')
+ depends_on('py-sphinx', when='+doc', type='build')
+ depends_on('openssl', when='+openssl')
+ depends_on('ncurses', when='+ncurses')
+
+ # Cannot build with Intel, should be fixed in 3.6.2
+ # https://gitlab.kitware.com/cmake/cmake/issues/16226
+ patch('intel-c-gnu11.patch', when='@3.6.0:3.6.1')
def url_for_version(self, version):
"""Handle CMake's version-based custom URLs."""
@@ -76,12 +86,27 @@ class Cmake(Package):
# Consistency check
self.validate(spec)
- # configure, build, install:
- options = ['--prefix=%s' % prefix]
- options.append('--parallel=%s' % str(make_jobs))
+ options = [
+ '--prefix={0}'.format(prefix),
+ '--parallel={0}'.format(make_jobs)]
+ if spec.satisfies("@3:"):
+ options.append(
+ # jsoncpp requires CMake to build
+ # use CMake-provided library to avoid circular dependency
+ '--no-system-jsoncpp'
+ )
+
+ if '+ownlibs' in spec:
+ # Build and link to the CMake-provided third-party libraries
+ options.append('--no-system-libs')
+ else:
+ # Build and link to the Spack-installed third-party libraries
+ options.append('--system-libs')
if '+qt' in spec:
options.append('--qt-gui')
+ else:
+ options.append('--no-qt-gui')
if '+doc' in spec:
options.append('--sphinx-html')
@@ -91,6 +116,10 @@ class Cmake(Package):
options.append('--')
options.append('-DCMAKE_USE_OPENSSL=ON')
- configure(*options)
+ bootstrap = Executable('./bootstrap')
+ bootstrap(*options)
+
make()
+ if self.run_tests:
+ make('test') # some tests fail, takes forever
make('install')
diff --git a/var/spack/repos/builtin/packages/compiz/package.py b/var/spack/repos/builtin/packages/compiz/package.py
new file mode 100644
index 0000000000..ec21f5b4f2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/compiz/package.py
@@ -0,0 +1,63 @@
+##############################################################################
+# 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 Compiz(Package):
+ """compiz - OpenGL window and compositing manager.
+
+ Compiz is an OpenGL compositing manager that use
+ GLX_EXT_texture_from_pixmap for binding redirected top-level
+ windows to texture objects. It has a flexible plug-in system
+ and it is designed to run well on most graphics hardware."""
+
+ homepage = "http://www.compiz.org/"
+ url = "https://www.x.org/archive/individual/app/compiz-0.7.8.tar.gz"
+
+ version('0.7.8', 'e99977d9170a7bd5d571004eed038428')
+
+ depends_on('libxcb')
+ depends_on('libxcomposite')
+ depends_on('libxfixes')
+ depends_on('libxdamage')
+ depends_on('libxrandr')
+ depends_on('libxinerama')
+ depends_on('libice')
+ depends_on('libsm')
+ depends_on('libxml2')
+ depends_on('libxslt')
+
+ # TODO: add dependencies
+ # libstartup-notification-1.0 >= 0.7
+ depends_on('libxrender')
+ depends_on('libpng')
+ depends_on('glib')
+ depends_on('gconf')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/compositeproto/package.py b/var/spack/repos/builtin/packages/compositeproto/package.py
new file mode 100644
index 0000000000..1b3fbda0af
--- /dev/null
+++ b/var/spack/repos/builtin/packages/compositeproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Compositeproto(Package):
+ """Composite Extension.
+
+ This package contains header files and documentation for the composite
+ extension. Library and server implementations are separate."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/compositeproto"
+ url = "https://www.x.org/archive/individual/proto/compositeproto-0.4.2.tar.gz"
+
+ version('0.4.2', '2dea7c339432b3363faf2d29c208e7b5')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/constype/package.py b/var/spack/repos/builtin/packages/constype/package.py
new file mode 100644
index 0000000000..dcf88fdd55
--- /dev/null
+++ b/var/spack/repos/builtin/packages/constype/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Constype(Package):
+ """constype prints on the standard output the Sun code for the type of
+ display that the specified device is.
+
+ It was originally written for SunOS, but has been ported to other
+ SPARC OS'es and to Solaris on both SPARC & x86."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/constype"
+ url = "https://www.x.org/archive/individual/app/constype-1.0.4.tar.gz"
+
+ version('1.0.4', '2333b9ac9fd32e58b05afa651c4590a3')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/converge/package.py b/var/spack/repos/builtin/packages/converge/package.py
new file mode 100644
index 0000000000..429be8542d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/converge/package.py
@@ -0,0 +1,69 @@
+##############################################################################
+# 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 *
+from distutils.dir_util import copy_tree
+import os
+
+
+class Converge(Package):
+ """CONVERGE is a revolutionary computational fluid dynamics (CFD) program
+ that eliminates the grid generation bottleneck from the simulation process.
+ CONVERGE was developed by engine simulation experts and is straightforward
+ to use for both engine and non-engine simulations. Unlike many CFD
+ programs, CONVERGE automatically generates a perfectly orthogonal,
+ structured grid at runtime based on simple, user-defined grid control
+ parameters. This grid generation method completely eliminates the need to
+ manually generate a grid. In addition, CONVERGE offers many other features
+ to expedite the setup process and to ensure that your simulations are as
+ computationally efficient as possible.
+
+ Note: CONVERGE is licensed software. You will need to create an account on
+ the CONVERGE homepage and download CONVERGE yourself. Spack will search
+ your current directory for the download file. Alternatively, add this file
+ to a mirror so that Spack can find it. For instructions on how to set up a
+ mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.convergecfd.com/"
+ url = "file://%s/converge_install_2.3.16.tar.gz" % os.getcwd()
+
+ version('2.3.16', '8b80f1e73a63181c427c7732ad279986')
+
+ variant('mpi', default=True, description='Build with MPI support')
+
+ # The Converge Getting Started Guide recommends:
+ # MPICH: 3.1.4
+ # HP-MPI: 2.0.3+
+ # OpenMPI: 1.6.*
+ depends_on('mpi', when='+mpi')
+
+ # Licensing
+ license_required = True
+ license_comment = '#'
+ license_files = ['license/license.lic']
+ license_vars = ['RLM_LICENSE']
+ license_url = 'http://www.reprisesoftware.com/RLM_License_Administration.pdf'
+
+ def install(self, spec, prefix):
+ copy_tree('.', prefix)
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index 5f59286323..3a175ea1a2 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -42,24 +42,23 @@ class Cp2k(Package):
variant('mpi', default=True, description='Enable MPI support')
variant('plumed', default=False, description='Enable PLUMED support')
- depends_on('python') # Build dependency
+ depends_on('python', type='build')
depends_on('lapack')
depends_on('blas')
depends_on('fftw')
+ depends_on('libint@:1.2', when='@3.0')
depends_on('mpi', when='+mpi')
depends_on('scalapack', when='+mpi')
depends_on('plumed+shared+mpi', when='+plumed+mpi')
depends_on('plumed+shared~mpi', when='+plumed~mpi')
+ depends_on('pexsi', when='+mpi')
+ depends_on('wannier90', when='+mpi')
+ depends_on('elpa', when='+mpi')
- # TODO : add dependency on libint
# TODO : add dependency on libsmm, libxsmm
- # TODO : add dependency on elpa
# TODO : add dependency on CUDA
- # TODO : add dependency on PEXSI
- # TODO : add dependency on QUIP
- # TODO : add dependency on libwannier90
parallel = False
@@ -88,14 +87,20 @@ class Cp2k(Package):
}
cppflags = [
'-D__FFTW3',
+ '-D__LIBINT',
'-I' + spec['fftw'].prefix.include
]
fcflags = copy.deepcopy(optflags[self.spec.compiler.name])
fcflags.extend([
'-I' + spec['fftw'].prefix.include
])
- ldflags = ['-L' + spec['fftw'].prefix.lib]
- libs = []
+ fftw = find_libraries(['libfftw3'], root=spec['fftw'].prefix.lib)
+ ldflags = [fftw.search_flags]
+ libs = [
+ join_path(spec['libint'].prefix.lib, 'libint.so'),
+ join_path(spec['libint'].prefix.lib, 'libderiv.so'),
+ join_path(spec['libint'].prefix.lib, 'libr12.so')
+ ]
if '+plumed' in self.spec:
# Include Plumed.inc in the Makefile
mkf.write('include {0}\n'.format(
@@ -108,7 +113,8 @@ class Cp2k(Package):
# Add required macro
cppflags.extend(['-D__PLUMED2'])
libs.extend([
- join_path(self.spec['plumed'].prefix.lib, 'libplumed.so')
+ join_path(self.spec['plumed'].prefix.lib,
+ 'libplumed.{0}'.format(dso_suffix))
])
mkf.write('CC = {0.compiler.cc}\n'.format(self))
@@ -142,23 +148,47 @@ class Cp2k(Package):
if '+mpi' in self.spec:
cppflags.extend([
'-D__parallel',
+ '-D__LIBPEXSI',
+ '-D__WANNIER90',
+ '-D__ELPA3',
'-D__SCALAPACK'
])
- ldflags.extend([
- '-L' + spec['scalapack'].prefix.lib
+ fcflags.extend([
+ '-I' + join_path(
+ spec['elpa'].prefix,
+ 'include',
+ 'elpa-{0}'.format(str(spec['elpa'].version)),
+ 'modules'
+ ),
+ '-I' + join_path(spec['pexsi'].prefix, 'fortran')
])
- libs.extend(spec['scalapack'].scalapack_shared_libs)
-
+ scalapack = spec['scalapack'].scalapack_libs
+ ldflags.append(scalapack.search_flags)
+ libs.extend([
+ join_path(spec['elpa'].prefix.lib,
+ 'libelpa.{0}'.format(dso_suffix)),
+ join_path(spec['wannier90'].prefix.lib, 'libwannier.a'),
+ join_path(spec['pexsi'].prefix.lib, 'libpexsi.a'),
+ join_path(spec['superlu-dist'].prefix.lib,
+ 'libsuperlu_dist.a'),
+ join_path(
+ spec['parmetis'].prefix.lib,
+ 'libparmetis.{0}'.format(dso_suffix)
+ ),
+ join_path(
+ spec['metis'].prefix.lib,
+ 'libmetis.{0}'.format(dso_suffix)
+ ),
+ ])
+ libs.extend(scalapack)
+ libs.extend(self.spec['mpi'].mpicxx_shared_libs)
+ libs.extend(self.compiler.stdcxx_libs)
# LAPACK / BLAS
- ldflags.extend([
- '-L' + spec['lapack'].prefix.lib,
- '-L' + spec['blas'].prefix.lib
- ])
- libs.extend([
- join_path(spec['fftw'].prefix.lib, 'libfftw3.so'),
- spec['lapack'].lapack_shared_lib,
- spec['blas'].blas_shared_lib
- ])
+ lapack = spec['lapack'].lapack_libs
+ blas = spec['blas'].blas_libs
+
+ ldflags.append((lapack + blas).search_flags)
+ libs.extend([str(x) for x in (fftw, lapack, blas)])
# Write compiler flags to file
mkf.write('CPPFLAGS = {0}\n'.format(' '.join(cppflags)))
diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py
index e9294a14a6..c92f262a9a 100644
--- a/var/spack/repos/builtin/packages/cryptopp/package.py
+++ b/var/spack/repos/builtin/packages/cryptopp/package.py
@@ -36,12 +36,15 @@ class Cryptopp(Package):
"""
homepage = "http://www.cryptopp.com"
- base_url = "http://www.cryptopp.com"
version('5.6.3', '3c5b70e2ec98b7a24988734446242d07')
version('5.6.2', '7ed022585698df48e65ce9218f6c6a67')
version('5.6.1', '96cbeba0907562b077e26bcffb483828')
+ def url_for_version(self, version):
+ url = "{0}/{1}{2}.zip"
+ return url.format(self.homepage, self.name, version.joined)
+
def install(self, spec, prefix):
make()
@@ -51,7 +54,3 @@ class Cryptopp(Package):
mkdirp(prefix.lib)
install('libcryptopp.a', prefix.lib)
-
- def url_for_version(self, version):
- version_string = str(version).replace('.', '')
- return '%s/cryptopp%s.zip' % (Cryptopp.base_url, version_string)
diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py
index 09237f87c3..9cea3c40e8 100644
--- a/var/spack/repos/builtin/packages/cube/package.py
+++ b/var/spack/repos/builtin/packages/cube/package.py
@@ -22,13 +22,11 @@
# 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 Cube(Package):
- """
- Cube the profile viewer for Score-P and Scalasca profiles. It displays a
+ """Cube the profile viewer for Score-P and Scalasca profiles. It displays a
multi-dimensional performance space consisting of the dimensions:
- performance metric
- call path
@@ -45,14 +43,19 @@ class Cube(Package):
version('4.2.3', '8f95b9531f5a8f8134f279c2767c9b20',
url="http://apps.fz-juelich.de/scalasca/releases/cube/4.2/dist/cube-4.2.3.tar.gz")
- # TODO : add variant that builds GUI on top of Qt
+ variant('gui', default=False, description='Build CUBE GUI')
depends_on('zlib')
+ depends_on('qt@4.6:', when='+gui')
def install(self, spec, prefix):
configure_args = ["--prefix=%s" % prefix,
- "--without-paraver",
- "--without-gui"]
+ "--without-paraver"]
+
+ # TODO : need to handle cross compiling build
+ if '+gui' not in spec:
+ configure_args.append('--without-gui')
+
configure(*configure_args)
- make(parallel=False)
+ make()
make("install", parallel=False)
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py
index 558535bec6..36cf3058d7 100644
--- a/var/spack/repos/builtin/packages/cuda/package.py
+++ b/var/spack/repos/builtin/packages/cuda/package.py
@@ -39,7 +39,7 @@ class Cuda(Package):
Type, select runfile and click Download. Spack will search your
current directory for this file. Alternatively, add this file to a
mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://software.llnl.gov/spack/mirrors.html
+ mirror, see http://spack.readthedocs.io/en/latest/mirrors.html.
Note: This package does not currently install the drivers necessary
to run CUDA. These will need to be installed manually. See:
diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py
index 4954e435c0..a22ac52714 100644
--- a/var/spack/repos/builtin/packages/curl/package.py
+++ b/var/spack/repos/builtin/packages/curl/package.py
@@ -32,6 +32,8 @@ class Curl(Package):
homepage = "http://curl.haxx.se"
url = "http://curl.haxx.se/download/curl-7.46.0.tar.bz2"
+ version('7.50.3', 'bd177fd6deecce00cfa7b5916d831c5e')
+ version('7.50.2', '6e161179f7af4b9f8b6ea21420132719')
version('7.50.1', '015f6a0217ca6f2c5442ca406476920b')
version('7.49.1', '6bb1f7af5b58b30e4e6414b8c1abccab')
version('7.47.1', '9ea3123449439bbd960cd25cf98796fb')
diff --git a/var/spack/repos/builtin/packages/daal/package.py b/var/spack/repos/builtin/packages/daal/package.py
index e13dd80e19..35cb6cbce8 100644
--- a/var/spack/repos/builtin/packages/daal/package.py
+++ b/var/spack/repos/builtin/packages/daal/package.py
@@ -9,7 +9,7 @@ class Daal(IntelInstaller):
Note: You will have to add the download file to a
mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://software.llnl.gov/spack/mirrors.html"""
+ mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "https://software.intel.com/en-us/daal"
diff --git a/var/spack/repos/builtin/packages/damageproto/package.py b/var/spack/repos/builtin/packages/damageproto/package.py
new file mode 100644
index 0000000000..84e0fac311
--- /dev/null
+++ b/var/spack/repos/builtin/packages/damageproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Damageproto(Package):
+ """X Damage Extension.
+
+ This package contains header files and documentation for the X Damage
+ extension. Library and server implementations are separate."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/damageproto"
+ url = "https://www.x.org/releases/individual/proto/damageproto-1.2.1.tar.gz"
+
+ version('1.2.1', 'bf8c47b7f48625230cff155180f8ddce')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/darshan-runtime/package.py b/var/spack/repos/builtin/packages/darshan-runtime/package.py
new file mode 100644
index 0000000000..640573fdc1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py
@@ -0,0 +1,65 @@
+#
+# 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 DarshanRuntime(Package):
+ """Darshan (runtime) is a scalable HPC I/O characterization tool
+ designed to capture an accurate picture of application I/O behavior,
+ including properties such as patterns of access within files, with
+ minimum overhead. DarshanRuntime package should be installed on
+ systems where you intend to instrument MPI applications."""
+
+ homepage = "http://www.mcs.anl.gov/research/projects/darshan/"
+ url = "ftp://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz"
+
+ version('3.1.0', '439d717323e6265b2612ed127886ae52')
+ version('3.0.0', '732577fe94238936268d74d7d74ebd08')
+
+ depends_on('mpi')
+ depends_on('zlib')
+
+ variant('slurm', default=False, description='Use Slurm Job ID')
+ variant('cobalt', default=False, description='Use Coblat Job Id')
+ variant('pbs', default=False, description='Use PBS Job Id')
+
+ def install(self, spec, prefix):
+
+ job_id = 'NONE'
+ if '+slurm' in spec:
+ job_id = 'SLURM_JOBID'
+ if '+cobalt' in spec:
+ job_id = 'COBALT_JOBID'
+ if '+pbs' in spec:
+ job_id = 'PBS_JOBID'
+
+ # TODO: BG-Q and other platform configure options
+ options = ['CC=%s' % spec['mpi'].mpicc,
+ '--with-mem-align=8',
+ '--with-log-path-by-env=DARSHAN_LOG_DIR_PATH',
+ '--with-jobid-env=%s' % job_id,
+ '--with-zlib=%s' % spec['zlib'].prefix]
+
+ with working_dir('spack-build', create=True):
+ configure = Executable('../darshan-runtime/configure')
+ configure('--prefix=%s' % prefix, *options)
+ make()
+ make('install')
+
+ def setup_environment(self, spack_env, run_env):
+ # default path for log file, could be user or site specific setting
+ darshan_log_dir = '%s' % os.environ['HOME']
+ run_env.set('DARSHAN_LOG_DIR_PATH', darshan_log_dir)
diff --git a/var/spack/repos/builtin/packages/darshan-util/package.py b/var/spack/repos/builtin/packages/darshan-util/package.py
new file mode 100644
index 0000000000..3446104a83
--- /dev/null
+++ b/var/spack/repos/builtin/packages/darshan-util/package.py
@@ -0,0 +1,41 @@
+#
+# 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 DarshanUtil(Package):
+ """Darshan (util) is collection of tools for parsing and summarizing log
+ files produced by Darshan (runtime) instrumentation. This package is
+ typically installed on systems (front-end) where you intend to analyze
+ log files produced by Darshan (runtime)."""
+
+ homepage = "http://www.mcs.anl.gov/research/projects/darshan/"
+ url = "ftp://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz"
+
+ version('3.1.0', '439d717323e6265b2612ed127886ae52')
+ version('3.0.0', '732577fe94238936268d74d7d74ebd08')
+
+ depends_on('zlib')
+
+ def install(self, spec, prefix):
+
+ options = ['CC=%s' % self.compiler.cc,
+ '--with-zlib=%s' % spec['zlib'].prefix]
+
+ with working_dir('spack-build', create=True):
+ configure = Executable('../darshan-util/configure')
+ configure('--prefix=%s' % prefix, *options)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/datamash/package.py b/var/spack/repos/builtin/packages/datamash/package.py
index ef30c50ebe..85adeca996 100644
--- a/var/spack/repos/builtin/packages/datamash/package.py
+++ b/var/spack/repos/builtin/packages/datamash/package.py
@@ -26,8 +26,7 @@ from spack import *
class Datamash(Package):
- """
- GNU datamash is a command-line program which performs basic numeric,
+ """GNU datamash is a command-line program which performs basic numeric,
textual and statistical operations on input textual data files.
"""
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 939d8fc013..563f751e0b 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -23,15 +23,19 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import sys
-class Dealii(Package):
+class Dealii(CMakePackage):
"""C++ software library providing well-documented tools to build finite
element codes for a broad variety of PDEs."""
homepage = "https://www.dealii.org"
url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz"
+ # Don't add RPATHs to this package for the full build DAG.
+ # only add for immediate deps.
+ transitive_rpaths = False
+
+ version('8.4.2', '84c6bd3f250d3e0681b645d24cb987a7')
version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d')
version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00')
version('8.3.0', 'fc6cdcb16309ef4bea338a4f014de6fa')
@@ -67,11 +71,11 @@ class Dealii(Package):
# Boost 1.58 is blacklisted, see
# https://github.com/dealii/dealii/issues/1591
# Require at least 1.59
- # +python won't affect @:8.4.1
+ # +python won't affect @:8.4.2
depends_on("boost@1.59.0:+thread+system+serialization+iostreams",
- when='@:8.4.1~mpi')
+ when='@:8.4.2~mpi')
depends_on("boost@1.59.0:+thread+system+serialization+iostreams+mpi",
- when='@:8.4.1+mpi')
+ when='@:8.4.2+mpi')
# since @8.5.0: (and @develop) python bindings are introduced:
depends_on("boost@1.59.0:+thread+system+serialization+iostreams",
when='@8.5.0:~mpi~python')
@@ -102,8 +106,9 @@ class Dealii(Package):
depends_on("netcdf-cxx", when='+netcdf+mpi')
depends_on("oce", when='+oce')
depends_on("p4est", when='+p4est+mpi')
- depends_on("petsc+mpi", when='@8.5.0:+petsc+mpi')
- depends_on("slepc", when='@8.5.0:+slepc+petsc+mpi')
+ depends_on("petsc+mpi", when='@8.4.2:+petsc+mpi')
+ depends_on('python', when='@8.5.0:+python')
+ depends_on("slepc", when='@8.4.2:+slepc+petsc+mpi')
depends_on("petsc@:3.6.4+mpi", when='@:8.4.1+petsc+mpi')
depends_on("slepc@:3.6.3", when='@:8.4.1+slepc+petsc+mpi')
depends_on("trilinos", when='+trilinos+mpi')
@@ -112,18 +117,16 @@ class Dealii(Package):
depends_on("numdiff", when='@develop')
depends_on("astyle@2.04", when='@develop')
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
-
+ def build_type(self):
# CMAKE_BUILD_TYPE should be DebugRelease | Debug | Release
- for word in options[:]:
- if word.startswith('-DCMAKE_BUILD_TYPE'):
- options.remove(word)
+ return 'DebugRelease'
- dsuf = 'dylib' if sys.platform == 'darwin' else 'so'
+ def cmake_args(self):
+ spec = self.spec
+ options = []
+
+ lapack_blas = spec['lapack'].lapack_libs + spec['blas'].blas_libs
options.extend([
- '-DCMAKE_BUILD_TYPE=DebugRelease',
'-DDEAL_II_COMPONENT_EXAMPLES=ON',
'-DDEAL_II_WITH_THREADS:BOOL=ON',
'-DBOOST_DIR=%s' % spec['boost'].prefix,
@@ -134,9 +137,7 @@ class Dealii(Package):
'-DLAPACK_FOUND=true',
'-DLAPACK_INCLUDE_DIRS=%s;%s' % (
spec['lapack'].prefix.include, spec['blas'].prefix.include),
- '-DLAPACK_LIBRARIES=%s;%s' % (
- spec['lapack'].lapack_shared_lib,
- spec['blas'].blas_shared_lib),
+ '-DLAPACK_LIBRARIES=%s' % lapack_blas.joined(';'),
'-DMUPARSER_DIR=%s' % spec['muparser'].prefix,
'-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix,
'-DTBB_DIR=%s' % spec['tbb'].prefix,
@@ -210,9 +211,9 @@ class Dealii(Package):
'-DNETCDF_FOUND=true',
'-DNETCDF_LIBRARIES=%s;%s' % (
join_path(spec['netcdf-cxx'].prefix.lib,
- 'libnetcdf_c++.%s' % dsuf),
+ 'libnetcdf_c++.%s' % dso_suffix),
join_path(spec['netcdf'].prefix.lib,
- 'libnetcdf.%s' % dsuf)),
+ 'libnetcdf.%s' % dso_suffix)),
'-DNETCDF_INCLUDE_DIRS=%s;%s' % (
spec['netcdf-cxx'].prefix.include,
spec['netcdf'].prefix.include),
@@ -233,124 +234,7 @@ class Dealii(Package):
'-DDEAL_II_WITH_OPENCASCADE=OFF'
])
- cmake('.', *options)
- make()
- if self.run_tests:
- make("test")
- make("install")
-
- # run some MPI examples with different solvers from PETSc and Trilinos
- if self.run_tests:
- env['DEAL_II_DIR'] = prefix
- print('=====================================')
- print('============ EXAMPLES ===============')
- print('=====================================')
- # take bare-bones step-3
- print('=====================================')
- print('============ Step-3 =================')
- print('=====================================')
- with working_dir('examples/step-3'):
- cmake('.')
- make('release')
- make('run', parallel=False)
-
- # An example which uses Metis + PETSc
- # FIXME: switch step-18 to MPI
- with working_dir('examples/step-18'):
- print('=====================================')
- print('============= Step-18 ===============')
- print('=====================================')
- # list the number of cycles to speed up
- filter_file(r'(end_time = 10;)', ('end_time = 3;'),
- 'step-18.cc')
- if '^petsc' in spec and '^metis' in spec:
- cmake('.')
- make('release')
- make('run', parallel=False)
-
- # take step-40 which can use both PETSc and Trilinos
- # FIXME: switch step-40 to MPI run
- with working_dir('examples/step-40'):
- print('=====================================')
- print('========== Step-40 PETSc ============')
- print('=====================================')
- # list the number of cycles to speed up
- filter_file(r'(const unsigned int n_cycles = 8;)',
- ('const unsigned int n_cycles = 2;'), 'step-40.cc')
- cmake('.')
- if '^petsc' in spec:
- make('release')
- make('run', parallel=False)
-
- print('=====================================')
- print('========= Step-40 Trilinos ==========')
- print('=====================================')
- # change Linear Algebra to Trilinos
- # The below filter_file should be different for versions
- # before and after 8.4.0
- if spec.satisfies('@8.4.0:'):
- filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
- ('#define FORCE_USE_OF_TRILINOS'),
- 'step-40.cc')
- else:
- filter_file(r'(#define USE_PETSC_LA.*)',
- ('// #define USE_PETSC_LA'), 'step-40.cc')
- if '^trilinos+hypre' in spec:
- make('release')
- make('run', parallel=False)
-
- # the rest of the tests on step 40 only works for
- # dealii version 8.4.0 and after
- if spec.satisfies('@8.4.0:'):
- print('=====================================')
- print('=== Step-40 Trilinos SuperluDist ====')
- print('=====================================')
- # change to direct solvers
- filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # noqa
- filter_file(
- r'(LA::MPI::PreconditionAMG preconditioner;)',
- (''), 'step-40.cc')
- filter_file(
- r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
- (''), 'step-40.cc')
- filter_file(
- r'(preconditioner.initialize\(system_matrix, data\);)',
- (''), 'step-40.cc')
- filter_file(
- r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # noqa
- filter_file(
- r'(preconditioner\);)', (''), 'step-40.cc')
- if '^trilinos+superlu-dist' in spec:
- make('release')
- make('run', paralle=False)
-
- print('=====================================')
- print('====== Step-40 Trilinos MUMPS =======')
- print('=====================================')
- # switch to Mumps
- filter_file(r'(Amesos_Superludist)',
- ('Amesos_Mumps'), 'step-40.cc')
- if '^trilinos+mumps' in spec:
- make('release')
- make('run', parallel=False)
-
- print('=====================================')
- print('============ Step-36 ================')
- print('=====================================')
- with working_dir('examples/step-36'):
- if 'slepc' in spec:
- cmake('.')
- make('release')
- make('run', parallel=False)
-
- print('=====================================')
- print('============ Step-54 ================')
- print('=====================================')
- with working_dir('examples/step-54'):
- if 'oce' in spec:
- cmake('.')
- make('release')
- make('run', parallel=False)
+ return options
def setup_environment(self, spack_env, env):
env.set('DEAL_II_DIR', self.prefix)
diff --git a/var/spack/repos/builtin/packages/dmxproto/package.py b/var/spack/repos/builtin/packages/dmxproto/package.py
new file mode 100644
index 0000000000..34213bba5f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dmxproto/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Dmxproto(Package):
+ """Distributed Multihead X (DMX) Extension.
+
+ This extension defines a protocol for clients to access a front-end proxy
+ X server that controls multiple back-end X servers making up a large
+ display."""
+
+ homepage = "http://dmx.sourceforge.net/"
+ url = "https://www.x.org/archive/individual/proto/dmxproto-2.3.1.tar.gz"
+
+ version('2.3.1', '7c52af95aac192e8de31bd9a588ce121')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/dri2proto/package.py b/var/spack/repos/builtin/packages/dri2proto/package.py
index 65b86714f1..d05e7ea231 100644
--- a/var/spack/repos/builtin/packages/dri2proto/package.py
+++ b/var/spack/repos/builtin/packages/dri2proto/package.py
@@ -26,14 +26,21 @@ from spack import *
class Dri2proto(Package):
- """DRI2 Protocol Headers."""
- homepage = "http://http://cgit.freedesktop.org/xorg/proto/dri2proto/"
- url = "http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.8.tar.gz"
+ """Direct Rendering Infrastructure 2 Extension.
+
+ This extension defines a protocol to securely allow user applications to
+ access the video hardware without requiring data to be passed through the
+ X server."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/dri2proto/"
+ url = "https://www.x.org/releases/individual/proto/dri2proto-2.8.tar.gz"
version('2.8', '19ea18f63d8ae8053c9fa84b60365b77')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
- make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/dri3proto/package.py b/var/spack/repos/builtin/packages/dri3proto/package.py
new file mode 100644
index 0000000000..cd2594d5da
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dri3proto/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Dri3proto(Package):
+ """Direct Rendering Infrastructure 3 Extension.
+
+ This extension defines a protocol to securely allow user applications to
+ access the video hardware without requiring data to be passed through the
+ X server."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/dri3proto/"
+ url = "https://www.x.org/releases/individual/proto/dri3proto-1.0.tar.gz"
+
+ version('1.0', '25e84a49a076862277ee12aebd49ff5f')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py
index 90c83bdc3a..420ab0fc68 100644
--- a/var/spack/repos/builtin/packages/dyninst/package.py
+++ b/var/spack/repos/builtin/packages/dyninst/package.py
@@ -28,10 +28,20 @@ from spack import *
class Dyninst(Package):
"""API for dynamic binary instrumentation. Modify programs while they
are executing without recompiling, re-linking, or re-executing."""
+
homepage = "https://paradyn.org"
- url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz"
+ url = "https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz"
list_url = "http://www.dyninst.org/downloads/dyninst-8.x"
+ # version 9.2.1b was the latest git commit when trying to port to a
+ # ppc64le system to get fixes in computeAddrWidth independent of
+ # endianness. This version can be removed if the next release includes
+ # this change. The actual commit was
+ # b8596ad4023ec40ac07e669ff8ea3ec06e262703
+ version('9.2.1b', git='https://github.com/dyninst/dyninst.git',
+ commit='859cb778e20b619443c943c96dd1851da763142b')
+ version('9.2.0', 'ad023f85e8e57837ed9de073b59d6bab',
+ url="https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz")
version('9.1.0', '5c64b77521457199db44bec82e4988ac',
url="http://www.paradyn.org/release9.1.0/DyninstAPI-9.1.0.tgz")
version('8.2.1', 'abf60b7faabe7a2e4b54395757be39c7',
@@ -41,30 +51,44 @@ class Dyninst(Package):
version('8.1.1', 'd1a04e995b7aa70960cd1d1fac8bd6ac',
url="http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz")
+ variant('stat_dysect', default=False,
+ description="patch for STAT's DySectAPI")
+
depends_on("libelf")
depends_on("libdwarf")
depends_on("boost@1.42:")
depends_on('cmake', type='build')
+ patch('stat_dysect.patch', when='+stat_dysect')
+ patch('stackanalysis_h.patch', when='@9.2.0')
+
# new version uses cmake
def install(self, spec, prefix):
+ if spec.satisfies('@:8.1'):
+ configure("--prefix=" + prefix)
+ make()
+ make("install")
+ return
+
libelf = spec['libelf'].prefix
libdwarf = spec['libdwarf'].prefix
with working_dir('spack-build', create=True):
- cmake('..',
- '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include,
- '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib,
- '-DBoost_NO_SYSTEM_PATHS=TRUE',
- '-DLIBELF_INCLUDE_DIR=%s' % join_path(
- libelf.include, 'libelf'),
- '-DLIBELF_LIBRARIES=%s' % join_path(
- libelf.lib, 'libelf.so'),
- '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include,
- '-DLIBDWARF_LIBRARIES=%s' % join_path(
- libdwarf.lib, 'libdwarf.so'),
- *std_cmake_args)
-
+ args = ['..',
+ '-DBoost_INCLUDE_DIR=%s' % spec['boost'].prefix.include,
+ '-DBoost_LIBRARY_DIR=%s' % spec['boost'].prefix.lib,
+ '-DBoost_NO_SYSTEM_PATHS=TRUE',
+ '-DLIBELF_INCLUDE_DIR=%s' % join_path(
+ libelf.include, 'libelf'),
+ '-DLIBELF_LIBRARIES=%s' % join_path(
+ libelf.lib, 'libelf.so'),
+ '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include,
+ '-DLIBDWARF_LIBRARIES=%s' % join_path(
+ libdwarf.lib, 'libdwarf.so')]
+ if spec.satisfies('arch=linux-redhat7-ppc64le'):
+ args.append('-Darch_ppc64_little_endian=1')
+ args += std_cmake_args
+ cmake(*args)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch b/var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch
new file mode 100644
index 0000000000..2c04d935d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch
@@ -0,0 +1,11 @@
+--- a/dataflowAPI/h/stackanalysis.h 2016-06-29 14:54:14.000000000 -0700
++++ b/dataflowAPI/h/stackanalysis.h 2016-08-02 09:50:13.619079000 -0700
+@@ -331,7 +331,7 @@
+
+ // To build intervals, we must replay the effect of each instruction.
+ // To avoid sucking enormous time, we keep those transfer functions around...
+- typedef std::map<ParseAPI::Block *, std::map<Offset, TransferFuncs>>
++ typedef std::map<ParseAPI::Block *, std::map<Offset, TransferFuncs> >
+ InstructionEffects;
+
+ DATAFLOW_EXPORT StackAnalysis();
diff --git a/var/spack/repos/builtin/packages/dyninst/stat_dysect.patch b/var/spack/repos/builtin/packages/dyninst/stat_dysect.patch
new file mode 100644
index 0000000000..c15403683f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dyninst/stat_dysect.patch
@@ -0,0 +1,96 @@
+From 3aebb41ce0ea5b578a1ebf6810446c660066c525 Mon Sep 17 00:00:00 2001
+From: Jesper Puge Nielsen <nielsen34@llnl.gov>
+Date: Wed, 12 Aug 2015 21:07:52 -0700
+Subject: [PATCH] =?UTF-8?q?Exposed=20stackwalker=20and=20proc=20callback=20status=20to=20DySect
+=20=C3c?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ dyninstAPI/h/BPatch_process.h | 13 +++++++++++++
+ dyninstAPI/src/BPatch_process.C | 18 ++++++++++++++++++
+ dyninstAPI/src/dynProcess.h | 3 ++-
+ 3 files changed, 33 insertions(+), 1 deletions(-)
+
+diff --git a/dyninstAPI/h/BPatch_process.h b/dyninstAPI/h/BPatch_process.h
+index 5e01bbb..1316bb2 100644
+--- a/dyninstAPI/h/BPatch_process.h
++++ b/dyninstAPI/h/BPatch_process.h
+@@ -225,6 +225,10 @@ class BPATCH_DLL_EXPORT BPatch_process : public BPatch_addressSpace {
+ //
+ // this function should go away as soon as Paradyn links against Dyninst
+ PCProcess *lowlevel_process() const { return llproc; }
++
++ // Expose walker from Dyninst proces
++ void *get_walker() const;
++
+ // These internal funcs trigger callbacks registered to matching events
+ bool triggerStopThread(instPoint *intPoint, func_instance *intFunc,
+ int cb_ID, void *retVal);
+@@ -281,6 +285,15 @@ class BPATCH_DLL_EXPORT BPatch_process : public BPatch_addressSpace {
+
+ bool continueExecution();
+
++ // BPatch_process::keepStopped
++ //
++ // Changes the desired process stat to prevent
++ // Dyninst from resuming the process after
++ // handling the current event.
++ // Must be called from an event handler.
++
++ void keepStopped();
++
+ // BPatch_process::terminateExecution
+ //
+ // Terminate mutatee process
+diff --git a/dyninstAPI/src/BPatch_process.C b/dyninstAPI/src/BPatch_process.C
+index 115f215..809e797 100644
+--- a/dyninstAPI/src/BPatch_process.C
++++ b/dyninstAPI/src/BPatch_process.C
+@@ -507,6 +507,19 @@ bool BPatch_process::continueExecution()
+ }
+
+ /*
++ * BPatch_process::keepStopped
++ *
++ * Changes the desired process stat to prevent
++ * Dyninst from resuming the process after
++ * handling the current event.
++ * Must be called from an event handler.
++ */
++void BPatch_process::keepStopped()
++{
++ llproc->setDesiredProcessState(PCProcess::ps_stopped);
++}
++
++/*
+ * BPatch_process::terminateExecution
+ *
+ * Kill the thread.
+@@ -1754,3 +1767,8 @@ bool BPatch_process::protectAnalyzedCode()
+ }
+ return ret;
+ }
++
++void *BPatch_process::get_walker() const
++{
++ return llproc->get_walker();
++}
+diff --git a/dyninstAPI/src/dynProcess.h b/dyninstAPI/src/dynProcess.h
+index 54b0c6e..00721d1 100644
+--- a/dyninstAPI/src/dynProcess.h
++++ b/dyninstAPI/src/dynProcess.h
+@@ -302,7 +302,8 @@ public:
+ // Stackwalking internals
+ bool walkStack(pdvector<Frame> &stackWalk, PCThread *thread);
+ bool getActiveFrame(Frame &frame, PCThread *thread);
+-
++ Dyninst::Stackwalker::Walker *get_walker() { return stackwalker_; }
++
+ void addSignalHandler(Address, unsigned);
+ bool isInSignalHandler(Address addr);
+
+--
+1.7.1
+
diff --git a/var/spack/repos/builtin/packages/editres/package.py b/var/spack/repos/builtin/packages/editres/package.py
new file mode 100644
index 0000000000..52ad33b133
--- /dev/null
+++ b/var/spack/repos/builtin/packages/editres/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Editres(Package):
+ """Dynamic resource editor for X Toolkit applications."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/editres"
+ url = "https://www.x.org/archive/individual/app/editres-1.0.6.tar.gz"
+
+ version('1.0.6', '310c504347ca499874593ac96e935353')
+
+ depends_on('libxaw')
+ depends_on('libx11')
+ depends_on('libxt')
+ depends_on('libxmu')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
index 36d6850c1a..ec55d68683 100644
--- a/var/spack/repos/builtin/packages/eigen/package.py
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -26,17 +26,17 @@ from spack import *
class Eigen(Package):
- """
- Eigen is a C++ template library for linear algebra
-
- Matrices, vectors, numerical solvers, and related algorithms
+ """Eigen is a C++ template library for linear algebra matrices,
+ vectors, numerical solvers, and related algorithms.
"""
homepage = 'http://eigen.tuxfamily.org/'
- url = 'http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2'
+ url = 'https://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2'
- version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184',
- url='http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2')
+ version('3.2.10', 'a85bb68c82988648c3d53ba9768d7dcbcfe105f8')
+ version('3.2.9', '59ab81212f8eb2534b1545a9b42c38bf618a0d71')
+ version('3.2.8', '64f4aef8012a424c7e079eaf0be71793ab9bc6e0')
+ version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184')
variant('debug', default=False,
description='Builds the library in debug mode')
diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py
index b089e585dd..acaf863935 100644
--- a/var/spack/repos/builtin/packages/elk/package.py
+++ b/var/spack/repos/builtin/packages/elk/package.py
@@ -87,12 +87,12 @@ class Elk(Package):
# BLAS/LAPACK support
# Note: BLAS/LAPACK must be compiled with OpenMP support
# if the +openmp variant is chosen
- blas = 'blas.a'
+ blas = 'blas.a'
lapack = 'lapack.a'
if '+blas' in spec:
- blas = spec['blas'].blas_shared_lib
+ blas = spec['blas'].blas_libs.joined()
if '+lapack' in spec:
- lapack = spec['lapack'].lapack_shared_lib
+ lapack = spec['lapack'].lapack_libs.joined()
# lapack must come before blas
config['LIB_LPK'] = ' '.join([lapack, blas])
diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py
index f28d63f6c3..b433bf40b0 100644
--- a/var/spack/repos/builtin/packages/elpa/package.py
+++ b/var/spack/repos/builtin/packages/elpa/package.py
@@ -34,8 +34,16 @@ class Elpa(Package):
homepage = 'http://elpa.mpcdf.mpg.de/'
url = 'http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz'
- version('2015.11.001', 'de0f35b7ee7c971fd0dca35c900b87e6',
- url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz')
+ version(
+ '2016.05.003',
+ '88a9f3f3bfb63e16509dd1be089dcf2c',
+ url='http://elpa.mpcdf.mpg.de/html/Releases/2016.05.003/elpa-2016.05.003.tar.gz'
+ )
+ version(
+ '2015.11.001',
+ 'de0f35b7ee7c971fd0dca35c900b87e6',
+ url='http://elpa.mpcdf.mpg.de/elpa-2015.11.001.tar.gz'
+ )
variant('openmp', default=False, description='Activates OpenMP support')
@@ -46,7 +54,24 @@ class Elpa(Package):
def install(self, spec, prefix):
- options = ["--prefix=%s" % prefix]
+ options = [
+ 'CC={0}'.format(self.spec['mpi'].mpicc),
+ 'FC={0}'.format(self.spec['mpi'].mpifc),
+ 'CXX={0}'.format(self.spec['mpi'].mpicxx),
+ 'FCFLAGS={0}'.format(
+ spec['lapack'].lapack_libs.joined()
+ ),
+ 'LDFLAGS={0}'.format(
+ spec['lapack'].lapack_libs.joined()
+ ),
+ 'SCALAPACK_FCFLAGS={0}'.format(
+ spec['scalapack'].scalapack_libs.joined()
+ ),
+ 'SCALAPACK_LDFLAGS={0}'.format(
+ spec['scalapack'].scalapack_libs.joined()
+ ),
+ '--prefix={0}'.format(self.prefix)
+ ]
if '+openmp' in spec:
options.append("--enable-openmp")
diff --git a/var/spack/repos/builtin/packages/encodings/package.py b/var/spack/repos/builtin/packages/encodings/package.py
new file mode 100644
index 0000000000..67b21a6e07
--- /dev/null
+++ b/var/spack/repos/builtin/packages/encodings/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Encodings(Package):
+ """X.org encodings font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/encodings"
+ url = "https://www.x.org/archive/individual/font/encodings-1.0.4.tar.gz"
+
+ version('1.0.4', '1a631784ce204d667abcc329b851670c')
+
+ depends_on('font-util')
+
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py
index 85594bab47..335fa1a3fe 100644
--- a/var/spack/repos/builtin/packages/environment-modules/package.py
+++ b/var/spack/repos/builtin/packages/environment-modules/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
class EnvironmentModules(Package):
@@ -30,7 +31,7 @@ class EnvironmentModules(Package):
modification of a user's environment via modulefiles."""
homepage = "https://sourceforge.net/p/modules/wiki/Home/"
- url = "http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz"
+ url = "http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz"
version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb')
@@ -40,22 +41,38 @@ class EnvironmentModules(Package):
def install(self, spec, prefix):
tcl_spec = spec['tcl']
+ # We are looking for tclConfig.sh
+ tcl_config_name = 'tclConfig.sh'
+ tcl_config_dir_options = [tcl_spec.prefix.lib,
+ tcl_spec.prefix.lib64]
+
+ tcl_config_found = False
+ for tcl_config_dir in tcl_config_dir_options:
+ tcl_config_found = os.path.exists(
+ join_path(tcl_config_dir, tcl_config_name))
+ if tcl_config_found:
+ break
+
+ if not tcl_config_found:
+ raise InstallError('Failed to locate ' + tcl_config_name)
+
# See: https://sourceforge.net/p/modules/bugs/62/
- CPPFLAGS = ['-DUSE_INTERP_ERRORLINE']
+ cpp_flags = ['-DUSE_INTERP_ERRORLINE']
+
config_args = [
"--without-tclx",
"--with-tclx-ver=0.0",
- "--prefix=%s" % prefix,
+ "--prefix=" + prefix,
# It looks for tclConfig.sh
- "--with-tcl=%s" % join_path(tcl_spec.prefix, 'lib'),
- "--with-tcl-ver=%d.%d" % (tcl_spec.version.version[
- 0], tcl_spec.version.version[1]),
+ "--with-tcl=" + tcl_config_dir,
+ "--with-tcl-ver=%d.%d" % (
+ tcl_spec.version.version[0], tcl_spec.version.version[1]),
'--disable-debug',
'--disable-dependency-tracking',
'--disable-silent-rules',
'--disable-versioning',
- '--datarootdir=%s' % prefix.share,
- 'CPPFLAGS=%s' % ' '.join(CPPFLAGS)
+ '--datarootdir=' + prefix.share,
+ 'CPPFLAGS=' + ' '.join(cpp_flags)
]
configure(*config_args)
diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py
index 447964f286..d2c825513c 100644
--- a/var/spack/repos/builtin/packages/espresso/package.py
+++ b/var/spack/repos/builtin/packages/espresso/package.py
@@ -23,17 +23,16 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-
import os
class Espresso(Package):
- """
- QE is an integrated suite of Open-Source computer codes for
+ """QE is an integrated suite of Open-Source computer codes for
electronic-structure calculations and materials modeling at
the nanoscale. It is based on density-functional theory, plane
waves, and pseudopotentials.
"""
+
homepage = 'http://quantum-espresso.org'
url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz'
@@ -89,7 +88,7 @@ class Espresso(Package):
# Add a list of directories to search
search_list = []
- for name, dependency_spec in spec.dependencies.iteritems():
+ for dependency_spec in spec.dependencies():
search_list.extend([dependency_spec.prefix.lib,
dependency_spec.prefix.lib64])
diff --git a/var/spack/repos/builtin/packages/etsf_io/package.py b/var/spack/repos/builtin/packages/etsf_io/package.py
new file mode 100644
index 0000000000..c1e6f2eded
--- /dev/null
+++ b/var/spack/repos/builtin/packages/etsf_io/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 EtsfIo(Package):
+ """ETSF_IO is a library implementing the Nanoquanta/ETSF file
+ format specifications.
+
+ ETSF_IO enables an architecture-independent exchange of crystallographic
+ data, electronic wavefunctions, densities and potentials, as well as
+ spectroscopic data. It is meant to be used by quantum-physical and
+ quantum-chemical applications relying upon Density Functional Theory (DFT).
+ """
+
+ homepage = "http://www.etsf.eu/resources/software/libraries_and_tools"
+ url = "https://launchpad.net/etsf-io/1.0/1.0.4/+download/etsf_io-1.0.4.tar.gz"
+
+ version('1.0.4', '32d0f7143278bd925b334c69fa425da1')
+
+ depends_on("netcdf-fortran")
+ depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support
+
+ def install(self, spec, prefix):
+ options = ['--prefix=%s' % prefix]
+ oapp = options.append
+
+ # Specify installation directory for Fortran module files
+ # Default is [INCLUDEDIR/FC_TYPE]
+ oapp("--with-moduledir=%s" % prefix.include)
+
+ # Netcdf4/HDF
+ hdf_libs = "-L%s -lhdf5_hl -lhdf5" % spec["hdf5"].prefix.lib
+ options.extend([
+ "--with-netcdf-incs=-I%s" % spec["netcdf-fortran"].prefix.include,
+ "--with-netcdf-libs=-L%s -lnetcdff -lnetcdf %s" % (
+ spec["netcdf-fortran"].prefix.lib, hdf_libs),
+ ])
+
+ configure(*options)
+
+ make()
+ make("check")
+ make("install")
diff --git a/var/spack/repos/builtin/packages/everytrace-example/package.py b/var/spack/repos/builtin/packages/everytrace-example/package.py
new file mode 100644
index 0000000000..8c49e04634
--- /dev/null
+++ b/var/spack/repos/builtin/packages/everytrace-example/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 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 EverytraceExample(CMakePackage):
+ """Get stack trace EVERY time a program exits."""
+
+ homepage = "https://github.com/citibeth/everytrace-example"
+ version('develop',
+ git='https://github.com/citibeth/everytrace-example.git',
+ branch='develop')
+
+ depends_on('cmake', type='build')
+ depends_on('everytrace+mpi+fortran')
+
+ # Currently the only MPI this everytrace works with.
+ depends_on('openmpi')
+
+ def setup_environment(self, spack_env, env):
+ env.prepend_path('PATH', join_path(self.prefix, 'bin'))
diff --git a/var/spack/repos/builtin/packages/everytrace/package.py b/var/spack/repos/builtin/packages/everytrace/package.py
new file mode 100644
index 0000000000..a3f3e2cfce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/everytrace/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 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 Everytrace(CMakePackage):
+ """Get stack trace EVERY time a program exits."""
+
+ homepage = "https://github.com/citibeth/everytrace"
+ url = "https://github.com/citibeth/everytrace/tarball/0.2.0"
+
+ version('0.2.0', '2af0e5b6255064d5191accebaa70d222')
+ version('develop',
+ git='https://github.com/citibeth/everytrace.git', branch='develop')
+
+ variant('mpi', default=True, description='Enables MPI parallelism')
+ variant('fortran', default=True,
+ description='Enable use with Fortran programs')
+
+ depends_on('cmake', type='build')
+ depends_on('mpi', when='+mpi')
+
+ def cmake_args(self):
+ spec = self.spec
+ return [
+ '-DUSE_MPI=%s' % ('YES' if '+mpi' in spec else 'NO'),
+ '-DUSE_FORTRAN=%s' % ('YES' if '+fortran' in spec else 'NO')]
+
+ def setup_environment(self, spack_env, env):
+ env.prepend_path('PATH', join_path(self.prefix, 'bin'))
diff --git a/var/spack/repos/builtin/packages/evieext/package.py b/var/spack/repos/builtin/packages/evieext/package.py
new file mode 100644
index 0000000000..afc0245f50
--- /dev/null
+++ b/var/spack/repos/builtin/packages/evieext/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Evieext(Package):
+ """Extended Visual Information Extension (XEVIE).
+
+ This extension defines a protocol for a client to determine information
+ about core X visuals beyond what the core protocol provides."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/evieproto"
+ url = "https://www.x.org/archive/individual/proto/evieext-1.1.1.tar.gz"
+
+ version('1.1.1', '018a7d24d0c7926d594246320bcb6a86')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/exodusii/cmake-exodus.patch b/var/spack/repos/builtin/packages/exodusii/cmake-exodus.patch
new file mode 100644
index 0000000000..014381de88
--- /dev/null
+++ b/var/spack/repos/builtin/packages/exodusii/cmake-exodus.patch
@@ -0,0 +1,9 @@
+diff --git a/cmake-exodus b/cmake-exodus
+index 67ccd34..9b749e3 100755
+--- a/cmake-exodus
++++ b/cmake-exodus
+@@ -1,3 +1,4 @@
++#!/bin/bash
+ EXTRA_ARGS=$@
+
+ ### The following assumes you are building in a subdirectory of ACCESS Root
diff --git a/var/spack/repos/builtin/packages/exodusii/exodus-cmake.patch b/var/spack/repos/builtin/packages/exodusii/exodus-cmake.patch
deleted file mode 100644
index 25355269ca..0000000000
--- a/var/spack/repos/builtin/packages/exodusii/exodus-cmake.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/cmake-exodus b/cmake-exodus
-index 787fd9d..ed073a2 100755
---- a/cmake-exodus
-+++ b/cmake-exodus
-@@ -1,4 +1,6 @@
--EXTRA_ARGS=$@
-+#!/bin/bash
-+
-+EXTRA_ARGS=-DSEACASProj_ENABLE_CXX11=OFF
-
- ### Change this to point to the compilers you want to use
- CC=gcc
diff --git a/var/spack/repos/builtin/packages/exodusii/package.py b/var/spack/repos/builtin/packages/exodusii/package.py
index 15fe1e89a6..67024673b2 100644
--- a/var/spack/repos/builtin/packages/exodusii/package.py
+++ b/var/spack/repos/builtin/packages/exodusii/package.py
@@ -27,10 +27,8 @@ from spack import *
# TODO: Add support for a C++11 enabled installation that filters out the
# TODO: "C++11-Disabled" flag (but only if the spec compiler supports C++11).
-# TODO: Add support for parallel installation that uses MPI.
-
-# TODO: Create installation options for NetCDF that support larger page size
-# TODO: suggested by Exodus (see the repository "README" file).
+# TODO: Use variant forwarding to forward the 'mpi' variant to the direct
+# TODO: dependencies 'hdf5' and 'netcdf'.
class Exodusii(Package):
@@ -46,34 +44,43 @@ class Exodusii(Package):
homepage = "https://github.com/gsjaardema/seacas"
url = "https://github.com/gsjaardema/seacas/archive/master.zip"
- version('2016-02-08',
- git='https://github.com/gsjaardema/seacas.git', commit='dcf3529')
+ version('2016-08-09', git='https://github.com/gsjaardema/seacas.git', commit='2ffeb1b')
- depends_on('cmake@2.8.7:', type='build')
- depends_on('hdf5~shared~mpi')
- depends_on('netcdf~mpi')
+ variant('mpi', default=True, description='Enables MPI parallelism.')
- patch('exodus-cmake.patch')
+ depends_on('cmake@2.8.11:', type='build')
+ depends_on('mpi', when='+mpi')
- def patch(self):
- ff = FileFilter('cmake-exodus')
+ # https://github.com/gsjaardema/seacas/blob/master/NetCDF-Mapping.md
+ depends_on('netcdf maxdims=65536 maxvars=524288')
+ depends_on('hdf5+shared')
- ff.filter('CMAKE_INSTALL_PREFIX:PATH=${ACCESS}',
- 'CMAKE_INSTALL_PREFIX:PATH=%s' % self.spec.prefix,
- string=True)
- ff.filter('NetCDF_DIR:PATH=${TPL}',
- 'NetCDF_DIR:PATH=%s' % self.spec['netcdf'].prefix,
- string=True)
- ff.filter('HDF5_ROOT:PATH=${TPL}',
- 'HDF5_ROOT:PATH=%s' % self.spec['hdf5'].prefix,
- string=True)
+ patch('cmake-exodus.patch')
def install(self, spec, prefix):
- mkdirp('build')
- cd('build')
+ cc_path = spec['mpi'].mpicc if '+mpi' in spec else self.compiler.cc
+ cxx_path = spec['mpi'].mpicxx if '+mpi' in spec else self.compiler.cxx
+
+ config_args = std_cmake_args[:]
+ config_args.extend([
+ # General Flags #
+ '-DSEACASProj_ENABLE_CXX11:BOOL=OFF',
+ '-DSEACASProj_ENABLE_Zoltan:BOOL=OFF',
+ '-DHDF5_ROOT:PATH={0}'.format(spec['hdf5'].prefix),
+ '-DNetCDF_DIR:PATH={0}'.format(spec['netcdf'].prefix),
+
+ # MPI Flags #
+ '-DTPL_ENABLE_MPI={0}'.format('ON' if '+mpi' in spec else 'OFF'),
+ '-DCMAKE_C_COMPILER={0}'.format(cc_path),
+ '-DCMAKE_CXX_COMPILER={0}'.format(cxx_path),
+ ])
+
+ build_directory = join_path(self.stage.source_path, 'spack-build')
+ source_directory = self.stage.source_path
- cmake_exodus = Executable('../cmake-exodus')
- cmake_exodus()
+ with working_dir(build_directory, create=True):
+ mcmake = Executable(join_path(source_directory, 'cmake-exodus'))
+ mcmake(*config_args)
- make()
- make('install')
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py
index 7d0fdae1d4..0262bf1e3f 100644
--- a/var/spack/repos/builtin/packages/expat/package.py
+++ b/var/spack/repos/builtin/packages/expat/package.py
@@ -28,15 +28,16 @@ from spack import *
class Expat(Package):
"""<eXpat/> is an XML parser library written in C"""
homepage = "http://expat.sourceforge.net/"
- url = "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz"
- version('2.1.0', 'dd7dab7a5fea97d2a6a43f511449b7cd')
-
- depends_on('cmake', type='build')
+ version('2.2.0', '2f47841c829facb346eb6e3fab5212e2',
+ url="http://downloads.sourceforge.net/project/expat/expat/2.2.0/expat-2.2.0.tar.bz2")
+ version('2.1.0', 'dd7dab7a5fea97d2a6a43f511449b7cd',
+ url="http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz")
def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make('install')
+ make()
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py
index 72bfbe6326..cb20a8109e 100644
--- a/var/spack/repos/builtin/packages/extrae/package.py
+++ b/var/spack/repos/builtin/packages/extrae/package.py
@@ -53,8 +53,8 @@ class Extrae(Package):
programming models either alone or in conjunction with MPI :
OpenMP, CUDA, OpenCL, pthread, OmpSs"""
homepage = "http://www.bsc.es/computer-sciences/extrae"
- url = "http://www.bsc.es/ssl/apps/performanceTools/files/extrae-3.0.1.tar.bz2"
- version('3.0.1', 'a6a8ca96cd877723cd8cc5df6bdb922b')
+ url = "http://www.bsc.es/ssl/apps/performanceTools/files/extrae-3.3.0.tar.bz2"
+ version('3.3.0', 'f46e3f1a6086b5b3ac41c9585b42952d')
depends_on("mpi")
depends_on("dyninst")
@@ -62,6 +62,9 @@ class Extrae(Package):
depends_on("boost")
depends_on("libdwarf")
depends_on("papi")
+ depends_on("libelf")
+ depends_on("libxml2")
+ depends_on("binutils+libiberty")
def install(self, spec, prefix):
if 'openmpi' in spec:
@@ -80,6 +83,9 @@ class Extrae(Package):
"--with-papi=%s" % spec['papi'].prefix,
"--with-dyninst-headers=%s" % spec[
'dyninst'].prefix.include,
+ "--with-elf=%s" % spec['libelf'].prefix,
+ "--with-xml-prefix=%s" % spec['libxml2'].prefix,
+ "--with-binutils=%s" % spec['binutils'].prefix,
"--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib)
make()
diff --git a/var/spack/repos/builtin/packages/fenics/hdf5~cxx-detection.patch b/var/spack/repos/builtin/packages/fenics/hdf5~cxx-detection.patch
new file mode 100644
index 0000000000..52e36ab00b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fenics/hdf5~cxx-detection.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt 2016-08-16 02:30:13.466078087 +0200
++++ b/CMakeLists.txt 2016-08-16 02:30:36.879586772 +0200
+@@ -553,7 +553,7 @@
+ set(ENV{HDF5_ROOT} "$ENV{HDF5_DIR}")
+ endif()
+ set(HDF5_PREFER_PARALLEL TRUE)
+- find_package(HDF5)
++ find_package(HDF5 COMPONENTS C)
+ set_package_properties(HDF5 PROPERTIES TYPE OPTIONAL
+ DESCRIPTION "Hierarchical Data Format 5 (HDF5)"
+ URL "https://www.hdfgroup.org/HDF5")
diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py
index eeeefc540d..1dc302fdff 100644
--- a/var/spack/repos/builtin/packages/fenics/package.py
+++ b/var/spack/repos/builtin/packages/fenics/package.py
@@ -62,17 +62,15 @@ class Fenics(Package):
# variant('slepc4py', default=True, description='Uses SLEPc4py')
# variant('pastix', default=True, description='Compile with Pastix')
- patch('petsc-3.7.patch', when='^petsc@3.7:')
+ patch('petsc-3.7.patch', when='@1.6.1^petsc@3.7:')
patch('petsc-version-detection.patch', when='@:1.6.1')
+ patch('hdf5~cxx-detection.patch')
extends('python')
- depends_on('py-numpy')
- depends_on('py-ply')
- depends_on('py-six')
- depends_on('py-sphinx@1.0.1:', when='+doc')
- depends_on('eigen@3.2.0:')
- depends_on('boost')
+ depends_on('eigen@3.2.0:', type='build')
+ depends_on('boost+filesystem+program_options+system+iostreams+timer+regex+chrono')
+
depends_on('mpi', when='+mpi')
depends_on('hdf5', when='+hdf5')
depends_on('parmetis@4.0.2:^metis+real64', when='+parmetis')
@@ -85,13 +83,28 @@ class Fenics(Package):
depends_on('suite-sparse', when='+suite-sparse')
depends_on('qt', when='+qt')
- # This are the build dependencies
- depends_on('py-setuptools')
- depends_on('cmake@2.8.12:')
- depends_on('swig@3.0.3:')
+ depends_on('py-ply', type=nolink)
+ depends_on('py-six', type=nolink)
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-sympy', type=nolink)
+ depends_on('swig@3.0.3:', type=nolink)
+ depends_on('cmake@2.8.12:', type=nolink)
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-sphinx@1.0.1:', when='+doc', type='build')
releases = [
{
+ 'version': '2016.1.0',
+ 'md5': '92e8d00f6487a575987201f0b0d19173',
+ 'resources': {
+ 'ffc': '35457ae164e481ba5c9189ebae060a47',
+ 'fiat': 'ac0c49942831ee434301228842bcc280',
+ 'instant': '0e3dbb464c4d90d691f31f0fdd63d4f6',
+ 'ufl': '37433336e5c9b58d1d5ab4acca9104a7',
+ }
+ },
+ {
'version': '1.6.0',
'md5': '35cb4baf7ab4152a40fb7310b34d5800',
'resources': {
@@ -130,7 +143,7 @@ class Fenics(Package):
def install(self, spec, prefix):
for package in ['ufl', 'ffc', 'fiat', 'instant']:
with working_dir(join_path('depends', package)):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
cmake_args = [
'-DCMAKE_BUILD_TYPE:STRING={0}'.format(
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 570cd1bbdd..53b635ba7c 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -22,8 +22,6 @@
# 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 *
@@ -33,14 +31,17 @@ class Fftw(Package):
size, and of both real and complex data (as well as of even/odd
data, i.e. the discrete cosine/sine transforms or DCT/DST). We
believe that FFTW, which is free software, should become the FFT
- library of choice for most applications.
+ library of choice for most applications."""
- """
homepage = "http://www.fftw.org"
url = "http://www.fftw.org/fftw-3.3.4.tar.gz"
+ version('3.3.5', '6cc08a3b9c7ee06fdd5b9eb02e06f569')
version('3.3.4', '2edab8c06b24feeb3b82bbb3ebf3e7b3')
+ patch('pfft-3.3.5.patch', when="@3.3.5+pfft_patches", level=0)
+ patch('pfft-3.3.4.patch', when="@3.3.4+pfft_patches", level=0)
+
variant(
'float', default=True,
description='Produces a single precision version of the library')
@@ -53,17 +54,25 @@ class Fftw(Package):
'(works only with GCC and libquadmath)')
variant('openmp', default=False, description="Enable OpenMP support.")
variant('mpi', default=False, description='Activate MPI support')
+ variant(
+ 'pfft_patches', default=False,
+ description='Add extra transpose functions for PFFT compatibility')
depends_on('mpi', when='+mpi')
+ depends_on('automake', type='build', when='+pfft_patches')
+ depends_on('autoconf', type='build', when='+pfft_patches')
# TODO : add support for architecture specific optimizations as soon as
# targets are supported
def install(self, spec, prefix):
- options = ['--prefix=%s' % prefix,
- '--enable-shared',
- '--enable-threads']
- # Add support for OpenMP
+ options = [
+ '--prefix={0}'.format(prefix),
+ '--enable-shared',
+ '--enable-threads'
+ ]
+
+ # Add support for OpenMP
if '+openmp' in spec:
# Note: Apple's Clang does not support OpenMP.
if spec.satisfies('%clang'):
@@ -76,19 +85,31 @@ class Fftw(Package):
if '+mpi' in spec:
options.append('--enable-mpi')
+ if '+pfft_patches' in spec:
+ autoreconf = which('autoreconf')
+ autoreconf('-ifv')
+
configure(*options)
make()
+ if self.run_tests:
+ make("check")
make("install")
if '+float' in spec:
configure('--enable-float', *options)
make()
+ if self.run_tests:
+ make("check")
make("install")
if '+long_double' in spec:
configure('--enable-long-double', *options)
make()
+ if self.run_tests:
+ make("check")
make("install")
if '+quad' in spec:
configure('--enable-quad-precision', *options)
make()
+ if self.run_tests:
+ make("check")
make("install")
diff --git a/var/spack/repos/builtin/packages/fftw/pfft-3.3.4.patch b/var/spack/repos/builtin/packages/fftw/pfft-3.3.4.patch
new file mode 100644
index 0000000000..4740a60ae4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fftw/pfft-3.3.4.patch
@@ -0,0 +1,865 @@
+--- mpi/conf.c 2014-03-04 19:41:03.000000000 +0100
++++ mpi/conf.c 2015-09-05 05:53:19.085516467 +0200
+@@ -29,6 +29,8 @@ static const solvtab s =
+ SOLVTAB(XM(transpose_pairwise_register)),
+ SOLVTAB(XM(transpose_alltoall_register)),
+ SOLVTAB(XM(transpose_recurse_register)),
++ SOLVTAB(XM(transpose_pairwise_transposed_register)),
++ SOLVTAB(XM(transpose_alltoall_transposed_register)),
+ SOLVTAB(XM(dft_rank_geq2_register)),
+ SOLVTAB(XM(dft_rank_geq2_transposed_register)),
+ SOLVTAB(XM(dft_serial_register)),
+
+--- mpi/Makefile.am 2013-03-18 13:10:45.000000000 +0100
++++ mpi/Makefile.am 2015-09-05 05:53:19.084516437 +0200
+@@ -16,6 +16,7 @@ BUILT_SOURCES = fftw3-mpi.f03.in fftw3-m
+ CLEANFILES = fftw3-mpi.f03 fftw3l-mpi.f03
+
+ TRANSPOSE_SRC = transpose-alltoall.c transpose-pairwise.c transpose-recurse.c transpose-problem.c transpose-solve.c mpi-transpose.h
++TRANSPOSE_SRC += transpose-alltoall-transposed.c transpose-pairwise-transposed.c
+ DFT_SRC = dft-serial.c dft-rank-geq2.c dft-rank-geq2-transposed.c dft-rank1.c dft-rank1-bigvec.c dft-problem.c dft-solve.c mpi-dft.h
+ RDFT_SRC = rdft-serial.c rdft-rank-geq2.c rdft-rank-geq2-transposed.c rdft-rank1-bigvec.c rdft-problem.c rdft-solve.c mpi-rdft.h
+ RDFT2_SRC = rdft2-serial.c rdft2-rank-geq2.c rdft2-rank-geq2-transposed.c rdft2-problem.c rdft2-solve.c mpi-rdft2.h
+
+--- mpi/mpi-transpose.h 2014-03-04 19:41:03.000000000 +0100
++++ mpi/mpi-transpose.h 2015-09-05 05:53:19.085516467 +0200
+@@ -59,3 +59,5 @@ int XM(mkplans_posttranspose)(const prob
+ void XM(transpose_pairwise_register)(planner *p);
+ void XM(transpose_alltoall_register)(planner *p);
+ void XM(transpose_recurse_register)(planner *p);
++void XM(transpose_pairwise_transposed_register)(planner *p);
++void XM(transpose_alltoall_transposed_register)(planner *p);
+
+--- mpi/transpose-alltoall-transposed.c 1970-01-01 01:00:00.000000000 +0100
++++ mpi/transpose-alltoall-transposed.c 2015-09-05 05:53:19.085516467 +0200
+@@ -0,0 +1,280 @@
++/*
++ * Copyright (c) 2003, 2007-11 Matteo Frigo
++ * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
++ * Copyright (c) 2012 Michael Pippig
++ *
++ * 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; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * 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
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ */
++
++/* plans for distributed out-of-place transpose using MPI_Alltoall,
++ and which destroy the input array (also if TRANSPOSED_IN is used) */
++
++#include "mpi-transpose.h"
++#include <string.h>
++
++typedef struct {
++ solver super;
++ int copy_transposed_out; /* whether to copy the output for TRANSPOSED_OUT,
++ which makes the first transpose out-of-place
++ but costs an extra copy and requires us
++ to destroy the input */
++} S;
++
++typedef struct {
++ plan_mpi_transpose super;
++
++ plan *cld1, *cld2, *cld2rest, *cld3;
++
++ MPI_Comm comm;
++ int *send_block_sizes, *send_block_offsets;
++ int *recv_block_sizes, *recv_block_offsets;
++
++ INT rest_Ioff, rest_Ooff;
++
++ int equal_blocks;
++} P;
++
++/* transpose locally to get contiguous chunks
++ this may take two transposes if the block sizes are unequal
++ (3 subplans, two of which operate on disjoint data) */
++static void apply_pretranspose(
++ const P *ego, R *I, R *O
++ )
++{
++ plan_rdft *cld2, *cld2rest, *cld3;
++
++ cld3 = (plan_rdft *) ego->cld3;
++ if (cld3)
++ cld3->apply(ego->cld3, O, O);
++ /* else TRANSPOSED_IN is true and user wants I transposed */
++
++ cld2 = (plan_rdft *) ego->cld2;
++ cld2->apply(ego->cld2, I, O);
++ cld2rest = (plan_rdft *) ego->cld2rest;
++ if (cld2rest) {
++ cld2rest->apply(ego->cld2rest,
++ I + ego->rest_Ioff, O + ego->rest_Ooff);
++ }
++}
++
++static void apply(const plan *ego_, R *I, R *O)
++{
++ const P *ego = (const P *) ego_;
++ plan_rdft *cld1 = (plan_rdft *) ego->cld1;
++
++ if (cld1) {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, O);
++
++ /* transpose chunks globally */
++ if (ego->equal_blocks)
++ MPI_Alltoall(O, ego->send_block_sizes[0], FFTW_MPI_TYPE,
++ I, ego->recv_block_sizes[0], FFTW_MPI_TYPE,
++ ego->comm);
++ else
++ MPI_Alltoallv(O, ego->send_block_sizes, ego->send_block_offsets,
++ FFTW_MPI_TYPE,
++ I, ego->recv_block_sizes, ego->recv_block_offsets,
++ FFTW_MPI_TYPE,
++ ego->comm);
++
++ /* transpose locally to get non-transposed output */
++ cld1->apply(ego->cld1, I, O);
++ } /* else TRANSPOSED_OUT is true and user wants O transposed */
++ else {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, I);
++
++ /* transpose chunks globally */
++ if (ego->equal_blocks)
++ MPI_Alltoall(I, ego->send_block_sizes[0], FFTW_MPI_TYPE,
++ O, ego->recv_block_sizes[0], FFTW_MPI_TYPE,
++ ego->comm);
++ else
++ MPI_Alltoallv(I, ego->send_block_sizes, ego->send_block_offsets,
++ FFTW_MPI_TYPE,
++ O, ego->recv_block_sizes, ego->recv_block_offsets,
++ FFTW_MPI_TYPE,
++ ego->comm);
++ }
++}
++
++static int applicable(const S *ego, const problem *p_,
++ const planner *plnr)
++{
++ /* in contrast to transpose-alltoall this algorithm can not preserve the input,
++ * since we need at least one transpose before the (out-of-place) Alltoall */
++ const problem_mpi_transpose *p = (const problem_mpi_transpose *) p_;
++ return (1
++ && p->I != p->O
++ && (!NO_DESTROY_INPUTP(plnr))
++ && ((p->flags & TRANSPOSED_OUT) || !ego->copy_transposed_out)
++ && ONLY_TRANSPOSEDP(p->flags)
++ );
++}
++
++static void awake(plan *ego_, enum wakefulness wakefulness)
++{
++ P *ego = (P *) ego_;
++ X(plan_awake)(ego->cld1, wakefulness);
++ X(plan_awake)(ego->cld2, wakefulness);
++ X(plan_awake)(ego->cld2rest, wakefulness);
++ X(plan_awake)(ego->cld3, wakefulness);
++}
++
++static void destroy(plan *ego_)
++{
++ P *ego = (P *) ego_;
++ X(ifree0)(ego->send_block_sizes);
++ MPI_Comm_free(&ego->comm);
++ X(plan_destroy_internal)(ego->cld3);
++ X(plan_destroy_internal)(ego->cld2rest);
++ X(plan_destroy_internal)(ego->cld2);
++ X(plan_destroy_internal)(ego->cld1);
++}
++
++static void print(const plan *ego_, printer *p)
++{
++ const P *ego = (const P *) ego_;
++ p->print(p, "(mpi-transpose-alltoall-transposed%s%(%p%)%(%p%)%(%p%)%(%p%))",
++ ego->equal_blocks ? "/e" : "",
++ ego->cld1, ego->cld2, ego->cld2rest, ego->cld3);
++}
++
++static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
++{
++ const S *ego = (const S *) ego_;
++ const problem_mpi_transpose *p;
++ P *pln;
++ plan *cld1 = 0, *cld2 = 0, *cld2rest = 0, *cld3 = 0;
++ INT b, bt, vn, rest_Ioff, rest_Ooff;
++ R *O;
++ int *sbs, *sbo, *rbs, *rbo;
++ int pe, my_pe, n_pes;
++ int equal_blocks = 1;
++ static const plan_adt padt = {
++ XM(transpose_solve), awake, print, destroy
++ };
++
++ if (!applicable(ego, p_, plnr))
++ return (plan *) 0;
++
++ p = (const problem_mpi_transpose *) p_;
++ vn = p->vn;
++
++ MPI_Comm_rank(p->comm, &my_pe);
++ MPI_Comm_size(p->comm, &n_pes);
++
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++
++ if (p->flags & TRANSPOSED_OUT) { /* O stays transposed */
++ if (ego->copy_transposed_out) {
++ cld1 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_1d)
++ (bt * p->nx * vn, 1, 1),
++ p->I, O = p->O),
++ 0, 0, NO_SLOW);
++ if (XM(any_true)(!cld1, p->comm)) goto nada;
++ }
++ else /* first transpose is in-place */
++ O = p->I;
++ }
++ else { /* transpose nx x bt x vn -> bt x nx x vn */
++ cld1 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_3d)
++ (bt, vn, p->nx * vn,
++ p->nx, bt * vn, vn,
++ vn, 1, 1),
++ p->I, O = p->O),
++ 0, 0, NO_SLOW);
++ if (XM(any_true)(!cld1, p->comm)) goto nada;
++ }
++
++ if (XM(any_true)(!XM(mkplans_pretranspose)(p, plnr, p->I, O, my_pe,
++ &cld2, &cld2rest, &cld3,
++ &rest_Ioff, &rest_Ooff),
++ p->comm)) goto nada;
++
++
++ pln = MKPLAN_MPI_TRANSPOSE(P, &padt, apply);
++
++ pln->cld1 = cld1;
++ pln->cld2 = cld2;
++ pln->cld2rest = cld2rest;
++ pln->rest_Ioff = rest_Ioff;
++ pln->rest_Ooff = rest_Ooff;
++ pln->cld3 = cld3;
++
++ MPI_Comm_dup(p->comm, &pln->comm);
++
++ /* Compute sizes/offsets of blocks to send for all-to-all command. */
++ sbs = (int *) MALLOC(4 * n_pes * sizeof(int), PLANS);
++ sbo = sbs + n_pes;
++ rbs = sbo + n_pes;
++ rbo = rbs + n_pes;
++ b = XM(block)(p->nx, p->block, my_pe);
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++ for (pe = 0; pe < n_pes; ++pe) {
++ INT db, dbt; /* destination block sizes */
++ db = XM(block)(p->nx, p->block, pe);
++ dbt = XM(block)(p->ny, p->tblock, pe);
++ if (db != p->block || dbt != p->tblock)
++ equal_blocks = 0;
++
++ /* MPI requires type "int" here; apparently it
++ has no 64-bit API? Grrr. */
++ sbs[pe] = (int) (b * dbt * vn);
++ sbo[pe] = (int) (pe * (b * p->tblock) * vn);
++ rbs[pe] = (int) (db * bt * vn);
++ rbo[pe] = (int) (pe * (p->block * bt) * vn);
++ }
++ pln->send_block_sizes = sbs;
++ pln->send_block_offsets = sbo;
++ pln->recv_block_sizes = rbs;
++ pln->recv_block_offsets = rbo;
++ pln->equal_blocks = equal_blocks;
++
++ X(ops_zero)(&pln->super.super.ops);
++ if (cld1) X(ops_add2)(&cld1->ops, &pln->super.super.ops);
++ if (cld2) X(ops_add2)(&cld2->ops, &pln->super.super.ops);
++ if (cld2rest) X(ops_add2)(&cld2rest->ops, &pln->super.super.ops);
++ if (cld3) X(ops_add2)(&cld3->ops, &pln->super.super.ops);
++ /* FIXME: should MPI operations be counted in "other" somehow? */
++
++ return &(pln->super.super);
++
++ nada:
++ X(plan_destroy_internal)(cld3);
++ X(plan_destroy_internal)(cld2rest);
++ X(plan_destroy_internal)(cld2);
++ X(plan_destroy_internal)(cld1);
++ return (plan *) 0;
++}
++
++static solver *mksolver(int copy_transposed_out)
++{
++ static const solver_adt sadt = { PROBLEM_MPI_TRANSPOSE, mkplan, 0 };
++ S *slv = MKSOLVER(S, &sadt);
++ slv->copy_transposed_out = copy_transposed_out;
++ return &(slv->super);
++}
++
++void XM(transpose_alltoall_transposed_register)(planner *p)
++{
++ int cto;
++ for (cto = 0; cto <= 1; ++cto)
++ REGISTER_SOLVER(p, mksolver(cto));
++}
+
+--- mpi/transpose-pairwise.c 2014-03-04 19:41:03.000000000 +0100
++++ mpi/transpose-pairwise.c 2015-09-05 06:00:05.715433709 +0200
+@@ -53,7 +53,6 @@ static void transpose_chunks(int *sched,
+ {
+ if (sched) {
+ int i;
+- MPI_Status status;
+
+ /* TODO: explore non-synchronous send/recv? */
+
+@@ -74,7 +73,7 @@ static void transpose_chunks(int *sched,
+ O + rbo[pe], (int) (rbs[pe]),
+ FFTW_MPI_TYPE,
+ pe, (pe * n_pes + my_pe) & 0xffff,
+- comm, &status);
++ comm, MPI_STATUS_IGNORE);
+ }
+ }
+
+@@ -92,7 +91,7 @@ static void transpose_chunks(int *sched,
+ O + rbo[pe], (int) (rbs[pe]),
+ FFTW_MPI_TYPE,
+ pe, (pe * n_pes + my_pe) & 0xffff,
+- comm, &status);
++ comm, MPI_STATUS_IGNORE);
+ }
+ }
+ }
+@@ -350,6 +349,7 @@ nada:
+ X(plan_destroy_internal)(*cld3);
+ X(plan_destroy_internal)(*cld2rest);
+ X(plan_destroy_internal)(*cld2);
++ *cld2 = *cld2rest = *cld3 = NULL;
+ return 0;
+ }
+
+--- mpi/transpose-pairwise-transposed.c 1970-01-01 01:00:00.000000000 +0100
++++ mpi/transpose-pairwise-transposed.c 2015-09-05 06:00:07.280481042 +0200
+@@ -0,0 +1,510 @@
++/*
++ * Copyright (c) 2003, 2007-11 Matteo Frigo
++ * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
++ * Copyright (c) 2012 Michael Pippig
++ *
++ * 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; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * 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
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ */
++
++/* Distributed transposes using a sequence of carefully scheduled
++ pairwise exchanges. This has the advantage that it can be done
++ in-place, or out-of-place while preserving the input, using buffer
++ space proportional to the local size divided by the number of
++ processes (i.e. to the total array size divided by the number of
++ processes squared). */
++
++#include "mpi-transpose.h"
++#include <string.h>
++
++typedef struct {
++ solver super;
++ int preserve_input; /* preserve input even if DESTROY_INPUT was passed */
++} S;
++
++typedef struct {
++ plan_mpi_transpose super;
++
++ plan *cld1, *cld2, *cld2rest, *cld3;
++ INT rest_Ioff, rest_Ooff;
++
++ int n_pes, my_pe, *sched;
++ INT *send_block_sizes, *send_block_offsets;
++ INT *recv_block_sizes, *recv_block_offsets;
++ MPI_Comm comm;
++ int preserve_input;
++} P;
++
++static void transpose_chunks(int *sched, int n_pes, int my_pe,
++ INT *sbs, INT *sbo, INT *rbs, INT *rbo,
++ MPI_Comm comm,
++ R *I, R *O)
++{
++ if (sched) {
++ int i;
++
++ /* TODO: explore non-synchronous send/recv? */
++
++ if (I == O) {
++ R *buf = (R*) MALLOC(sizeof(R) * sbs[0], BUFFERS);
++
++ for (i = 0; i < n_pes; ++i) {
++ int pe = sched[i];
++ if (my_pe == pe) {
++ if (rbo[pe] != sbo[pe])
++ memmove(O + rbo[pe], O + sbo[pe],
++ sbs[pe] * sizeof(R));
++ }
++ else {
++ memcpy(buf, O + sbo[pe], sbs[pe] * sizeof(R));
++ MPI_Sendrecv(buf, (int) (sbs[pe]), FFTW_MPI_TYPE,
++ pe, (my_pe * n_pes + pe) & 0xffff,
++ O + rbo[pe], (int) (rbs[pe]),
++ FFTW_MPI_TYPE,
++ pe, (pe * n_pes + my_pe) & 0xffff,
++ comm, MPI_STATUS_IGNORE);
++ }
++ }
++
++ X(ifree)(buf);
++ }
++ else { /* I != O */
++ for (i = 0; i < n_pes; ++i) {
++ int pe = sched[i];
++ if (my_pe == pe)
++ memcpy(O + rbo[pe], I + sbo[pe], sbs[pe] * sizeof(R));
++ else
++ MPI_Sendrecv(I + sbo[pe], (int) (sbs[pe]),
++ FFTW_MPI_TYPE,
++ pe, (my_pe * n_pes + pe) & 0xffff,
++ O + rbo[pe], (int) (rbs[pe]),
++ FFTW_MPI_TYPE,
++ pe, (pe * n_pes + my_pe) & 0xffff,
++ comm, MPI_STATUS_IGNORE);
++ }
++ }
++ }
++}
++
++/* transpose locally to get contiguous chunks
++ this may take two transposes if the block sizes are unequal
++ (3 subplans, two of which operate on disjoint data) */
++static void apply_pretranspose(
++ const P *ego, R *I, R *O
++ )
++{
++ plan_rdft *cld2, *cld2rest, *cld3;
++
++ cld3 = (plan_rdft *) ego->cld3;
++ if (cld3)
++ cld3->apply(ego->cld3, O, O);
++ /* else TRANSPOSED_IN is true and user wants I transposed */
++
++ cld2 = (plan_rdft *) ego->cld2;
++ cld2->apply(ego->cld2, I, O);
++ cld2rest = (plan_rdft *) ego->cld2rest;
++ if (cld2rest) {
++ cld2rest->apply(ego->cld2rest,
++ I + ego->rest_Ioff, O + ego->rest_Ooff);
++ }
++}
++
++static void apply(const plan *ego_, R *I, R *O)
++{
++ const P *ego = (const P *) ego_;
++ plan_rdft *cld1 = (plan_rdft *) ego->cld1;
++
++ if (cld1) {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, O);
++
++ if(ego->preserve_input) I = O;
++
++ /* transpose chunks globally */
++ transpose_chunks(ego->sched, ego->n_pes, ego->my_pe,
++ ego->send_block_sizes, ego->send_block_offsets,
++ ego->recv_block_sizes, ego->recv_block_offsets,
++ ego->comm, O, I);
++
++ /* transpose locally to get non-transposed output */
++ cld1->apply(ego->cld1, I, O);
++ } /* else TRANSPOSED_OUT is true and user wants O transposed */
++ else if (ego->preserve_input) {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, O);
++
++ /* transpose chunks globally */
++ transpose_chunks(ego->sched, ego->n_pes, ego->my_pe,
++ ego->send_block_sizes, ego->send_block_offsets,
++ ego->recv_block_sizes, ego->recv_block_offsets,
++ ego->comm, O, O);
++ }
++ else {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, I);
++
++ /* transpose chunks globally */
++ transpose_chunks(ego->sched, ego->n_pes, ego->my_pe,
++ ego->send_block_sizes, ego->send_block_offsets,
++ ego->recv_block_sizes, ego->recv_block_offsets,
++ ego->comm, I, O);
++ }
++}
++
++static int applicable(const S *ego, const problem *p_,
++ const planner *plnr)
++{
++ const problem_mpi_transpose *p = (const problem_mpi_transpose *) p_;
++ /* Note: this is *not* UGLY for out-of-place, destroy-input plans;
++ the planner often prefers transpose-pairwise to transpose-alltoall,
++ at least with LAM MPI on my machine. */
++ return (1
++ && (!ego->preserve_input || (!NO_DESTROY_INPUTP(plnr)
++ && p->I != p->O))
++ && ONLY_TRANSPOSEDP(p->flags));
++}
++
++static void awake(plan *ego_, enum wakefulness wakefulness)
++{
++ P *ego = (P *) ego_;
++ X(plan_awake)(ego->cld1, wakefulness);
++ X(plan_awake)(ego->cld2, wakefulness);
++ X(plan_awake)(ego->cld2rest, wakefulness);
++ X(plan_awake)(ego->cld3, wakefulness);
++}
++
++static void destroy(plan *ego_)
++{
++ P *ego = (P *) ego_;
++ X(ifree0)(ego->sched);
++ X(ifree0)(ego->send_block_sizes);
++ MPI_Comm_free(&ego->comm);
++ X(plan_destroy_internal)(ego->cld3);
++ X(plan_destroy_internal)(ego->cld2rest);
++ X(plan_destroy_internal)(ego->cld2);
++ X(plan_destroy_internal)(ego->cld1);
++}
++
++static void print(const plan *ego_, printer *p)
++{
++ const P *ego = (const P *) ego_;
++ p->print(p, "(mpi-transpose-pairwise-transposed%s%(%p%)%(%p%)%(%p%)%(%p%))",
++ ego->preserve_input==2 ?"/p":"",
++ ego->cld1, ego->cld2, ego->cld2rest, ego->cld3);
++}
++
++/* Given a process which_pe and a number of processes npes, fills
++ the array sched[npes] with a sequence of processes to communicate
++ with for a deadlock-free, optimum-overlap all-to-all communication.
++ (All processes must call this routine to get their own schedules.)
++ The schedule can be re-ordered arbitrarily as long as all processes
++ apply the same permutation to their schedules.
++
++ The algorithm here is based upon the one described in:
++ J. A. M. Schreuder, "Constructing timetables for sport
++ competitions," Mathematical Programming Study 13, pp. 58-67 (1980).
++ In a sport competition, you have N teams and want every team to
++ play every other team in as short a time as possible (maximum overlap
++ between games). This timetabling problem is therefore identical
++ to that of an all-to-all communications problem. In our case, there
++ is one wrinkle: as part of the schedule, the process must do
++ some data transfer with itself (local data movement), analogous
++ to a requirement that each team "play itself" in addition to other
++ teams. With this wrinkle, it turns out that an optimal timetable
++ (N parallel games) can be constructed for any N, not just for even
++ N as in the original problem described by Schreuder.
++*/
++static void fill1_comm_sched(int *sched, int which_pe, int npes)
++{
++ int pe, i, n, s = 0;
++ A(which_pe >= 0 && which_pe < npes);
++ if (npes % 2 == 0) {
++ n = npes;
++ sched[s++] = which_pe;
++ }
++ else
++ n = npes + 1;
++ for (pe = 0; pe < n - 1; ++pe) {
++ if (npes % 2 == 0) {
++ if (pe == which_pe) sched[s++] = npes - 1;
++ else if (npes - 1 == which_pe) sched[s++] = pe;
++ }
++ else if (pe == which_pe) sched[s++] = pe;
++
++ if (pe != which_pe && which_pe < n - 1) {
++ i = (pe - which_pe + (n - 1)) % (n - 1);
++ if (i < n/2)
++ sched[s++] = (pe + i) % (n - 1);
++
++ i = (which_pe - pe + (n - 1)) % (n - 1);
++ if (i < n/2)
++ sched[s++] = (pe - i + (n - 1)) % (n - 1);
++ }
++ }
++ A(s == npes);
++}
++
++/* Sort the communication schedule sched for npes so that the schedule
++ on process sortpe is ascending or descending (!ascending). This is
++ necessary to allow in-place transposes when the problem does not
++ divide equally among the processes. In this case there is one
++ process where the incoming blocks are bigger/smaller than the
++ outgoing blocks and thus have to be received in
++ descending/ascending order, respectively, to avoid overwriting data
++ before it is sent. */
++static void sort1_comm_sched(int *sched, int npes, int sortpe, int ascending)
++{
++ int *sortsched, i;
++ sortsched = (int *) MALLOC(npes * sizeof(int) * 2, OTHER);
++ fill1_comm_sched(sortsched, sortpe, npes);
++ if (ascending)
++ for (i = 0; i < npes; ++i)
++ sortsched[npes + sortsched[i]] = sched[i];
++ else
++ for (i = 0; i < npes; ++i)
++ sortsched[2*npes - 1 - sortsched[i]] = sched[i];
++ for (i = 0; i < npes; ++i)
++ sched[i] = sortsched[npes + i];
++ X(ifree)(sortsched);
++}
++
++/* make the plans to do the pre-MPI transpositions (shared with
++ transpose-alltoall-transposed) */
++int XM(mkplans_pretranspose)(const problem_mpi_transpose *p, planner *plnr,
++ R *I, R *O, int my_pe,
++ plan **cld2, plan **cld2rest, plan **cld3,
++ INT *rest_Ioff, INT *rest_Ooff)
++{
++ INT vn = p->vn;
++ INT b = XM(block)(p->nx, p->block, my_pe);
++ INT bt = p->tblock;
++ INT nyb = p->ny / bt; /* number of equal-sized blocks */
++ INT nyr = p->ny - nyb * bt; /* leftover rows after equal blocks */
++
++ *cld2 = *cld2rest = *cld3 = NULL;
++ *rest_Ioff = *rest_Ooff = 0;
++
++ if (!(p->flags & TRANSPOSED_IN) && (nyr == 0 || I != O)) {
++ INT ny = p->ny * vn;
++ bt *= vn;
++ *cld2 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_3d)
++ (nyb, bt, b * bt,
++ b, ny, bt,
++ bt, 1, 1),
++ I, O),
++ 0, 0, NO_SLOW);
++ if (!*cld2) goto nada;
++
++ if (nyr > 0) {
++ *rest_Ioff = nyb * bt;
++ *rest_Ooff = nyb * b * bt;
++ bt = nyr * vn;
++ *cld2rest = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_2d)
++ (b, ny, bt,
++ bt, 1, 1),
++ I + *rest_Ioff,
++ O + *rest_Ooff),
++ 0, 0, NO_SLOW);
++ if (!*cld2rest) goto nada;
++ }
++ }
++ else {
++ *cld2 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(
++ X(mktensor_4d)
++ (nyb, b * bt * vn, b * bt * vn,
++ b, vn, bt * vn,
++ bt, b * vn, vn,
++ vn, 1, 1),
++ I, O),
++ 0, 0, NO_SLOW);
++ if (!*cld2) goto nada;
++
++ *rest_Ioff = *rest_Ooff = nyb * bt * b * vn;
++ *cld2rest = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(
++ X(mktensor_3d)
++ (b, vn, nyr * vn,
++ nyr, b * vn, vn,
++ vn, 1, 1),
++ I + *rest_Ioff, O + *rest_Ooff),
++ 0, 0, NO_SLOW);
++ if (!*cld2rest) goto nada;
++
++ if (!(p->flags & TRANSPOSED_IN)) {
++ *cld3 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(
++ X(mktensor_3d)
++ (p->ny, vn, b * vn,
++ b, p->ny * vn, vn,
++ vn, 1, 1),
++ I, I),
++ 0, 0, NO_SLOW);
++ if (!*cld3) goto nada;
++ }
++ }
++
++ return 1;
++
++nada:
++ X(plan_destroy_internal)(*cld3);
++ X(plan_destroy_internal)(*cld2rest);
++ X(plan_destroy_internal)(*cld2);
++ *cld2 = *cld2rest = *cld3 = NULL;
++ return 0;
++}
++
++static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
++{
++ const S *ego = (const S *) ego_;
++ const problem_mpi_transpose *p;
++ P *pln;
++ plan *cld1 = 0, *cld2 = 0, *cld2rest = 0, *cld3 = 0;
++ INT b, bt, vn, rest_Ioff, rest_Ooff;
++ INT *sbs, *sbo, *rbs, *rbo;
++ int pe, my_pe, n_pes, sort_pe = -1, ascending = 1;
++ R *I, *O;
++ static const plan_adt padt = {
++ XM(transpose_solve), awake, print, destroy
++ };
++
++ UNUSED(ego);
++
++ if (!applicable(ego, p_, plnr))
++ return (plan *) 0;
++
++ p = (const problem_mpi_transpose *) p_;
++ vn = p->vn;
++ I = p->I; O = p->O;
++
++ MPI_Comm_rank(p->comm, &my_pe);
++ MPI_Comm_size(p->comm, &n_pes);
++
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++
++
++ if (ego->preserve_input || NO_DESTROY_INPUTP(plnr)) I = p->O;
++
++ if (!(p->flags & TRANSPOSED_OUT)) { /* nx x bt x vn -> bt x nx x vn */
++ cld1 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_3d)
++ (bt, vn, p->nx * vn,
++ p->nx, bt * vn, vn,
++ vn, 1, 1),
++ I, O = p->O),
++ 0, 0, NO_SLOW);
++ if (XM(any_true)(!cld1, p->comm)) goto nada;
++
++ }
++ else {
++ if (ego->preserve_input || NO_DESTROY_INPUTP(plnr))
++ O = p->O;
++ else
++ O = p->I;
++ }
++
++ if (XM(any_true)(!XM(mkplans_pretranspose)(p, plnr, p->I, O, my_pe,
++ &cld2, &cld2rest, &cld3,
++ &rest_Ioff, &rest_Ooff),
++ p->comm)) goto nada;
++
++ pln = MKPLAN_MPI_TRANSPOSE(P, &padt, apply);
++
++ pln->cld1 = cld1;
++ pln->cld2 = cld2;
++ pln->cld2rest = cld2rest;
++ pln->rest_Ioff = rest_Ioff;
++ pln->rest_Ooff = rest_Ooff;
++ pln->cld3 = cld3;
++ pln->preserve_input = ego->preserve_input ? 2 : NO_DESTROY_INPUTP(plnr);
++
++ MPI_Comm_dup(p->comm, &pln->comm);
++
++ n_pes = (int) X(imax)(XM(num_blocks)(p->nx, p->block),
++ XM(num_blocks)(p->ny, p->tblock));
++
++ /* Compute sizes/offsets of blocks to exchange between processors */
++ sbs = (INT *) MALLOC(4 * n_pes * sizeof(INT), PLANS);
++ sbo = sbs + n_pes;
++ rbs = sbo + n_pes;
++ rbo = rbs + n_pes;
++ b = XM(block)(p->nx, p->block, my_pe);
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++ for (pe = 0; pe < n_pes; ++pe) {
++ INT db, dbt; /* destination block sizes */
++ db = XM(block)(p->nx, p->block, pe);
++ dbt = XM(block)(p->ny, p->tblock, pe);
++
++ sbs[pe] = b * dbt * vn;
++ sbo[pe] = pe * (b * p->tblock) * vn;
++ rbs[pe] = db * bt * vn;
++ rbo[pe] = pe * (p->block * bt) * vn;
++
++ if (db * dbt > 0 && db * p->tblock != p->block * dbt) {
++ A(sort_pe == -1); /* only one process should need sorting */
++ sort_pe = pe;
++ ascending = db * p->tblock > p->block * dbt;
++ }
++ }
++ pln->n_pes = n_pes;
++ pln->my_pe = my_pe;
++ pln->send_block_sizes = sbs;
++ pln->send_block_offsets = sbo;
++ pln->recv_block_sizes = rbs;
++ pln->recv_block_offsets = rbo;
++
++ if (my_pe >= n_pes) {
++ pln->sched = 0; /* this process is not doing anything */
++ }
++ else {
++ pln->sched = (int *) MALLOC(n_pes * sizeof(int), PLANS);
++ fill1_comm_sched(pln->sched, my_pe, n_pes);
++ if (sort_pe >= 0)
++ sort1_comm_sched(pln->sched, n_pes, sort_pe, ascending);
++ }
++
++ X(ops_zero)(&pln->super.super.ops);
++ if (cld1) X(ops_add2)(&cld1->ops, &pln->super.super.ops);
++ if (cld2) X(ops_add2)(&cld2->ops, &pln->super.super.ops);
++ if (cld2rest) X(ops_add2)(&cld2rest->ops, &pln->super.super.ops);
++ if (cld3) X(ops_add2)(&cld3->ops, &pln->super.super.ops);
++ /* FIXME: should MPI operations be counted in "other" somehow? */
++
++ return &(pln->super.super);
++
++ nada:
++ X(plan_destroy_internal)(cld3);
++ X(plan_destroy_internal)(cld2rest);
++ X(plan_destroy_internal)(cld2);
++ X(plan_destroy_internal)(cld1);
++ return (plan *) 0;
++}
++
++static solver *mksolver(int preserve_input)
++{
++ static const solver_adt sadt = { PROBLEM_MPI_TRANSPOSE, mkplan, 0 };
++ S *slv = MKSOLVER(S, &sadt);
++ slv->preserve_input = preserve_input;
++ return &(slv->super);
++}
++
++void XM(transpose_pairwise_transposed_register)(planner *p)
++{
++ int preserve_input;
++ for (preserve_input = 0; preserve_input <= 1; ++preserve_input)
++ REGISTER_SOLVER(p, mksolver(preserve_input));
++}
diff --git a/var/spack/repos/builtin/packages/fftw/pfft-3.3.5.patch b/var/spack/repos/builtin/packages/fftw/pfft-3.3.5.patch
new file mode 100644
index 0000000000..360a3757f9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fftw/pfft-3.3.5.patch
@@ -0,0 +1,858 @@
+--- mpi/conf.c 2014-03-04 19:41:03.000000000 +0100
++++ mpi/conf.c 2015-09-05 05:53:19.085516467 +0200
+@@ -29,6 +29,8 @@ static const solvtab s =
+ SOLVTAB(XM(transpose_pairwise_register)),
+ SOLVTAB(XM(transpose_alltoall_register)),
+ SOLVTAB(XM(transpose_recurse_register)),
++ SOLVTAB(XM(transpose_pairwise_transposed_register)),
++ SOLVTAB(XM(transpose_alltoall_transposed_register)),
+ SOLVTAB(XM(dft_rank_geq2_register)),
+ SOLVTAB(XM(dft_rank_geq2_transposed_register)),
+ SOLVTAB(XM(dft_serial_register)),
+
+--- mpi/Makefile.am 2013-03-18 13:10:45.000000000 +0100
++++ mpi/Makefile.am 2015-09-05 05:53:19.084516437 +0200
+@@ -16,6 +16,7 @@ BUILT_SOURCES = fftw3-mpi.f03.in fftw3-m
+ CLEANFILES = fftw3-mpi.f03 fftw3l-mpi.f03
+
+ TRANSPOSE_SRC = transpose-alltoall.c transpose-pairwise.c transpose-recurse.c transpose-problem.c transpose-solve.c mpi-transpose.h
++TRANSPOSE_SRC += transpose-alltoall-transposed.c transpose-pairwise-transposed.c
+ DFT_SRC = dft-serial.c dft-rank-geq2.c dft-rank-geq2-transposed.c dft-rank1.c dft-rank1-bigvec.c dft-problem.c dft-solve.c mpi-dft.h
+ RDFT_SRC = rdft-serial.c rdft-rank-geq2.c rdft-rank-geq2-transposed.c rdft-rank1-bigvec.c rdft-problem.c rdft-solve.c mpi-rdft.h
+ RDFT2_SRC = rdft2-serial.c rdft2-rank-geq2.c rdft2-rank-geq2-transposed.c rdft2-problem.c rdft2-solve.c mpi-rdft2.h
+
+--- mpi/mpi-transpose.h 2014-03-04 19:41:03.000000000 +0100
++++ mpi/mpi-transpose.h 2015-09-05 05:53:19.085516467 +0200
+@@ -59,3 +59,5 @@ int XM(mkplans_posttranspose)(const prob
+ void XM(transpose_pairwise_register)(planner *p);
+ void XM(transpose_alltoall_register)(planner *p);
+ void XM(transpose_recurse_register)(planner *p);
++void XM(transpose_pairwise_transposed_register)(planner *p);
++void XM(transpose_alltoall_transposed_register)(planner *p);
+
+--- mpi/transpose-alltoall-transposed.c 1970-01-01 01:00:00.000000000 +0100
++++ mpi/transpose-alltoall-transposed.c 2015-09-05 05:53:19.085516467 +0200
+@@ -0,0 +1,280 @@
++/*
++ * Copyright (c) 2003, 2007-11 Matteo Frigo
++ * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
++ * Copyright (c) 2012 Michael Pippig
++ *
++ * 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; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * 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
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ */
++
++/* plans for distributed out-of-place transpose using MPI_Alltoall,
++ and which destroy the input array (also if TRANSPOSED_IN is used) */
++
++#include "mpi-transpose.h"
++#include <string.h>
++
++typedef struct {
++ solver super;
++ int copy_transposed_out; /* whether to copy the output for TRANSPOSED_OUT,
++ which makes the first transpose out-of-place
++ but costs an extra copy and requires us
++ to destroy the input */
++} S;
++
++typedef struct {
++ plan_mpi_transpose super;
++
++ plan *cld1, *cld2, *cld2rest, *cld3;
++
++ MPI_Comm comm;
++ int *send_block_sizes, *send_block_offsets;
++ int *recv_block_sizes, *recv_block_offsets;
++
++ INT rest_Ioff, rest_Ooff;
++
++ int equal_blocks;
++} P;
++
++/* transpose locally to get contiguous chunks
++ this may take two transposes if the block sizes are unequal
++ (3 subplans, two of which operate on disjoint data) */
++static void apply_pretranspose(
++ const P *ego, R *I, R *O
++ )
++{
++ plan_rdft *cld2, *cld2rest, *cld3;
++
++ cld3 = (plan_rdft *) ego->cld3;
++ if (cld3)
++ cld3->apply(ego->cld3, O, O);
++ /* else TRANSPOSED_IN is true and user wants I transposed */
++
++ cld2 = (plan_rdft *) ego->cld2;
++ cld2->apply(ego->cld2, I, O);
++ cld2rest = (plan_rdft *) ego->cld2rest;
++ if (cld2rest) {
++ cld2rest->apply(ego->cld2rest,
++ I + ego->rest_Ioff, O + ego->rest_Ooff);
++ }
++}
++
++static void apply(const plan *ego_, R *I, R *O)
++{
++ const P *ego = (const P *) ego_;
++ plan_rdft *cld1 = (plan_rdft *) ego->cld1;
++
++ if (cld1) {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, O);
++
++ /* transpose chunks globally */
++ if (ego->equal_blocks)
++ MPI_Alltoall(O, ego->send_block_sizes[0], FFTW_MPI_TYPE,
++ I, ego->recv_block_sizes[0], FFTW_MPI_TYPE,
++ ego->comm);
++ else
++ MPI_Alltoallv(O, ego->send_block_sizes, ego->send_block_offsets,
++ FFTW_MPI_TYPE,
++ I, ego->recv_block_sizes, ego->recv_block_offsets,
++ FFTW_MPI_TYPE,
++ ego->comm);
++
++ /* transpose locally to get non-transposed output */
++ cld1->apply(ego->cld1, I, O);
++ } /* else TRANSPOSED_OUT is true and user wants O transposed */
++ else {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, I);
++
++ /* transpose chunks globally */
++ if (ego->equal_blocks)
++ MPI_Alltoall(I, ego->send_block_sizes[0], FFTW_MPI_TYPE,
++ O, ego->recv_block_sizes[0], FFTW_MPI_TYPE,
++ ego->comm);
++ else
++ MPI_Alltoallv(I, ego->send_block_sizes, ego->send_block_offsets,
++ FFTW_MPI_TYPE,
++ O, ego->recv_block_sizes, ego->recv_block_offsets,
++ FFTW_MPI_TYPE,
++ ego->comm);
++ }
++}
++
++static int applicable(const S *ego, const problem *p_,
++ const planner *plnr)
++{
++ /* in contrast to transpose-alltoall this algorithm can not preserve the input,
++ * since we need at least one transpose before the (out-of-place) Alltoall */
++ const problem_mpi_transpose *p = (const problem_mpi_transpose *) p_;
++ return (1
++ && p->I != p->O
++ && (!NO_DESTROY_INPUTP(plnr))
++ && ((p->flags & TRANSPOSED_OUT) || !ego->copy_transposed_out)
++ && ONLY_TRANSPOSEDP(p->flags)
++ );
++}
++
++static void awake(plan *ego_, enum wakefulness wakefulness)
++{
++ P *ego = (P *) ego_;
++ X(plan_awake)(ego->cld1, wakefulness);
++ X(plan_awake)(ego->cld2, wakefulness);
++ X(plan_awake)(ego->cld2rest, wakefulness);
++ X(plan_awake)(ego->cld3, wakefulness);
++}
++
++static void destroy(plan *ego_)
++{
++ P *ego = (P *) ego_;
++ X(ifree0)(ego->send_block_sizes);
++ MPI_Comm_free(&ego->comm);
++ X(plan_destroy_internal)(ego->cld3);
++ X(plan_destroy_internal)(ego->cld2rest);
++ X(plan_destroy_internal)(ego->cld2);
++ X(plan_destroy_internal)(ego->cld1);
++}
++
++static void print(const plan *ego_, printer *p)
++{
++ const P *ego = (const P *) ego_;
++ p->print(p, "(mpi-transpose-alltoall-transposed%s%(%p%)%(%p%)%(%p%)%(%p%))",
++ ego->equal_blocks ? "/e" : "",
++ ego->cld1, ego->cld2, ego->cld2rest, ego->cld3);
++}
++
++static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
++{
++ const S *ego = (const S *) ego_;
++ const problem_mpi_transpose *p;
++ P *pln;
++ plan *cld1 = 0, *cld2 = 0, *cld2rest = 0, *cld3 = 0;
++ INT b, bt, vn, rest_Ioff, rest_Ooff;
++ R *O;
++ int *sbs, *sbo, *rbs, *rbo;
++ int pe, my_pe, n_pes;
++ int equal_blocks = 1;
++ static const plan_adt padt = {
++ XM(transpose_solve), awake, print, destroy
++ };
++
++ if (!applicable(ego, p_, plnr))
++ return (plan *) 0;
++
++ p = (const problem_mpi_transpose *) p_;
++ vn = p->vn;
++
++ MPI_Comm_rank(p->comm, &my_pe);
++ MPI_Comm_size(p->comm, &n_pes);
++
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++
++ if (p->flags & TRANSPOSED_OUT) { /* O stays transposed */
++ if (ego->copy_transposed_out) {
++ cld1 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_1d)
++ (bt * p->nx * vn, 1, 1),
++ p->I, O = p->O),
++ 0, 0, NO_SLOW);
++ if (XM(any_true)(!cld1, p->comm)) goto nada;
++ }
++ else /* first transpose is in-place */
++ O = p->I;
++ }
++ else { /* transpose nx x bt x vn -> bt x nx x vn */
++ cld1 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_3d)
++ (bt, vn, p->nx * vn,
++ p->nx, bt * vn, vn,
++ vn, 1, 1),
++ p->I, O = p->O),
++ 0, 0, NO_SLOW);
++ if (XM(any_true)(!cld1, p->comm)) goto nada;
++ }
++
++ if (XM(any_true)(!XM(mkplans_pretranspose)(p, plnr, p->I, O, my_pe,
++ &cld2, &cld2rest, &cld3,
++ &rest_Ioff, &rest_Ooff),
++ p->comm)) goto nada;
++
++
++ pln = MKPLAN_MPI_TRANSPOSE(P, &padt, apply);
++
++ pln->cld1 = cld1;
++ pln->cld2 = cld2;
++ pln->cld2rest = cld2rest;
++ pln->rest_Ioff = rest_Ioff;
++ pln->rest_Ooff = rest_Ooff;
++ pln->cld3 = cld3;
++
++ MPI_Comm_dup(p->comm, &pln->comm);
++
++ /* Compute sizes/offsets of blocks to send for all-to-all command. */
++ sbs = (int *) MALLOC(4 * n_pes * sizeof(int), PLANS);
++ sbo = sbs + n_pes;
++ rbs = sbo + n_pes;
++ rbo = rbs + n_pes;
++ b = XM(block)(p->nx, p->block, my_pe);
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++ for (pe = 0; pe < n_pes; ++pe) {
++ INT db, dbt; /* destination block sizes */
++ db = XM(block)(p->nx, p->block, pe);
++ dbt = XM(block)(p->ny, p->tblock, pe);
++ if (db != p->block || dbt != p->tblock)
++ equal_blocks = 0;
++
++ /* MPI requires type "int" here; apparently it
++ has no 64-bit API? Grrr. */
++ sbs[pe] = (int) (b * dbt * vn);
++ sbo[pe] = (int) (pe * (b * p->tblock) * vn);
++ rbs[pe] = (int) (db * bt * vn);
++ rbo[pe] = (int) (pe * (p->block * bt) * vn);
++ }
++ pln->send_block_sizes = sbs;
++ pln->send_block_offsets = sbo;
++ pln->recv_block_sizes = rbs;
++ pln->recv_block_offsets = rbo;
++ pln->equal_blocks = equal_blocks;
++
++ X(ops_zero)(&pln->super.super.ops);
++ if (cld1) X(ops_add2)(&cld1->ops, &pln->super.super.ops);
++ if (cld2) X(ops_add2)(&cld2->ops, &pln->super.super.ops);
++ if (cld2rest) X(ops_add2)(&cld2rest->ops, &pln->super.super.ops);
++ if (cld3) X(ops_add2)(&cld3->ops, &pln->super.super.ops);
++ /* FIXME: should MPI operations be counted in "other" somehow? */
++
++ return &(pln->super.super);
++
++ nada:
++ X(plan_destroy_internal)(cld3);
++ X(plan_destroy_internal)(cld2rest);
++ X(plan_destroy_internal)(cld2);
++ X(plan_destroy_internal)(cld1);
++ return (plan *) 0;
++}
++
++static solver *mksolver(int copy_transposed_out)
++{
++ static const solver_adt sadt = { PROBLEM_MPI_TRANSPOSE, mkplan, 0 };
++ S *slv = MKSOLVER(S, &sadt);
++ slv->copy_transposed_out = copy_transposed_out;
++ return &(slv->super);
++}
++
++void XM(transpose_alltoall_transposed_register)(planner *p)
++{
++ int cto;
++ for (cto = 0; cto <= 1; ++cto)
++ REGISTER_SOLVER(p, mksolver(cto));
++}
+
+--- mpi/transpose-pairwise.c 2014-03-04 19:41:03.000000000 +0100
++++ mpi/transpose-pairwise.c 2015-09-05 06:00:05.715433709 +0200
+@@ -53,7 +53,6 @@ static void transpose_chunks(int *sched,
+ {
+ if (sched) {
+ int i;
+- MPI_Status status;
+
+ /* TODO: explore non-synchronous send/recv? */
+
+@@ -74,7 +73,7 @@ static void transpose_chunks(int *sched,
+ O + rbo[pe], (int) (rbs[pe]),
+ FFTW_MPI_TYPE,
+ pe, (pe * n_pes + my_pe) & 0xffff,
+- comm, &status);
++ comm, MPI_STATUS_IGNORE);
+ }
+ }
+
+@@ -92,7 +91,7 @@ static void transpose_chunks(int *sched,
+ O + rbo[pe], (int) (rbs[pe]),
+ FFTW_MPI_TYPE,
+ pe, (pe * n_pes + my_pe) & 0xffff,
+- comm, &status);
++ comm, MPI_STATUS_IGNORE);
+ }
+ }
+ }
+
+--- mpi/transpose-pairwise-transposed.c 1970-01-01 01:00:00.000000000 +0100
++++ mpi/transpose-pairwise-transposed.c 2015-09-05 06:00:07.280481042 +0200
+@@ -0,0 +1,510 @@
++/*
++ * Copyright (c) 2003, 2007-11 Matteo Frigo
++ * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
++ * Copyright (c) 2012 Michael Pippig
++ *
++ * 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; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * 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
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ */
++
++/* Distributed transposes using a sequence of carefully scheduled
++ pairwise exchanges. This has the advantage that it can be done
++ in-place, or out-of-place while preserving the input, using buffer
++ space proportional to the local size divided by the number of
++ processes (i.e. to the total array size divided by the number of
++ processes squared). */
++
++#include "mpi-transpose.h"
++#include <string.h>
++
++typedef struct {
++ solver super;
++ int preserve_input; /* preserve input even if DESTROY_INPUT was passed */
++} S;
++
++typedef struct {
++ plan_mpi_transpose super;
++
++ plan *cld1, *cld2, *cld2rest, *cld3;
++ INT rest_Ioff, rest_Ooff;
++
++ int n_pes, my_pe, *sched;
++ INT *send_block_sizes, *send_block_offsets;
++ INT *recv_block_sizes, *recv_block_offsets;
++ MPI_Comm comm;
++ int preserve_input;
++} P;
++
++static void transpose_chunks(int *sched, int n_pes, int my_pe,
++ INT *sbs, INT *sbo, INT *rbs, INT *rbo,
++ MPI_Comm comm,
++ R *I, R *O)
++{
++ if (sched) {
++ int i;
++
++ /* TODO: explore non-synchronous send/recv? */
++
++ if (I == O) {
++ R *buf = (R*) MALLOC(sizeof(R) * sbs[0], BUFFERS);
++
++ for (i = 0; i < n_pes; ++i) {
++ int pe = sched[i];
++ if (my_pe == pe) {
++ if (rbo[pe] != sbo[pe])
++ memmove(O + rbo[pe], O + sbo[pe],
++ sbs[pe] * sizeof(R));
++ }
++ else {
++ memcpy(buf, O + sbo[pe], sbs[pe] * sizeof(R));
++ MPI_Sendrecv(buf, (int) (sbs[pe]), FFTW_MPI_TYPE,
++ pe, (my_pe * n_pes + pe) & 0xffff,
++ O + rbo[pe], (int) (rbs[pe]),
++ FFTW_MPI_TYPE,
++ pe, (pe * n_pes + my_pe) & 0xffff,
++ comm, MPI_STATUS_IGNORE);
++ }
++ }
++
++ X(ifree)(buf);
++ }
++ else { /* I != O */
++ for (i = 0; i < n_pes; ++i) {
++ int pe = sched[i];
++ if (my_pe == pe)
++ memcpy(O + rbo[pe], I + sbo[pe], sbs[pe] * sizeof(R));
++ else
++ MPI_Sendrecv(I + sbo[pe], (int) (sbs[pe]),
++ FFTW_MPI_TYPE,
++ pe, (my_pe * n_pes + pe) & 0xffff,
++ O + rbo[pe], (int) (rbs[pe]),
++ FFTW_MPI_TYPE,
++ pe, (pe * n_pes + my_pe) & 0xffff,
++ comm, MPI_STATUS_IGNORE);
++ }
++ }
++ }
++}
++
++/* transpose locally to get contiguous chunks
++ this may take two transposes if the block sizes are unequal
++ (3 subplans, two of which operate on disjoint data) */
++static void apply_pretranspose(
++ const P *ego, R *I, R *O
++ )
++{
++ plan_rdft *cld2, *cld2rest, *cld3;
++
++ cld3 = (plan_rdft *) ego->cld3;
++ if (cld3)
++ cld3->apply(ego->cld3, O, O);
++ /* else TRANSPOSED_IN is true and user wants I transposed */
++
++ cld2 = (plan_rdft *) ego->cld2;
++ cld2->apply(ego->cld2, I, O);
++ cld2rest = (plan_rdft *) ego->cld2rest;
++ if (cld2rest) {
++ cld2rest->apply(ego->cld2rest,
++ I + ego->rest_Ioff, O + ego->rest_Ooff);
++ }
++}
++
++static void apply(const plan *ego_, R *I, R *O)
++{
++ const P *ego = (const P *) ego_;
++ plan_rdft *cld1 = (plan_rdft *) ego->cld1;
++
++ if (cld1) {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, O);
++
++ if(ego->preserve_input) I = O;
++
++ /* transpose chunks globally */
++ transpose_chunks(ego->sched, ego->n_pes, ego->my_pe,
++ ego->send_block_sizes, ego->send_block_offsets,
++ ego->recv_block_sizes, ego->recv_block_offsets,
++ ego->comm, O, I);
++
++ /* transpose locally to get non-transposed output */
++ cld1->apply(ego->cld1, I, O);
++ } /* else TRANSPOSED_OUT is true and user wants O transposed */
++ else if (ego->preserve_input) {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, O);
++
++ /* transpose chunks globally */
++ transpose_chunks(ego->sched, ego->n_pes, ego->my_pe,
++ ego->send_block_sizes, ego->send_block_offsets,
++ ego->recv_block_sizes, ego->recv_block_offsets,
++ ego->comm, O, O);
++ }
++ else {
++ /* transpose locally to get contiguous chunks */
++ apply_pretranspose(ego, I, I);
++
++ /* transpose chunks globally */
++ transpose_chunks(ego->sched, ego->n_pes, ego->my_pe,
++ ego->send_block_sizes, ego->send_block_offsets,
++ ego->recv_block_sizes, ego->recv_block_offsets,
++ ego->comm, I, O);
++ }
++}
++
++static int applicable(const S *ego, const problem *p_,
++ const planner *plnr)
++{
++ const problem_mpi_transpose *p = (const problem_mpi_transpose *) p_;
++ /* Note: this is *not* UGLY for out-of-place, destroy-input plans;
++ the planner often prefers transpose-pairwise to transpose-alltoall,
++ at least with LAM MPI on my machine. */
++ return (1
++ && (!ego->preserve_input || (!NO_DESTROY_INPUTP(plnr)
++ && p->I != p->O))
++ && ONLY_TRANSPOSEDP(p->flags));
++}
++
++static void awake(plan *ego_, enum wakefulness wakefulness)
++{
++ P *ego = (P *) ego_;
++ X(plan_awake)(ego->cld1, wakefulness);
++ X(plan_awake)(ego->cld2, wakefulness);
++ X(plan_awake)(ego->cld2rest, wakefulness);
++ X(plan_awake)(ego->cld3, wakefulness);
++}
++
++static void destroy(plan *ego_)
++{
++ P *ego = (P *) ego_;
++ X(ifree0)(ego->sched);
++ X(ifree0)(ego->send_block_sizes);
++ MPI_Comm_free(&ego->comm);
++ X(plan_destroy_internal)(ego->cld3);
++ X(plan_destroy_internal)(ego->cld2rest);
++ X(plan_destroy_internal)(ego->cld2);
++ X(plan_destroy_internal)(ego->cld1);
++}
++
++static void print(const plan *ego_, printer *p)
++{
++ const P *ego = (const P *) ego_;
++ p->print(p, "(mpi-transpose-pairwise-transposed%s%(%p%)%(%p%)%(%p%)%(%p%))",
++ ego->preserve_input==2 ?"/p":"",
++ ego->cld1, ego->cld2, ego->cld2rest, ego->cld3);
++}
++
++/* Given a process which_pe and a number of processes npes, fills
++ the array sched[npes] with a sequence of processes to communicate
++ with for a deadlock-free, optimum-overlap all-to-all communication.
++ (All processes must call this routine to get their own schedules.)
++ The schedule can be re-ordered arbitrarily as long as all processes
++ apply the same permutation to their schedules.
++
++ The algorithm here is based upon the one described in:
++ J. A. M. Schreuder, "Constructing timetables for sport
++ competitions," Mathematical Programming Study 13, pp. 58-67 (1980).
++ In a sport competition, you have N teams and want every team to
++ play every other team in as short a time as possible (maximum overlap
++ between games). This timetabling problem is therefore identical
++ to that of an all-to-all communications problem. In our case, there
++ is one wrinkle: as part of the schedule, the process must do
++ some data transfer with itself (local data movement), analogous
++ to a requirement that each team "play itself" in addition to other
++ teams. With this wrinkle, it turns out that an optimal timetable
++ (N parallel games) can be constructed for any N, not just for even
++ N as in the original problem described by Schreuder.
++*/
++static void fill1_comm_sched(int *sched, int which_pe, int npes)
++{
++ int pe, i, n, s = 0;
++ A(which_pe >= 0 && which_pe < npes);
++ if (npes % 2 == 0) {
++ n = npes;
++ sched[s++] = which_pe;
++ }
++ else
++ n = npes + 1;
++ for (pe = 0; pe < n - 1; ++pe) {
++ if (npes % 2 == 0) {
++ if (pe == which_pe) sched[s++] = npes - 1;
++ else if (npes - 1 == which_pe) sched[s++] = pe;
++ }
++ else if (pe == which_pe) sched[s++] = pe;
++
++ if (pe != which_pe && which_pe < n - 1) {
++ i = (pe - which_pe + (n - 1)) % (n - 1);
++ if (i < n/2)
++ sched[s++] = (pe + i) % (n - 1);
++
++ i = (which_pe - pe + (n - 1)) % (n - 1);
++ if (i < n/2)
++ sched[s++] = (pe - i + (n - 1)) % (n - 1);
++ }
++ }
++ A(s == npes);
++}
++
++/* Sort the communication schedule sched for npes so that the schedule
++ on process sortpe is ascending or descending (!ascending). This is
++ necessary to allow in-place transposes when the problem does not
++ divide equally among the processes. In this case there is one
++ process where the incoming blocks are bigger/smaller than the
++ outgoing blocks and thus have to be received in
++ descending/ascending order, respectively, to avoid overwriting data
++ before it is sent. */
++static void sort1_comm_sched(int *sched, int npes, int sortpe, int ascending)
++{
++ int *sortsched, i;
++ sortsched = (int *) MALLOC(npes * sizeof(int) * 2, OTHER);
++ fill1_comm_sched(sortsched, sortpe, npes);
++ if (ascending)
++ for (i = 0; i < npes; ++i)
++ sortsched[npes + sortsched[i]] = sched[i];
++ else
++ for (i = 0; i < npes; ++i)
++ sortsched[2*npes - 1 - sortsched[i]] = sched[i];
++ for (i = 0; i < npes; ++i)
++ sched[i] = sortsched[npes + i];
++ X(ifree)(sortsched);
++}
++
++/* make the plans to do the pre-MPI transpositions (shared with
++ transpose-alltoall-transposed) */
++int XM(mkplans_pretranspose)(const problem_mpi_transpose *p, planner *plnr,
++ R *I, R *O, int my_pe,
++ plan **cld2, plan **cld2rest, plan **cld3,
++ INT *rest_Ioff, INT *rest_Ooff)
++{
++ INT vn = p->vn;
++ INT b = XM(block)(p->nx, p->block, my_pe);
++ INT bt = p->tblock;
++ INT nyb = p->ny / bt; /* number of equal-sized blocks */
++ INT nyr = p->ny - nyb * bt; /* leftover rows after equal blocks */
++
++ *cld2 = *cld2rest = *cld3 = NULL;
++ *rest_Ioff = *rest_Ooff = 0;
++
++ if (!(p->flags & TRANSPOSED_IN) && (nyr == 0 || I != O)) {
++ INT ny = p->ny * vn;
++ bt *= vn;
++ *cld2 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_3d)
++ (nyb, bt, b * bt,
++ b, ny, bt,
++ bt, 1, 1),
++ I, O),
++ 0, 0, NO_SLOW);
++ if (!*cld2) goto nada;
++
++ if (nyr > 0) {
++ *rest_Ioff = nyb * bt;
++ *rest_Ooff = nyb * b * bt;
++ bt = nyr * vn;
++ *cld2rest = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_2d)
++ (b, ny, bt,
++ bt, 1, 1),
++ I + *rest_Ioff,
++ O + *rest_Ooff),
++ 0, 0, NO_SLOW);
++ if (!*cld2rest) goto nada;
++ }
++ }
++ else {
++ *cld2 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(
++ X(mktensor_4d)
++ (nyb, b * bt * vn, b * bt * vn,
++ b, vn, bt * vn,
++ bt, b * vn, vn,
++ vn, 1, 1),
++ I, O),
++ 0, 0, NO_SLOW);
++ if (!*cld2) goto nada;
++
++ *rest_Ioff = *rest_Ooff = nyb * bt * b * vn;
++ *cld2rest = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(
++ X(mktensor_3d)
++ (b, vn, nyr * vn,
++ nyr, b * vn, vn,
++ vn, 1, 1),
++ I + *rest_Ioff, O + *rest_Ooff),
++ 0, 0, NO_SLOW);
++ if (!*cld2rest) goto nada;
++
++ if (!(p->flags & TRANSPOSED_IN)) {
++ *cld3 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(
++ X(mktensor_3d)
++ (p->ny, vn, b * vn,
++ b, p->ny * vn, vn,
++ vn, 1, 1),
++ I, I),
++ 0, 0, NO_SLOW);
++ if (!*cld3) goto nada;
++ }
++ }
++
++ return 1;
++
++nada:
++ X(plan_destroy_internal)(*cld3);
++ X(plan_destroy_internal)(*cld2rest);
++ X(plan_destroy_internal)(*cld2);
++ *cld2 = *cld2rest = *cld3 = NULL;
++ return 0;
++}
++
++static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
++{
++ const S *ego = (const S *) ego_;
++ const problem_mpi_transpose *p;
++ P *pln;
++ plan *cld1 = 0, *cld2 = 0, *cld2rest = 0, *cld3 = 0;
++ INT b, bt, vn, rest_Ioff, rest_Ooff;
++ INT *sbs, *sbo, *rbs, *rbo;
++ int pe, my_pe, n_pes, sort_pe = -1, ascending = 1;
++ R *I, *O;
++ static const plan_adt padt = {
++ XM(transpose_solve), awake, print, destroy
++ };
++
++ UNUSED(ego);
++
++ if (!applicable(ego, p_, plnr))
++ return (plan *) 0;
++
++ p = (const problem_mpi_transpose *) p_;
++ vn = p->vn;
++ I = p->I; O = p->O;
++
++ MPI_Comm_rank(p->comm, &my_pe);
++ MPI_Comm_size(p->comm, &n_pes);
++
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++
++
++ if (ego->preserve_input || NO_DESTROY_INPUTP(plnr)) I = p->O;
++
++ if (!(p->flags & TRANSPOSED_OUT)) { /* nx x bt x vn -> bt x nx x vn */
++ cld1 = X(mkplan_f_d)(plnr,
++ X(mkproblem_rdft_0_d)(X(mktensor_3d)
++ (bt, vn, p->nx * vn,
++ p->nx, bt * vn, vn,
++ vn, 1, 1),
++ I, O = p->O),
++ 0, 0, NO_SLOW);
++ if (XM(any_true)(!cld1, p->comm)) goto nada;
++
++ }
++ else {
++ if (ego->preserve_input || NO_DESTROY_INPUTP(plnr))
++ O = p->O;
++ else
++ O = p->I;
++ }
++
++ if (XM(any_true)(!XM(mkplans_pretranspose)(p, plnr, p->I, O, my_pe,
++ &cld2, &cld2rest, &cld3,
++ &rest_Ioff, &rest_Ooff),
++ p->comm)) goto nada;
++
++ pln = MKPLAN_MPI_TRANSPOSE(P, &padt, apply);
++
++ pln->cld1 = cld1;
++ pln->cld2 = cld2;
++ pln->cld2rest = cld2rest;
++ pln->rest_Ioff = rest_Ioff;
++ pln->rest_Ooff = rest_Ooff;
++ pln->cld3 = cld3;
++ pln->preserve_input = ego->preserve_input ? 2 : NO_DESTROY_INPUTP(plnr);
++
++ MPI_Comm_dup(p->comm, &pln->comm);
++
++ n_pes = (int) X(imax)(XM(num_blocks)(p->nx, p->block),
++ XM(num_blocks)(p->ny, p->tblock));
++
++ /* Compute sizes/offsets of blocks to exchange between processors */
++ sbs = (INT *) MALLOC(4 * n_pes * sizeof(INT), PLANS);
++ sbo = sbs + n_pes;
++ rbs = sbo + n_pes;
++ rbo = rbs + n_pes;
++ b = XM(block)(p->nx, p->block, my_pe);
++ bt = XM(block)(p->ny, p->tblock, my_pe);
++ for (pe = 0; pe < n_pes; ++pe) {
++ INT db, dbt; /* destination block sizes */
++ db = XM(block)(p->nx, p->block, pe);
++ dbt = XM(block)(p->ny, p->tblock, pe);
++
++ sbs[pe] = b * dbt * vn;
++ sbo[pe] = pe * (b * p->tblock) * vn;
++ rbs[pe] = db * bt * vn;
++ rbo[pe] = pe * (p->block * bt) * vn;
++
++ if (db * dbt > 0 && db * p->tblock != p->block * dbt) {
++ A(sort_pe == -1); /* only one process should need sorting */
++ sort_pe = pe;
++ ascending = db * p->tblock > p->block * dbt;
++ }
++ }
++ pln->n_pes = n_pes;
++ pln->my_pe = my_pe;
++ pln->send_block_sizes = sbs;
++ pln->send_block_offsets = sbo;
++ pln->recv_block_sizes = rbs;
++ pln->recv_block_offsets = rbo;
++
++ if (my_pe >= n_pes) {
++ pln->sched = 0; /* this process is not doing anything */
++ }
++ else {
++ pln->sched = (int *) MALLOC(n_pes * sizeof(int), PLANS);
++ fill1_comm_sched(pln->sched, my_pe, n_pes);
++ if (sort_pe >= 0)
++ sort1_comm_sched(pln->sched, n_pes, sort_pe, ascending);
++ }
++
++ X(ops_zero)(&pln->super.super.ops);
++ if (cld1) X(ops_add2)(&cld1->ops, &pln->super.super.ops);
++ if (cld2) X(ops_add2)(&cld2->ops, &pln->super.super.ops);
++ if (cld2rest) X(ops_add2)(&cld2rest->ops, &pln->super.super.ops);
++ if (cld3) X(ops_add2)(&cld3->ops, &pln->super.super.ops);
++ /* FIXME: should MPI operations be counted in "other" somehow? */
++
++ return &(pln->super.super);
++
++ nada:
++ X(plan_destroy_internal)(cld3);
++ X(plan_destroy_internal)(cld2rest);
++ X(plan_destroy_internal)(cld2);
++ X(plan_destroy_internal)(cld1);
++ return (plan *) 0;
++}
++
++static solver *mksolver(int preserve_input)
++{
++ static const solver_adt sadt = { PROBLEM_MPI_TRANSPOSE, mkplan, 0 };
++ S *slv = MKSOLVER(S, &sadt);
++ slv->preserve_input = preserve_input;
++ return &(slv->super);
++}
++
++void XM(transpose_pairwise_transposed_register)(planner *p)
++{
++ int preserve_input;
++ for (preserve_input = 0; preserve_input <= 1; ++preserve_input)
++ REGISTER_SOLVER(p, mksolver(preserve_input));
++}
diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py
index 0e85f410c1..fb784b7571 100644
--- a/var/spack/repos/builtin/packages/fish/package.py
+++ b/var/spack/repos/builtin/packages/fish/package.py
@@ -32,8 +32,7 @@ class Fish(Package):
homepage = "http://fishshell.com/"
url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz"
- list_url = "http://fishshell.com/files/"
- list_depth = 2
+ list_url = "http://fishshell.com/"
version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a')
diff --git a/var/spack/repos/builtin/packages/fixesproto/package.py b/var/spack/repos/builtin/packages/fixesproto/package.py
new file mode 100644
index 0000000000..64852b40e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fixesproto/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Fixesproto(Package):
+ """X Fixes Extension.
+
+ The extension makes changes to many areas of the protocol to resolve
+ issues raised by application interaction with core protocol mechanisms
+ that cannot be adequately worked around on the client side of the wire."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/fixesproto"
+ url = "https://www.x.org/archive/individual/proto/fixesproto-5.0.tar.gz"
+
+ version('5.0', '1b3115574cadd4cbea1f197faa7c1de4')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/flint/package.py b/var/spack/repos/builtin/packages/flint/package.py
new file mode 100644
index 0000000000..c39b17db2c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/flint/package.py
@@ -0,0 +1,66 @@
+##############################################################################
+# 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 Flint(Package):
+ """FLINT (Fast Library for Number Theory)."""
+
+ homepage = "http://www.flintlib.org"
+ url = "http://mirrors.mit.edu/sage/spkg/upstream/flint/flint-2.5.2.tar.gz"
+
+ version('2.5.2', 'cda885309362150196aed66a5e0f0383')
+ version('2.4.5', '6504b9deabeafb9313e57153a1730b33')
+ version('develop', git='https://github.com/wbhart/flint2.git')
+
+ # Overlap in functionality between gmp and mpir
+ # All other dependencies must also be built with
+ # one or the other
+ # variant('mpir', default=False,
+ # description='Compile with the MPIR library')
+
+ # Build dependencies
+ depends_on('autoconf', type='build')
+
+ # Other dependencies
+ depends_on('gmp') # mpir is a drop-in replacement for this
+ depends_on('mpfr') # Could also be built against mpir
+
+ def install(self, spec, prefix):
+ options = []
+ options = ["--prefix=%s" % prefix,
+ "--with-gmp=%s" % spec['gmp'].prefix,
+ "--with-mpfr=%s" % spec['mpfr'].prefix]
+
+ # if '+mpir' in spec:
+ # options.extend([
+ # "--with-mpir=%s" % spec['mpir'].prefix
+ # ])
+
+ configure(*options)
+ make()
+ if self.run_tests:
+ make("check")
+ make("install")
diff --git a/var/spack/repos/builtin/packages/font-adobe-100dpi/package.py b/var/spack/repos/builtin/packages/font-adobe-100dpi/package.py
new file mode 100644
index 0000000000..bde6f352da
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-adobe-100dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontAdobe100dpi(Package):
+ """X.org adobe-100dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/adobe-100dpi"
+ url = "https://www.x.org/archive/individual/font/font-adobe-100dpi-1.0.3.tar.gz"
+
+ version('1.0.3', 'ba61e7953f4f5cec5a8e69c262bbc7f9')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-adobe-75dpi/package.py b/var/spack/repos/builtin/packages/font-adobe-75dpi/package.py
new file mode 100644
index 0000000000..380fcf363e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-adobe-75dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontAdobe75dpi(Package):
+ """X.org adobe-75dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/adobe-75dpi"
+ url = "https://www.x.org/archive/individual/font/font-adobe-75dpi-1.0.3.tar.gz"
+
+ version('1.0.3', '7a414bb661949cec938938fd678cf649')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-adobe-utopia-100dpi/package.py b/var/spack/repos/builtin/packages/font-adobe-utopia-100dpi/package.py
new file mode 100644
index 0000000000..9782d259b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-adobe-utopia-100dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontAdobeUtopia100dpi(Package):
+ """X.org adobe-utopia-100dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/adobe-utopia-100dpi"
+ url = "https://www.x.org/archive/individual/font/font-adobe-utopia-100dpi-1.0.4.tar.gz"
+
+ version('1.0.4', '128416eccd59b850f77a9b803681da3c')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-adobe-utopia-75dpi/package.py b/var/spack/repos/builtin/packages/font-adobe-utopia-75dpi/package.py
new file mode 100644
index 0000000000..9b687a7814
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-adobe-utopia-75dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontAdobeUtopia75dpi(Package):
+ """X.org adobe-utopia-75dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/adobe-utopia-75dpi"
+ url = "https://www.x.org/archive/individual/font/font-adobe-utopia-75dpi-1.0.4.tar.gz"
+
+ version('1.0.4', '74c73a5b73c6c3224b299f1fc033e508')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-adobe-utopia-type1/package.py b/var/spack/repos/builtin/packages/font-adobe-utopia-type1/package.py
new file mode 100644
index 0000000000..14004e9883
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-adobe-utopia-type1/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 FontAdobeUtopiaType1(Package):
+ """X.org adobe-utopia-type1 font."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/font/adobe-utopia-type1"
+ url = "https://www.x.org/archive/individual/font/font-adobe-utopia-type1-1.0.4.tar.gz"
+
+ version('1.0.4', 'b0676c3495acabad519ee98a94163904')
+
+ depends_on('font-util', type='build')
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-alias/package.py b/var/spack/repos/builtin/packages/font-alias/package.py
new file mode 100644
index 0000000000..eb8c79fe2a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-alias/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class FontAlias(Package):
+ """X.org alias font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/alias"
+ url = "https://www.x.org/archive/individual/font/font-alias-1.0.3.tar.gz"
+
+ version('1.0.3', '535138efe0a95f5fe521be6a6b9c4888')
+
+ depends_on('font-util')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-arabic-misc/package.py b/var/spack/repos/builtin/packages/font-arabic-misc/package.py
new file mode 100644
index 0000000000..8307d58d6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-arabic-misc/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontArabicMisc(Package):
+ """X.org arabic-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/arabic-misc"
+ url = "https://www.x.org/archive/individual/font/font-arabic-misc-1.0.3.tar.gz"
+
+ version('1.0.3', '918457df65ef93f09969c6ab01071789')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bh-100dpi/package.py b/var/spack/repos/builtin/packages/font-bh-100dpi/package.py
new file mode 100644
index 0000000000..1d488a6cd9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bh-100dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontBh100dpi(Package):
+ """X.org bh-100dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bh-100dpi"
+ url = "https://www.x.org/archive/individual/font/font-bh-100dpi-1.0.3.tar.gz"
+
+ version('1.0.3', '09e63a5608000531179e1ab068a35878')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bh-75dpi/package.py b/var/spack/repos/builtin/packages/font-bh-75dpi/package.py
new file mode 100644
index 0000000000..22420dd887
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bh-75dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontBh75dpi(Package):
+ """X.org bh-75dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bh-75dpi"
+ url = "https://www.x.org/archive/individual/font/font-bh-75dpi-1.0.3.tar.gz"
+
+ version('1.0.3', '88fec4ebc4a265684bff3abdd066f14f')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bh-lucidatypewriter-100dpi/package.py b/var/spack/repos/builtin/packages/font-bh-lucidatypewriter-100dpi/package.py
new file mode 100644
index 0000000000..173195a557
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bh-lucidatypewriter-100dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontBhLucidatypewriter100dpi(Package):
+ """X.org bh-lucidatypewriter-100dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bh-lucidatypewriter-100dpi"
+ url = "https://www.x.org/archive/individual/font/font-bh-lucidatypewriter-100dpi-1.0.3.tar.gz"
+
+ version('1.0.3', '5f716f54e497fb4ec1bb3a5d650ac6f7')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bh-lucidatypewriter-75dpi/package.py b/var/spack/repos/builtin/packages/font-bh-lucidatypewriter-75dpi/package.py
new file mode 100644
index 0000000000..9066823bc3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bh-lucidatypewriter-75dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontBhLucidatypewriter75dpi(Package):
+ """X.org bh-lucidatypewriter-75dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bh-lucidatypewriter-75dpi"
+ url = "https://www.x.org/archive/individual/font/font-bh-lucidatypewriter-75dpi-1.0.3.tar.gz"
+
+ version('1.0.3', 'cab8a44ae329aab7141c7adeef0daf5a')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bh-ttf/package.py b/var/spack/repos/builtin/packages/font-bh-ttf/package.py
new file mode 100644
index 0000000000..a10b88d355
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bh-ttf/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontBhTtf(Package):
+ """X.org bh-ttf font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bh-ttf"
+ url = "https://www.x.org/archive/individual/font/font-bh-ttf-1.0.3.tar.gz"
+
+ version('1.0.3', '4ce741ec4edaa11cd38988d355a7578b')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bh-type1/package.py b/var/spack/repos/builtin/packages/font-bh-type1/package.py
new file mode 100644
index 0000000000..fffc2e4095
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bh-type1/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontBhType1(Package):
+ """X.org bh-type1 font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bh-type1"
+ url = "https://www.x.org/archive/individual/font/font-bh-type1-1.0.3.tar.gz"
+
+ version('1.0.3', '62d4e8f782a6a0658784072a5df5ac98')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bitstream-100dpi/package.py b/var/spack/repos/builtin/packages/font-bitstream-100dpi/package.py
new file mode 100644
index 0000000000..e8e11ae627
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bitstream-100dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontBitstream100dpi(Package):
+ """X.org bitstream-100dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bitstream-100dpi"
+ url = "https://www.x.org/archive/individual/font/font-bitstream-100dpi-1.0.3.tar.gz"
+
+ version('1.0.3', 'c27bf37e9b8039f93bd90b8131ed37ad')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bitstream-75dpi/package.py b/var/spack/repos/builtin/packages/font-bitstream-75dpi/package.py
new file mode 100644
index 0000000000..5dd033964b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bitstream-75dpi/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontBitstream75dpi(Package):
+ """X.org bitstream-75dpi font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bitstream-75dpi"
+ url = "https://www.x.org/archive/individual/font/font-bitstream-75dpi-1.0.3.tar.gz"
+
+ version('1.0.3', '4ff6c5d6aebe69371e27b09ad8313d25')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bitstream-speedo/package.py b/var/spack/repos/builtin/packages/font-bitstream-speedo/package.py
new file mode 100644
index 0000000000..e746f241df
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bitstream-speedo/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontBitstreamSpeedo(Package):
+ """X.org bitstream-speedo font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bitstream-speedo"
+ url = "https://www.x.org/archive/individual/font/font-bitstream-speedo-1.0.2.tar.gz"
+
+ version('1.0.2', 'f0a777b351cf5adefefcf4823e0c1c01')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-bitstream-type1/package.py b/var/spack/repos/builtin/packages/font-bitstream-type1/package.py
new file mode 100644
index 0000000000..65289685c3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-bitstream-type1/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontBitstreamType1(Package):
+ """X.org bitstream-type1 font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/bitstream-type1"
+ url = "https://www.x.org/archive/individual/font/font-bitstream-type1-1.0.3.tar.gz"
+
+ version('1.0.3', 'ff91738c4d3646d7999e00aa9923f2a0')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-cronyx-cyrillic/package.py b/var/spack/repos/builtin/packages/font-cronyx-cyrillic/package.py
new file mode 100644
index 0000000000..07e1330fe6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-cronyx-cyrillic/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontCronyxCyrillic(Package):
+ """X.org cronyx-cyrillic font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/cronyx-cyrillic"
+ url = "https://www.x.org/archive/individual/font/font-cronyx-cyrillic-1.0.3.tar.gz"
+
+ version('1.0.3', '3119ba1bc7f775c162c96e17a912fe30')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-cursor-misc/package.py b/var/spack/repos/builtin/packages/font-cursor-misc/package.py
new file mode 100644
index 0000000000..6fddc015e3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-cursor-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontCursorMisc(Package):
+ """X.org cursor-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/cursor-misc"
+ url = "https://www.x.org/archive/individual/font/font-cursor-misc-1.0.3.tar.gz"
+
+ version('1.0.3', 'a0bf70c7e498f1cd8e3fdf6154f2bb00')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-daewoo-misc/package.py b/var/spack/repos/builtin/packages/font-daewoo-misc/package.py
new file mode 100644
index 0000000000..3dd3b59b14
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-daewoo-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontDaewooMisc(Package):
+ """X.org daewoo-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/daewoo-misc"
+ url = "https://www.x.org/archive/individual/font/font-daewoo-misc-1.0.3.tar.gz"
+
+ version('1.0.3', '71a7e2796f045c9d217a19c4e6c25bc1')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-dec-misc/package.py b/var/spack/repos/builtin/packages/font-dec-misc/package.py
new file mode 100644
index 0000000000..035ae3eb15
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-dec-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontDecMisc(Package):
+ """X.org dec-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/dec-misc"
+ url = "https://www.x.org/archive/individual/font/font-dec-misc-1.0.3.tar.gz"
+
+ version('1.0.3', '5a9242f6b60ecf2b8c5b158322ca2a40')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-ibm-type1/package.py b/var/spack/repos/builtin/packages/font-ibm-type1/package.py
new file mode 100644
index 0000000000..34bbe85cfb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-ibm-type1/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontIbmType1(Package):
+ """X.org ibm-type1 font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/ibm-type1"
+ url = "https://www.x.org/archive/individual/font/font-ibm-type1-1.0.3.tar.gz"
+
+ version('1.0.3', '2806116e4adcb89d3d5ff5faf65e57c1')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-isas-misc/package.py b/var/spack/repos/builtin/packages/font-isas-misc/package.py
new file mode 100644
index 0000000000..b0575f8ffc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-isas-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontIsasMisc(Package):
+ """X.org isas-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/isas-misc"
+ url = "https://www.x.org/archive/individual/font/font-isas-misc-1.0.3.tar.gz"
+
+ version('1.0.3', 'ecc3b6fbe8f5721ddf5c7fc66f73e76f')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-jis-misc/package.py b/var/spack/repos/builtin/packages/font-jis-misc/package.py
new file mode 100644
index 0000000000..a5bee3fe31
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-jis-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontJisMisc(Package):
+ """X.org jis-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/jis-misc"
+ url = "https://www.x.org/archive/individual/font/font-jis-misc-1.0.3.tar.gz"
+
+ version('1.0.3', 'c48ee5749ae25075d2c7a6111c195e7b')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-micro-misc/package.py b/var/spack/repos/builtin/packages/font-micro-misc/package.py
new file mode 100644
index 0000000000..930a299beb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-micro-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontMicroMisc(Package):
+ """X.org micro-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/micro-misc"
+ url = "https://www.x.org/archive/individual/font/font-micro-misc-1.0.3.tar.gz"
+
+ version('1.0.3', '4de3f0ce500aef85f198c52ace5e66ac')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-misc-cyrillic/package.py b/var/spack/repos/builtin/packages/font-misc-cyrillic/package.py
new file mode 100644
index 0000000000..4d25552732
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-misc-cyrillic/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontMiscCyrillic(Package):
+ """X.org misc-cyrillic font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/misc-cyrillic"
+ url = "https://www.x.org/archive/individual/font/font-misc-cyrillic-1.0.3.tar.gz"
+
+ version('1.0.3', 'e7b13da5325f62dd3f630beade6d2656')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-misc-ethiopic/package.py b/var/spack/repos/builtin/packages/font-misc-ethiopic/package.py
new file mode 100644
index 0000000000..6ccdc4e482
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-misc-ethiopic/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontMiscEthiopic(Package):
+ """X.org misc-ethiopic font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/misc-ethiopic"
+ url = "https://www.x.org/archive/individual/font/font-misc-ethiopic-1.0.3.tar.gz"
+
+ version('1.0.3', '02ddea9338d9d36804ad38f3daadb55a')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-misc-meltho/package.py b/var/spack/repos/builtin/packages/font-misc-meltho/package.py
new file mode 100644
index 0000000000..eda84e2b32
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-misc-meltho/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontMiscMeltho(Package):
+ """X.org misc-meltho font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/misc-meltho"
+ url = "https://www.x.org/archive/individual/font/font-misc-meltho-1.0.3.tar.gz"
+
+ version('1.0.3', '8380696483478449c39b04612f20eea8')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-misc-misc/package.py b/var/spack/repos/builtin/packages/font-misc-misc/package.py
new file mode 100644
index 0000000000..c960d18b39
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-misc-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontMiscMisc(Package):
+ """X.org misc-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/misc-misc"
+ url = "https://www.x.org/archive/individual/font/font-misc-misc-1.1.2.tar.gz"
+
+ version('1.1.2', '23a79b92275375315129b440206c85b9')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-mutt-misc/package.py b/var/spack/repos/builtin/packages/font-mutt-misc/package.py
new file mode 100644
index 0000000000..a5d4cae060
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-mutt-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontMuttMisc(Package):
+ """X.org mutt-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/mutt-misc"
+ url = "https://www.x.org/archive/individual/font/font-mutt-misc-1.0.3.tar.gz"
+
+ version('1.0.3', '6c2de53ba514f720e02af48eef28ff32')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-schumacher-misc/package.py b/var/spack/repos/builtin/packages/font-schumacher-misc/package.py
new file mode 100644
index 0000000000..193fa2691e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-schumacher-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontSchumacherMisc(Package):
+ """X.org schumacher-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/schumacher-misc"
+ url = "https://www.x.org/archive/individual/font/font-schumacher-misc-1.1.2.tar.gz"
+
+ version('1.1.2', '1f3386a0a690ba8117fc05b501f9f91b')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-screen-cyrillic/package.py b/var/spack/repos/builtin/packages/font-screen-cyrillic/package.py
new file mode 100644
index 0000000000..5914a3c9de
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-screen-cyrillic/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontScreenCyrillic(Package):
+ """X.org screen-cyrillic font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/screen-cyrillic"
+ url = "https://www.x.org/archive/individual/font/font-screen-cyrillic-1.0.4.tar.gz"
+
+ version('1.0.4', '4cadaf2ba4c4d0f4cb9b4e7b8f0a3019')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-sony-misc/package.py b/var/spack/repos/builtin/packages/font-sony-misc/package.py
new file mode 100644
index 0000000000..145ee20971
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-sony-misc/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontSonyMisc(Package):
+ """X.org sony-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/sony-misc"
+ url = "https://www.x.org/archive/individual/font/font-sony-misc-1.0.3.tar.gz"
+
+ version('1.0.3', '4026cb88e2253efc0b8376003780ccb6')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-sun-misc/package.py b/var/spack/repos/builtin/packages/font-sun-misc/package.py
new file mode 100644
index 0000000000..dcf5b9e217
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-sun-misc/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontSunMisc(Package):
+ """X.org sun-misc font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/sun-misc"
+ url = "https://www.x.org/archive/individual/font/font-sun-misc-1.0.3.tar.gz"
+
+ version('1.0.3', '87ce97ce0582e76bc4064a4d4d10db09')
+
+ depends_on('font-util')
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-util/package.py b/var/spack/repos/builtin/packages/font-util/package.py
new file mode 100644
index 0000000000..0b310117c6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-util/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 FontUtil(Package):
+ """X.Org font package creation/installation utilities."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/util"
+ url = "https://www.x.org/archive/individual/font/font-util-1.3.1.tar.gz"
+
+ version('1.3.1', 'd153a9af216e4498fa171faea2c82514')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/font-winitzki-cyrillic/package.py b/var/spack/repos/builtin/packages/font-winitzki-cyrillic/package.py
new file mode 100644
index 0000000000..0af366c742
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-winitzki-cyrillic/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 FontWinitzkiCyrillic(Package):
+ """X.org winitzki-cyrillic font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/winitzki-cyrillic"
+ url = "https://www.x.org/archive/individual/font/font-winitzki-cyrillic-1.0.3.tar.gz"
+
+ version('1.0.3', '777c667b080b33793528d5abf3247a48')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/font-xfree86-type1/package.py b/var/spack/repos/builtin/packages/font-xfree86-type1/package.py
new file mode 100644
index 0000000000..dceac106a9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/font-xfree86-type1/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 FontXfree86Type1(Package):
+ """X.org xfree86-type1 font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/font/xfree86-type1"
+ url = "https://www.x.org/archive/individual/font/font-xfree86-type1-1.0.4.tar.gz"
+
+ version('1.0.4', '89c33c5176cd580de6636ad50ce7777b')
+
+ depends_on('font-util')
+
+ depends_on('fontconfig', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('mkfontscale', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
+
+ # `make install` copies the files to the font-util installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/fontcacheproto/package.py b/var/spack/repos/builtin/packages/fontcacheproto/package.py
new file mode 100644
index 0000000000..77feb87573
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fontcacheproto/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# 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 Fontcacheproto(Package):
+ """X.org FontcacheProto protocol headers."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/fontcacheproto"
+ url = "https://www.x.org/archive/individual/proto/fontcacheproto-0.1.3.tar.gz"
+
+ version('0.1.3', '5a91ab914ffbfbc856e6fcde52e6f3e3')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py
index 0d7e47f228..99c9b1f15d 100644
--- a/var/spack/repos/builtin/packages/fontconfig/package.py
+++ b/var/spack/repos/builtin/packages/fontconfig/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Fontconfig(Package):
+class Fontconfig(AutotoolsPackage):
"""Fontconfig customizing font access"""
homepage = "http://www.freedesktop.org/wiki/Software/fontconfig/"
url = "http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz"
@@ -34,9 +34,8 @@ class Fontconfig(Package):
depends_on('freetype')
depends_on('libxml2')
+ depends_on('pkg-config', type='build')
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix, "--enable-libxml2")
-
- make()
- make("install")
+ def configure_args(self):
+ args = ["--enable-libxml2", "--disable-docs"]
+ return args
diff --git a/var/spack/repos/builtin/packages/fontsproto/package.py b/var/spack/repos/builtin/packages/fontsproto/package.py
new file mode 100644
index 0000000000..c3771e18fa
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fontsproto/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 Fontsproto(Package):
+ """X Fonts Extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/fontsproto"
+ url = "https://www.x.org/archive/individual/proto/fontsproto-2.1.3.tar.gz"
+
+ version('2.1.3', '0415f0360e33f3202af67c6c46782251')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/fonttosfnt/package.py b/var/spack/repos/builtin/packages/fonttosfnt/package.py
new file mode 100644
index 0000000000..016cab1ac8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fonttosfnt/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Fonttosfnt(Package):
+ """Wrap a bitmap font in a sfnt (TrueType) wrapper."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/fonttosfnt"
+ url = "https://www.x.org/archive/individual/app/fonttosfnt-1.0.4.tar.gz"
+
+ version('1.0.4', 'ba77fd047a9cca400f17db8c46b06ce8')
+
+ depends_on('freetype')
+ depends_on('libfontenc')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/fslsfonts/package.py b/var/spack/repos/builtin/packages/fslsfonts/package.py
new file mode 100644
index 0000000000..6e46bd6b5a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fslsfonts/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Fslsfonts(Package):
+ """fslsfonts produces a list of fonts served by an X font server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/fslsfonts"
+ url = "https://www.x.org/archive/individual/app/fslsfonts-1.0.5.tar.gz"
+
+ version('1.0.5', 'ef781bd6a7b529d3ed7a256055715730')
+
+ depends_on('libfs')
+
+ depends_on('xproto@7.0.25:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/fstobdf/package.py b/var/spack/repos/builtin/packages/fstobdf/package.py
new file mode 100644
index 0000000000..6358e33d2a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fstobdf/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Fstobdf(Package):
+ """The fstobdf program reads a font from a font server and prints a BDF
+ file on the standard output that may be used to recreate the font.
+ This is useful in testing servers, debugging font metrics, and
+ reproducing lost BDF files."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/fstobdf"
+ url = "https://www.x.org/archive/individual/app/fstobdf-1.0.6.tar.gz"
+
+ version('1.0.6', '6d3f24673fcb9ce266f49dc140bbf250')
+
+ depends_on('libx11')
+ depends_on('libfs')
+
+ depends_on('xproto@7.0.25:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/gcc/gcc-backport.patch b/var/spack/repos/builtin/packages/gcc/gcc-backport.patch
new file mode 100644
index 0000000000..f9fab68f23
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gcc/gcc-backport.patch
@@ -0,0 +1,138 @@
+2016-02-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Backported from mainline
+ 2016-02-19 Jakub Jelinek <jakub@redhat.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * Make-lang.in: Invoke gperf with -L C++.
+ * cfns.gperf: Remove prototypes for hash and libc_name_p
+ inlines.
+ * cfns.h: Regenerated.
+ * except.c (nothrow_libfn_p): Adjust.
+
+Index: gcc/cp/Make-lang.in
+===================================================================
+--- a/gcc/cp/Make-lang.in (revision 233574)
++++ b/gcc/cp/Make-lang.in (working copy)
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+
+ #
+Index: gcc/cp/cfns.gperf
+===================================================================
+--- a/gcc/cp/cfns.gperf (revision 233574)
++++ b/gcc/cp/cfns.gperf (working copy)
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -16,14 +18,6 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+Index: gcc/cp/cfns.h
+===================================================================
+--- a/gcc/cp/cfns.h (revision 233574)
++++ b/gcc/cp/cfns.h (working copy)
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
+
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+ #endif
+
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -47,26 +47,19 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
+ {
++private:
++ static inline unsigned int hash (const char *str, unsigned int len);
++public:
++ static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
++{
+ static const unsigned short asso_values[] =
+ {
+ 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
+@@ -122,14 +115,8 @@ along with GCC; see the file COPYING3. If not see
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+ enum
+ {
+Index: gcc/cp/except.c
+===================================================================
+--- a/gcc/cp/except.c (revision 233574)
++++ b/gcc/cp/except.c (working copy)
+@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
+ unless the system headers are playing rename tricks, and if
+ they are, we don't want to be confused by them. */
+ id = DECL_NAME (fn);
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++ IDENTIFIER_LENGTH (id));
+ }
+
+ /* Returns nonzero if an exception of type FROM will be caught by a
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index 72a5cb22f8..18fe0d88f8 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -3,6 +3,7 @@ from spack import *
from contextlib import closing
from glob import glob
import sys
+from os.path import isfile
class Gcc(Package):
@@ -10,14 +11,17 @@ class Gcc(Package):
Objective-C, Fortran, and Java."""
homepage = "https://gcc.gnu.org"
- url = "http://open-source-box.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2"
- list_url = 'http://open-source-box.org/gcc/'
+ url = "http://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2"
+ list_url = 'http://ftp.gnu.org/gnu/gcc/'
list_depth = 2
+ version('6.2.0', '9768625159663b300ae4de2f4745fcc4')
version('6.1.0', '8fb6cb98b8459f5863328380fbf06bd1')
version('5.4.0', '4c626ac2a83ef30dfb9260e6f59c2b30')
version('5.3.0', 'c9616fd448f980259c31de613e575719')
version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467')
+ version('5.1.0', 'd5525b1127d07d215960e6051c5da35e')
+ version('4.9.4', '87c24a4090c1577ba817ec6882602491')
version('4.9.3', '6f831b4d251872736e8e9cc09746f327')
version('4.9.2', '4df8ee253b7f3863ad0b86359cd39c43')
version('4.9.1', 'fddf71348546af523353bd43d34919c1')
@@ -33,6 +37,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")
@@ -50,6 +57,9 @@ class Gcc(Package):
else:
provides('golang', when='@4.7.1:')
+ patch('piclibs.patch', when='+piclibs')
+ patch('gcc-backport.patch', when='@4.7:4.9.2,5:5.3')
+
def install(self, spec, prefix):
# libjava/configure needs a minor fix to install into spack paths.
filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure',
@@ -57,9 +67,23 @@ class Gcc(Package):
enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc'))
- if spec.satisfies("@4.7.1:") and sys.platform != 'darwin':
+ if spec.satisfies("@4.7.1:") and sys.platform != 'darwin' and \
+ not (spec.satisfies('@:4.9.3') and 'ppc64le' in spec.architecture):
enabled_languages.add('go')
+ # Fix a standard header file for OS X Yosemite that
+ # is GCC incompatible by replacing non-GCC compliant macros
+ if 'yosemite' in spec.architecture:
+ if isfile(r'/usr/include/dispatch/object.h'):
+ new_dispatch_dir = join_path(prefix, 'include', 'dispatch')
+ mkdirp(new_dispatch_dir)
+ cp = which('cp')
+ new_header = join_path(new_dispatch_dir, 'object.h')
+ cp(r'/usr/include/dispatch/object.h', new_header)
+ filter_file(r'typedef void \(\^dispatch_block_t\)\(void\)',
+ 'typedef void* dispatch_block_t',
+ new_header)
+
# Generic options to compile GCC
options = ["--prefix=%s" % prefix, "--libdir=%s/lib64" % prefix,
"--disable-multilib",
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/gccmakedep/package.py b/var/spack/repos/builtin/packages/gccmakedep/package.py
new file mode 100644
index 0000000000..ed2530d89e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gccmakedep/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 Gccmakedep(Package):
+ """X.org gccmakedep utilities."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/util/gccmakedep/"
+ url = "https://www.x.org/archive/individual/util/gccmakedep-1.0.3.tar.gz"
+
+ version('1.0.3', '127ddb6131eb4a56fdf6644a63ade788')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/gconf/package.py b/var/spack/repos/builtin/packages/gconf/package.py
new file mode 100644
index 0000000000..3b3abc71ed
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gconf/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Gconf(Package):
+ """GConf is a system for storing application preferences."""
+
+ homepage = "https://projects.gnome.org/gconf/"
+ url = "ftp://ftp.gnome.org/pub/gnome/sources/GConf/3.2/GConf-3.2.6.tar.xz"
+
+ version('3.2.6', '2b16996d0e4b112856ee5c59130e822c')
+
+ depends_on('glib@2.14.0:')
+ depends_on('libxml2')
+
+ # TODO: add missing dependencies
+ # gio-2.0 >= 2.31.0
+ # gthread-2.0
+ # gmodule-2.0 >= 2.7.0
+ # gobject-2.0 >= 2.7.0
+ # dbus-1 >= 1.0.0
+ # dbus-glib-1 >= 0.74
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py
index 4fdfafc992..4f54b3a841 100644
--- a/var/spack/repos/builtin/packages/gdal/package.py
+++ b/var/spack/repos/builtin/packages/gdal/package.py
@@ -26,14 +26,13 @@ from spack import *
class Gdal(Package):
- """
- GDAL is a translator library for raster and vector geospatial
+ """GDAL is a translator library for raster and vector geospatial
data formats that is released under an X/MIT style Open Source
license by the Open Source Geospatial Foundation. As a library,
it presents a single raster abstract data model and vector
abstract data model to the calling application for all supported
formats. It also comes with a variety of useful command line
- utilities for data translation and processing
+ utilities for data translation and processing.
"""
homepage = "http://www.gdal.org/"
diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py
index 9145009fa4..f90e4e7ff0 100644
--- a/var/spack/repos/builtin/packages/gdb/package.py
+++ b/var/spack/repos/builtin/packages/gdb/package.py
@@ -22,16 +22,15 @@
# 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 Gdb(Package):
"""GDB, the GNU Project debugger, allows you to see what is going on
- `inside' another program while it executes -- or what another
- program was doing at the moment it crashed.
-
+ 'inside' another program while it executes -- or what another
+ program was doing at the moment it crashed.
"""
+
homepage = "https://www.gnu.org/software/gdb"
url = "http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz"
@@ -42,9 +41,18 @@ class Gdb(Package):
version('7.9', '8f8ced422fe462a00e0135a643544f17')
version('7.8.2', '8b0ea8b3559d3d90b3ff4952f0aeafbc')
+ variant('python', default=True, description='Compile with Python support')
+
+ # Required dependency
depends_on('texinfo', type='build')
+ # Optional dependency
+ depends_on('python', when='+python')
+
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ options = ['--prefix=%s' % prefix]
+ if '+python' in spec:
+ options.extend(['--with-python'])
+ configure(*options)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py
new file mode 100644
index 0000000000..239ef6d586
--- /dev/null
+++ b/var/spack/repos/builtin/packages/geant4/package.py
@@ -0,0 +1,85 @@
+##############################################################################
+# 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 Geant4(Package):
+ """Geant4 is a toolkit for the simulation of the passage of particles
+ through matter. Its areas of application include high energy, nuclear
+ and accelerator physics, as well as studies in medical and space
+ science."""
+
+ homepage = "http://geant4.cern.ch/"
+ url = "http://geant4.cern.ch/support/source/geant4.10.01.p03.tar.gz"
+
+ version('10.02.p01', 'b81f7082a15f6a34b720b6f15c6289cfe4ddbbbdcef0dc52719f71fac95f7f1c')
+ version('10.01.p03', '4fb4175cc0dabcd517443fbdccd97439')
+
+ variant('qt', default=False, description='Enable Qt support')
+
+ depends_on('cmake@3.5:', type='build')
+
+ depends_on("clhep@2.3.1.1~cxx11+cxx14", when="@10.02.p01")
+ depends_on("clhep@2.2.0.4~cxx11+cxx14", when="@10.01.p03")
+ depends_on("expat")
+ depends_on("zlib")
+ depends_on("xerces-c")
+ depends_on("qt@4.8:", when="+qt")
+
+ def install(self, spec, prefix):
+ cmake_args = list(std_cmake_args)
+ cmake_args.append('-DXERCESC_ROOT_DIR:STRING=%s' %
+ spec['xerces-c'].prefix)
+ cmake_args.append('-DGEANT4_BUILD_CXXSTD=c++14')
+
+ cmake_args += ['-DGEANT4_USE_GDML=ON',
+ '-DGEANT4_USE_SYSTEM_EXPAT=ON',
+ '-DGEANT4_USE_SYSTEM_ZLIB=ON',
+ '-DGEANT4_USE_SYSTEM_CLHEP=ON']
+
+ # fixme: turn off data for now and maybe each data set should
+ # go into a separate package to cut down on disk usage between
+ # different code versions using the same data versions.
+ cmake_args.append('-DGEANT4_INSTALL_DATA=OFF')
+
+ # http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch02s03.html
+ # fixme: likely things that need addressing:
+ # -DGEANT4_USE_OPENGL_X11=ON
+
+ if '+qt' in spec:
+ cmake_args.append('-DGEANT4_USE_QT=ON')
+
+ build_directory = join_path(self.stage.path, 'spack-build')
+ source_directory = self.stage.source_path
+
+ with working_dir(build_directory, create=True):
+ cmake(source_directory, *cmake_args)
+ make()
+ make("install")
+
+ def url_for_version(self, version):
+ """Handle Geant4's unusual version string."""
+ return "http://geant4.cern.ch/support/source/geant4.%s.tar.gz" % version
diff --git a/var/spack/repos/builtin/packages/ghostscript-fonts/package.py b/var/spack/repos/builtin/packages/ghostscript-fonts/package.py
new file mode 100644
index 0000000000..0f82ed5fb6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ghostscript-fonts/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# 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 GhostscriptFonts(Package):
+ """Ghostscript Fonts"""
+
+ homepage = "http://ghostscript.com/"
+ url = "ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ghostscript-fonts-std-8.11.tar.gz"
+
+ version('8.11', '6865682b095f8c4500c54b285ff05ef6')
+
+ def install(self, spec, prefix):
+ install_tree('.', join_path(prefix.share, 'font'))
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/git-lfs/package.py b/var/spack/repos/builtin/packages/git-lfs/package.py
new file mode 100644
index 0000000000..25e440ff6d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/git-lfs/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 GitLfs(Package):
+ """Git LFS is a system for managing and versioning large files in
+ association with a Git repository. Instead of storing the large files
+ within the Git repository as blobs, Git LFS stores special "pointer
+ files" in the repository, while storing the actual file contents on a
+ Git LFS server."""
+
+ homepage = "https://git-lfs.github.com"
+ git_url = "https://github.com/github/git-lfs.git"
+
+ version('1.4.1', git=git_url, tag='v1.4.1')
+ version('1.3.1', git=git_url, tag='v1.3.1')
+
+ # TODO: Implement this by following the instructions at this location:
+ # https://github.com/github/git-lfs/blob/master/CONTRIBUTING.md#building
+ # variant('test', default=True, description='Build and run tests as part of the build.') # NOQA: E501
+
+ depends_on('go@1.5:', type='build')
+ depends_on('git@1.8.2:', type='run')
+
+ def install(self, spec, prefix):
+ bootstrap_script = Executable(join_path('script', 'bootstrap'))
+ bootstrap_script()
+
+ mkdirp(prefix.bin)
+ install(join_path('bin', 'git-lfs'), prefix.bin)
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py
index 3cc879088d..ac97ad392b 100644
--- a/var/spack/repos/builtin/packages/git/package.py
+++ b/var/spack/repos/builtin/packages/git/package.py
@@ -22,6 +22,7 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+import sys
from spack import *
@@ -32,6 +33,13 @@ class Git(Package):
homepage = "http://git-scm.com"
url = "https://github.com/git/git/tarball/v2.7.1"
+ version('2.9.3', 'b0edfc0f3cb046aec7ed68a4b7282a75')
+ version('2.9.2', '3ff8a9b30fd5c99a02e6d6585ab543fc')
+ version('2.9.1', 'a5d806743a992300b45f734d1667ddd2')
+ version('2.9.0', 'bf33a13c2adc05bc9d654c415332bc65')
+ version('2.8.4', '86afb10254c3803894c9863fb5896bb6')
+ version('2.8.3', '0e19f31f96f9364fd247b8dc737dacfd')
+ version('2.8.2', '3d55550880af98f6e35c7f1d7c5aecfe')
version('2.8.1', '1308448d95afa41a4135903f22262fc8')
version('2.8.0', 'eca687e46e9750121638f258cff8317b')
version('2.7.3', 'fa1c008b56618c355a32ba4a678305f6')
@@ -47,28 +55,33 @@ class Git(Package):
# version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b')
# version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c')
- depends_on("openssl")
depends_on("autoconf", type='build')
depends_on("curl")
depends_on("expat")
depends_on("gettext")
- depends_on("zlib")
+ depends_on("libiconv")
+ depends_on("openssl")
depends_on("pcre")
depends_on("perl")
+ depends_on("zlib")
def install(self, spec, prefix):
env['LDFLAGS'] = "-L%s" % spec['gettext'].prefix.lib + " -lintl"
configure_args = [
"--prefix=%s" % prefix,
- "--with-libpcre=%s" % spec['pcre'].prefix,
- "--with-openssl=%s" % spec['openssl'].prefix,
- "--with-zlib=%s" % spec['zlib'].prefix,
"--with-curl=%s" % spec['curl'].prefix,
"--with-expat=%s" % spec['expat'].prefix,
+ "--with-iconv=%s" % spec['libiconv'].prefix,
+ "--with-libpcre=%s" % spec['pcre'].prefix,
+ "--with-openssl=%s" % spec['openssl'].prefix,
"--with-perl=%s" % join_path(spec['perl'].prefix.bin, 'perl'),
+ "--with-zlib=%s" % spec['zlib'].prefix,
]
which('autoreconf')('-i')
configure(*configure_args)
+ if sys.platform == "darwin":
+ # Don't link with -lrt; the system has no (and needs no) librt
+ filter_file(r' -lrt$', '', 'Makefile')
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/icu/package.py b/var/spack/repos/builtin/packages/glew/package.py
index b8d366b905..5df7c8642f 100644
--- a/var/spack/repos/builtin/packages/icu/package.py
+++ b/var/spack/repos/builtin/packages/glew/package.py
@@ -25,24 +25,27 @@
from spack import *
-class Icu(Package):
- """The International Components for Unicode (ICU) package is a
- mature, widely used set of C/C++ libraries providing Unicode and
- Globalization support for software applications. ICU is widely
- portable and gives applications the same results on all
- platforms."""
- # FIXME: add a proper url for your package's homepage here.
- homepage = "http://www.example.com"
- url = "http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz"
-
- version('54.1', 'e844caed8f2ca24c088505b0d6271bc0')
-
- def url_for_version(self, version):
- return "http://download.icu-project.org/files/icu4c/%s/icu4c-%s-src.tgz" % (
- version, str(version).replace('.', '_'))
+class Glew(Package):
+ """The OpenGL Extension Wrangler Library."""
+
+ homepage = "http://glew.sourceforge.net/"
+ url = "https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.tgz/download"
+
+ version('2.0.0', '2a2cd7c98f13854d2fcddae0d2b20411')
+
+ depends_on("cmake", type='build')
def install(self, spec, prefix):
- with working_dir("source"):
- configure("--prefix=%s" % prefix)
+ options = []
+ options.extend(std_cmake_args)
+
+ with working_dir('build'):
+ cmake('./cmake/', *options)
+
+ # https://github.com/Homebrew/legacy-homebrew/issues/22025
+ # Note: This file is generated only after cmake is run
+ filter_file(r'Requires: glu',
+ (''), '../glew.pc')
+
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch b/var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch
new file mode 100644
index 0000000000..cfcfe424be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac 2016-08-16 11:57:34.000000000 -0400
++++ b/configure.ac 2016-08-16 11:57:36.000000000 -0400
+@@ -3357,11 +3357,11 @@
+ enable_compile_warnings=yes)
+ AS_IF([test "x$enable_compile_warnings" = xyes], [
+ CC_CHECK_FLAGS_APPEND([GLIB_WARN_CFLAGS], [CFLAGS], [\
+ -Wall -Wstrict-prototypes -Werror=declaration-after-statement \
+ -Werror=missing-prototypes -Werror=implicit-function-declaration \
+- -Werror=pointer-arith -Werror=init-self -Werror=format-security \
+- -Werror=format=2 -Werror=missing-include-dirs])
++ -Werror=pointer-arith -Werror=init-self \
++ -Werror=missing-include-dirs])
+ ])
+ AC_SUBST(GLIB_WARN_CFLAGS)
+
+ #
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index 2720831e4f..4d8085baf2 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
class Glib(Package):
@@ -30,20 +31,28 @@ class Glib(Package):
providing data structure handling for C, portability wrappers
and interfaces for such runtime functionality as an event loop,
threads, dynamic loading and an object system."""
+
homepage = "https://developer.gnome.org/glib/"
url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz"
version('2.49.4', 'e2c87c03017b0cd02c4c73274b92b148')
+ version('2.48.1', '67bd3b75c9f6d5587b457dc01cdcd5bb')
version('2.42.1', '89c4119e50e767d3532158605ee9121a')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('pkg-config+internal_glib', type='build')
depends_on('libffi')
depends_on('zlib')
- depends_on('pkg-config', type='build')
depends_on('gettext')
- depends_on('pcre+utf', when='@2.49:')
+ depends_on('pcre+utf', when='@2.48:')
# The following patch is needed for gcc-6.1
patch('g_date_strftime.patch', when='@2.42.1')
+ # Clang doesn't seem to acknowledge the pragma lines to disable the -Werror
+ # around a legitimate usage.
+ patch('no-Werror=format-security.patch')
def url_for_version(self, version):
"""Handle glib's version-based custom URLs."""
@@ -51,6 +60,16 @@ class Glib(Package):
return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version)
def install(self, spec, prefix):
+ autoreconf = which("autoreconf")
+ autoreconf("--install", "--verbose", "--force",
+ "-I", "config",
+ "-I", os.path.join(spec['pkg-config'].prefix,
+ "share", "aclocal"),
+ "-I", os.path.join(spec['automake'].prefix,
+ "share", "aclocal"),
+ "-I", os.path.join(spec['libtool'].prefix,
+ "share", "aclocal"),
+ )
configure("--prefix=%s" % prefix)
make()
make("install", parallel=False)
diff --git a/var/spack/repos/builtin/packages/globus_toolkit/package.py b/var/spack/repos/builtin/packages/globus_toolkit/package.py
new file mode 100644
index 0000000000..5cec13a5af
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus_toolkit/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# 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 GlobusToolkit(Package):
+ """The Globus Toolkit is an open source software toolkit used for building
+ grids"""
+
+ homepage = "http://toolkit.globus.org"
+ url = "http://toolkit.globus.org/ftppub/gt6/installers/src/globus_toolkit-6.0.1470089956.tar.gz"
+
+ version('6.0.1470089956', 'b77fe3cc5a5844df995688b0e630d077')
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/glproto/package.py b/var/spack/repos/builtin/packages/glproto/package.py
new file mode 100644
index 0000000000..462e529067
--- /dev/null
+++ b/var/spack/repos/builtin/packages/glproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Glproto(Package):
+ """OpenGL Extension to the X Window System.
+
+ This extension defines a protocol for the client to send 3D rendering
+ commands to the X server."""
+
+ homepage = "https://www.x.org/wiki/"
+ url = "https://www.x.org/archive/individual/proto/glproto-1.4.17.tar.gz"
+
+ version('1.4.17', 'd69554c1b51a83f2c6976a640819911b')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py
new file mode 100644
index 0000000000..ca296350a4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gmake/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 Gmake(Package):
+ """GNU Make."""
+
+ homepage = "http://gnu.org/gnu/make"
+ url = "ftp://ftp.gnu.org/gnu/make/make-4.0.tar.gz"
+
+ version('4.0', 'b5e558f981326d9ca1bfdb841640721a')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+ with working_dir(prefix.bin):
+ symlink('make', 'gmake')
diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py
index d85330dd6e..eacd3a6733 100644
--- a/var/spack/repos/builtin/packages/gmp/package.py
+++ b/var/spack/repos/builtin/packages/gmp/package.py
@@ -25,21 +25,24 @@
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."""
-
+class Gmp(AutotoolsPackage):
+ """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"
+ url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2"
version('6.1.1', '4c175f86e11eb32d8bf9872ca3a8e11d')
version('6.1.0', '86ee6e54ebfc4a90b643a65e402c4048')
version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470')
version('6.0.0', '6ef5869ae735db9995619135bd856b84')
- depends_on("m4", type='build')
+ depends_on('m4', type='build')
+
+ def configure_args(self):
+ args = ['--enable-cxx']
+ # We need this flag if we want all the following checks to pass.
+ if self.spec.compiler.name == 'intel':
+ args.append('CXXFLAGS=-no-ftz')
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
- make()
- make("install")
+ return args
diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py
index 72f490e2f4..dd142866e5 100644
--- a/var/spack/repos/builtin/packages/gmsh/package.py
+++ b/var/spack/repos/builtin/packages/gmsh/package.py
@@ -26,8 +26,7 @@ from spack import *
class Gmsh(Package):
- """
- Gmsh is a free 3D finite element grid generator with a built-in CAD engine
+ """Gmsh is a free 3D finite element grid generator with a built-in CAD engine
and post-processor. Its design goal is to provide a fast, light and
user-friendly meshing tool with parametric input and advanced visualization
capabilities. Gmsh is built around four modules: geometry, mesh, solver and
@@ -35,6 +34,7 @@ class Gmsh(Package):
either interactively using the graphical user interface or in ASCII text
files using Gmsh's own scripting language.
"""
+
homepage = 'http://gmsh.info'
url = 'http://gmsh.info/src/gmsh-2.11.0-source.tgz'
@@ -87,9 +87,9 @@ class Gmsh(Package):
options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF')
# Make sure GMSH picks up correct BlasLapack by providing linker flags
- options.append('-DBLAS_LAPACK_LIBRARIES=%s %s' %
- (to_link_flags(spec['lapack'].lapack_shared_lib),
- to_link_flags(spec['blas'].blas_shared_lib)))
+ blas_lapack = spec['lapack'].lapack_libs + spec['blas'].blas_libs
+ options.append(
+ '-DBLAS_LAPACK_LIBRARIES={0}'.format(blas_lapack.ld_flags))
# Gmsh does not have an option to compile against external metis.
# Its own Metis, however, fails to build
diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py
index b0e2109fd3..d48c7c9756 100644
--- a/var/spack/repos/builtin/packages/go-bootstrap/package.py
+++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py
@@ -1,3 +1,27 @@
+##############################################################################
+# 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
+##############################################################################
import os
import shutil
import glob
@@ -17,25 +41,37 @@ class GoBootstrap(Package):
extendable = True
- # temporary fix until tags are pulled correctly
+ # NOTE: Go@1.4.2 is the only supported bootstrapping compiler because all
+ # later versions require a Go compiler to build.
+ # See: https://golang.org/doc/install/source
version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
- variant('test',
- default=True,
- description="Run tests as part of build, a good idea but quite"
- " time consuming")
+ variant('test', default=True, description='Build and run tests as part of the build.')
provides('golang@:1.4.2')
- depends_on('git')
+ depends_on('git', type='alldeps')
+
+ # NOTE: Older versions of Go attempt to download external files that have
+ # since been moved while running the test suite. This patch modifies the
+ # test files so that these tests don't cause false failures.
+ # See: https://github.com/golang/go/issues/15694
+ @when('@:1.4.3')
+ def patch(self):
+ test_suite_file = FileFilter(join_path('src', 'run.bash'))
+ test_suite_file.filter(
+ r'^(.*)(\$GOROOT/src/cmd/api/run.go)(.*)$',
+ r'# \1\2\3',
+ )
+
+ @when('@1.5.0:')
+ def patch(self):
+ pass
def install(self, spec, prefix):
bash = which('bash')
with working_dir('src'):
- if '+test' in spec:
- bash('all.bash')
- else:
- bash('make.bash')
+ bash('{0}.bash'.format('all' if '+test' in spec else 'make'))
try:
os.makedirs(prefix)
diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py
index ff2c2f6781..5fa3017ab5 100644
--- a/var/spack/repos/builtin/packages/go/package.py
+++ b/var/spack/repos/builtin/packages/go/package.py
@@ -1,3 +1,27 @@
+##############################################################################
+# 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
+##############################################################################
import os
import shutil
import glob
@@ -12,28 +36,39 @@ class Go(Package):
extendable = True
- version('1.5.4', git='https://go.googlesource.com/go', tag='go1.5.4')
version('1.6.2', git='https://go.googlesource.com/go', tag='go1.6.2')
+ version('1.5.4', git='https://go.googlesource.com/go', tag='go1.5.4')
+ version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
- variant('test',
- default=True,
- description="Run tests as part of build, a good idea but quite"
- " time consuming")
+ variant('test', default=True, description='Build and run tests as part of the build.')
provides('golang')
- # to-do, make non-c self-hosting compilers feasible without backflips
+ depends_on('git', type='alldeps')
+ # TODO: Make non-c self-hosting compilers feasible without backflips
# should be a dep on external go compiler
depends_on('go-bootstrap', type='build')
- depends_on('git')
+
+ # NOTE: Older versions of Go attempt to download external files that have
+ # since been moved while running the test suite. This patch modifies the
+ # test files so that these tests don't cause false failures.
+ # See: https://github.com/golang/go/issues/15694
+ @when('@:1.4.3')
+ def patch(self):
+ test_suite_file = FileFilter(join_path('src', 'run.bash'))
+ test_suite_file.filter(
+ r'^(.*)(\$GOROOT/src/cmd/api/run.go)(.*)$',
+ r'# \1\2\3',
+ )
+
+ @when('@1.5.0:')
+ def patch(self):
+ pass
def install(self, spec, prefix):
bash = which('bash')
with working_dir('src'):
- if '+test' in spec:
- bash('all.bash')
- else:
- bash('make.bash')
+ bash('{0}.bash'.format('all' if '+test' in spec else 'make'))
try:
os.makedirs(prefix)
diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py
new file mode 100644
index 0000000000..952ec21661
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 GobjectIntrospection(Package):
+ """The GObject Introspection is used to describe the program APIs and
+ collect them in a uniform, machine readable format.Cairo is a 2D graphics
+ library with support for multiple output"""
+
+ homepage = "https://wiki.gnome.org/Projects/GObjectIntrospection"
+ url = "http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.48/gobject-introspection-1.48.0.tar.xz"
+
+ version('1.48.0', '01301fa9019667d48e927353e08bc218')
+
+ # version 1.48.0 build fails with glib 2.49.4
+ depends_on("glib@2.48.1")
+ depends_on("python")
+ depends_on("cairo")
+ depends_on("bison", type="build")
+ depends_on("flex", type="build")
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ # we need to filter this file to avoid an overly long hashbang line
+ filter_file('@PYTHON@', 'python',
+ 'tools/g-ir-tool-template.in')
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/gource/package.py b/var/spack/repos/builtin/packages/gource/package.py
new file mode 100644
index 0000000000..d8ae8b6506
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gource/package.py
@@ -0,0 +1,63 @@
+##############################################################################
+# 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 Gource(Package):
+ """Software version control visualization."""
+
+ homepage = "http://gource.io"
+ url = "https://github.com/acaudwell/Gource/releases/download/gource-0.44/gource-0.44.tar.gz"
+
+ version('0.44', '79cda1bfaad16027d59cce55455bfab88b57c69d')
+
+ depends_on('automake', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('libtool', type='build')
+ depends_on('glm', type='build')
+ depends_on('pkg-config', type='build')
+
+ depends_on('freetype@2.0:')
+ depends_on('pcre')
+ depends_on('boost@1.46:+filesystem+system')
+ depends_on('glew')
+ depends_on('jpeg')
+ depends_on('libpng')
+ depends_on('pcre')
+ depends_on('sdl2')
+ depends_on('sdl2_image')
+
+ def install(self, spec, prefix):
+ make_args = ['--prefix=%s' % prefix,
+ '--disable-dependency-tracking',
+ '--without-x',
+ '--with-boost=%s' % spec['boost'].prefix]
+
+ autoreconf('-i')
+ configure(*make_args)
+ make()
+
+ make("install",
+ parallel=False)
diff --git a/var/spack/repos/builtin/packages/gperf/package.py b/var/spack/repos/builtin/packages/gperf/package.py
index 0e54d0e037..0ae07b33fc 100644
--- a/var/spack/repos/builtin/packages/gperf/package.py
+++ b/var/spack/repos/builtin/packages/gperf/package.py
@@ -39,6 +39,8 @@ class Gperf(Package):
version('3.0.4', 'c1f1db32fb6598d6a93e6e88796a8632')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ # make('check') # fails tests
+ make('install')
diff --git a/var/spack/repos/builtin/packages/grackle/Make.mach.template b/var/spack/repos/builtin/packages/grackle/Make.mach.template
new file mode 100644
index 0000000000..83abaa26d1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/grackle/Make.mach.template
@@ -0,0 +1,71 @@
+MACH_TEXT = Generic Linux
+MACH_VALID = 1
+MACH_FILE = Make.mach.@ARCHITECTURE
+
+#-----------------------------------------------------------------------
+# Install paths (local variables)
+#-----------------------------------------------------------------------
+
+LOCAL_HDF5_INSTALL = @HDF5_ROOT
+
+#-----------------------------------------------------------------------
+# Compiler settings
+#-----------------------------------------------------------------------
+
+MACH_CC_NOMPI = @CC # C compiler
+MACH_CXX_NOMPI = @CXX # C++ compiler
+MACH_FC_NOMPI = @F77 # Fortran 77
+MACH_F90_NOMPI = @FC # Fortran 90
+MACH_LD_NOMPI = @FC # Linker
+@LINK_VARIABLES_DEFINITION
+
+#-----------------------------------------------------------------------
+# Machine-dependent defines
+#-----------------------------------------------------------------------
+
+MACH_DEFINES = -DLINUX -DH5_USE_16_API -fPIC
+
+#-----------------------------------------------------------------------
+# Compiler flag settings
+#-----------------------------------------------------------------------
+
+MACH_CPPFLAGS = -P -traditional
+MACH_CFLAGS =
+MACH_CXXFLAGS =
+MACH_FFLAGS = -fno-second-underscore -ffixed-line-length-132
+MACH_F90FLAGS = -fno-second-underscore
+MACH_LDFLAGS = @STDCXX_LIB
+
+#-----------------------------------------------------------------------
+# Optimization flags
+#-----------------------------------------------------------------------
+
+MACH_OPT_WARN = -Wall -g
+MACH_OPT_DEBUG = -g
+MACH_OPT_HIGH = -O2
+MACH_OPT_AGGRESSIVE = -O3 -g
+
+#-----------------------------------------------------------------------
+# Includes
+#-----------------------------------------------------------------------
+
+LOCAL_INCLUDES_HDF5 = -I@HDF5_ROOT/include # HDF5 includes
+
+MACH_INCLUDES = $(LOCAL_INCLUDES_HDF5)
+
+#-----------------------------------------------------------------------
+# Libraries
+#-----------------------------------------------------------------------
+
+LOCAL_LIBS_HDF5 = -L@HDF5_ROOT/lib -lhdf5 # HDF5 libraries
+LOCAL_LIBS_MACH = # Machine-dependent libraries
+
+MACH_LIBS = $(LOCAL_LIBS_HDF5) $(LOCAL_LIBS_MACH)
+
+#-----------------------------------------------------------------------
+# Installation
+#-----------------------------------------------------------------------
+
+MACH_INSTALL_PREFIX = @PREFIX
+MACH_INSTALL_LIB_DIR =
+MACH_INSTALL_INCLUDE_DIR =
diff --git a/var/spack/repos/builtin/packages/grackle/package.py b/var/spack/repos/builtin/packages/grackle/package.py
new file mode 100644
index 0000000000..7e3777158f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/grackle/package.py
@@ -0,0 +1,89 @@
+##############################################################################
+# 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
+##############################################################################
+import os.path
+import shutil
+import inspect
+
+from spack import *
+
+
+class Grackle(Package):
+ """Grackle is a chemistry and radiative cooling library for astrophysical
+ simulations with interfaces for C, C++, and Fortran codes. It is a
+ generalized and trimmed down version of the chemistry network of the Enzo
+ simulation code
+ """
+ homepage = 'http://grackle.readthedocs.io/en/grackle-2.2/'
+ url = 'https://bitbucket.org/grackle/grackle/get/grackle-2.0.1.tar.bz2'
+
+ version('2.2', 'ec49ed1db5a42db21f478285150c2ba3')
+ version('2.0.1', 'a9624ad13a60c592c1a0a4ea8e1ae86d')
+
+ depends_on('libtool', when='@2.2')
+
+ depends_on('mpi')
+ depends_on('hdf5+mpi')
+
+ parallel = False
+
+ def install(self, spec, prefix):
+ template_name = '{0.architecture}-{0.compiler.name}'
+ grackle_architecture = template_name.format(spec)
+ link_variables = 'MACH_AR = ar' if spec.version < Version(2.2) else 'MACH_LIBTOOL = libtool' # NOQA: ignore=E501
+ substitutions = {
+ '@ARCHITECTURE': grackle_architecture,
+ '@CC': spec['mpi'].mpicc,
+ '@CXX': spec['mpi'].mpicxx,
+ '@FC': spec['mpi'].mpifc,
+ '@F77': spec['mpi'].mpif77,
+ '@STDCXX_LIB': ' '.join(self.compiler.stdcxx_libs),
+ '@HDF5_ROOT': spec['hdf5'].prefix,
+ '@PREFIX': prefix,
+ '@LINK_VARIABLES_DEFINITION': link_variables
+ }
+
+ template = join_path(
+ os.path.dirname(inspect.getmodule(self).__file__),
+ 'Make.mach.template'
+ )
+ makefile = join_path(
+ self.stage.source_path,
+ 'src',
+ 'clib',
+ 'Make.mach.{0}'.format(grackle_architecture)
+ )
+ shutil.copy(template, makefile)
+ for key, value in substitutions.items():
+ filter_file(key, value, makefile)
+
+ configure()
+ with working_dir('src/clib'):
+ make('clean')
+ make('machine-{0}'.format(grackle_architecture))
+ make('opt-high')
+ make('show-config')
+ make()
+ mkdirp(prefix.lib)
+ make('install')
diff --git a/var/spack/repos/builtin/packages/grandr/package.py b/var/spack/repos/builtin/packages/grandr/package.py
new file mode 100644
index 0000000000..8097d4fa01
--- /dev/null
+++ b/var/spack/repos/builtin/packages/grandr/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Grandr(Package):
+ """RandR user interface using GTK+ libraries."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/app/grandr"
+ url = "https://www.x.org/archive/individual/app/grandr-0.1.tar.gz"
+
+ version('0.1', '707109a105f2ab1bb216e6e6a5a10ba4')
+
+ depends_on('gtkplus@2.0.0:')
+ depends_on('gconf')
+ depends_on('xrandr@1.2:')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/graphlib/package.py b/var/spack/repos/builtin/packages/graphlib/package.py
index 0c3cd9b649..1e0eb2bf3b 100644
--- a/var/spack/repos/builtin/packages/graphlib/package.py
+++ b/var/spack/repos/builtin/packages/graphlib/package.py
@@ -27,10 +27,11 @@ from spack import *
class Graphlib(Package):
"""Library to create, manipulate, and export graphs Graphlib."""
- homepage = "http://https://github.com/lee218llnl/graphlib"
- url = "https://github.com/lee218llnl/graphlib/archive/v2.0.0.tar.gz"
+ homepage = "https://github.com/LLNL/graphlib"
+ url = "https://github.com/LLNL/graphlib/archive/v2.0.0.tar.gz"
version('2.0.0', '43c6df84f1d38ba5a5dce0ae19371a70')
+ version('3.0.0', '625d199f97ab1b84cbc8daabcaee5e2a')
depends_on('cmake', type='build')
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index b37121248c..bb23513d2f 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -24,9 +24,10 @@
##############################################################################
from spack import *
import sys
+import shutil
-class Graphviz(Package):
+class Graphviz(AutotoolsPackage):
"""Graph Visualization Software"""
homepage = "http://www.graphviz.org"
url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz"
@@ -46,11 +47,13 @@ class Graphviz(Package):
depends_on("swig")
depends_on("python")
depends_on("ghostscript")
+ depends_on("freetype")
+ depends_on("libtool", type='build')
depends_on("pkg-config", type='build')
- def install(self, spec, prefix):
- options = ['--prefix=%s' % prefix]
- if '+perl' not in spec:
+ def configure_args(self):
+ options = []
+ if '+perl' not in self.spec:
options.append('--disable-perl')
# On OSX fix the compiler error:
@@ -59,7 +62,9 @@ class Graphviz(Package):
# include <X11/Xlib.h>
if sys.platform == 'darwin':
options.append('CFLAGS=-I/opt/X11/include')
+ options.append('--with-ltdl-lib=%s/lib' % self.spec['libtool'].prefix)
- configure(*options)
- make()
- make("install")
+ # A hack to patch config.guess in the libltdl sub directory
+ shutil.copyfile('./config/config.guess', 'libltdl/config/config.guess')
+
+ return options
diff --git a/var/spack/repos/builtin/packages/grib-api/package.py b/var/spack/repos/builtin/packages/grib-api/package.py
new file mode 100644
index 0000000000..8b81e14a27
--- /dev/null
+++ b/var/spack/repos/builtin/packages/grib-api/package.py
@@ -0,0 +1,80 @@
+##############################################################################
+# 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 GribApi(Package):
+ """The ECMWF GRIB API is an application program interface accessible from
+ C, FORTRAN and Python programs developed for encoding and decoding WMO
+ FM-92 GRIB edition 1 and edition 2 messages."""
+
+ homepage = "https://software.ecmwf.int/wiki/display/GRIB/Home"
+ url = "https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.17.0-Source.tar.gz"
+
+ version('1.17.0', 'bca7114d2c3100501a08190a146818d2')
+ version('1.16.0', '8c7fdee03344e4379d400ae20976a460')
+
+ variant('netcdf', default=False, description='Enable netcdf encoding/decoding using netcdf library')
+ variant('jpeg', default=True, description='Enable jpeg 2000 for grib 2 decoding/encoding')
+ variant('png', default=False, description='Enable png for decoding/encoding')
+
+ depends_on('cmake', type='build')
+ depends_on('libpng', when='+png')
+ depends_on('netcdf', when='+netcdf')
+ depends_on('jasper', when='+jpeg')
+
+ def install(self, spec, prefix):
+ options = []
+ options.extend(std_cmake_args)
+ options.append('-DBUILD_SHARED_LIBS=BOTH')
+
+ # We will add python support later.
+ options.append('-DENABLE_PYTHON=OFF')
+
+ # Disable FORTRAN interface if we don't have it.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ options.append('-DENABLE_FORTRAN=OFF')
+
+ if '+netcdf' in spec:
+ options.append('-DENABLE_NETCDF=ON')
+ options.append('-DNETCDF_PATH=%s' % spec['netcdf'].prefix)
+ else:
+ options.append('-DENABLE_NETCDF=OFF')
+
+ if '+jpeg' in spec:
+ options.append('-DENABLE_JPG=ON')
+ options.append('-DJASPER_PATH=%s' % spec['jasper'].prefix)
+ else:
+ options.append('-DENABLE_JPG=OFF')
+
+ if '+png' in spec:
+ options.append('-DENABLE_PNG=ON')
+ else:
+ options.append('-DENABLE_PNG=OFF')
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *options)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index d39c9738ef..d079188db6 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -22,11 +22,10 @@
# 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 Gromacs(Package):
+class Gromacs(CMakePackage):
"""GROMACS (GROningen MAchine for Chemical Simulations) is a molecular
dynamics package primarily designed for simulations of proteins, lipids
and nucleic acids. It was originally developed in the Biophysical
@@ -57,7 +56,7 @@ class Gromacs(Package):
depends_on('plumed+mpi', when='+plumed+mpi')
depends_on('plumed~mpi', when='+plumed~mpi')
depends_on('fftw')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8.8:', type='build')
# TODO : add GPU support
@@ -65,28 +64,22 @@ class Gromacs(Package):
if '+plumed' in self.spec:
self.spec['plumed'].package.apply_patch(self)
- def install(self, spec, prefix):
+ def cmake_args(self):
options = []
- if '+mpi' in spec:
+ if '+mpi' in self.spec:
options.append('-DGMX_MPI:BOOL=ON')
- if '+double' in spec:
+ if '+double' in self.spec:
options.append('-DGMX_DOUBLE:BOOL=ON')
- if '~shared' in spec:
+ if '~shared' in self.spec:
options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
- if '+debug' in spec:
+ if '+debug' in self.spec:
options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
else:
options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
- options.extend(std_cmake_args)
-
- with working_dir('spack-build', create=True):
-
- cmake('..', *options)
- make()
- make('install')
+ return options
diff --git a/var/spack/repos/builtin/packages/gsl/package.py b/var/spack/repos/builtin/packages/gsl/package.py
index 574d3b9402..da17c4a330 100644
--- a/var/spack/repos/builtin/packages/gsl/package.py
+++ b/var/spack/repos/builtin/packages/gsl/package.py
@@ -38,6 +38,7 @@ class Gsl(Package):
homepage = "http://www.gnu.org/software/gsl"
url = "http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-2.1.tar.gz"
+ version('2.2.1', '3d90650b7cfe0a6f4b29c2d7b0f86458')
version('2.1', 'd8f70abafd3e9f0bae03c52d1f4e8de5')
version('2.0', 'ae44cdfed78ece40e73411b63a78c375')
version('1.16', 'e49a664db13d81c968415cd53f62bc8b')
diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py
index c85bbe4094..183662dd0e 100644
--- a/var/spack/repos/builtin/packages/gtkplus/package.py
+++ b/var/spack/repos/builtin/packages/gtkplus/package.py
@@ -37,6 +37,7 @@ class Gtkplus(Package):
depends_on("atk")
depends_on("gdk-pixbuf")
depends_on("pango")
+ depends_on("glib")
def patch(self):
# remove disable deprecated flag.
diff --git a/var/spack/repos/builtin/packages/h5hut/package.py b/var/spack/repos/builtin/packages/h5hut/package.py
new file mode 100644
index 0000000000..1501384493
--- /dev/null
+++ b/var/spack/repos/builtin/packages/h5hut/package.py
@@ -0,0 +1,70 @@
+##############################################################################
+# 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 H5hut(Package):
+ """H5hut (HDF5 Utility Toolkit)
+ High-Performance I/O Library for Particle-based Simulations
+ """
+
+ homepage = "https://amas.psi.ch/H5hut/"
+ url = "https://amas.psi.ch/H5hut/raw-attachment/wiki/DownloadSources/H5hut-1.99.13.tar.gz"
+
+ version("1.99.13", "2a07a449afe50534de006ac6954a421a")
+
+ variant("fortran", default=True, description="Enable Fortran support")
+ variant("mpi", default=False, description="Enable MPI support")
+
+ depends_on("autoconf @2.60:", type="build")
+ depends_on("automake", type="build")
+ depends_on("hdf5 +mpi", when="+mpi")
+ depends_on("hdf5 @1.8:")
+ # h5hut +mpi uses the obsolete function H5Pset_fapl_mpiposix:
+ depends_on("hdf5 @:1.8.12", when="+mpi")
+ depends_on("libtool", type="build")
+ depends_on("mpi", when="+mpi")
+
+ def install(self, spec, prefix):
+ autogen = Executable("./autogen.sh")
+ autogen()
+ configopts = ["--prefix={0}".format(prefix)]
+ if "+fortran" in spec:
+ if not self.compiler.fc:
+ raise RuntimeError(
+ "Cannot build Fortran variant without a Fortran compiler")
+ configopts.append("--enable-fortran")
+ if "+mpi" in spec:
+ configopts.extend([
+ "--enable-parallel",
+ "CC=%s" % spec["mpi"].mpicc,
+ "CXX=%s" % spec["mpi"].mpicxx])
+ if "+fortran" in spec:
+ configopts.append("FC=%s" % spec["mpi"].mpifc)
+ configure(*configopts)
+
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/hadoop/package.py b/var/spack/repos/builtin/packages/hadoop/package.py
new file mode 100644
index 0000000000..fdcac10335
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hadoop/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Alfredo Gimenez, gimenez1@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 Hadoop(Package):
+ """The Apache Hadoop software library is a framework that
+ allows for the distributed processing of large data sets
+ across clusters of computers using simple programming models.
+ """
+
+ homepage = "http://hadoop.apache.org/"
+ url = "http://mirrors.ocf.berkeley.edu/apache/hadoop/common/hadoop-2.6.4/hadoop-2.6.4.tar.gz"
+
+ version('2.6.4', '37019f13d7dcd819727be158440b9442')
+
+ depends_on('jdk', type='run')
+
+ def install(self, spec, prefix):
+
+ def install_dir(dirname):
+ install_tree(dirname, join_path(prefix, dirname))
+
+ install_dir('bin')
+ install_dir('etc')
+ install_dir('include')
+ install_dir('lib')
+ install_dir('libexec')
+ install_dir('sbin')
+ install_dir('share')
diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py
index f8d73d651b..7c98c2a96a 100644
--- a/var/spack/repos/builtin/packages/harfbuzz/package.py
+++ b/var/spack/repos/builtin/packages/harfbuzz/package.py
@@ -32,8 +32,9 @@ class Harfbuzz(Package):
version('0.9.37', 'bfe733250e34629a188d82e3b971bc1e')
+ depends_on("pkg-config", type="build")
depends_on("glib")
- depends_on("icu")
+ depends_on("icu4c")
depends_on("freetype")
depends_on("cairo")
depends_on("zlib")
diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py
index aafb345be6..2554bd0f96 100644
--- a/var/spack/repos/builtin/packages/hdf/package.py
+++ b/var/spack/repos/builtin/packages/hdf/package.py
@@ -34,24 +34,24 @@ class Hdf(Package):
list_url = "https://www.hdfgroup.org/ftp/HDF/releases/"
list_depth = 3
+ version('4.2.12', '79fd1454c899c05e34a3da0456ab0c1c')
version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19')
variant('szip', default=False, description="Enable szip support")
- depends_on("jpeg")
- depends_on("szip", when='+szip')
- depends_on("zlib")
+ depends_on('jpeg@6b:')
+ depends_on('szip', when='+szip')
+ depends_on('zlib@1.1.4:')
- def url_for_version(self, version):
- return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str(
- version) + "/src/hdf-" + str(version) + ".tar.gz"
+ depends_on('bison', type='build')
+ depends_on('flex', type='build')
def install(self, spec, prefix):
config_args = [
'CFLAGS=-fPIC',
- '--prefix=%s' % prefix,
- '--with-jpeg=%s' % spec['jpeg'].prefix,
- '--with-zlib=%s' % spec['zlib'].prefix,
+ '--prefix={0}'.format(prefix),
+ '--with-jpeg={0}'.format(spec['jpeg'].prefix),
+ '--with-zlib={0}'.format(spec['zlib'].prefix),
'--disable-netcdf', # must be disabled to build NetCDF with HDF4
'--enable-fortran',
'--disable-shared', # fortran and shared libs are not compatible
@@ -59,11 +59,17 @@ class Hdf(Package):
'--enable-production'
]
- # SZip support
+ # Szip support
if '+szip' in spec:
- config_args.append('--with-szlib=%s' % spec['szip'].prefix)
+ config_args.append('--with-szlib={0}'.format(spec['szip'].prefix))
+ else:
+ config_args.append('--without-szlib')
configure(*config_args)
make()
- make("install")
+
+ if self.run_tests:
+ make('check')
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
index b9c19dff62..088c1e9d9b 100644
--- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
@@ -49,9 +49,10 @@ def _install_shlib(name, src, dst):
class Hdf5Blosc(Package):
"""Blosc filter for HDF5"""
homepage = "https://github.com/Blosc/hdf5-blosc"
- url = "https://github.com/Blosc/hdf5-blosc/archive/master.zip"
+ url = "https://github.com/Blosc/hdf5-blosc"
- version('master', '02c04acbf4bec66ec8a35bf157d1c9de')
+ version('master', git='https://github.com/Blosc/hdf5-blosc',
+ branch='master')
depends_on("c-blosc")
depends_on("hdf5")
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index aedaf18218..2820a3a304 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -27,10 +27,10 @@ from spack import *
import shutil
-class Hdf5(Package):
+class Hdf5(AutotoolsPackage):
"""HDF5 is a data model, library, and file format for storing and managing
- data. It supports an unlimited variety of datatypes, and is designed for
- flexible and efficient I/O and for high volume and complex data.
+ data. It supports an unlimited variety of datatypes, and is designed for
+ flexible and efficient I/O and for high volume and complex data.
"""
homepage = "http://www.hdfgroup.org/HDF5/"
@@ -43,6 +43,7 @@ class Hdf5(Package):
version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618')
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
version('1.8.13', 'c03426e9e77d7766944654280b467289')
+ version('1.8.12', 'd804802feb99b87fc668a90e6fa34411')
variant('debug', default=False,
description='Builds a debug version of the library')
@@ -52,22 +53,24 @@ class Hdf5(Package):
variant('cxx', default=True, description='Enable C++ support')
variant('fortran', default=True, description='Enable Fortran support')
- variant('mpi', default=False, description='Enable MPI support')
+ variant('mpi', default=True, description='Enable MPI support')
variant('szip', default=False, description='Enable szip support')
variant('threadsafe', default=False,
description='Enable thread-safe capabilities')
- depends_on("mpi", when='+mpi')
- depends_on("szip", when='+szip')
- depends_on("zlib")
+ depends_on('mpi', when='+mpi')
+ depends_on('szip', when='+szip')
+ depends_on('zlib@1.1.2:')
- def validate(self, spec):
+ @AutotoolsPackage.precondition('configure')
+ def validate(self):
"""
Checks if incompatible variants have been activated at the same time
:param spec: spec of the package
:raises RuntimeError: in case of inconsistencies
"""
+ spec = self.spec
if '+fortran' in spec and not self.compiler.fc:
msg = 'cannot build a fortran variant without a fortran compiler'
raise RuntimeError(msg)
@@ -76,8 +79,8 @@ class Hdf5(Package):
msg = 'cannot use variant +threadsafe with either +cxx or +fortran'
raise RuntimeError(msg)
- def install(self, spec, prefix):
- self.validate(spec)
+ def configure_args(self):
+ spec = self.spec
# Handle compilation after spec validation
extra_args = []
@@ -120,16 +123,14 @@ class Hdf5(Package):
# this is not actually a problem.
extra_args.extend([
"--enable-parallel",
- "CC=%s" % join_path(spec['mpi'].prefix.bin, "mpicc"),
+ "CC=%s" % spec['mpi'].mpicc
])
if '+cxx' in spec:
- extra_args.append("CXX=%s" % join_path(spec['mpi'].prefix.bin,
- "mpic++"))
+ extra_args.append("CXX=%s" % spec['mpi'].mpicxx)
if '+fortran' in spec:
- extra_args.append("FC=%s" % join_path(spec['mpi'].prefix.bin,
- "mpifort"))
+ extra_args.append("FC=%s" % spec['mpi'].mpifc)
if '+szip' in spec:
extra_args.append("--with-szlib=%s" % spec['szip'].prefix)
@@ -140,17 +141,13 @@ class Hdf5(Package):
'--disable-hl',
])
- configure(
- "--prefix=%s" % prefix,
- "--with-zlib=%s" % spec['zlib'].prefix,
- *extra_args)
- make()
- make("install")
- self.check_install(spec)
-
- def check_install(self, spec):
- "Build and run a small program to test the installed HDF5 library"
- print "Checking HDF5 installation..."
+ return ["--with-zlib=%s" % spec['zlib'].prefix] + extra_args
+
+ @AutotoolsPackage.sanity_check('install')
+ def check_install(self):
+ # Build and run a small program to test the installed HDF5 library
+ spec = self.spec
+ print("Checking HDF5 installation...")
checkdir = "spack-check"
with working_dir(checkdir, create=True):
source = r"""
@@ -172,7 +169,7 @@ HDF5 version {version} {version}
with open("check.c", 'w') as f:
f.write(source)
if '+mpi' in spec:
- cc = which(join_path(spec['mpi'].prefix.bin, "mpicc"))
+ cc = which('%s' % spec['mpi'].mpicc)
else:
cc = which('cc')
# TODO: Automate these path and library settings
@@ -187,15 +184,15 @@ HDF5 version {version} {version}
output = ""
success = output == expected
if not success:
- print "Produced output does not match expected output."
- print "Expected output:"
- print '-' * 80
- print expected
- print '-' * 80
- print "Produced output:"
- print '-' * 80
- print output
- print '-' * 80
+ print("Produced output does not match expected output.")
+ print("Expected output:")
+ print('-' * 80)
+ print(expected)
+ print('-' * 80)
+ print("Produced output:")
+ print('-' * 80)
+ print(output)
+ print('-' * 80)
raise RuntimeError("HDF5 install check failed")
shutil.rmtree(checkdir)
diff --git a/var/spack/repos/builtin/packages/hepmc/package.py b/var/spack/repos/builtin/packages/hepmc/package.py
new file mode 100644
index 0000000000..ab80dcf6ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hepmc/package.py
@@ -0,0 +1,55 @@
+##############################################################################
+# 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 Hepmc(Package):
+ """The HepMC package is an object oriented, C++ event record for
+ High Energy Physics Monte Carlo generators and simulation."""
+
+ homepage = "http://hepmc.web.cern.ch/hepmc/"
+ url = "http://hepmc.web.cern.ch/hepmc/releases/hepmc2.06.09.tgz"
+
+ version('2.06.09', 'c47627ced4255b40e731b8666848b087')
+ version('2.06.08', 'a2e889114cafc4f60742029d69abd907')
+ version('2.06.07', '11d7035dccb0650b331f51520c6172e7')
+ version('2.06.06', '102e5503537a3ecd6ea6f466aa5bc4ae')
+ version('2.06.05', '2a4a2a945adf26474b8bdccf4f881d9c')
+
+ depends_on("cmake", type='build')
+
+ def install(self, spec, prefix):
+ build_directory = join_path(self.stage.path, 'spack-build')
+ source_directory = self.stage.source_path
+ options = [source_directory]
+ options.append('-Dmomentum:STRING=GEV')
+ options.append('-Dlength:STRING=MM')
+ options.extend(std_cmake_args)
+
+ with working_dir(build_directory, create=True):
+ cmake(*options)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/heppdt/package.py b/var/spack/repos/builtin/packages/heppdt/package.py
new file mode 100644
index 0000000000..54c846ae33
--- /dev/null
+++ b/var/spack/repos/builtin/packages/heppdt/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Heppdt(Package):
+ """The HepPID library contains translation methods for particle ID's
+ to and from various Monte Carlo generators and the PDG standard
+ numbering scheme. We realize that the generators adhere closely
+ to the standard, but there are occasional differences."""
+ homepage = "http://lcgapp.cern.ch/project/simu/HepPDT/"
+ url = "http://lcgapp.cern.ch/project/simu/HepPDT/download/HepPDT-2.06.01.tar.gz"
+
+ version('3.04.01', 'a8e93c7603d844266b62d6f189f0ac7e')
+ version('3.04.00', '2d2cd7552d3e9539148febacc6287db2')
+ version('3.03.02', '0b85f1809bb8b0b28a46f23c718b2773')
+ version('3.03.01', 'd411f3bfdf9c4350d802241ba2629cc2')
+ version('3.03.00', 'cd84d0a0454be982dcd8c285e060a7b3')
+ version('2.06.01', '5688b4bdbd84b48ed5dd2545a3dc33c0')
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/hpctoolkit-externals/package.py b/var/spack/repos/builtin/packages/hpctoolkit-externals/package.py
new file mode 100644
index 0000000000..64b5d17851
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpctoolkit-externals/package.py
@@ -0,0 +1,39 @@
+#
+# 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 HpctoolkitExternals(Package):
+ """HPCToolkit performance analysis tool has many prerequisites and
+ HpctoolkitExternals package provides all these prerequisites."""
+
+ homepage = "http://hpctoolkit.org"
+
+ # Note: No precise release tags/branches provided
+ version('5.4',
+ git='https://github.com/HPCToolkit/hpctoolkit-externals.git',
+ commit='3d2953623357bb06e9a4b51eca90a4b039c2710e')
+
+ parallel = False
+
+ def install(self, spec, prefix):
+
+ options = ['CC=%s' % self.compiler.cc,
+ 'CXX=%s' % self.compiler.cxx]
+
+ with working_dir('spack-build', create=True):
+ configure = Executable('../configure')
+ configure('--prefix=%s' % prefix, *options)
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py
new file mode 100644
index 0000000000..aac22ef829
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py
@@ -0,0 +1,55 @@
+#
+# 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 Hpctoolkit(Package):
+ """HPCToolkit is an integrated suite of tools for measurement and analysis
+ of program performance on computers ranging from multicore desktop systems
+ to the nation's largest supercomputers. By using statistical sampling of
+ timers and hardware performance counters, HPCToolkit collects accurate
+ measurements of a program's work, resource consumption, and inefficiency
+ and attributes them to the full calling context in which they occur."""
+
+ homepage = "http://hpctoolkit.org"
+
+ # Note: No precise release tags/branches provided
+ version('5.4', git='https://github.com/HPCToolkit/hpctoolkit.git',
+ commit='d9ca2112762e5a06ea31b5295d793e4a83272d19')
+
+ variant('mpi', default=True, description='Enable MPI supoort')
+ variant('papi', default=True, description='Enable PAPI counter support')
+
+ depends_on('hpctoolkit-externals')
+ depends_on('papi', when='+papi')
+ depends_on('mpi', when='+mpi')
+
+ def install(self, spec, prefix):
+
+ options = ['CC=%s' % self.compiler.cc,
+ 'CXX=%s' % self.compiler.cxx,
+ '--with-externals=%s' % spec['hpctoolkit-externals'].prefix]
+
+ if '+mpi' in spec:
+ options.extend(['MPICXX=%s' % spec['mpi'].mpicxx])
+
+ if '+papi' in spec:
+ options.extend(['--with-papi=%s' % spec['papi'].prefix])
+
+ # TODO: BG-Q configure option
+ with working_dir('spack-build', create=True):
+ configure = Executable('../configure')
+ configure('--prefix=%s' % prefix, *options)
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py
index efd5c8bb1d..fa0013de17 100644
--- a/var/spack/repos/builtin/packages/hpl/package.py
+++ b/var/spack/repos/builtin/packages/hpl/package.py
@@ -78,7 +78,7 @@ class Hpl(Package):
'MPlib = -L{0}'.format(spec['mpi'].prefix.lib),
# Linear Algebra library (BLAS or VSIPL)
'LAinc = {0}'.format(spec['blas'].prefix.include),
- 'LAlib = {0}'.format(spec['blas'].blas_shared_lib),
+ 'LAlib = {0}'.format(spec['blas'].blas_libs.joined()),
# F77 / C interface
'F2CDEFS = -DAdd_ -DF77_INTEGER=int -DStringSunStyle',
# HPL includes / libraries / specifics
diff --git a/var/spack/repos/builtin/packages/hpx5/package.py b/var/spack/repos/builtin/packages/hpx5/package.py
index 686e959719..fe75c256f8 100644
--- a/var/spack/repos/builtin/packages/hpx5/package.py
+++ b/var/spack/repos/builtin/packages/hpx5/package.py
@@ -37,15 +37,16 @@ class Hpx5(Package):
applications enabling scientists to write code that performs and
scales better than contemporary runtimes."""
homepage = "http://hpx.crest.iu.edu"
- url = "http://hpx.crest.iu.edu/release/hpx-2.0.0.tar.gz"
+ url = "http://hpx.crest.iu.edu/release/hpx-3.1.0.tar.gz"
+ version('3.1.0', '9e90b8ac46788c009079632828c77628')
version('2.0.0', '3d2ff3aab6c46481f9ec65c5b2bfe7a6')
version('1.3.0', '2260ecc7f850e71a4d365a43017d8cee')
version('1.2.0', '4972005f85566af4afe8b71afbf1480f')
version('1.1.0', '646afb460ecb7e0eea713a634933ce4f')
version('1.0.0', '8020822adf6090bd59ed7fe465f6c6cb')
- variant('debug', default=False, description='Build a debug version of HPX-5')
+ variant('debug', default=False, description='Build debug version of HPX-5')
variant('photon', default=False, description='Enable Photon support')
variant('mpi', default=False, description='Enable MPI support')
diff --git a/var/spack/repos/builtin/packages/hsakmt/package.py b/var/spack/repos/builtin/packages/hsakmt/package.py
new file mode 100644
index 0000000000..0daad4afed
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hsakmt/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 Hsakmt(Package):
+ """hsakmt is a thunk library that provides a userspace interface to amdkfd
+ (AMD's HSA Linux kernel driver). It is the HSA equivalent of libdrm."""
+
+ homepage = "https://cgit.freedesktop.org/amd/hsakmt/"
+ url = "https://www.x.org/archive/individual/lib/hsakmt-1.0.0.tar.gz"
+
+ version('1.0.0', '9beb20104e505300daf541266c4c3c3d')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/htop/package.py b/var/spack/repos/builtin/packages/htop/package.py
new file mode 100644
index 0000000000..3df0a35356
--- /dev/null
+++ b/var/spack/repos/builtin/packages/htop/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 Htop(Package):
+ """htop is an interactive text-mode process viewer for Unix systems."""
+
+ homepage = "https://github.com/hishamhm/htop"
+ url = "https://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz"
+
+ version('2.0.2', '7d354d904bad591a931ad57e99fea84a')
+
+ depends_on('ncurses')
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py
index c163628840..111c424b22 100644
--- a/var/spack/repos/builtin/packages/hwloc/package.py
+++ b/var/spack/repos/builtin/packages/hwloc/package.py
@@ -42,6 +42,7 @@ class Hwloc(Package):
list_url = "http://www.open-mpi.org/software/hwloc/"
list_depth = 3
+ version('1.11.4', 'b6f23eb59074fd09fdd84905d50b103d')
version('1.11.3', 'c1d36a9de6028eac1d18ea4782ef958f')
version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23')
version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc')
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py
index fdc236dcf4..3c288e7933 100644
--- a/var/spack/repos/builtin/packages/hypre/package.py
+++ b/var/spack/repos/builtin/packages/hypre/package.py
@@ -35,6 +35,7 @@ class Hypre(Package):
homepage = "http://computation.llnl.gov/project/linear_solvers/software.php"
url = "http://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz"
+ version('2.11.1', '3f02ef8fd679239a6723f60b7f796519')
version('2.10.1', 'dc048c4cabb3cd549af72591474ad674')
version('2.10.0b', '768be38793a35bb5d055905b271f5b8e')
@@ -54,20 +55,16 @@ class Hypre(Package):
os.environ['CXX'] = spec['mpi'].mpicxx
os.environ['F77'] = spec['mpi'].mpif77
- # Since +shared does not build on macOS and also Atlas does not have
- # a single static lib to build against, link against shared libs with
- # a hope that --whole-archive linker option (or alike) was used
- # to command the linker to include whole static libs' content into the
- # shared lib
# Note: --with-(lapack|blas)_libs= needs space separated list of names
+ lapack = spec['lapack'].lapack_libs
+ blas = spec['blas'].blas_libs
+
configure_args = [
'--prefix=%s' % prefix,
- '--with-lapack-libs=%s' % to_lib_name(
- spec['lapack'].lapack_shared_lib),
- '--with-lapack-lib-dirs=%s' % spec['lapack'].prefix.lib,
- '--with-blas-libs=%s' % to_lib_name(
- spec['blas'].blas_shared_lib),
- '--with-blas-lib-dirs=%s' % spec['blas'].prefix.lib
+ '--with-lapack-libs=%s' % ' '.join(lapack.names),
+ '--with-lapack-lib-dirs=%s' % ' '.join(lapack.directories),
+ '--with-blas-libs=%s' % ' '.join(blas.names),
+ '--with-blas-lib-dirs=%s' % ' '.join(blas.directories)
]
if '+shared' in self.spec:
diff --git a/var/spack/repos/builtin/packages/ibmisc/package.py b/var/spack/repos/builtin/packages/ibmisc/package.py
index 8e83058e94..172204a75b 100644
--- a/var/spack/repos/builtin/packages/ibmisc/package.py
+++ b/var/spack/repos/builtin/packages/ibmisc/package.py
@@ -34,7 +34,7 @@ class Ibmisc(CMakePackage):
depends_on('blitz', when='+blitz')
depends_on('netcdf-cxx4', when='+netcdf')
depends_on('udunits2', when='+udunits2')
- depends_on('googletest', when='+googletest')
+ depends_on('googletest', when='+googletest', type='build')
depends_on('py-cython', when='+python', type=nolink)
depends_on('py-numpy', when='+python', type=nolink)
depends_on('boost', when='+boost')
@@ -43,7 +43,7 @@ class Ibmisc(CMakePackage):
depends_on('cmake', type='build')
depends_on('doxygen', type='build')
- def configure_args(self):
+ def cmake_args(self):
spec = self.spec
return [
'-DUSE_EVERYTRACE=%s' % ('YES' if '+everytrace' in spec else 'NO'),
diff --git a/var/spack/repos/builtin/packages/iceauth/package.py b/var/spack/repos/builtin/packages/iceauth/package.py
new file mode 100644
index 0000000000..59c6e0e7b7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/iceauth/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Iceauth(Package):
+ """The iceauth program is used to edit and display the authorization
+ information used in connecting with ICE. It operates very much
+ like the xauth program for X11 connection authentication records."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/iceauth"
+ url = "https://www.x.org/archive/individual/app/iceauth-1.0.7.tar.gz"
+
+ version('1.0.7', '183e834ec8bd096ac084ad4acbc29f51')
+
+ depends_on('libice')
+
+ depends_on('xproto@7.0.22:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/ico/package.py b/var/spack/repos/builtin/packages/ico/package.py
new file mode 100644
index 0000000000..5e523575ca
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ico/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Ico(Package):
+ """ico is a simple animation program that may be used for testing various
+ X11 operations and extensions. It displays a wire-frame rotating
+ polyhedron, with hidden lines removed, or a solid-fill polyhedron with
+ hidden faces removed."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/ico"
+ url = "https://www.x.org/archive/individual/app/ico-1.0.4.tar.gz"
+
+ version('1.0.4', '8833b2da01a7f919b0db8e5a49184c0f')
+
+ depends_on('libx11@0.99.1:')
+
+ depends_on('xproto@7.0.22:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py
index 2bcf86cd13..e2fcb7bd5f 100644
--- a/var/spack/repos/builtin/packages/icu4c/package.py
+++ b/var/spack/repos/builtin/packages/icu4c/package.py
@@ -27,18 +27,24 @@ from spack import *
class Icu4c(Package):
"""ICU is a mature, widely used set of C/C++ and Java libraries providing
- Unicode and Globalization support for software applications.
-
- """
+ Unicode and Globalization support for software applications. ICU4C is the
+ C/C++ interface."""
homepage = "http://site.icu-project.org/"
- url = "http://downloads.sourceforge.net/project/icu/ICU4C/54.1/icu4c-54_1-src.tgz"
+ url = "http://download.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.tgz"
+
+ version('57.1', '976734806026a4ef8bdd17937c8898b9')
- version('54_1', 'e844caed8f2ca24c088505b0d6271bc0')
+ def url_for_version(self, version):
+ base_url = "http://download.icu-project.org/files/icu4c"
+ return "{0}/{1}/icu4c-{2}-src.tgz".format(
+ base_url, version, version.underscored)
def install(self, spec, prefix):
- cd("source")
- configure("--prefix=%s" % prefix)
+ with working_dir('source'):
+ configure('--prefix={0}'.format(prefix),
+ '--enable-rpath')
- make()
- make("install")
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/imake/package.py b/var/spack/repos/builtin/packages/imake/package.py
new file mode 100644
index 0000000000..32542b0391
--- /dev/null
+++ b/var/spack/repos/builtin/packages/imake/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 Imake(Package):
+ """The imake build system."""
+
+ homepage = "http://www.snake.net/software/imake-stuff/"
+ url = "https://www.x.org/archive/individual/util/imake-1.0.7.tar.gz"
+
+ version('1.0.7', '186ca7b8ff0de8752f2a2d0426542363')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/inputproto/package.py b/var/spack/repos/builtin/packages/inputproto/package.py
new file mode 100644
index 0000000000..915986ef68
--- /dev/null
+++ b/var/spack/repos/builtin/packages/inputproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Inputproto(Package):
+ """X Input Extension.
+
+ This extension defines a protocol to provide additional input devices
+ management such as graphic tablets."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/inputproto"
+ url = "https://www.x.org/archive/individual/proto/inputproto-2.3.2.tar.gz"
+
+ version('2.3.2', '6450bad6f8d5ebe354b01b734d1fd7ca')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/intel-gpu-tools/package.py b/var/spack/repos/builtin/packages/intel-gpu-tools/package.py
new file mode 100644
index 0000000000..132e29839b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-gpu-tools/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 IntelGpuTools(Package):
+ """Intel GPU Tools is a collection of tools for development and testing of
+ the Intel DRM driver. There are many macro-level test suites that get used
+ against the driver, including xtest, rendercheck, piglit, and oglconform,
+ but failures from those can be difficult to track down to kernel changes,
+ and many require complicated build procedures or specific testing
+ environments to get useful results. Therefore, Intel GPU Tools includes
+ low-level tools and tests specifically for development and testing of the
+ Intel DRM Driver."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/"
+ url = "https://www.x.org/archive/individual/app/intel-gpu-tools-1.16.tar.gz"
+
+ version('1.16', '3996f10fc86a28ec59e1cf7b227dad78')
+
+ depends_on('libdrm@2.4.64:')
+ depends_on('libpciaccess@0.10:')
+ depends_on('cairo@1.12.0:')
+ depends_on('glib')
+
+ depends_on('flex', type='build')
+ depends_on('bison', type='build')
+ depends_on('python@3:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ # xrandr ?
+
+ # gtk-doc-tools
+ # libunwind-dev
+ # python-docutils
+ # x11proto-dri2-dev
+ # xutils-dev
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
index 65db3351a1..e03c9fab3f 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -1,3 +1,27 @@
+##############################################################################
+# 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
import re
@@ -11,25 +35,17 @@ class IntelParallelStudio(IntelInstaller):
Note: You will have to add the download file to a
mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://software.llnl.gov/spack/mirrors.html"""
+ mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
- # TODO: can also try the online installer (will download files on demand)
- version('composer.2016.2', '1133fb831312eb519f7da897fec223fa',
- url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz"
- % os.getcwd())
- version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
- url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd())
- version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
- url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd())
- version('composer.2016.3', '3208eeabee951fc27579177b593cefe9',
- url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz"
- % os.getcwd())
- version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
- url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd())
- version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
- url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd())
+ version('professional.2017.0', '34c98e3329d6ac57408b738ae1daaa01')
+ version('composer.2016.3', '3208eeabee951fc27579177b593cefe9')
+ version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3')
+ version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3')
+ version('composer.2016.2', '1133fb831312eb519f7da897fec223fa')
+ version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832')
+ version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832')
variant('rpath', default=True, description="Add rpath to .cfg files")
variant('newdtags', default=False,
@@ -45,6 +61,10 @@ class IntelParallelStudio(IntelInstaller):
variant('tools', default=True, description="Install the Intel Advisor, "
"VTune Amplifier, and Inspector tools")
+ variant('shared', default=True, description='Builds shared library')
+ variant('ilp64', default=False, description='64 bit integers')
+ variant('openmp', default=False, description='OpenMP multithreading layer')
+
provides('mpi', when='@cluster:+mpi')
provides('mkl', when='+mkl')
provides('daal', when='+daal')
@@ -55,6 +75,47 @@ class IntelParallelStudio(IntelInstaller):
provides('lapack', when='+mkl')
# TODO: MKL also provides implementation of Scalapack.
+ @property
+ def blas_libs(self):
+ shared = True if '+shared' in self.spec else False
+ suffix = dso_suffix if '+shared' in self.spec else 'a'
+ mkl_integer = ['libmkl_intel_ilp64'] if '+ilp64' in self.spec else ['libmkl_intel_lp64'] # NOQA: ignore=E501
+ mkl_threading = ['libmkl_sequential']
+ if '+openmp' in self.spec:
+ mkl_threading = ['libmkl_intel_thread', 'libiomp5'] if '%intel' in self.spec else ['libmkl_gnu_thread'] # NOQA: ignore=E501
+ # TODO: TBB threading: ['libmkl_tbb_thread', 'libtbb', 'libstdc++']
+ mkl_libs = find_libraries(
+ mkl_integer + ['libmkl_core'] + mkl_threading,
+ root=join_path(self.prefix.lib, 'intel64'),
+ shared=shared
+ )
+ system_libs = [
+ 'libpthread.{0}'.format(suffix),
+ 'libm.{0}'.format(suffix),
+ 'libdl.{0}'.format(suffix)
+ ]
+ return mkl_libs + system_libs
+
+ @property
+ def lapack_libs(self):
+ return self.blas_libs
+
+ def url_for_version(self, version):
+ """Assume the tarball is in the current directory."""
+
+ version_tuple = str(version).split('.')
+
+ url = "file://{0}/parallel_studio_xe_{1}".format(
+ os.getcwd(), version_tuple[1])
+
+ if version_tuple[0] == 'composer':
+ url += "_composer_edition"
+
+ if version_tuple[2] != '0':
+ url += "_update{0}".format(version_tuple[2])
+
+ return url + ".tgz"
+
def check_variants(self, spec):
error_message = '\t{variant} can not be turned off if "+all" is set'
@@ -123,15 +184,24 @@ class IntelParallelStudio(IntelInstaller):
"license.lic"))
if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
spec.satisfies('@professional')):
- os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses"))
+ inspector_dir = "inspector_xe/licenses"
+ advisor_dir = "advisor_xe/licenses"
+ vtune_amplifier_dir = "vtune_amplifier_xe/licenses"
+
+ year = int(str(self.version).split('.')[1])
+ if year >= 2017:
+ inspector_dir = "inspector/licenses"
+ advisor_dir = "advisor/licenses"
+
+ os.mkdir(os.path.join(self.prefix, inspector_dir))
os.symlink(self.global_license_file, os.path.join(
- self.prefix, "inspector_xe/licenses", "license.lic"))
- os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses"))
+ self.prefix, inspector_dir, "license.lic"))
+ os.mkdir(os.path.join(self.prefix, advisor_dir))
os.symlink(self.global_license_file, os.path.join(
- self.prefix, "advisor_xe/licenses", "license.lic"))
- os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses"))
+ self.prefix, advisor_dir, "license.lic"))
+ os.mkdir(os.path.join(self.prefix, vtune_amplifier_dir))
os.symlink(self.global_license_file, os.path.join(
- self.prefix, "vtune_amplifier_xe/licenses", "license.lic"))
+ self.prefix, vtune_amplifier_dir, "license.lic"))
if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \
spec.satisfies('@cluster'):
@@ -171,24 +241,6 @@ class IntelParallelStudio(IntelInstaller):
os.symlink(os.path.join(self.prefix.man, "common", "man1"),
os.path.join(self.prefix.man, "man1"))
- def setup_dependent_package(self, module, dspec):
- # For now use Single Dynamic Library:
- # To set the threading layer at run time, use the
- # mkl_set_threading_layer function or set MKL_THREADING_LAYER
- # variable to one of the following values: INTEL, SEQUENTIAL, PGI.
- # To set interface layer at run time, use the mkl_set_interface_layer
- # function or set the MKL_INTERFACE_LAYER variable to LP64 or ILP64.
-
- # Otherwise one would need to specify several libraries
- # (e.g. mkl_intel_lp64;mkl_sequential;mkl_core), which reflect
- # different interface and threading layers.
-
- name = 'libmkl_rt.%s' % dso_suffix
- libdir = find_library_path(name, self.prefix.lib64, self.prefix.lib)
-
- self.spec.blas_shared_lib = join_path(libdir, name)
- self.spec.lapack_shared_lib = self.spec.blas_shared_lib
-
def setup_environment(self, spack_env, run_env):
# TODO: Determine variables needed for the professional edition.
diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py
index 26134a12ae..5b9c26df0e 100644
--- a/var/spack/repos/builtin/packages/intel/package.py
+++ b/var/spack/repos/builtin/packages/intel/package.py
@@ -77,7 +77,7 @@ class Intel(IntelInstaller):
Note: You will have to add the download file to a
mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://software.llnl.gov/spack/mirrors.html"""
+ mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py
index d5981e9975..bd1e5f36ef 100644
--- a/var/spack/repos/builtin/packages/ipopt/package.py
+++ b/var/spack/repos/builtin/packages/ipopt/package.py
@@ -53,9 +53,8 @@ class Ipopt(Package):
mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq"
mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags
- # By convention, spack links blas & lapack libs to libblas & liblapack
- blas_lib = "-L%s" % blas_dir.lib + " -lblas"
- lapack_lib = "-L%s" % lapack_dir.lib + " -llapack"
+ blas_lib = spec['blas'].blas_libs.ld_flags
+ lapack_lib = spec['lapack'].lapack_libs.ld_flags
configure_args = [
"--prefix=%s" % prefix,
diff --git a/var/spack/repos/builtin/packages/ipp/package.py b/var/spack/repos/builtin/packages/ipp/package.py
index 2bd931d5bd..93c5284695 100644
--- a/var/spack/repos/builtin/packages/ipp/package.py
+++ b/var/spack/repos/builtin/packages/ipp/package.py
@@ -9,7 +9,7 @@ class Ipp(IntelInstaller):
Note: You will have to add the download file to a
mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://software.llnl.gov/spack/mirrors.html"""
+ mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "https://software.intel.com/en-us/intel-ipp"
diff --git a/var/spack/repos/builtin/packages/itstool/package.py b/var/spack/repos/builtin/packages/itstool/package.py
new file mode 100644
index 0000000000..b8b2b4459f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/itstool/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 Itstool(Package):
+ """ITS Tool allows you to translate your XML documents with PO files, using
+ rules from the W3C Internationalization Tag Set (ITS) to determine what
+ to translate and how to separate it into PO file messages."""
+
+ homepage = "http://itstool.org/"
+ url = "http://files.itstool.org/itstool/itstool-2.0.2.tar.bz2"
+
+ version('2.0.2', 'd472d877a7bc49899a73d442085b2f93')
+ version('2.0.1', '40935cfb08228488bd45575e5f001a34')
+ version('2.0.0', 'd8c702c3e8961db83d04182c2aa4730b')
+ version('1.2.0', 'c0925f6869e33af8e7fe56848c129152')
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/jansson/package.py b/var/spack/repos/builtin/packages/jansson/package.py
new file mode 100644
index 0000000000..8ba7829bbc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/jansson/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# 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 Jansson(CMakePackage):
+ """Jansson is a C library for encoding, decoding and manipulating JSON
+ data."""
+
+ homepage = "http://www.digip.org/jansson/"
+ url = "https://github.com/akheron/jansson/archive/v2.9.tar.gz"
+
+ version('2.9', 'd2db25c437b359fc5a065ed938962237')
+
+ depends_on('cmake', type='build')
diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py
index 63bf6514cb..518a469435 100644
--- a/var/spack/repos/builtin/packages/jdk/package.py
+++ b/var/spack/repos/builtin/packages/jdk/package.py
@@ -26,10 +26,7 @@
# Author: Justin Too <too1@llnl.gov>
#
import distutils.dir_util
-
-import spack
from spack import *
-import llnl.util.tty as tty
class Jdk(Package):
@@ -37,11 +34,6 @@ class Jdk(Package):
in the form of a binary product aimed at Java developers."""
homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html"
- version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf',
- url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz")
- version('8u92-linux-x64', '65a1cc17ea362453a6e0eb4f13be76e4',
- url="http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz")
-
# Oracle requires that you accept their License Agreement in order
# to access the Java packages in download.oracle.com. In order to
# automate this process, we need to utilize these additional curl
@@ -53,18 +45,18 @@ class Jdk(Package):
'-H', # specify required License Agreement cookie
'Cookie: oraclelicense=accept-securebackup-cookie']
- def do_fetch(self, mirror_only=False):
- # Add our custom curl commandline options
- tty.msg(
- "[Jdk] Adding required commandline options to curl " +
- "before performing fetch: %s" %
- (self.curl_options))
-
- for option in self.curl_options:
- spack.curl.add_default_arg(option)
-
- # Now perform the actual fetch
- super(Jdk, self).do_fetch(mirror_only)
+ version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf',
+ url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz",
+ curl_options=curl_options)
+ version('8u92-linux-x64', '65a1cc17ea362453a6e0eb4f13be76e4',
+ url="http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz",
+ curl_options=curl_options)
def install(self, spec, prefix):
distutils.dir_util.copy_tree(".", prefix)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('JAVA_HOME', self.spec.prefix)
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ spack_env.set('JAVA_HOME', self.spec.prefix)
diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py
index f5a983b7a9..e13d4292f8 100644
--- a/var/spack/repos/builtin/packages/jemalloc/package.py
+++ b/var/spack/repos/builtin/packages/jemalloc/package.py
@@ -31,6 +31,8 @@ class Jemalloc(Package):
homepage = "http://www.canonware.com/jemalloc/"
url = "https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2"
+ version('4.2.1', '094b0a7b8c77c464d0dc8f0643fd3901')
+ version('4.2.0', 'e6b5d5a1ea93a04207528d274efdd144')
version('4.1.0', 'c4e53c947905a533d5899e5cc3da1f94')
version('4.0.4', '687c5cc53b9a7ab711ccd680351ff988')
diff --git a/var/spack/repos/builtin/packages/jsoncpp/package.py b/var/spack/repos/builtin/packages/jsoncpp/package.py
new file mode 100644
index 0000000000..5169b338ee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/jsoncpp/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Jsoncpp(Package):
+ """JsonCpp is a C++ library that allows manipulating JSON values,
+ including serialization and deserialization to and from strings.
+ It can also preserve existing comment in unserialization/serialization
+ steps, making it a convenient format to store user input files."""
+
+ homepage = "https://github.com/open-source-parsers/jsoncpp"
+ url = "https://github.com/open-source-parsers/jsoncpp/archive/1.7.3.tar.gz"
+
+ version('1.7.3', 'aff6bfb5b81d9a28785429faa45839c5')
+
+ depends_on('cmake', type='build')
+ # depends_on('python', type='test')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('..', '-DBUILD_SHARED_LIBS=ON', *std_cmake_args)
+
+ make()
+ if self.run_tests:
+ make('test') # Python needed to run tests
+ make('install')
diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py
index 536ce69236..033e27fb64 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,45 @@ 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('0.5.0', 'b61385671ba74767ab452363c43131fb', preferred=True)
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.7', '75a7a7dd882b7840829d8f165e9b9078')
+ version('0.4.6', 'd88db18c579049c23ab8ef427ccedf5d')
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", when='@:0.4')
+ depends_on("git", when='@release-0.4')
+ depends_on("openssl")
+ depends_on("python @2.7:2.999")
# Run-time dependencies:
# depends_on("arpack")
@@ -93,10 +109,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 +128,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 or "@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/kbproto/package.py b/var/spack/repos/builtin/packages/kbproto/package.py
new file mode 100644
index 0000000000..356d1c6b4f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kbproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Kbproto(Package):
+ """X Keyboard Extension.
+
+ This extension defines a protcol to provide a number of new capabilities
+ and controls for text keyboards."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/kbproto"
+ url = "https://www.x.org/archive/individual/proto/kbproto-1.0.7.tar.gz"
+
+ version('1.0.7', '19acc5f02ae80381e216f443134e0bbb')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py
index d7c96a03d8..c2b289da4f 100644
--- a/var/spack/repos/builtin/packages/launchmon/package.py
+++ b/var/spack/repos/builtin/packages/launchmon/package.py
@@ -36,6 +36,8 @@ class Launchmon(Package):
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
+ depends_on('libgcrypt')
+ depends_on('libgpg-error')
def install(self, spec, prefix):
configure(
diff --git a/var/spack/repos/builtin/packages/lbxproxy/package.py b/var/spack/repos/builtin/packages/lbxproxy/package.py
new file mode 100644
index 0000000000..3de3ade0c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lbxproxy/package.py
@@ -0,0 +1,58 @@
+##############################################################################
+# 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 Lbxproxy(Package):
+ """lbxproxy accepts client connections, multiplexes them over a single
+ connection to the X server, and performs various optimizations on the
+ X protocol to make it faster over low bandwidth and/or high latency
+ connections.
+
+ Note that the X server source from X.Org no longer supports the LBX
+ extension, so this program is only useful in connecting to older
+ X servers."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/lbxproxy"
+ url = "https://www.x.org/archive/individual/app/lbxproxy-1.0.3.tar.gz"
+
+ version('1.0.3', '50a2a1ae15e8edf7582f76bcdf6b8197')
+
+ depends_on('libxext')
+ depends_on('liblbxutil')
+ depends_on('libx11')
+ depends_on('libice')
+
+ depends_on('xtrans', type='build')
+ depends_on('xproxymanagementprotocol', type='build')
+ depends_on('bigreqsproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libapplewm/package.py b/var/spack/repos/builtin/packages/libapplewm/package.py
new file mode 100644
index 0000000000..85408053ad
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libapplewm/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 Libapplewm(Package):
+ """AppleWM is a simple library designed to interface with the Apple-WM
+ extension. This extension allows X window managers to better interact with
+ the Mac OS X Aqua user interface when running X11 in a rootless mode."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libAppleWM"
+ url = "https://www.x.org/archive/individual/lib/libAppleWM-1.4.1.tar.gz"
+
+ version('1.4.1', '52c587641eb57f00978d28d98d487af8')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('applewmproto@1.4:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ # Crashes with this error message on Linux:
+ # HIServices/Processes.h: No such file or directory
+ # May only build properly on macOS?
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libarchive/package.py b/var/spack/repos/builtin/packages/libarchive/package.py
index 0cf3932957..e439bf894f 100644
--- a/var/spack/repos/builtin/packages/libarchive/package.py
+++ b/var/spack/repos/builtin/packages/libarchive/package.py
@@ -28,14 +28,30 @@ from spack import *
class Libarchive(Package):
"""libarchive: C library and command-line tools for reading and
writing tar, cpio, zip, ISO, and other archive formats."""
+
homepage = "http://www.libarchive.org"
url = "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz"
+ version('3.2.1', 'afa257047d1941a565216edbf0171e72')
version('3.1.2', 'efad5a503f66329bb9d2f4308b5de98a')
version('3.1.1', '1f3d883daf7161a0065e42a15bbf168f')
version('3.1.0', '095a287bb1fd687ab50c85955692bf3a')
+ depends_on('zlib')
+ depends_on('bzip2')
+ depends_on('lzma')
+ depends_on('lz4')
+ depends_on('xz')
+ depends_on('lzo')
+ depends_on('nettle')
+ depends_on('openssl')
+ depends_on('libxml2')
+ depends_on('expat')
+
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ if self.run_tests:
+ make('check') # cannot build test suite with Intel compilers
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libcerf/package.py b/var/spack/repos/builtin/packages/libcerf/package.py
index 7fb47f8dcd..1964f03b95 100644
--- a/var/spack/repos/builtin/packages/libcerf/package.py
+++ b/var/spack/repos/builtin/packages/libcerf/package.py
@@ -38,6 +38,12 @@ class Libcerf(Package):
version('1.3', 'b3504c467204df71e62aeccf73a25612')
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ options = []
+ # Clang reports unused functions as errors, see
+ # http://clang.debian.net/status.php?version=3.8.1&key=UNUSED_FUNCTION
+ if spec.satisfies('%clang'):
+ options.append('CFLAGS=-Wno-unused-function')
+
+ configure('--prefix=%s' % prefix, *options)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/libdmx/package.py b/var/spack/repos/builtin/packages/libdmx/package.py
new file mode 100644
index 0000000000..fa469fd423
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libdmx/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libdmx(Package):
+ """libdmx - X Window System DMX (Distributed Multihead X) extension
+ library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libdmx"
+ url = "https://www.x.org/archive/individual/lib/libdmx-1.1.3.tar.gz"
+
+ version('1.1.3', 'eed755e7cdb161e05f70e955f2b0ef4d')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('dmxproto@2.2.99.1:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py
index 543eab11b3..ab9661269e 100644
--- a/var/spack/repos/builtin/packages/libdrm/package.py
+++ b/var/spack/repos/builtin/packages/libdrm/package.py
@@ -30,16 +30,21 @@ class Libdrm(Package):
rendering manager, on Linux, BSD and other operating
systems that support the ioctl interface."""
- homepage = "http://dri.freedesktop.org/libdrm/" # no real website...
+ homepage = "http://dri.freedesktop.org/libdrm/"
url = "http://dri.freedesktop.org/libdrm/libdrm-2.4.59.tar.gz"
+ version('2.4.70', 'a8c275bce5f3d71a5ca25e8fb60df084')
version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6')
version('2.4.33', '86e4e3debe7087d5404461e0032231c8')
- depends_on('libpciaccess')
+ depends_on('libpciaccess@0.10:')
+ depends_on('libpthread-stubs')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix),
+ '--enable-static',
+ 'LIBS=-lrt') # This fixes a bug with `make check`
make()
- make("install")
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libelf/package.py b/var/spack/repos/builtin/packages/libelf/package.py
index 3304d27bdb..5af4ab705d 100644
--- a/var/spack/repos/builtin/packages/libelf/package.py
+++ b/var/spack/repos/builtin/packages/libelf/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Libelf(Package):
+class Libelf(AutotoolsPackage):
"""libelf lets you read, modify or create ELF object files in an
architecture-independent way. The library takes care of size
and endian issues, e.g. you can process a file for SPARC
@@ -39,12 +39,11 @@ class Libelf(Package):
provides('elf')
- def install(self, spec, prefix):
- configure("--prefix=" + prefix,
- "--enable-shared",
- "--disable-dependency-tracking",
- "--disable-debug")
- make()
+ def configure_args(self):
+ args = ["--enable-shared",
+ "--disable-dependency-tracking",
+ "--disable-debug"]
+ return args
- # The mkdir commands in libelf's install can fail in parallel
- make("install", parallel=False)
+ def install(self, spec, prefix):
+ make('install', parallel=False)
diff --git a/var/spack/repos/builtin/packages/libemos/package.py b/var/spack/repos/builtin/packages/libemos/package.py
new file mode 100644
index 0000000000..0275c7ede9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libemos/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Libemos(Package):
+ """The Interpolation library (EMOSLIB) includes Interpolation software and
+ BUFR & CREX encoding/decoding routines."""
+
+ homepage = "https://software.ecmwf.int/wiki/display/EMOS/Emoslib"
+ url = "https://software.ecmwf.int/wiki/download/attachments/3473472/libemos-4.4.2-Source.tar.gz"
+
+ version('4.4.2', 'f15a9aff0f40861f3f046c9088197376')
+
+ depends_on('cmake', type='build')
+ depends_on('grib-api')
+
+ def install(self, spec, prefix):
+ options = []
+ options.extend(std_cmake_args)
+
+ options.append('-DGRIB_API_PATH=%s' % spec['grib_api'].prefix)
+
+ # To support long pathnames that spack generates
+ options.append('-DCMAKE_Fortran_FLAGS=-ffree-line-length-none')
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *options)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libfontenc/package.py b/var/spack/repos/builtin/packages/libfontenc/package.py
new file mode 100644
index 0000000000..1c7fa196d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libfontenc/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Libfontenc(Package):
+ """libfontenc - font encoding library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libfontenc"
+ url = "https://www.x.org/archive/individual/lib/libfontenc-1.1.3.tar.gz"
+
+ version('1.1.3', '0ffa28542aa7d246299b1f7211cdb768')
+
+ depends_on('zlib')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libfs/package.py b/var/spack/repos/builtin/packages/libfs/package.py
new file mode 100644
index 0000000000..96bf62afd7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libfs/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libfs(Package):
+ """libFS - X Font Service client library.
+
+ This library is used by clients of X Font Servers (xfs), such as
+ xfsinfo, fslsfonts, and the X servers themselves."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libFS"
+ url = "https://www.x.org/archive/individual/lib/libFS-1.0.7.tar.gz"
+
+ version('1.0.7', 'd8c1246f5b3d0e7ccf2190d3bf2ecb73')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('fontsproto', type='build')
+ depends_on('xtrans', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py
index acfdebb972..6329adf8f3 100644
--- a/var/spack/repos/builtin/packages/libgd/package.py
+++ b/var/spack/repos/builtin/packages/libgd/package.py
@@ -40,18 +40,33 @@ class Libgd(Package):
homepage = "https://github.com/libgd/libgd"
url = "https://github.com/libgd/libgd/archive/gd-2.1.1.tar.gz"
+ version('2.2.3', 'a67bd15fa33d4aac0a1c7904aed19f49')
version('2.1.1', 'e91a1a99903e460e7ba00a794e72cc1e')
+ # Build dependencies
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+ depends_on('gettext', type='build')
+ depends_on('pkg-config', type='build')
+
depends_on('libpng')
- depends_on('cmake', type='build')
+ depends_on('libtiff')
+ depends_on('fontconfig')
def install(self, spec, prefix):
-
- with working_dir('spack-build', create=True):
- cmake('..',
- '-DENABLE_JPEG:BOOL=ON',
- '-DENABLE_PNG:BOOL=ON',
- '-DENABLE_TIFF:BOOL=ON',
- *std_cmake_args)
- make()
- make("install")
+ autoreconf("--install", "--force",
+ "-I", "m4",
+ "-I", join_path(spec['gettext'].prefix,
+ "share", "aclocal"),
+ "-I", join_path(spec['pkg-config'].prefix,
+ "share", "aclocal"),
+ "-I", join_path(spec['automake'].prefix,
+ "share", "aclocal"),
+ "-I", join_path(spec['libtool'].prefix,
+ "share", "aclocal")
+ )
+ configure('--prefix={0}'.format(prefix))
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/libice/package.py b/var/spack/repos/builtin/packages/libice/package.py
new file mode 100644
index 0000000000..1f6fd2f901
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libice/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Libice(Package):
+ """libICE - Inter-Client Exchange Library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libICE"
+ url = "https://www.x.org/archive/individual/lib/libICE-1.0.9.tar.gz"
+
+ version('1.0.9', '95812d61df8139c7cacc1325a26d5e37')
+
+ depends_on('xproto', type='build')
+ depends_on('xtrans', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libiconv/gets.patch b/var/spack/repos/builtin/packages/libiconv/gets.patch
new file mode 100644
index 0000000000..7c4b5562ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libiconv/gets.patch
@@ -0,0 +1,13 @@
+--- a/srclib/stdio.in.h
++++ b/srclib/stdio.in.h
+@@ -692,10 +692,6 @@
+ # undef gets
+ # endif
+ _GL_CXXALIASWARN (gets);
+-/* It is very rare that the developer ever has full control of stdin,
+- so any use of gets warrants an unconditional warning. Assume it is
+- always declared, since it is required by C89. */
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+
+
diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py
index f2eeb07b26..72f67ec80d 100644
--- a/var/spack/repos/builtin/packages/libiconv/package.py
+++ b/var/spack/repos/builtin/packages/libiconv/package.py
@@ -23,9 +23,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import shutil
-class Libiconv(Package):
+class Libiconv(AutotoolsPackage):
"""GNU libiconv provides an implementation of the iconv() function
and the iconv program for character set conversion."""
@@ -34,10 +35,14 @@ class Libiconv(Package):
version('1.14', 'e34509b1623cec449dfeb73d7ce9c6c6')
- def install(self, spec, prefix):
- configure('--prefix={0}'.format(prefix),
- '--enable-extra-encodings')
+ # We cannot set up a warning for gets(), since gets() is not part
+ # of C11 any more and thus might not exist.
+ patch("gets.patch")
- make()
- make('check')
- make('install')
+ def configure_args(self):
+ args = ['--enable-extra-encodings']
+
+ # A hack to patch config.guess in the libcharset sub directory
+ shutil.copyfile('./build-aux/config.guess',
+ 'libcharset/build-aux/config.guess')
+ return args
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
new file mode 100644
index 0000000000..2ad5e93191
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -0,0 +1,104 @@
+##############################################################################
+# 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 Libint(Package):
+ """Libint is a high-performance library for computing
+ Gaussian integrals in quantum mechanics."""
+
+ homepage = "https://github.com/evaleev/libint"
+ url = "https://github.com/evaleev/libint/archive/v2.1.0.tar.gz"
+
+ version('2.1.0', 'd0dcb985fe32ddebc78fe571ce37e2d6')
+ version('1.1.6', '990f67b55f49ecc18f32c58da9240684')
+ version('1.1.5', '379b7d0718ff398715d6898807adf628')
+
+ # Build dependencies
+ depends_on('autoconf@2.52:', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+
+ # Libint 2 dependencies
+ depends_on('boost', when='@2:')
+ depends_on('gmp', when='@2:')
+
+ def url_for_version(self, version):
+ base_url = "https://github.com/evaleev/libint/archive"
+ if version == Version('1.0.0'):
+ return "{0}/LIBINT_1_00.tar.gz".format(base_url)
+ elif version < Version('2.1.0'):
+ return "{0}/release-{1}.tar.gz".format(base_url, version.dashed)
+ else:
+ return "{0}/v{1}.tar.gz".format(base_url, version)
+
+ def install(self, spec, prefix):
+ # Generate configure
+ libtoolize()
+ aclocal('-I', 'lib/autoconf')
+ autoconf()
+
+ config_args = [
+ '--prefix={0}'.format(prefix),
+ '--enable-shared'
+ ]
+
+ # Optimizations for the Intel compiler, suggested by CP2K
+ optflags = '-O2'
+ if self.compiler.name == 'intel':
+ optflags += ' -xAVX -axCORE-AVX2 -ipo'
+ if which('xiar'):
+ env['AR'] = 'xiar'
+
+ env['CFLAGS'] = optflags
+ env['CXXFLAGS'] = optflags
+
+ # Optimization flag names have changed in libint 2
+ if self.version < Version('2.0.0'):
+ config_args.extend([
+ '--with-cc-optflags={0}'.format(optflags),
+ '--with-cxx-optflags={0}'.format(optflags)
+ ])
+ else:
+ config_args.extend([
+ '--with-cxx-optflags={0}'.format(optflags),
+ '--with-cxxgen-optflags={0}'.format(optflags)
+ ])
+
+ # Options required by CP2K, removed in libint 2
+ if self.version < Version('2.0.0'):
+ config_args.extend([
+ '--with-libint-max-am=5',
+ '--with-libderiv-max-am1=4'
+ ])
+
+ configure(*config_args)
+ make()
+
+ # Testing suite was added in libint 2
+ if self.version >= Version('2.0.0'):
+ make('check')
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
index 6252a88542..3fe159d7b9 100644
--- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
+++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
@@ -26,20 +26,25 @@ from spack import *
class LibjpegTurbo(Package):
- """libjpeg-turbo is a fork of the original IJG libjpeg which uses
- SIMD to accelerate baseline JPEG compression and
- decompression. libjpeg is a library that implements JPEG image
- encoding, decoding and transcoding."""
+ """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to
+ accelerate baseline JPEG compression and decompression. libjpeg is a
+ library that implements JPEG image encoding, decoding and
+ transcoding."""
+
homepage = "http://libjpeg-turbo.virtualgl.org"
url = "http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.3.1.tar.gz"
+ version('1.5.0', '3fc5d9b6a8bce96161659ae7a9939257')
version('1.3.1', '2c3a68129dac443a72815ff5bb374b05')
- # Can use either of these.
- depends_on("yasm", type='build')
+ # Can use either of these. But in the current version of the package
+ # only nasm is used. In order to use yasm an environmental variable
+ # NASM must be set.
+ # TODO: Implement the selection between two supported assemblers.
+ # depends_on("yasm", type='build')
depends_on("nasm", type='build')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure("--prefix=" + prefix)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/liblbxutil/package.py b/var/spack/repos/builtin/packages/liblbxutil/package.py
new file mode 100644
index 0000000000..1de59defd6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/liblbxutil/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Liblbxutil(Package):
+ """liblbxutil - Low Bandwith X extension (LBX) utility routines."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/liblbxutil"
+ url = "https://www.x.org/archive/individual/lib/liblbxutil-1.1.0.tar.gz"
+
+ version('1.1.0', '2735cd23625d4cc870ec4eb7ca272788')
+
+ depends_on('xextproto@7.0.99.1:', type='build')
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ # There is a bug in the library that causes the following messages:
+ # undefined symbol: Xfree
+ # undefined symbol: Xalloc
+ # See https://bugs.freedesktop.org/show_bug.cgi?id=8421
+ # Adding a dependency on libxdmcp and adding LIBS=-lXdmcp did not fix it
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libmesh/package.py b/var/spack/repos/builtin/packages/libmesh/package.py
new file mode 100644
index 0000000000..ea81f5da73
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libmesh/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 Libmesh(Package):
+ """The libMesh library provides a framework for the numerical simulation of
+ partial differential equations using arbitrary unstructured
+ discretizations on serial and parallel platforms."""
+
+ homepage = "http://libmesh.github.io/"
+ url = "https://github.com/libMesh/libmesh/releases/download/v1.0.0/libmesh-1.0.0.tar.bz2"
+
+ version('1.0.0', 'cb464fc63ea0b71b1e69fa3f5d4f93a4')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/liboldx/package.py b/var/spack/repos/builtin/packages/liboldx/package.py
new file mode 100644
index 0000000000..9e85f1ed65
--- /dev/null
+++ b/var/spack/repos/builtin/packages/liboldx/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Liboldx(Package):
+ """X version 10 backwards compatibility."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/liboldX/"
+ url = "https://www.x.org/archive/individual/lib/liboldX-1.0.1.tar.gz"
+
+ version('1.0.1', 'ea7c4b6a19bf2d04100e2580abf83fae')
+
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py
index a65b81b69b..f4a3cf7157 100644
--- a/var/spack/repos/builtin/packages/libpciaccess/package.py
+++ b/var/spack/repos/builtin/packages/libpciaccess/package.py
@@ -29,11 +29,13 @@ class Libpciaccess(Package):
"""Generic PCI access library."""
homepage = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/"
- url = "http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.13.4.tar.bz2"
+ url = "http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.13.4.tar.gz"
- version('0.13.4', 'ace78aec799b1cf6dfaea55d3879ed9f')
+ version('0.13.4', 'cc1fad87da60682af1d5fa43a5da45a4')
- depends_on('libtool')
+ depends_on('libtool', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
def install(self, spec, prefix):
# libpciaccess does not support OS X
@@ -42,6 +44,7 @@ class Libpciaccess(Package):
mkdir(prefix.lib)
return
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py
index 1afe4911e6..c3a595d12d 100644
--- a/var/spack/repos/builtin/packages/libpng/package.py
+++ b/var/spack/repos/builtin/packages/libpng/package.py
@@ -30,6 +30,7 @@ class Libpng(Package):
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz"
+ version('1.6.24', '65213080dd30a9b16193d9b83adc1ee9')
version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d')
version('1.6.15', '829a256f3de9307731d4f52dc071916d')
version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
@@ -37,9 +38,10 @@ class Libpng(Package):
version('1.4.19', '89bcbc4fc8b31f4a403906cf4f662330')
version('1.2.56', '9508fc59d10a1ffadd9aae35116c19ee')
- depends_on('zlib')
+ depends_on('zlib@1.0.4:') # 1.2.5 or later recommended
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
+ make("check")
make("install")
diff --git a/var/spack/repos/builtin/packages/libpthread-stubs/package.py b/var/spack/repos/builtin/packages/libpthread-stubs/package.py
index ea36758a83..fdaf327c2a 100644
--- a/var/spack/repos/builtin/packages/libpthread-stubs/package.py
+++ b/var/spack/repos/builtin/packages/libpthread-stubs/package.py
@@ -27,14 +27,14 @@ from spack import *
class LibpthreadStubs(Package):
"""The libpthread-stubs package provides weak aliases for pthread
- functions not provided in libc or otherwise available by
- default. """
- homepage = "http://xcb.freedesktop.org/"
- url = "http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2"
+ functions not provided in libc or otherwise available by default."""
- version('0.3', 'e8fa31b42e13f87e8f5a7a2b731db7ee')
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.gz"
+
+ version('0.3', 'a09d928c4af54fe5436002345ef71138')
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
- make()
- make("install")
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libquo/package.py b/var/spack/repos/builtin/packages/libquo/package.py
new file mode 100644
index 0000000000..8856913bb2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libquo/package.py
@@ -0,0 +1,68 @@
+##############################################################################
+# 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 Libquo(Package):
+ """A high-level, easy to use programming interface tailored specifically
+ for MPI/MPI+X codes that may benefit from evolving process binding
+ policies during their execution. QUO allows for arbitrary process binding
+ policies to be enacted and reverted during the execution of an MPI/MPI+X
+ application as different computational phases are entered and exited,
+ respectively."""
+
+ homepage = "https://github.com/losalamos/libquo"
+ url = "https://github.com/losalamos/libquo/archive/v1.2.9.tar.gz"
+
+ version('1.2.9', 'ca82ab33f13e2b89983f81e7c02e98c2')
+
+ depends_on('mpi')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+
+ def install(self, spec, prefix):
+ autoreconf_options = [
+ '--install',
+ '--verbose',
+ '--force',
+ '-I', 'config',
+ '-I', os.path.join(spec['automake'].prefix,
+ 'share', 'aclocal'),
+ '-I', os.path.join(spec['libtool'].prefix,
+ 'share', 'aclocal')
+ ]
+ autoreconf(*autoreconf_options)
+
+ configure_options = [
+ '--prefix={0}'.format(prefix),
+ 'CC=%s' % join_path(spec['mpi'].prefix.bin, "mpicc"),
+ 'FC=%s' % join_path(spec['mpi'].prefix.bin, "mpif90")
+ ]
+ configure(*configure_options)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libsigsegv/package.py b/var/spack/repos/builtin/packages/libsigsegv/package.py
index 715d24bcf7..6c8b27478a 100644
--- a/var/spack/repos/builtin/packages/libsigsegv/package.py
+++ b/var/spack/repos/builtin/packages/libsigsegv/package.py
@@ -30,6 +30,8 @@ class Libsigsegv(Package):
homepage = "https://www.gnu.org/software/libsigsegv/"
url = "ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz"
+ patch('patch.new_config_guess', when='@2.10')
+
version('2.10', '7f96fb1f65b3b8cbc1582fb7be774f0f')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess b/var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess
new file mode 100644
index 0000000000..3ecc7458f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess
@@ -0,0 +1,1187 @@
+--- a/build-aux/config.guess 2010-11-06 04:18:40.000000000 -0700
++++ b/build-aux/config.guess 2016-10-18 13:38:39.950379000 -0700
+@@ -1,14 +1,12 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+-# Free Software Foundation, Inc.
++# Copyright 1992-2016 Free Software Foundation, Inc.
+
+-timestamp='2010-09-24'
++timestamp='2016-10-02'
+
+ # This file 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; either version 2 of the License, or
++# the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful, but
+@@ -17,26 +15,22 @@
+ # General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
+-
+-
+-# Originally written by Per Bothner. Please send patches (context
+-# diff format) to <config-patches@gnu.org> and include a ChangeLog
+-# entry.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+ #
+-# This script attempts to guess a canonical system name similar to
+-# config.sub. If it succeeds, it prints the system name on stdout, and
+-# exits with 0. Otherwise, it exits with 1.
++# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+ #
+ # You can get the latest version of this script from:
+-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
++#
++# Please send patches to <config-patches@gnu.org>.
++
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -56,9 +50,7 @@
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+-Software Foundation, Inc.
++Copyright 1992-2016 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -92,7 +84,7 @@
+ exit 1
+ fi
+
+-trap 'exit 1' HUP INT TERM
++trap 'exit 1' 1 2 15
+
+ # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+ # compiler to aid in system detection is discouraged as it requires
+@@ -106,7 +98,7 @@
+
+ set_cc_for_build='
+ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+ : ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+@@ -140,12 +132,33 @@
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++case "${UNAME_SYSTEM}" in
++Linux|GNU|GNU/*)
++ # If the system lacks a compiler, then just pick glibc.
++ # We could probably try harder.
++ LIBC=gnu
++
++ eval $set_cc_for_build
++ cat <<-EOF > $dummy.c
++ #include <features.h>
++ #if defined(__UCLIBC__)
++ LIBC=uclibc
++ #elif defined(__dietlibc__)
++ LIBC=dietlibc
++ #else
++ LIBC=gnu
++ #endif
++ EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
++ ;;
++esac
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+@@ -155,19 +168,29 @@
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
++ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
++ /sbin/$sysctl 2>/dev/null || \
++ /usr/sbin/$sysctl 2>/dev/null || \
++ echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
++ earmv*)
++ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
++ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
++ machine=${arch}${endian}-unknown
++ ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+- # to ELF recently, or will in the future.
++ # to ELF recently (or will in the future) and ABI.
+ case "${UNAME_MACHINE_ARCH}" in
++ earm*)
++ os=netbsdelf
++ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+@@ -181,7 +204,14 @@
+ fi
+ ;;
+ *)
+- os=netbsd
++ os=netbsd
++ ;;
++ esac
++ # Determine ABI tags.
++ case "${UNAME_MACHINE_ARCH}" in
++ earm*)
++ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
++ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+@@ -194,18 +224,26 @@
+ release='-gnu'
+ ;;
+ *)
+- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+- echo "${machine}-${os}${release}"
++ echo "${machine}-${os}${release}${abi}"
++ exit ;;
++ *:Bitrig:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
++ *:LibertyBSD:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
++ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+@@ -218,13 +256,16 @@
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
++ *:Sortix:*:*)
++ echo ${UNAME_MACHINE}-unknown-sortix
++ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+@@ -234,43 +275,46 @@
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+- UNAME_MACHINE="alpha" ;;
++ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+- UNAME_MACHINE="alpha" ;;
++ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+- UNAME_MACHINE="alpha" ;;
++ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+- UNAME_MACHINE="alphaev5" ;;
++ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+- UNAME_MACHINE="alphaev56" ;;
++ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+- UNAME_MACHINE="alphapca56" ;;
++ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+- UNAME_MACHINE="alphapca57" ;;
++ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+- UNAME_MACHINE="alphaev6" ;;
++ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+- UNAME_MACHINE="alphaev67" ;;
++ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+- UNAME_MACHINE="alphaev68" ;;
++ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+- UNAME_MACHINE="alphaev68" ;;
++ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+- UNAME_MACHINE="alphaev68" ;;
++ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+- UNAME_MACHINE="alphaev69" ;;
++ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+- UNAME_MACHINE="alphaev7" ;;
++ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+- UNAME_MACHINE="alphaev79" ;;
++ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- exit ;;
++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
++ exitcode=$?
++ trap '' 0
++ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+@@ -296,12 +340,12 @@
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+- echo powerpc-ibm-os400
++ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+- arm:riscos:*:*|arm:RISCOS:*:*)
++ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -339,16 +383,16 @@
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+- SUN_ARCH="i386"
++ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+- SUN_ARCH="x86_64"
++ SUN_ARCH=x86_64
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+@@ -373,7 +417,7 @@
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
++ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+@@ -395,23 +439,23 @@
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
++ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit ;;
++ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
++ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+- echo m68k-milan-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-milan-mint${UNAME_RELEASE}
++ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+- echo m68k-hades-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-hades-mint${UNAME_RELEASE}
++ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+- echo m68k-unknown-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-unknown-mint${UNAME_RELEASE}
++ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+@@ -481,8 +525,8 @@
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+- # DG/UX returns AViiON for all architectures
+- UNAME_PROCESSOR=`/usr/bin/uname -p`
++ # DG/UX returns AViiON for all architectures
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+@@ -495,7 +539,7 @@
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+- exit ;;
++ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+@@ -559,8 +603,9 @@
+ else
+ IBM_ARCH=powerpc
+ fi
+- if [ -x /usr/bin/oslevel ] ; then
+- IBM_REV=`/usr/bin/oslevel`
++ if [ -x /usr/bin/lslpp ] ; then
++ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
++ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+@@ -595,58 +640,58 @@
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+- case "${sc_cpu_version}" in
+- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+- 532) # CPU_PA_RISC2_0
+- case "${sc_kernel_bits}" in
+- 32) HP_ARCH="hppa2.0n" ;;
+- 64) HP_ARCH="hppa2.0w" ;;
+- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+- esac ;;
+- esac
++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
++ case "${sc_cpu_version}" in
++ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
++ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
++ 532) # CPU_PA_RISC2_0
++ case "${sc_kernel_bits}" in
++ 32) HP_ARCH=hppa2.0n ;;
++ 64) HP_ARCH=hppa2.0w ;;
++ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
++ esac ;;
++ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
++ sed 's/^ //' << EOF >$dummy.c
+
+- #define _HPUX_SOURCE
+- #include <stdlib.h>
+- #include <unistd.h>
+-
+- int main ()
+- {
+- #if defined(_SC_KERNEL_BITS)
+- long bits = sysconf(_SC_KERNEL_BITS);
+- #endif
+- long cpu = sysconf (_SC_CPU_VERSION);
+-
+- switch (cpu)
+- {
+- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+- case CPU_PA_RISC2_0:
+- #if defined(_SC_KERNEL_BITS)
+- switch (bits)
+- {
+- case 64: puts ("hppa2.0w"); break;
+- case 32: puts ("hppa2.0n"); break;
+- default: puts ("hppa2.0"); break;
+- } break;
+- #else /* !defined(_SC_KERNEL_BITS) */
+- puts ("hppa2.0"); break;
+- #endif
+- default: puts ("hppa1.0"); break;
+- }
+- exit (0);
+- }
++ #define _HPUX_SOURCE
++ #include <stdlib.h>
++ #include <unistd.h>
++
++ int main ()
++ {
++ #if defined(_SC_KERNEL_BITS)
++ long bits = sysconf(_SC_KERNEL_BITS);
++ #endif
++ long cpu = sysconf (_SC_CPU_VERSION);
++
++ switch (cpu)
++ {
++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++ case CPU_PA_RISC2_0:
++ #if defined(_SC_KERNEL_BITS)
++ switch (bits)
++ {
++ case 64: puts ("hppa2.0w"); break;
++ case 32: puts ("hppa2.0n"); break;
++ default: puts ("hppa2.0"); break;
++ } break;
++ #else /* !defined(_SC_KERNEL_BITS) */
++ puts ("hppa2.0"); break;
++ #endif
++ default: puts ("hppa1.0"); break;
++ }
++ exit (0);
++ }
+ EOF
+- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
++ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+- if [ ${HP_ARCH} = "hppa2.0w" ]
++ if [ ${HP_ARCH} = hppa2.0w ]
+ then
+ eval $set_cc_for_build
+
+@@ -659,12 +704,12 @@
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
++ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+- HP_ARCH="hppa2.0w"
++ HP_ARCH=hppa2.0w
+ else
+- HP_ARCH="hppa64"
++ HP_ARCH=hppa64
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+@@ -731,22 +776,22 @@
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+- exit ;;
++ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit ;;
++ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+- exit ;;
++ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+- exit ;;
++ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+- exit ;;
++ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+@@ -769,15 +814,15 @@
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+- exit ;;
++ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
++ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+@@ -789,30 +834,35 @@
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+- case ${UNAME_MACHINE} in
+- pc98)
+- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
++ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
++ *:MINGW64*:*)
++ echo ${UNAME_MACHINE}-pc-mingw64
++ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
++ *:MSYS*:*)
++ echo ${UNAME_MACHINE}-pc-msys
++ exit ;;
+ i*:windows32*:*)
+- # uname -m includes "-pc" on this system.
+- echo ${UNAME_MACHINE}-mingw32
++ # uname -m includes "-pc" on this system.
++ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+- case ${UNAME_MACHINE} in
++ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+@@ -849,15 +899,22 @@
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
++ aarch64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ aarch64_be:Linux:*:*)
++ UNAME_MACHINE=aarch64_be
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+@@ -867,52 +924,62 @@
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+- esac
++ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ arc:Linux:*:* | arceb:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep -q __ARM_PCS_VFP
++ then
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
++ else
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
++ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+- echo cris-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+- echo crisv32-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
++ exit ;;
++ e2k:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo frv-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ hexagon:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+- LIBC=gnu
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ k1om:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -931,54 +998,69 @@
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+- or32:Linux:*:*)
+- echo or32-unknown-linux-gnu
++ mips64el:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ openrisc*:Linux:*:*)
++ echo or1k-unknown-linux-${LIBC}
++ exit ;;
++ or32:Linux:*:* | or1k*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+- echo sparc-unknown-linux-gnu
++ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
++ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ echo powerpc-unknown-linux-${LIBC}
++ exit ;;
++ ppc64le:Linux:*:*)
++ echo powerpc64le-unknown-linux-${LIBC}
++ exit ;;
++ ppcle:Linux:*:*)
++ echo powerpcle-unknown-linux-${LIBC}
++ exit ;;
++ riscv32:Linux:*:* | riscv64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+- echo ${UNAME_MACHINE}-ibm-linux
++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+- echo ${UNAME_MACHINE}-tilera-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+- echo ${UNAME_MACHINE}-dec-linux-gnu
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo x86_64-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+@@ -987,11 +1069,11 @@
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+- # Unixware is an offshoot of SVR4, but it has its own version
+- # number series starting with 2...
+- # I am not positive that other SVR4 systems won't match this,
++ # Unixware is an offshoot of SVR4, but it has its own version
++ # number series starting with 2...
++ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+- # Use sysv4.2uw... so that sysv4* matches it.
++ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+@@ -1023,7 +1105,7 @@
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+- # UnixWare 7.x, OpenUNIX and OpenServer 6.
++ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+@@ -1051,13 +1133,13 @@
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+- # uname -m prints for DJGPP always 'pc', but it prints nothing about
+- # the processor, so we play safe by assuming i586.
++ # uname -m prints for DJGPP always 'pc', but it prints nothing about
++ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+- # prints for the "djgpp" host, or else GDB configury will decide that
++ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+- exit ;;
++ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+@@ -1092,8 +1174,8 @@
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && { echo i486-ncr-sysv4; exit; } ;;
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+@@ -1136,10 +1218,10 @@
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+- # says <Richard.M.Bartel@ccMail.Census.GOV>
+- echo i586-unisys-sysv4
+- exit ;;
++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++ # says <Richard.M.Bartel@ccMail.Census.GOV>
++ echo i586-unisys-sysv4
++ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+@@ -1165,11 +1247,11 @@
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+- echo mips-nec-sysv${UNAME_RELEASE}
++ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+- echo mips-unknown-sysv${UNAME_RELEASE}
++ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+- exit ;;
++ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+@@ -1182,6 +1264,9 @@
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
++ x86_64:Haiku:*:*)
++ echo x86_64-unknown-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+@@ -1200,6 +1285,9 @@
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
++ SX-ACE:SUPER-UX:*:*)
++ echo sxace-nec-superux${UNAME_RELEASE}
++ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+@@ -1208,24 +1296,36 @@
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+- case $UNAME_PROCESSOR in
+- i386)
+- eval $set_cc_for_build
+- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+- grep IS_64BIT_ARCH >/dev/null
+- then
+- UNAME_PROCESSOR="x86_64"
+- fi
+- fi ;;
+- unknown) UNAME_PROCESSOR=powerpc ;;
+- esac
++ eval $set_cc_for_build
++ if test "$UNAME_PROCESSOR" = unknown ; then
++ UNAME_PROCESSOR=powerpc
++ fi
++ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
++ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ case $UNAME_PROCESSOR in
++ i386) UNAME_PROCESSOR=x86_64 ;;
++ powerpc) UNAME_PROCESSOR=powerpc64 ;;
++ esac
++ fi
++ fi
++ elif test "$UNAME_PROCESSOR" = i386 ; then
++ # Avoid executing cc on OS X 10.9, as it ships with a stub
++ # that puts up a graphical alert prompting to install
++ # developer tools. Any system running Mac OS X 10.7 or
++ # later (Darwin 11 and later) is required to have a 64-bit
++ # processor. This is not true of the ARM version of Darwin
++ # that Apple uses in portable devices.
++ UNAME_PROCESSOR=x86_64
++ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+- if test "$UNAME_PROCESSOR" = "x86"; then
++ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+@@ -1237,7 +1337,7 @@
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+- NSE-?:NONSTOP_KERNEL:*:*)
++ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+@@ -1256,7 +1356,7 @@
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+- if test "$cputype" = "386"; then
++ if test "$cputype" = 386; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+@@ -1282,13 +1382,13 @@
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+- echo mips-sei-seiux${UNAME_RELEASE}
++ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+- UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+@@ -1298,7 +1398,7 @@
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+@@ -1306,174 +1406,28 @@
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+-esac
+-
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+-eval $set_cc_for_build
+-cat >$dummy.c <<EOF
+-#ifdef _SEQUENT_
+-# include <sys/types.h>
+-# include <sys/utsname.h>
+-#endif
+-main ()
+-{
+-#if defined (sony)
+-#if defined (MIPSEB)
+- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+- I don't know.... */
+- printf ("mips-sony-bsd\n"); exit (0);
+-#else
+-#include <sys/param.h>
+- printf ("m68k-sony-newsos%s\n",
+-#ifdef NEWSOS4
+- "4"
+-#else
+- ""
+-#endif
+- ); exit (0);
+-#endif
+-#endif
+-
+-#if defined (__arm) && defined (__acorn) && defined (__unix)
+- printf ("arm-acorn-riscix\n"); exit (0);
+-#endif
+-
+-#if defined (hp300) && !defined (hpux)
+- printf ("m68k-hp-bsd\n"); exit (0);
+-#endif
+-
+-#if defined (NeXT)
+-#if !defined (__ARCHITECTURE__)
+-#define __ARCHITECTURE__ "m68k"
+-#endif
+- int version;
+- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+- if (version < 4)
+- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+- else
+- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+- exit (0);
+-#endif
+-
+-#if defined (MULTIMAX) || defined (n16)
+-#if defined (UMAXV)
+- printf ("ns32k-encore-sysv\n"); exit (0);
+-#else
+-#if defined (CMU)
+- printf ("ns32k-encore-mach\n"); exit (0);
+-#else
+- printf ("ns32k-encore-bsd\n"); exit (0);
+-#endif
+-#endif
+-#endif
+-
+-#if defined (__386BSD__)
+- printf ("i386-pc-bsd\n"); exit (0);
+-#endif
+-
+-#if defined (sequent)
+-#if defined (i386)
+- printf ("i386-sequent-dynix\n"); exit (0);
+-#endif
+-#if defined (ns32000)
+- printf ("ns32k-sequent-dynix\n"); exit (0);
+-#endif
+-#endif
+-
+-#if defined (_SEQUENT_)
+- struct utsname un;
+-
+- uname(&un);
+-
+- if (strncmp(un.version, "V2", 2) == 0) {
+- printf ("i386-sequent-ptx2\n"); exit (0);
+- }
+- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+- printf ("i386-sequent-ptx1\n"); exit (0);
+- }
+- printf ("i386-sequent-ptx\n"); exit (0);
+-
+-#endif
+-
+-#if defined (vax)
+-# if !defined (ultrix)
+-# include <sys/param.h>
+-# if defined (BSD)
+-# if BSD == 43
+- printf ("vax-dec-bsd4.3\n"); exit (0);
+-# else
+-# if BSD == 199006
+- printf ("vax-dec-bsd4.3reno\n"); exit (0);
+-# else
+- printf ("vax-dec-bsd\n"); exit (0);
+-# endif
+-# endif
+-# else
+- printf ("vax-dec-bsd\n"); exit (0);
+-# endif
+-# else
+- printf ("vax-dec-ultrix\n"); exit (0);
+-# endif
+-#endif
+-
+-#if defined (alliant) && defined (i860)
+- printf ("i860-alliant-bsd\n"); exit (0);
+-#endif
+-
+- exit (1);
+-}
+-EOF
+-
+-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+- { echo "$SYSTEM_NAME"; exit; }
+-
+-# Apollos put the system type in the environment.
+-
+-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+-
+-# Convex versions that predate uname can use getsysinfo(1)
+-
+-if [ -x /usr/convex/getsysinfo ]
+-then
+- case `getsysinfo -f cpu_type` in
+- c1*)
+- echo c1-convex-bsd
+- exit ;;
+- c2*)
+- if getsysinfo -f scalar_acc
+- then echo c32-convex-bsd
+- else echo c2-convex-bsd
+- fi
+- exit ;;
+- c34*)
+- echo c34-convex-bsd
+- exit ;;
+- c38*)
+- echo c38-convex-bsd
++ x86_64:VMkernel:*:*)
++ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+- c4*)
+- echo c4-convex-bsd
++ amd64:Isilon\ OneFS:*:*)
++ echo x86_64-unknown-onefs
+ exit ;;
+- esac
+-fi
++esac
+
+ cat >&2 <<EOF
+ $0: unable to guess system type
+
+-This script, last modified $timestamp, has failed to recognize
+-the operating system you are using. It is advised that you
+-download the most up to date version of the config scripts from
++This script (version $timestamp), has failed to recognize the
++operating system you are using. If your script is old, overwrite
++config.guess and config.sub with the latest versions from:
+
+- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+ and
+- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+-If the version you run ($0) is already up to date, please
+-send the following data and any information you think might be
+-pertinent to <config-patches@gnu.org> in order to provide the needed
+-information to handle your system.
++If $0 has already been updated, send the following data and any
++information you think might be pertinent to config-patches@gnu.org to
++provide the necessary information to handle your system.
+
+ config.guess timestamp = $timestamp
+
diff --git a/var/spack/repos/builtin/packages/libsm/package.py b/var/spack/repos/builtin/packages/libsm/package.py
new file mode 100644
index 0000000000..4affd50127
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsm/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Libsm(Package):
+ """libSM - X Session Management Library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libSM"
+ url = "https://www.x.org/archive/individual/lib/libSM-1.2.2.tar.gz"
+
+ version('1.2.2', '18e5084ed9500b1b47719fd1758f0ec8')
+
+ depends_on('libice@1.0.5:')
+
+ depends_on('xproto', type='build')
+ depends_on('xtrans', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py
index 1c930e21dd..805881ce07 100644
--- a/var/spack/repos/builtin/packages/libsodium/package.py
+++ b/var/spack/repos/builtin/packages/libsodium/package.py
@@ -29,14 +29,22 @@ class Libsodium(Package):
"""Sodium is a modern, easy-to-use software library for encryption,
decryption, signatures, password hashing and more."""
homepage = "https://download.libsodium.org/doc/"
- url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.3.tar.gz"
+ url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.11.tar.gz"
+ version('1.0.11', 'b58928d035064b2a46fb564937b83540')
+ version('1.0.10', 'ea89dcbbda0b2b6ff6a1c476231870dd')
version('1.0.3', 'b3bcc98e34d3250f55ae196822307fab')
version('1.0.2', 'dc40eb23e293448c6fc908757738003f')
version('1.0.1', '9a221b49fba7281ceaaf5e278d0f4430')
version('1.0.0', '3093dabe4e038d09f0d150cef064b2f7')
version('0.7.1', 'c224fe3923d1dcfe418c65c8a7246316')
+ def url_for_version(self, version):
+ url = 'https://download.libsodium.org/libsodium/releases/'
+ if version < Version('1.0.4'):
+ url += 'old/'
+ return url + 'libsodium-{0}.tar.gz'.format(version)
+
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/libsplash/package.py b/var/spack/repos/builtin/packages/libsplash/package.py
new file mode 100644
index 0000000000..c87dae19be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsplash/package.py
@@ -0,0 +1,64 @@
+##############################################################################
+# 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 Libsplash(Package):
+ """libSplash aims at developing a HDF5-based I/O library for HPC
+ simulations. It is created as an easy-to-use frontend for the standard HDF5
+ library with support for MPI processes in a cluster environment. While the
+ standard HDF5 library provides detailed low-level control, libSplash
+ simplifies tasks commonly found in large-scale HPC simulations, such as
+ iterative computations and MPI distributed processes.
+ """
+
+ homepage = "https://github.com/ComputationalRadiationPhysics/libSplash"
+ url = "https://github.com/ComputationalRadiationPhysics/libSplash/archive/v1.4.0.tar.gz"
+
+ version('dev', branch='dev',
+ git='https://github.com/ComputationalRadiationPhysics/libSplash.git')
+ version('master', branch='master',
+ git='https://github.com/ComputationalRadiationPhysics/libSplash.git')
+ version('1.6.0', 'c05bce95abfe1ae4cd9d9817acf58d94')
+ version('1.5.0', 'c1efec4c20334242c8a3b6bfdc0207e3')
+ version('1.4.0', '2de37bcef6fafa1960391bf44b1b50e0')
+ version('1.3.1', '524580ba088d97253d03b4611772f37c')
+ version('1.2.4', '3fccb314293d22966beb7afd83b746d0')
+
+ variant('mpi', default=True,
+ description='Enable parallel I/O (one-file aggregation) support')
+
+ depends_on('cmake', type='build')
+ depends_on('hdf5@1.8.6:')
+ depends_on('hdf5+mpi', when='+mpi')
+ depends_on('mpi', when='+mpi')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('-DCMAKE_INSTALL_PREFIX=%s' % prefix,
+ '..', *std_cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py
index cef9fcaae5..70c371b3b8 100644
--- a/var/spack/repos/builtin/packages/libtiff/package.py
+++ b/var/spack/repos/builtin/packages/libtiff/package.py
@@ -25,19 +25,14 @@
from spack import *
-class Libtiff(Package):
+class Libtiff(AutotoolsPackage):
"""libtiff graphics format library"""
- homepage = "http://www.remotesensing.org/libtiff/"
- url = "http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz"
+ homepage = "http://www.simplesystems.org/libtiff/"
+ url = "ftp://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz"
+ version('4.0.6', 'd1d2e940dea0b5ad435f21f03d96dd72')
version('4.0.3', '051c1068e6a0627f461948c365290410')
depends_on('jpeg')
depends_on('zlib')
depends_on('xz')
-
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
-
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/libuuid/package.py b/var/spack/repos/builtin/packages/libuuid/package.py
index 553f0dddb8..b8f6b1cc3a 100644
--- a/var/spack/repos/builtin/packages/libuuid/package.py
+++ b/var/spack/repos/builtin/packages/libuuid/package.py
@@ -27,7 +27,7 @@ from spack import *
class Libuuid(Package):
"""Portable uuid C library"""
- # FIXME: add a proper url for your package's homepage here.
+
homepage = "http://sourceforge.net/projects/libuuid/"
url = "http://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibuuid%2F&ts=1433881396&use_mirror=iweb"
@@ -36,6 +36,5 @@ class Libuuid(Package):
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
- # FIXME: Add logic to build and install here
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/libwebsockets/package.py b/var/spack/repos/builtin/packages/libwebsockets/package.py
new file mode 100644
index 0000000000..904ad887ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libwebsockets/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# 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 Libwebsockets(CMakePackage):
+ """C library for lightweight websocket clients and servers."""
+
+ homepage = "https://github.com/warmcat/libwebsockets"
+ url = "https://github.com/warmcat/libwebsockets/archive/v2.1.0.tar.gz"
+
+ version('2.1.0', '4df3be57dee43aeebd54a3ed56568f50')
+ version('2.0.3', 'a025156d606d90579e65d53ccd062a94')
+ version('1.7.9', '7b3692ead5ae00fd0e1d56c080170f07')
+
+ depends_on('cmake', type='build')
+ depends_on('zlib')
+ depends_on('openssl')
diff --git a/var/spack/repos/builtin/packages/libwindowswm/package.py b/var/spack/repos/builtin/packages/libwindowswm/package.py
new file mode 100644
index 0000000000..3836e0d419
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libwindowswm/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 Libwindowswm(Package):
+ """WindowsWM - Cygwin/X rootless window management extension.
+
+ WindowsWM is a simple library designed to interface with the
+ Windows-WM extension. This extension allows X window managers to
+ better interact with the Cygwin XWin server when running X11 in a
+ rootless mode."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libWindowsWM"
+ url = "https://www.x.org/archive/individual/lib/libWindowsWM-1.0.1.tar.gz"
+
+ version('1.0.1', 'f260e124706ff6209c566689528667c6')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('windowswmproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libx11/package.py b/var/spack/repos/builtin/packages/libx11/package.py
new file mode 100644
index 0000000000..c5df2e0f83
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libx11/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Libx11(Package):
+ """libX11 - Core X11 protocol client library."""
+
+ homepage = "https://www.x.org/"
+ url = "https://www.x.org/archive/individual/lib/libX11-1.6.3.tar.gz"
+
+ version('1.6.3', '7d16653fe7c36209799175bb3dc1ae46')
+
+ depends_on('libxcb@1.1.92:')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('xtrans', type='build')
+ depends_on('kbproto', type='build')
+ depends_on('inputproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py
index b9215bc601..eb1f1326c6 100644
--- a/var/spack/repos/builtin/packages/libxau/package.py
+++ b/var/spack/repos/builtin/packages/libxau/package.py
@@ -27,18 +27,21 @@ from spack import *
class Libxau(Package):
"""The libXau package contains a library implementing the X11
- Authorization Protocol. This is useful for restricting client
- access to the display."""
- homepage = "http://xcb.freedesktop.org/"
- url = "http://ftp.x.org/pub/individual/lib/libXau-1.0.8.tar.bz2"
+ Authorization Protocol. This is useful for restricting client
+ access to the display."""
- version('1.0.8', '685f8abbffa6d145c0f930f00703b21b')
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libXau/"
+ url = "https://www.x.org/archive/individual/lib/libXau-1.0.8.tar.gz"
- depends_on('xproto')
- depends_on('pkg-config', type='build')
+ version('1.0.8', 'a85cd601d82bc79c0daa280917572e20')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
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/libxaw/package.py b/var/spack/repos/builtin/packages/libxaw/package.py
new file mode 100644
index 0000000000..9f92ff57d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxaw/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Libxaw(Package):
+ """Xaw is the X Athena Widget Set.
+ Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXaw"
+ url = "https://www.x.org/archive/individual/lib/libXaw-1.0.13.tar.gz"
+
+ version('1.0.13', '6c522476024df5872cddc5f1562fb656')
+
+ depends_on('libx11')
+ depends_on('libxext')
+ depends_on('libxt')
+ depends_on('libxmu')
+ depends_on('libxpm')
+
+ depends_on('xproto', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxaw3d/package.py b/var/spack/repos/builtin/packages/libxaw3d/package.py
new file mode 100644
index 0000000000..498f57cbca
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxaw3d/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Libxaw3d(Package):
+ """Xaw3d is the X 3D Athena Widget Set.
+ Xaw3d is a widget set based on the X Toolkit Intrinsics (Xt) Library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXaw3d"
+ url = "https://www.x.org/archive/individual/lib/libXaw3d-1.6.2.tar.gz"
+
+ version('1.6.2', 'e51e00b734853e555ae9b367d213de45')
+
+ depends_on('libx11')
+ depends_on('libxt')
+ depends_on('libxmu')
+ depends_on('libxext')
+ depends_on('libxpm')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py
index 9ea4d1c326..d773395e6c 100644
--- a/var/spack/repos/builtin/packages/libxc/package.py
+++ b/var/spack/repos/builtin/packages/libxc/package.py
@@ -32,11 +32,28 @@ class Libxc(Package):
homepage = "http://www.tddft.org/programs/octopus/wiki/index.php/Libxc"
url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz"
+ version('3.0.0', '8227fa3053f8fc215bd9d7b0d36de03c')
version('2.2.2', 'd9f90a0d6e36df6c1312b6422280f2ec')
+ version('2.2.1', '38dc3a067524baf4f8521d5bb1cd0b8f')
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix,
+ # Optimizations for the Intel compiler, suggested by CP2K
+ optflags = '-O2'
+ if self.compiler.name == 'intel':
+ optflags += ' -xAVX -axCORE-AVX2 -ipo'
+ if which('xiar'):
+ env['AR'] = 'xiar'
+
+ env['CFLAGS'] = optflags
+ env['FCFLAGS'] = optflags
+
+ configure('--prefix={0}'.format(prefix),
'--enable-shared')
make()
- make("install")
+
+ # libxc provides a testsuite, but many tests fail
+ # http://www.tddft.org/pipermail/libxc/2013-February/000032.html
+ # make('check')
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py
index 82ddb2742e..9fa1c6f97c 100644
--- a/var/spack/repos/builtin/packages/libxcb/package.py
+++ b/var/spack/repos/builtin/packages/libxcb/package.py
@@ -31,17 +31,21 @@ class Libxcb(Package):
access to the protocol, improved threading support, and
extensibility."""
- homepage = "http://xcb.freedesktop.org/"
- url = "http://xcb.freedesktop.org/dist/libxcb-1.11.tar.gz"
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/libxcb-1.11.tar.gz"
+ version('1.12', '95eee7c28798e16ba5443f188b27a476')
version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb')
version('1.11.1', '118623c15a96b08622603a71d8789bf3')
- depends_on("python", type='build')
- depends_on("xcb-proto")
- depends_on("pkg-config", type='build')
- depends_on("libpthread-stubs")
- depends_on('libxau')
+ depends_on('libpthread-stubs')
+ depends_on('libxau@0.99.2:')
+ depends_on('libxdmcp')
+
+ depends_on('xcb-proto', type='build')
+ depends_on('python@2:2.8', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
def patch(self):
filter_file(
@@ -50,9 +54,8 @@ class Libxcb(Package):
'src/xcb.h')
def install(self, spec, prefix):
- env['PKG_CONFIG_PATH'] = env[
- 'PKG_CONFIG_PATH'] + ':/usr/lib64/pkgconfig'
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
make()
- make("install")
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxcomposite/package.py b/var/spack/repos/builtin/packages/libxcomposite/package.py
new file mode 100644
index 0000000000..48cba00250
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxcomposite/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Libxcomposite(Package):
+ """libXcomposite - client library for the Composite extension to the
+ X11 protocol."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXcomposite"
+ url = "https://www.x.org/archive/individual/lib/libXcomposite-0.4.4.tar.gz"
+
+ version('0.4.4', 'af860b1554a423735d831e6f29ac1ef5')
+
+ depends_on('libx11')
+ depends_on('libxfixes')
+
+ depends_on('compositeproto@0.4:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxcursor/package.py b/var/spack/repos/builtin/packages/libxcursor/package.py
new file mode 100644
index 0000000000..215452ef52
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxcursor/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Libxcursor(Package):
+ """libXcursor - X Window System Cursor management library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXcursor"
+ url = "https://www.x.org/archive/individual/lib/libXcursor-1.1.14.tar.gz"
+
+ version('1.1.14', '39c8423de190d64f1c52fbc00022e52c')
+
+ depends_on('libxrender@0.8.2:')
+ depends_on('libxfixes')
+ depends_on('libx11')
+
+ depends_on('fixesproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxdamage/package.py b/var/spack/repos/builtin/packages/libxdamage/package.py
new file mode 100644
index 0000000000..448ac21945
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxdamage/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxdamage(Package):
+ """This package contains the library for the X Damage extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXdamage"
+ url = "https://www.x.org/archive/individual/lib/libXdamage-1.1.4.tar.gz"
+
+ version('1.1.4', '95867778da012623815214769007c0d7')
+
+ depends_on('libxfixes')
+ depends_on('libx11')
+
+ depends_on('damageproto@1.1:', type='build')
+ depends_on('fixesproto', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxdmcp/package.py b/var/spack/repos/builtin/packages/libxdmcp/package.py
new file mode 100644
index 0000000000..c05d4b8771
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxdmcp/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Libxdmcp(Package):
+ """libXdmcp - X Display Manager Control Protocol library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXdmcp"
+ url = "https://www.x.org/archive/individual/lib/libXdmcp-1.1.2.tar.gz"
+
+ version('1.1.2', 'ab0d6a38f0344a05d698ec7d48cfa5a8')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxevie/package.py b/var/spack/repos/builtin/packages/libxevie/package.py
new file mode 100644
index 0000000000..b9f0e41631
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxevie/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxevie(Package):
+ """Xevie - X Event Interception Extension (XEvIE)."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXevie"
+ url = "https://www.x.org/archive/individual/lib/libXevie-1.0.3.tar.gz"
+
+ version('1.0.3', '100e6485cabfe6e788e09c110ca680d8')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xproto', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('evieext', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxext/package.py b/var/spack/repos/builtin/packages/libxext/package.py
new file mode 100644
index 0000000000..192ab3957a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxext/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Libxext(Package):
+ """libXext - library for common extensions to the X11 protocol."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXext"
+ url = "https://www.x.org/archive/individual/lib/libXext-1.3.3.tar.gz"
+
+ version('1.3.3', '93f5ec084c998efbfb0befed22f9b57f')
+
+ depends_on('libx11@1.6:')
+
+ depends_on('xproto@7.0.13:', type='build')
+ depends_on('xextproto@7.1.99:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxfixes/package.py b/var/spack/repos/builtin/packages/libxfixes/package.py
new file mode 100644
index 0000000000..6b8b599a85
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxfixes/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxfixes(Package):
+ """This package contains header files and documentation for the XFIXES
+ extension. Library and server implementations are separate."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXfixes"
+ url = "https://www.x.org/archive/individual/lib/libXfixes-5.0.2.tar.gz"
+
+ version('5.0.2', '3636e59f8f5fa2e469d556d49f30e98d')
+
+ depends_on('libx11@1.6:')
+
+ depends_on('xproto', type='build')
+ depends_on('fixesproto@5.0:', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxfont/package.py b/var/spack/repos/builtin/packages/libxfont/package.py
new file mode 100644
index 0000000000..1ebf321c9f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxfont/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 Libxfont(Package):
+ """libXfont provides the core of the legacy X11 font system, handling the
+ index files (fonts.dir, fonts.alias, fonts.scale), the various font file
+ formats, and rasterizing them. It is used by the X servers, the
+ X Font Server (xfs), and some font utilities (bdftopcf for instance),
+ but should not be used by normal X11 clients. X11 clients access fonts
+ via either the new API's in libXft, or the legacy API's in libX11."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXfont"
+ url = "https://www.x.org/archive/individual/lib/libXfont-1.5.2.tar.gz"
+
+ version('1.5.2', 'e8c616db0e59df4614980915e79bb05e')
+
+ depends_on('libfontenc')
+ depends_on('freetype')
+
+ depends_on('xtrans', type='build')
+ depends_on('xproto', type='build')
+ depends_on('fontsproto@2.1.3:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxfont2/package.py b/var/spack/repos/builtin/packages/libxfont2/package.py
new file mode 100644
index 0000000000..8611e65ebb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxfont2/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 Libxfont2(Package):
+ """libXfont provides the core of the legacy X11 font system, handling the
+ index files (fonts.dir, fonts.alias, fonts.scale), the various font file
+ formats, and rasterizing them. It is used by the X servers, the
+ X Font Server (xfs), and some font utilities (bdftopcf for instance),
+ but should not be used by normal X11 clients. X11 clients access fonts
+ via either the new API's in libXft, or the legacy API's in libX11."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXfont"
+ url = "https://www.x.org/archive/individual/lib/libXfont2-2.0.1.tar.gz"
+
+ version('2.0.1', '6ae5ae1f9fb1213b04f14a802a1d721c')
+
+ depends_on('libfontenc')
+ depends_on('freetype')
+
+ depends_on('xtrans', type='build')
+ depends_on('xproto', type='build')
+ depends_on('fontsproto@2.1.3:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxfontcache/package.py b/var/spack/repos/builtin/packages/libxfontcache/package.py
new file mode 100644
index 0000000000..5421f093ca
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxfontcache/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Libxfontcache(Package):
+ """Xfontcache - X-TrueType font cache extension client library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXfontcache"
+ url = "https://www.x.org/archive/individual/lib/libXfontcache-1.0.5.tar.gz"
+
+ version('1.0.5', '5030fc9c7f16dbb52f92a8ba2c574f5c')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('fontcacheproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxft/package.py b/var/spack/repos/builtin/packages/libxft/package.py
new file mode 100644
index 0000000000..b1b8f853d0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxft/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Libxft(Package):
+ """X FreeType library.
+
+ Xft version 2.1 was the first stand alone release of Xft, a library that
+ connects X applications with the FreeType font rasterization library. Xft
+ uses fontconfig to locate fonts so it has no configuration files."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXft"
+ url = "https://www.x.org/archive/individual/lib/libXft-2.3.2.tar.gz"
+
+ version('2.3.2', '3a2c1ce2641817dace55cd2bfe10b0f0')
+
+ depends_on('freetype@2.1.6:')
+ depends_on('fontconfig@2.5.92:')
+ depends_on('libx11')
+ depends_on('libxrender@0.8.2:')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxi/package.py b/var/spack/repos/builtin/packages/libxi/package.py
new file mode 100644
index 0000000000..4e9a273579
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxi/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Libxi(Package):
+ """libXi - library for the X Input Extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXi"
+ url = "https://www.x.org/archive/individual/lib/libXi-1.7.6.tar.gz"
+
+ version('1.7.6', 'f3828f9d7893068f6f6f10fe15b31afa')
+
+ depends_on('libx11@1.6:')
+ depends_on('libxext@1.0.99.1:')
+ depends_on('libxfixes@5:')
+
+ depends_on('xproto@7.0.13:', type='build')
+ depends_on('xextproto@7.0.3:', type='build')
+ depends_on('inputproto@2.2.99.1:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxinerama/package.py b/var/spack/repos/builtin/packages/libxinerama/package.py
new file mode 100644
index 0000000000..a001c41ca7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxinerama/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Libxinerama(Package):
+ """libXinerama - API for Xinerama extension to X11 Protocol."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXinerama"
+ url = "https://www.x.org/archive/individual/lib/libXinerama-1.1.3.tar.gz"
+
+ version('1.1.3', '7224a1baa9733a54053550a3fb4be118')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('xineramaproto@1.1.99.1:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxkbfile/package.py b/var/spack/repos/builtin/packages/libxkbfile/package.py
new file mode 100644
index 0000000000..af8029a024
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxkbfile/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Libxkbfile(Package):
+ """XKB file handling routines."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libxkbfile"
+ url = "https://www.x.org/archive/individual/lib/libxkbfile-1.0.9.tar.gz"
+
+ version('1.0.9', '5aab87eba67f37dd910a19be5c1129ee')
+
+ depends_on('libx11')
+
+ depends_on('kbproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxkbui/package.py b/var/spack/repos/builtin/packages/libxkbui/package.py
new file mode 100644
index 0000000000..d0c132d970
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxkbui/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Libxkbui(Package):
+ """X.org libxkbui library."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libxkbui/"
+ url = "https://www.x.org/archive/individual/lib/libxkbui-1.0.2.tar.gz"
+
+ version('1.0.2', 'a6210171defde64d9e8bcf6a6f6074b0')
+
+ depends_on('libx11')
+ depends_on('libxt')
+ depends_on('libxkbfile')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py
index 0f4810fa8a..0b55fe4d30 100644
--- a/var/spack/repos/builtin/packages/libxml2/package.py
+++ b/var/spack/repos/builtin/packages/libxml2/package.py
@@ -32,6 +32,7 @@ class Libxml2(Package):
homepage = "http://xmlsoft.org"
url = "http://xmlsoft.org/sources/libxml2-2.9.2.tar.gz"
+ version('2.9.4', 'ae249165c173b1ff386ee8ad676815f5')
version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788')
variant('python', default=False, description='Enable Python support')
@@ -44,13 +45,16 @@ class Libxml2(Package):
def install(self, spec, prefix):
if '+python' in spec:
- python_args = ["--with-python=%s" % spec['python'].prefix,
- "--with-python-install-dir=%s" % site_packages_dir]
+ python_args = [
+ '--with-python={0}'.format(spec['python'].prefix),
+ '--with-python-install-dir={0}'.format(site_packages_dir)
+ ]
else:
- python_args = ["--without-python"]
+ python_args = ['--without-python']
- configure("--prefix=%s" % prefix,
- *python_args)
+ configure('--prefix={0}'.format(prefix), *python_args)
make()
- make("install")
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxmu/package.py b/var/spack/repos/builtin/packages/libxmu/package.py
new file mode 100644
index 0000000000..dbba5f168d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxmu/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Libxmu(Package):
+ """This library contains miscellaneous utilities and is not part of the
+ Xlib standard. It contains routines which only use public interfaces so
+ that it may be layered on top of any proprietary implementation of Xlib
+ or Xt."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXmu"
+ url = "https://www.x.org/archive/individual/lib/libXmu-1.1.2.tar.gz"
+
+ version('1.1.2', 'd5be323b02e6851607205c8e941b4e61')
+
+ depends_on('libxt')
+ depends_on('libxext')
+ depends_on('libx11')
+
+ depends_on('xextproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxp/package.py b/var/spack/repos/builtin/packages/libxp/package.py
new file mode 100644
index 0000000000..10aaccc54f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxp/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxp(Package):
+ """libXp - X Print Client Library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXp"
+ url = "https://www.x.org/archive/individual/lib/libXp-1.0.3.tar.gz"
+
+ version('1.0.3', '1157da663b28e110f440ce64cede6e18')
+
+ depends_on('libx11@1.6:')
+ depends_on('libxext')
+ depends_on('libxau')
+
+ depends_on('xextproto', type='build')
+ depends_on('printproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py
index 10ca8158c2..b726e74b0b 100644
--- a/var/spack/repos/builtin/packages/libxpm/package.py
+++ b/var/spack/repos/builtin/packages/libxpm/package.py
@@ -26,9 +26,9 @@ from spack import *
class Libxpm(Package):
- """Xpm file format library"""
+ """libXpm - X Pixmap (XPM) image file format library."""
- homepage = "https://www.x.org/"
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXpm"
url = "https://www.x.org/archive//individual/lib/libXpm-3.5.11.tar.gz"
version('3.5.11', '7c67c878ee048206b070bc0b24154f04')
@@ -37,8 +37,14 @@ class Libxpm(Package):
version('3.5.8', '2d81d6633e67ac5562e2fbee126b2897')
version('3.5.7', '7bbc8f112f7143ed6961a58ce4e14558')
+ depends_on('libx11')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ configure('--prefix={0}'.format(prefix))
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxpresent/package.py b/var/spack/repos/builtin/packages/libxpresent/package.py
new file mode 100644
index 0000000000..e65d4353a0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxpresent/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxpresent(Package):
+ """This package contains header files and documentation for the Present
+ extension. Library and server implementations are separate."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libXpresent/"
+ url = "https://www.x.org/archive/individual/lib/libXpresent-1.0.0.tar.gz"
+
+ version('1.0.0', '2f543a595c3e6a519e2e38d079002958')
+
+ depends_on('libx11')
+
+ depends_on('xproto', type='build')
+ depends_on('presentproto@1.0:', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxprintapputil/package.py b/var/spack/repos/builtin/packages/libxprintapputil/package.py
new file mode 100644
index 0000000000..fc66b76ac0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxprintapputil/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxprintapputil(Package):
+ """Xprint application utility routines."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libXprintAppUtil/"
+ url = "https://www.x.org/archive/individual/lib/libXprintAppUtil-1.0.1.tar.gz"
+
+ version('1.0.1', '3adb71fa34a2d4e75d8b840310318f76')
+
+ depends_on('libx11')
+ depends_on('libxp')
+ depends_on('libxprintutil')
+ depends_on('libxau')
+
+ depends_on('printproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxprintutil/package.py b/var/spack/repos/builtin/packages/libxprintutil/package.py
new file mode 100644
index 0000000000..8eb768958f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxprintutil/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxprintutil(Package):
+ """Xprint application utility routines."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libXprintUtil/"
+ url = "https://www.x.org/archive/individual/lib/libXprintUtil-1.0.1.tar.gz"
+
+ version('1.0.1', '2f02e812f3e419534ced6fcb5860825f')
+
+ depends_on('libx11')
+ depends_on('libxp')
+ depends_on('libxt')
+ depends_on('libxau')
+
+ depends_on('printproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxrandr/package.py b/var/spack/repos/builtin/packages/libxrandr/package.py
new file mode 100644
index 0000000000..56c36c0c7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxrandr/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Libxrandr(Package):
+ """libXrandr - X Resize, Rotate and Reflection extension library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXrandr"
+ url = "https://www.x.org/archive/individual/lib/libXrandr-1.5.0.tar.gz"
+
+ version('1.5.0', 'e2fafff575b94ba0b15983eb4df93656')
+
+ depends_on('libx11@1.6:')
+ depends_on('libxext')
+ depends_on('libxrender')
+
+ depends_on('randrproto@1.5:', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('renderproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxrender/package.py b/var/spack/repos/builtin/packages/libxrender/package.py
new file mode 100644
index 0000000000..c5a6dac1be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxrender/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Libxrender(Package):
+ """libXrender - library for the Render Extension to the X11 protocol."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXrender"
+ url = "https://www.x.org/archive/individual/lib/libXrender-0.9.9.tar.gz"
+
+ version('0.9.9', '0c797c4f2a7b782896bc223e6dac4333')
+
+ depends_on('libx11@1.6:')
+
+ depends_on('renderproto@0.9:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxres/package.py b/var/spack/repos/builtin/packages/libxres/package.py
new file mode 100644
index 0000000000..6d0684c4b8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxres/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Libxres(Package):
+ """libXRes - X-Resource extension client library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXRes"
+ url = "https://www.x.org/archive/individual/lib/libXres-1.0.7.tar.gz"
+
+ version('1.0.7', '7fad9ab34201bb4adffcbf0cd7e87a89')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('resourceproto@1.0:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxscrnsaver/package.py b/var/spack/repos/builtin/packages/libxscrnsaver/package.py
new file mode 100644
index 0000000000..c9ca6ac1c8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxscrnsaver/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Libxscrnsaver(Package):
+ """XScreenSaver - X11 Screen Saver extension client library"""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXScrnSaver"
+ url = "https://www.x.org/archive/individual/lib/libXScrnSaver-1.2.2.tar.gz"
+
+ version('1.2.2', '79227e7d8c0dad27654c526de3d6fef3')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('scrnsaverproto@1.2:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py
index fe5d5667e9..d4f4c85203 100644
--- a/var/spack/repos/builtin/packages/libxshmfence/package.py
+++ b/var/spack/repos/builtin/packages/libxshmfence/package.py
@@ -26,16 +26,24 @@ from spack import *
class Libxshmfence(Package):
- """This is a tiny library that exposes a event API on top of Linux
- futexes."""
+ """libxshmfence - Shared memory 'SyncFence' synchronization primitive.
- homepage = "http://keithp.com/blogs/dri3_extension/" # not really...
+ This library offers a CPU-based synchronization primitive compatible
+ with the X SyncFence objects that can be shared between processes
+ using file descriptor passing."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libxshmfence/"
url = "http://xorg.freedesktop.org/archive/individual/lib/libxshmfence-1.2.tar.gz"
version('1.2', 'f0b30c0fc568b22ec524859ee28556f1')
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
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/libxstream/package.py b/var/spack/repos/builtin/packages/libxstream/package.py
new file mode 100644
index 0000000000..3201b58620
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxstream/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Libxstream(Package):
+ '''LIBXSTREAM is a library to work with streams, events, and code regions
+ that are able to run asynchronous while preserving the usual stream
+ conditions.'''
+
+ homepage = 'https://github.com/hfp/libxstream'
+ url = 'https://github.com/hfp/libxstream.git'
+
+ version('0.9.0', git='https://github.com/hfp/libxstream.git')
+
+ def patch(self):
+ kwargs = {'ignore_absent': False, 'backup': True, 'string': True}
+ makefile = FileFilter('Makefile.inc')
+
+ makefile.filter('CC =', 'CC ?=', **kwargs)
+ makefile.filter('CXX =', 'CXX ?=', **kwargs)
+ makefile.filter('FC =', 'FC ?=', **kwargs)
+
+ def install(self, spec, prefix):
+ make()
+ install_tree('lib', prefix.lib)
+ install_tree('include', prefix.include)
+ install_tree('documentation', prefix.share + '/libxstream/doc/')
diff --git a/var/spack/repos/builtin/packages/libxt/package.py b/var/spack/repos/builtin/packages/libxt/package.py
new file mode 100644
index 0000000000..c657c866b4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxt/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxt(Package):
+ """libXt - X Toolkit Intrinsics library."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXt"
+ url = "https://www.x.org/archive/individual/lib/libXt-1.1.5.tar.gz"
+
+ version('1.1.5', '77d317fbc508dd6adefb59d57a663032')
+
+ depends_on('libsm')
+ depends_on('libice')
+ depends_on('libx11')
+
+ depends_on('xproto', type='build')
+ depends_on('kbproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxtrap/package.py b/var/spack/repos/builtin/packages/libxtrap/package.py
new file mode 100644
index 0000000000..4589f98a87
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxtrap/package.py
@@ -0,0 +1,58 @@
+##############################################################################
+# 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 Libxtrap(Package):
+ """libXTrap is the Xlib-based client API for the DEC-XTRAP extension.
+
+ XTrap was a proposed standard extension for X11R5 which facilitated the
+ capturing of server protocol and synthesizing core input events.
+
+ Digital participated in the X Consortium's xtest working group which chose
+ to evolve XTrap functionality into the XTEST & RECORD extensions for X11R6.
+
+ As X11R6 was released in 1994, XTrap has now been deprecated for over
+ 15 years, and uses of it should be quite rare."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXTrap"
+ url = "https://www.x.org/archive/individual/lib/libXTrap-1.0.1.tar.gz"
+
+ version('1.0.1', 'fde266b82ee14da3e4f4f81c9584c1ea')
+
+ depends_on('libx11')
+ depends_on('libxt')
+ depends_on('libxext')
+
+ depends_on('trapproto', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxtst/package.py b/var/spack/repos/builtin/packages/libxtst/package.py
new file mode 100644
index 0000000000..0d16643f94
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxtst/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# 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 Libxtst(Package):
+ """libXtst provides the Xlib-based client API for the XTEST & RECORD
+ extensions.
+
+ The XTEST extension is a minimal set of client and server extensions
+ required to completely test the X11 server with no user intervention.
+ This extension is not intended to support general journaling and
+ playback of user actions.
+
+ The RECORD extension supports the recording and reporting of all
+ core X protocol and arbitrary X extension protocol."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXtst"
+ url = "https://www.x.org/archive/individual/lib/libXtst-1.2.2.tar.gz"
+
+ version('1.2.2', 'efef3b1e44bd8074a601c0c5ce0788f4')
+
+ depends_on('libx11')
+ depends_on('libxext@1.0.99.4:')
+ depends_on('libxi')
+
+ depends_on('recordproto@1.13.99.1:', type='build')
+ depends_on('xextproto@7.0.99.3:', type='build')
+ depends_on('inputproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxv/package.py b/var/spack/repos/builtin/packages/libxv/package.py
new file mode 100644
index 0000000000..03f10a1842
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxv/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxv(Package):
+ """libXv - library for the X Video (Xv) extension to the
+ X Window System."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXv"
+ url = "https://www.x.org/archive/individual/lib/libXv-1.0.10.tar.gz"
+
+ version('1.0.10', 'e7182673b4bbe3ca00ac932e22edc038')
+
+ depends_on('libx11@1.6:')
+ depends_on('libxext')
+
+ depends_on('xextproto', type='build')
+ depends_on('videoproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxvmc/package.py b/var/spack/repos/builtin/packages/libxvmc/package.py
new file mode 100644
index 0000000000..9d5695c2c1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxvmc/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxvmc(Package):
+ """X.org libXvMC library."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/lib/libXvMC"
+ url = "https://www.x.org/archive/individual/lib/libXvMC-1.0.9.tar.gz"
+
+ version('1.0.9', 'a28c0780373537f4774565309b31a69e')
+
+ depends_on('libx11@1.6:')
+ depends_on('libxext')
+ depends_on('libxv')
+
+ depends_on('xextproto', type='build')
+ depends_on('videoproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxxf86dga/package.py b/var/spack/repos/builtin/packages/libxxf86dga/package.py
new file mode 100644
index 0000000000..292c5d213b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxxf86dga/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxxf86dga(Package):
+ """libXxf86dga - Client library for the XFree86-DGA extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXxf86dga"
+ url = "https://www.x.org/archive/individual/lib/libXxf86dga-1.1.4.tar.gz"
+
+ version('1.1.4', '8ed1c8674e730e8d333dfe4b9f2097d9')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xproto', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('xf86dgaproto@2.0.99.2:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxxf86misc/package.py b/var/spack/repos/builtin/packages/libxxf86misc/package.py
new file mode 100644
index 0000000000..0247f8b57c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxxf86misc/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxxf86misc(Package):
+ """libXxf86misc - Extension library for the XFree86-Misc X extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXxf86misc"
+ url = "https://www.x.org/archive/individual/lib/libXxf86misc-1.0.3.tar.gz"
+
+ version('1.0.3', 'c8d8743e146bcd2aa9856117ac5ef6c0')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('xproto', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('xf86miscproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/libxxf86vm/package.py b/var/spack/repos/builtin/packages/libxxf86vm/package.py
new file mode 100644
index 0000000000..feec5ff3d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxxf86vm/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libxxf86vm(Package):
+ """libXxf86vm - Extension library for the XFree86-VidMode X extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libXxf86vm"
+ url = "https://www.x.org/archive/individual/lib/libXxf86vm-1.1.4.tar.gz"
+
+ version('1.1.4', '675bd0c521472628d5796602f625ef51')
+
+ depends_on('libx11@1.6:')
+ depends_on('libxext')
+
+ depends_on('xproto', type='build')
+ depends_on('xextproto', type='build')
+ depends_on('xf86vidmodeproto@2.2.99.1:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/listres/package.py b/var/spack/repos/builtin/packages/listres/package.py
new file mode 100644
index 0000000000..c6b3d149f6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/listres/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Listres(Package):
+ """The listres program generates a list of X resources for a widget
+ in an X client written using a toolkit based on libXt."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/listres"
+ url = "https://www.x.org/archive/individual/app/listres-1.0.3.tar.gz"
+
+ version('1.0.3', '77cafc32e8e02cca2d4453e73e0c0e7d')
+
+ depends_on('libxaw')
+ depends_on('libxt')
+ depends_on('libxmu')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 61ea8daac4..06572ea312 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -22,9 +22,10 @@
# 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
+from spack import *
+
class Llvm(Package):
"""The LLVM Project is a collection of modular and reusable compiler and
@@ -32,11 +33,13 @@ class Llvm(Package):
with traditional virtual machines, though it does provide helpful
libraries that can be used to build them. The name "LLVM" itself
is not an acronym; it is the full name of the project.
-
"""
+
homepage = 'http://llvm.org/'
url = 'http://llvm.org/releases/3.7.1/llvm-3.7.1.src.tar.xz'
+ family = 'compiler' # Used by lmod
+
# currently required by mesa package
version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005',
url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz')
@@ -111,7 +114,7 @@ class Llvm(Package):
'destination': 'projects',
'placement': 'libcxxabi',
},
- 'clang': {
+ 'cfe': {
'url': base_url % {'pkg': 'cfe'},
'destination': 'tools',
'placement': 'clang',
@@ -141,63 +144,93 @@ class Llvm(Package):
{
'version': 'trunk',
'repo': 'http://llvm.org/svn/llvm-project/llvm/trunk',
- 'resources': {
- 'compiler-rt': 'http://llvm.org/svn/llvm-project/compiler-rt/trunk',
- 'openmp': 'http://llvm.org/svn/llvm-project/openmp/trunk',
- 'polly': 'http://llvm.org/svn/llvm-project/polly/trunk',
- 'libcxx': 'http://llvm.org/svn/llvm-project/libcxx/trunk',
- 'libcxxabi': 'http://llvm.org/svn/llvm-project/libcxxabi/trunk',
- 'clang': 'http://llvm.org/svn/llvm-project/cfe/trunk',
- 'clang-tools-extra': 'http://llvm.org/svn/llvm-project/clang-tools-extra/trunk',
- 'lldb': 'http://llvm.org/svn/llvm-project/lldb/trunk',
- 'llvm-libunwind': 'http://llvm.org/svn/llvm-project/libunwind/trunk',
- }
- },
- {
- 'version': '3.8.0',
- 'md5': '07a7a74f3c6bd65de4702bf941b511a0',
- 'resources': {
- 'compiler-rt': 'd6fcbe14352ffb708e4d1ac2e48bb025',
- 'openmp': '8fd7cc35d48051613cf1e750e9f22e40',
- 'polly': '1b3b20f52d34a4024e21a4ea7112caa7',
- 'libcxx': 'd6e0bdbbee39f7907ad74fd56d03b88a',
- 'libcxxabi': 'bbe6b4d72c7c5978550d370af529bcf7',
- 'clang': 'cc99e7019bb74e6459e80863606250c5',
- 'clang-tools-extra': 'c2344f50e0eea0b402f0092a80ddc036',
- 'lldb': 'a5da35ed9cc8c8817ee854e3dbfba00e',
- 'llvm-libunwind': '162ade468607f153cca12be90b5194fa',
- }
- },
- {
- 'version': '3.7.1',
- 'md5': 'bf8b3a2c79e61212c5409041dfdbd319',
- 'resources': {
- 'compiler-rt': '1c6975daf30bb3b0473b53c3a1a6ff01',
- 'openmp': 'b4ad08cda4e5c22e42b66062b140438e',
- 'polly': '3a2a7367002740881637f4d47bca4dc3',
- 'libcxx': 'f9c43fa552a10e14ff53b94d04bea140',
- 'libcxxabi': '52d925afac9f97e9dcac90745255c169',
- 'clang': '0acd026b5529164197563d135a8fd83e',
- 'clang-tools-extra': '5d49ff745037f061a7c86aeb6a24c3d2',
- 'lldb': 'a106d8a0d21fc84d76953822fbaf3398',
- 'llvm-libunwind': '814bd52c9247c5d04629658fbcb3ab8c',
- }
- },
- {
- 'version': '3.7.0',
- 'md5': 'b98b9495e5655a672d6cb83e1a180f8e',
'resources': {
- 'compiler-rt': '383c10affd513026f08936b5525523f5',
- 'openmp': 'f482c86fdead50ba246a1a2b0bbf206f',
- 'polly': '32f93ffc9cc7e042df22089761558f8b',
- 'libcxx': '46aa5175cbe1ad42d6e9c995968e56dd',
- 'libcxxabi': '5aa769e2fca79fa5335cfae8f6258772',
- 'clang': '8f9d27335e7331cf0a4711e952f21f01',
- 'clang-tools-extra': 'd5a87dacb65d981a427a536f6964642e',
- 'lldb': 'e5931740400d1dc3e7db4c7ba2ceff68',
- 'llvm-libunwind': '9a75392eb7eb8ed5c0840007e212baf5',
- }
- },
+ 'compiler-rt': 'http://llvm.org/svn/llvm-project/compiler-rt/trunk',
+ 'openmp': 'http://llvm.org/svn/llvm-project/openmp/trunk',
+ 'polly': 'http://llvm.org/svn/llvm-project/polly/trunk',
+ 'libcxx': 'http://llvm.org/svn/llvm-project/libcxx/trunk',
+ 'libcxxabi': 'http://llvm.org/svn/llvm-project/libcxxabi/trunk',
+ 'cfe': 'http://llvm.org/svn/llvm-project/cfe/trunk',
+ 'clang-tools-extra': 'http://llvm.org/svn/llvm-project/clang-tools-extra/trunk',
+ 'lldb': 'http://llvm.org/svn/llvm-project/lldb/trunk',
+ 'llvm-libunwind': 'http://llvm.org/svn/llvm-project/libunwind/trunk',
+ }
+ },
+ {
+ 'version': '3.9.0',
+ 'md5': 'f2093e98060532449eb7d2fcfd0bc6c6',
+ 'resources': {
+ 'compiler-rt': 'b7ea34c9d744da16ffc0217b6990d095',
+ 'openmp': '5390164f2374e1444e82393541ecf6c7',
+ 'polly': '1cf328cbae25267749b68cfa6f113674',
+ 'libcxx': '0a11efefd864ce6f321194e441f7e569',
+ 'libcxxabi': 'd02642308e22e614af6b061b9b4fedfa',
+ 'cfe': '29e1d86bee422ab5345f5e9fb808d2dc',
+ 'clang-tools-extra': 'f4f663068c77fc742113211841e94d5e',
+ 'lldb': '968d053c3c3d7297983589164c6999e9',
+ 'llvm-libunwind': '3e5c87c723a456be599727a444b1c166',
+ }
+ },
+ {
+ 'version': '3.8.1',
+ 'md5': '538467e6028bbc9259b1e6e015d25845',
+ 'resources': {
+ 'compiler-rt': 'f140db073d2453f854fbe01cc46f3110',
+ 'openmp': '078b8d4c51ad437a4f8b5989f5ec4156',
+ 'polly': '8a40e697a4ba1c8b640b85d074bd6e25',
+ 'libcxx': '1bc60150302ff76a0d79d6f9db22332e',
+ 'libcxxabi': '3c63b03ba2f30a01279ca63384a67773',
+ 'cfe': '4ff2f8844a786edb0220f490f7896080',
+ 'clang-tools-extra': '6e49f285d0b366cc3cab782d8c92d382',
+ 'lldb': '9e4787b71be8e432fffd31e13ac87623',
+ 'llvm-libunwind': 'd66e2387e1d37a8a0c8fe6a0063a3bab',
+ }
+ },
+ {
+ 'version': '3.8.0',
+ 'md5': '07a7a74f3c6bd65de4702bf941b511a0',
+ 'resources': {
+ 'compiler-rt': 'd6fcbe14352ffb708e4d1ac2e48bb025',
+ 'openmp': '8fd7cc35d48051613cf1e750e9f22e40',
+ 'polly': '1b3b20f52d34a4024e21a4ea7112caa7',
+ 'libcxx': 'd6e0bdbbee39f7907ad74fd56d03b88a',
+ 'libcxxabi': 'bbe6b4d72c7c5978550d370af529bcf7',
+ 'cfe': 'cc99e7019bb74e6459e80863606250c5',
+ 'clang-tools-extra': 'c2344f50e0eea0b402f0092a80ddc036',
+ 'lldb': 'a5da35ed9cc8c8817ee854e3dbfba00e',
+ 'llvm-libunwind': '162ade468607f153cca12be90b5194fa',
+ }
+ },
+ {
+ 'version': '3.7.1',
+ 'md5': 'bf8b3a2c79e61212c5409041dfdbd319',
+ 'resources': {
+ 'compiler-rt': '1c6975daf30bb3b0473b53c3a1a6ff01',
+ 'openmp': 'b4ad08cda4e5c22e42b66062b140438e',
+ 'polly': '3a2a7367002740881637f4d47bca4dc3',
+ 'libcxx': 'f9c43fa552a10e14ff53b94d04bea140',
+ 'libcxxabi': '52d925afac9f97e9dcac90745255c169',
+ 'cfe': '0acd026b5529164197563d135a8fd83e',
+ 'clang-tools-extra': '5d49ff745037f061a7c86aeb6a24c3d2',
+ 'lldb': 'a106d8a0d21fc84d76953822fbaf3398',
+ 'llvm-libunwind': '814bd52c9247c5d04629658fbcb3ab8c',
+ }
+ },
+ {
+ 'version': '3.7.0',
+ 'md5': 'b98b9495e5655a672d6cb83e1a180f8e',
+ 'resources': {
+ 'compiler-rt': '383c10affd513026f08936b5525523f5',
+ 'openmp': 'f482c86fdead50ba246a1a2b0bbf206f',
+ 'polly': '32f93ffc9cc7e042df22089761558f8b',
+ 'libcxx': '46aa5175cbe1ad42d6e9c995968e56dd',
+ 'libcxxabi': '5aa769e2fca79fa5335cfae8f6258772',
+ 'cfe': '8f9d27335e7331cf0a4711e952f21f01',
+ 'clang-tools-extra': 'd5a87dacb65d981a427a536f6964642e',
+ 'lldb': 'e5931740400d1dc3e7db4c7ba2ceff68',
+ 'llvm-libunwind': '9a75392eb7eb8ed5c0840007e212baf5',
+ }
+ },
{
'version': '3.6.2',
'md5': '0c1ee3597d75280dee603bae9cbf5cc2',
@@ -206,7 +239,7 @@ class Llvm(Package):
'openmp': '65dd5863b9b270960a96817e9152b123',
'libcxx': '22214c90697636ef960a49aef7c1823a',
'libcxxabi': '17518e361e4e228f193dd91e8ef54ba2',
- 'clang': 'ff862793682f714bb7862325b9c06e20',
+ 'cfe': 'ff862793682f714bb7862325b9c06e20',
'clang-tools-extra': '3ebc1dc41659fcec3db1b47d81575e06',
'lldb': '51e5eb552f777b950bb0ff326e60d5f0',
}
@@ -219,7 +252,7 @@ class Llvm(Package):
'openmp': '121ddb10167d7fc38b1f7e4b029cf059',
'libcxx': '406f09b1dab529f3f7879f4d548329d2',
'libcxxabi': 'b22c707e8d474a99865ad3c521c3d464',
- 'clang': '93f9532f8f7e6f1d8e5c1116907051cb',
+ 'cfe': '93f9532f8f7e6f1d8e5c1116907051cb',
'clang-tools-extra': 'f13f31ed3038acadc6fa63fef812a246',
'lldb': 'cc5ea8a414c62c33e760517f8929a204',
}
diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py
index 69965bc423..c2daca80a5 100644
--- a/var/spack/repos/builtin/packages/lmod/package.py
+++ b/var/spack/repos/builtin/packages/lmod/package.py
@@ -27,14 +27,14 @@ from glob import glob
class Lmod(Package):
- """
- Lmod is a Lua based module system that easily handles the MODULEPATH
+ """Lmod is a Lua based module system that easily handles the MODULEPATH
Hierarchical problem. Environment Modules provide a convenient way to
dynamically change the users' environment through modulefiles. This
includes easily adding or removing directories to the PATH environment
variable. Modulefiles for Library packages provide environment variables
that specify where the library and header files can be found.
"""
+
homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod'
url = 'https://github.com/TACC/Lmod/archive/6.4.1.tar.gz'
diff --git a/var/spack/repos/builtin/packages/lndir/package.py b/var/spack/repos/builtin/packages/lndir/package.py
new file mode 100644
index 0000000000..a7ce892502
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lndir/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 Lndir(Package):
+ """lndir - create a shadow directory of symbolic links to another
+ directory tree."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/util/lndir"
+ url = "https://www.x.org/archive/individual/util/lndir-1.0.3.tar.gz"
+
+ version('1.0.3', '7173b2e4832658d319c2980a7c834205')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/lrslib/Makefile.spack.patch b/var/spack/repos/builtin/packages/lrslib/Makefile.spack.patch
new file mode 100644
index 0000000000..d4d5e66528
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lrslib/Makefile.spack.patch
@@ -0,0 +1,60 @@
+--- old/Makefile.spack
++++ new/Makefile.spack
+@@ -0,0 +1,57 @@
++# Set PREFIX to the install location for both building and installing
++# Set BOOST_PREFIX to the location where BOOST is installed
++# Set GMP_PREFIX to the location where GMP is installed
++
++all: liblrsgmp.la \
++ 2nash fourier lrs lrs1 lrsnash redund redund1 setnash setnash2
++
++liblrsgmp.la: lrslib-GMP.lo lrsgmp-GMP.lo
++ libtool --mode=link --tag=CC cc -g -O3 \
++ -rpath $(PREFIX)/lib -o $@ $^ \
++ -L$(GMP_PREFIX)/lib -lgmp
++
++lrs1: lrs-LONG.lo lrslib-LONG.lo lrslong-LONG.lo
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++redund1: redund-LONG.lo lrslib-LONG.lo lrslong-LONG.lo
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++lrs: lrs-GMP.lo lrslib-GMP.lo lrsmp-GMP.lo liblrsgmp.la
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++redund: redund-GMP.lo lrslib-GMP.lo lrsmp-GMP.lo liblrsgmp.la
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++fourier: fourier-GMP.lo lrslib-GMP.lo lrsgmp-GMP.lo liblrsgmp.la
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++lrsnash: lrsnash-GMP.lo lrsnashlib-GMP.lo lrslib-GMP.lo lrsmp-GMP.lo \
++ liblrsgmp.la
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++2nash: 2nash.lo
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++setnash: setupnash.lo lrslib.lo lrsmp.lo
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++setnash2: setupnash2.lo lrslib.lo lrsmp.lo
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++
++%.lo: %.c
++ libtool --mode=compile --tag=CC cc -g -O3 -o $@ -c $*.c
++%-GMP.lo: %.c
++ libtool --mode=compile --tag=CC cc -g -O3 -o $@ -DGMP -c $*.c
++%-LONG.lo: %.c
++ libtool --mode=compile --tag=CC cc -g -O3 -o $@ -DLRSLONG -c $*.c
++
++install:
++ mkdir -p $(PREFIX)/bin
++ mkdir -p $(PREFIX)/include
++ mkdir -p $(PREFIX)/lib
++ libtool --mode=install cp 2nash $(PREFIX)/bin/2nash
++ libtool --mode=install cp fourier $(PREFIX)/bin/fourier
++ libtool --mode=install cp lrs $(PREFIX)/bin/lrs
++ libtool --mode=install cp lrs1 $(PREFIX)/bin/lrs1
++ libtool --mode=install cp lrsnash $(PREFIX)/bin/lrsnash
++ libtool --mode=install cp redund $(PREFIX)/bin/redund
++ libtool --mode=install cp redund1 $(PREFIX)/bin/redund1
++ libtool --mode=install cp setnash $(PREFIX)/bin/setnash
++ libtool --mode=install cp setnash2 $(PREFIX)/bin/setnash2
++ libtool --mode=install cp lrsgmp.h $(PREFIX)/include/lrsgmp.h
++ libtool --mode=install cp lrslib.h $(PREFIX)/include/lrslib.h
++ libtool --mode=install cp liblrsgmp.la $(PREFIX)/lib/liblrsgmp.la
++
++.PHONY: all install
diff --git a/var/spack/repos/builtin/packages/lrslib/package.py b/var/spack/repos/builtin/packages/lrslib/package.py
new file mode 100644
index 0000000000..3825867bb6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lrslib/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# 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 Lrslib(Package):
+ """lrslib Ver 6.2 is a self-contained ANSI C implementation of the
+ reverse search algorithm for vertex enumeration/convex hull
+ problems and comes with a choice of three arithmetic packages"""
+ homepage = "http://cgm.cs.mcgill.ca/~avis/C/lrs.html"
+ url = "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-062.tar.gz"
+
+ version('6.2', 'be5da7b3b90cc2be628dcade90c5d1b9')
+ version('6.1', '0b3687c8693cd7d1f234a3f65e147551')
+ version('6.0', 'd600a2e62969ad03f7ab2f85f1b3709c')
+ version('5.1', 'cca323eee8bf76f598a13d7bf67cc13d')
+ version('4.3', '86dd9a45d20a3a0069f77e61be5b46ad')
+
+ # Note: lrslib can also be built with Boost, and probably without gmp
+
+ # depends_on("boost")
+ depends_on("gmp")
+ depends_on("libtool", type="build")
+
+ patch("Makefile.spack.patch")
+
+ def url_for_version(self, version):
+ url = "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-0{0}.tar.gz"
+ return url.format(version.joined)
+
+ def install(self, spec, prefix):
+ # The Makefile isn't portable; use our own instead
+ makeargs = ["-f", "Makefile.spack",
+ "PREFIX=%s" % prefix,
+ # "BOOST_PREFIX=%s" % spec["boost"].prefix,
+ "GMP_PREFIX=%s" % spec["gmp"].prefix]
+ make(*makeargs)
+ make("install", *makeargs)
diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
index a61b9dd675..9e0e449813 100644
--- a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
+++ b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
@@ -26,8 +26,7 @@ from spack import *
class LuaLuafilesystem(Package):
- """
- LuaFileSystem is a Lua library developed to complement the set of
+ """LuaFileSystem is a Lua library developed to complement the set of
functions related to file systems offered by the standard Lua distribution.
LuaFileSystem offers a portable way to access the underlying directory
@@ -35,6 +34,7 @@ class LuaLuafilesystem(Package):
LuaFileSystem is free software and uses the same license as Lua 5.1
"""
+
homepage = 'http://keplerproject.github.io/luafilesystem'
url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz'
diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py
index ca0a481a83..4da2c99e04 100644
--- a/var/spack/repos/builtin/packages/lua/package.py
+++ b/var/spack/repos/builtin/packages/lua/package.py
@@ -62,16 +62,18 @@ class Lua(Package):
else:
target = 'linux'
make('INSTALL_TOP=%s' % prefix,
- 'MYLDFLAGS=-L%s -L%s ' % (
+ 'MYLDFLAGS=-L%s -L%s' % (
spec['readline'].prefix.lib,
spec['ncurses'].prefix.lib),
'MYLIBS=-lncurses',
+ 'CC=%s -std=gnu99' % spack_cc,
target)
make('INSTALL_TOP=%s' % prefix,
- 'MYLDFLAGS=-L%s -L%s ' % (
+ 'MYLDFLAGS=-L%s -L%s' % (
spec['readline'].prefix.lib,
spec['ncurses'].prefix.lib),
'MYLIBS=-lncurses',
+ 'CC=%s -std=gnu99' % spack_cc,
'install')
with working_dir(os.path.join('luarocks', 'luarocks')):
diff --git a/var/spack/repos/builtin/packages/luit/package.py b/var/spack/repos/builtin/packages/luit/package.py
new file mode 100644
index 0000000000..54fd740bdc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/luit/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Luit(Package):
+ """Luit is a filter that can be run between an arbitrary application and
+ a UTF-8 terminal emulator such as xterm. It will convert application
+ output from the locale's encoding into UTF-8, and convert terminal
+ input from UTF-8 into the locale's encoding."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/luit"
+ url = "https://www.x.org/archive/individual/app/luit-1.1.1.tar.gz"
+
+ version('1.1.1', '04128a52f68c05129f709196819ddad3')
+
+ depends_on('libfontenc')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix),
+ # see http://www.linuxquestions.org/questions/linux-from-scratch-13/can't-compile-luit-xorg-applications-4175476308/ # noqa
+ 'CFLAGS=-U_XOPEN_SOURCE -D_XOPEN_SOURCE=600')
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/lulesh/package.py b/var/spack/repos/builtin/packages/lulesh/package.py
new file mode 100644
index 0000000000..e880d4fa14
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lulesh/package.py
@@ -0,0 +1,55 @@
+##############################################################################
+# 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 Lulesh(Package):
+ """Livermore Unstructured Lagrangian Explicit Shock Hydrodynamics (LULESH)
+ """
+
+ homepage = "https://codesign.llnl.gov/lulesh.php"
+ url = "https://codesign.llnl.gov/lulesh/lulesh2.0.3.tgz"
+
+ version("2.0.3", "336644a8750f71c7c6b9d2960976e7aa")
+
+ patch("remove_defaults.patch")
+
+ variant('mpip', default=False)
+
+ depends_on("mpi", type="build")
+ depends_on("mpip", when="+mpip")
+
+ def install(self, spec, prefix):
+ if '+mpip' in spec:
+ os.environ["LDFLAGS"] = " -lmpiP -ldwarf -lelf"
+
+ if os.uname()[4] == "x86_64":
+ os.environ["LDFLAGS"] += " -lunwind"
+
+ os.environ["CXX"] = spec['mpi'].mpicxx + " -DUSE_MPI=1"
+ os.environ["PREFIX"] = prefix
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/lulesh/remove_defaults.patch b/var/spack/repos/builtin/packages/lulesh/remove_defaults.patch
new file mode 100644
index 0000000000..36cce25ba1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lulesh/remove_defaults.patch
@@ -0,0 +1,60 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,17 +1,9 @@
+ #default build suggestion of MPI + OPENMP with gcc on Livermore machines you might have to change the compiler name
+
+-SHELL = /bin/sh
+ .SUFFIXES: .cc .o
+
+ LULESH_EXEC = lulesh2.0
+
+-MPI_INC = /opt/local/include/openmpi
+-MPI_LIB = /opt/local/lib
+-
+-SERCXX = g++ -DUSE_MPI=0
+-MPICXX = mpig++ -DUSE_MPI=1
+-CXX = $(MPICXX)
+-
+ SOURCES2.0 = \
+ lulesh.cc \
+ lulesh-comm.cc \
+@@ -20,28 +12,6 @@
+ lulesh-init.cc
+ OBJECTS2.0 = $(SOURCES2.0:.cc=.o)
+
+-#Default build suggestions with OpenMP for g++
+-CXXFLAGS = -g -O3 -fopenmp -I. -Wall
+-LDFLAGS = -g -O3 -fopenmp
+-
+-#Below are reasonable default flags for a serial build
+-#CXXFLAGS = -g -O3 -I. -Wall
+-#LDFLAGS = -g -O3
+-
+-#common places you might find silo on the Livermore machines.
+-#SILO_INCDIR = /opt/local/include
+-#SILO_LIBDIR = /opt/local/lib
+-#SILO_INCDIR = ./silo/4.9/1.8.10.1/include
+-#SILO_LIBDIR = ./silo/4.9/1.8.10.1/lib
+-
+-#If you do not have silo and visit you can get them at:
+-#silo: https://wci.llnl.gov/codes/silo/downloads.html
+-#visit: https://wci.llnl.gov/codes/visit/download.html
+-
+-#below is and example of how to make with silo, hdf5 to get vizulization by default all this is turned off. All paths are Livermore specific.
+-#CXXFLAGS = -g -DVIZ_MESH -I${SILO_INCDIR} -Wall -Wno-pragmas
+-#LDFLAGS = -g -L${SILO_LIBDIR} -Wl,-rpath -Wl,${SILO_LIBDIR} -lsiloh5 -lhdf5
+-
+ .cc.o: lulesh.h
+ @echo "Building $<"
+ $(CXX) -c $(CXXFLAGS) -o $@ $<
+@@ -56,6 +26,7 @@
+ /bin/rm -f *.o *~ $(OBJECTS) $(LULESH_EXEC)
+ /bin/rm -rf *.dSYM
+
+-tar: clean
+- cd .. ; tar cvf lulesh-2.0.tar LULESH-2.0 ; mv lulesh-2.0.tar LULESH-2.0
+-
++install: lulesh2.0
++ @echo "Installing"
++ mkdir -p $(PREFIX)/bin
++ install --mode=755 lulesh2.0 $(PREFIX)/bin/
diff --git a/var/spack/repos/builtin/packages/lz4/package.py b/var/spack/repos/builtin/packages/lz4/package.py
new file mode 100644
index 0000000000..de7e566e70
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lz4/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Lz4(Package):
+ """LZ4 is lossless compression algorithm, providing compression speed
+ at 400 MB/s per core, scalable with multi-cores CPU. It also features
+ an extremely fast decoder, with speed in multiple GB/s per core,
+ typically reaching RAM speed limits on multi-core systems."""
+
+ homepage = "http://cyan4973.github.io/lz4/"
+ url = "https://github.com/Cyan4973/lz4/archive/r131.tar.gz"
+
+ version('131', '42b09fab42331da9d3fb33bd5c560de9')
+
+ # depends_on('valgrind', type='test')
+
+ def install(self, spec, prefix):
+ make()
+ if self.run_tests:
+ make('test') # requires valgrind to be installed
+ make('install', 'PREFIX={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/lzma/package.py b/var/spack/repos/builtin/packages/lzma/package.py
new file mode 100644
index 0000000000..3eb97a2d9f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lzma/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 Lzma(AutotoolsPackage):
+ """LZMA Utils are legacy data compression software with high compression
+ ratio. LZMA Utils are no longer developed, although critical bugs may be
+ fixed as long as fixing them doesn't require huge changes to the code.
+
+ Users of LZMA Utils should move to XZ Utils. XZ Utils support the legacy
+ .lzma format used by LZMA Utils, and can also emulate the command line
+ tools of LZMA Utils. This should make transition from LZMA Utils to XZ
+ Utils relatively easy."""
+
+ homepage = "http://tukaani.org/lzma/"
+ url = "http://tukaani.org/lzma/lzma-4.32.7.tar.gz"
+
+ version('4.32.7', '2a748b77a2f8c3cbc322dbd0b4c9d06a')
diff --git a/var/spack/repos/builtin/packages/lzo/package.py b/var/spack/repos/builtin/packages/lzo/package.py
index 0961bbb58c..e9c98842f4 100644
--- a/var/spack/repos/builtin/packages/lzo/package.py
+++ b/var/spack/repos/builtin/packages/lzo/package.py
@@ -25,11 +25,11 @@
from spack import *
-class Lzo(Package):
+class Lzo(AutotoolsPackage):
"""Real-time data compression library"""
homepage = 'https://www.oberhumer.com/opensource/lzo/'
- url = 'https://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz'
+ url = 'http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz'
version('2.09', 'c7ffc9a103afe2d1bba0b015e7aa887f')
version('2.08', 'fcec64c26a0f4f4901468f360029678f')
@@ -37,13 +37,8 @@ class Lzo(Package):
version('2.06', '95380bd4081f85ef08c5209f4107e9f8')
version('2.05', 'c67cda5fa191bab761c7cb06fe091e36')
- def install(self, spec, prefix):
- configure_args = [
- '--prefix={0}'.format(prefix),
+ def configure_args(self):
+ return [
'--disable-dependency-tracking',
'--enable-shared'
]
- configure(*configure_args)
- make()
- make('check')
- make('install')
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py
index b3bb5e61ce..f7150727fe 100644
--- a/var/spack/repos/builtin/packages/m4/package.py
+++ b/var/spack/repos/builtin/packages/m4/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
class M4(Package):
@@ -47,6 +48,11 @@ class M4(Package):
else:
configure_args.append('--without-libsigsegv-prefix')
+ # http://lists.gnu.org/archive/html/bug-m4/2016-09/msg00002.html
+ if (sys.platform == "darwin") and (spec.satisfies('%gcc')) and \
+ (spec.architecture.platform_os.version == "10.12"):
+ configure_args.append('ac_cv_type_struct_sched_param=yes')
+
configure("--prefix=%s" % prefix, *configure_args)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/magics/no_hardcoded_python.patch b/var/spack/repos/builtin/packages/magics/no_hardcoded_python.patch
new file mode 100644
index 0000000000..e2e2a5d1ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/magics/no_hardcoded_python.patch
@@ -0,0 +1,5 @@
+--- a/tools/xml2mv.py 2016-06-27 17:49:27.000000000 +0200
++++ a/tools/xml2mv.py 2016-09-13 16:25:17.246960456 +0200
+@@ -1 +1 @@
+-#!/usr/bin/python
++#!/usr/bin/env python
diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py
new file mode 100644
index 0000000000..cd793ae051
--- /dev/null
+++ b/var/spack/repos/builtin/packages/magics/package.py
@@ -0,0 +1,115 @@
+##############################################################################
+# 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 Magics(Package):
+ """Magics is the latest generation of the ECMWF's Meteorological plotting
+ software MAGICS. Although completely redesigned in C++, it is intended
+ to be as backwards-compatible as possible with the Fortran interface."""
+
+ homepage = "https://software.ecmwf.int/wiki/display/MAGP/Magics"
+ url = "https://software.ecmwf.int/wiki/download/attachments/3473464/Magics-2.29.0-Source.tar.gz"
+
+ # Maintainers of Magics do not keep tarballs of minor releases. Once the
+ # next minor released is published the previous one becomes unavailable.
+ # That is why the preferred version is the latest stable one.
+ version('2.29.4', '91c561f413316fb665b3bb563f3878d1')
+ version('2.29.0', 'db20a4d3c51a2da5657c31ae3de59709', preferred=True)
+
+ # The patch changes the hardcoded path to python in shebang to enable the
+ # usage of the first python installation that appears in $PATH
+ patch('no_hardcoded_python.patch')
+
+ # The patch reorders includes and adds namespaces where necessary to
+ # resolve ambiguity of invocations of isnan and isinf functions. The
+ # patch is not needed since the version 2.29.1
+ patch('resolve_isnan_ambiguity.patch', when='@2.29.0')
+
+ variant('bufr', default=False, description='Enable BUFR support')
+ variant('netcdf', default=False, description='Enable NetCDF support')
+ variant('cairo', default=True, description='Enable cairo support[png/jpeg]')
+ variant('metview', default=False, description='Enable metview support')
+ variant('qt', default=False, description='Enable metview support with qt')
+
+ depends_on('cmake', type='build')
+ depends_on('pkg-config', type='build')
+
+ # Currently python is only necessary to run
+ # building preprocessing scripts.
+ depends_on('python', type='build')
+ depends_on('grib-api')
+ depends_on('proj')
+ depends_on('boost')
+ depends_on('expat')
+ depends_on('pango', when='+cairo')
+ depends_on('netcdf-cxx', when='+netcdf')
+ depends_on('libemos', when='+bufr')
+ depends_on('qt', when='+metview+qt')
+
+ def install(self, spec, prefix):
+ options = []
+ options.extend(std_cmake_args)
+ options.append('-DENABLE_ODB=OFF')
+ options.append('-DENABLE_PYTHON=OFF')
+ options.append('-DBOOST_ROOT=%s' % spec['boost'].prefix)
+ options.append('-DPROJ4_PATH=%s' % spec['proj'].prefix)
+ options.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix)
+ options.append('-DENABLE_TESTS=OFF')
+
+ if '+bufr' in spec:
+ options.append('-DENABLE_BUFR=ON')
+ options.append('-DLIBEMOS_PATH=%s' % spec['libemos'].prefix)
+ else:
+ options.append('-DENABLE_BUFR=OFF')
+
+ if '+netcdf' in spec:
+ options.append('-DENABLE_NETCDF=ON')
+ options.append('-DNETCDF_PATH=%s' % spec['netcdf-cxx'].prefix)
+ else:
+ options.append('-DENABLE_NETCDF=OFF')
+
+ if '+cairo' in spec:
+ options.append('-DENABLE_CAIRO=ON')
+ else:
+ options.append('-DENABLE_CAIRO=OFF')
+
+ if '+metview' in spec:
+ if '+qt' in spec:
+ options.append('-DENABLE_METVIEW=ON')
+ if spec['qt'].version.up_to(1) == '5':
+ options.append('-DENABLE_QT5=ON')
+ else:
+ options.append('-DENABLE_METVIEW_NO_QT=ON')
+ else:
+ options.append('-DENABLE_METVIEW=OFF')
+
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ options.append('-DENABLE_FORTRAN=OFF')
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *options)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/magics/resolve_isnan_ambiguity.patch b/var/spack/repos/builtin/packages/magics/resolve_isnan_ambiguity.patch
new file mode 100644
index 0000000000..54b96ae88e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/magics/resolve_isnan_ambiguity.patch
@@ -0,0 +1,73 @@
+--- a/src/common/Polyline.cc 2016-04-28 14:38:09.000000000 +0200
++++ b/src/common/Polyline.cc 2016-09-14 13:31:35.784617803 +0200
+@@ -31,2 +30,0 @@
+-#include "TeCoord2D.h"
+-#include "TeGeometryAlgorithms.h"
+--- a/src/decoders/GribRegularInterpretor.cc 2016-04-28 14:38:09.000000000 +0200
++++ b/src/decoders/GribRegularInterpretor.cc 2016-09-14 13:43:41.673614590 +0200
+@@ -2083,2 +2083,2 @@
+- if (isnan(val1)) {
+- if (isnan(val2)) {
++ if (std::isnan(val1)) {
++ if (std::isnan(val2)) {
+@@ -2090 +2090 @@
+- if (isnan(val2)) {
++ if (std::isnan(val2)) {
+@@ -2101 +2101 @@
+- if (isnan(val) || isinf(val) || isinf(-val)) {
++ if (std::isnan(val) || std::isinf(val) || std::isinf(-val)) {
+@@ -2105 +2105 @@
+- if (isnan(val))
++ if (std::isnan(val))
+--- a/src/decoders/GribSatelliteInterpretor.cc 2016-04-28 14:38:09.000000000 +0200
++++ b/src/decoders/GribSatelliteInterpretor.cc 2016-09-14 13:48:55.243699910 +0200
+@@ -33,5 +32,0 @@
+-#include "TeProjection.h"
+-#include "TeDataTypes.h"
+-#include "TeRasterParams.h"
+-#include "TeDecoderMemory.h"
+-#include "TeRasterRemap.h"
+--- a/src/decoders/NetcdfGeoMatrixInterpretor.cc 2016-04-28 14:38:09.000000000 +0200
++++ b/src/decoders/NetcdfGeoMatrixInterpretor.cc 2016-09-14 13:52:37.481201085 +0200
+@@ -93 +93 @@
+- if ( !isnan(*d) ) {
++ if ( !std::isnan(*d) ) {
+--- a/src/decoders/NetcdfOrcaInterpretor.cc 2016-04-28 14:38:09.000000000 +0200
++++ b/src/decoders/NetcdfOrcaInterpretor.cc 2016-09-14 13:51:16.248650570 +0200
+@@ -210,2 +210,2 @@
+- if ( isnan(val1) ) {
+- if ( isnan(val2) ) {
++ if ( std::isnan(val1) ) {
++ if ( std::isnan(val2) ) {
+@@ -218 +218 @@
+- if ( isnan(val2) ) {
++ if ( std::isnan(val2) ) {
+@@ -226 +226 @@
+- if (isnan(val) || isinf(val) || isinf(-val) ) {
++ if (std::isnan(val) || std::isinf(val) || std::isinf(-val) ) {
+@@ -230 +230 @@
+- if (isnan(val) ) val = missing;
++ if (std::isnan(val) ) val = missing;
+@@ -296 +296 @@
+- if (isnan(value) )
++ if (std::isnan(value) )
+--- a/src/terralib/kernel/TeCentroid.cpp 2016-04-28 14:38:09.000000000 +0200
++++ b/src/terralib/kernel/TeCentroid.cpp 2016-09-14 14:17:31.675996554 +0200
+@@ -23,0 +24,2 @@
++#include "TeGeometryAlgorithms.h"
++
+@@ -30 +31,0 @@
+-#include "TeGeometryAlgorithms.h"
+--- a/src/terralib/kernel/TeDatabase.h 2014-11-07 17:39:24.000000000 +0100
++++ b/src/terralib/kernel/TeDatabase.h 2016-09-14 14:20:01.041100590 +0200
+@@ -33,0 +34 @@
++#include "TeGeometry.h"
+@@ -38 +38,0 @@
+-#include "TeGeometry.h"
+--- a/src/terralib/kernel/TeOverlayUtils.h 2014-11-07 17:39:24.000000000 +0100
++++ b/src/terralib/kernel/TeOverlayUtils.h 2016-09-14 14:21:51.649920405 +0200
+@@ -37,0 +38,2 @@
++#include "TeGeometry.h"
++
+@@ -44 +45,0 @@
+-#include "TeGeometry.h"
diff --git a/var/spack/repos/builtin/packages/makedepend/package.py b/var/spack/repos/builtin/packages/makedepend/package.py
new file mode 100644
index 0000000000..5675793abc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/makedepend/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 Makedepend(Package):
+ """makedepend - create dependencies in makefiles."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/util/makedepend"
+ url = "https://www.x.org/archive/individual/util/makedepend-1.0.5.tar.gz"
+
+ version('1.0.5', 'efb2d7c7e22840947863efaedc175747')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/matio/package.py b/var/spack/repos/builtin/packages/matio/package.py
index c141f7e8af..a33b23a4e9 100644
--- a/var/spack/repos/builtin/packages/matio/package.py
+++ b/var/spack/repos/builtin/packages/matio/package.py
@@ -25,15 +25,26 @@
from spack import *
-class Matio(Package):
+class Matio(AutotoolsPackage):
"""matio is an C library for reading and writing Matlab MAT files"""
homepage = "http://sourceforge.net/projects/matio/"
- url = "http://downloads.sourceforge.net/project/matio/matio/1.5.2/matio-1.5.2.tar.gz"
+ url = "http://downloads.sourceforge.net/project/matio/matio/1.5.9/matio-1.5.9.tar.gz"
+ version('1.5.9', 'aab5b4219a3c0262afe7eeb7bdd2f463')
version('1.5.2', '85b007b99916c63791f28398f6a4c6f1')
- def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ variant("zlib", default=True,
+ description='support for compressed mat files')
+ variant("hdf5", default=True,
+ description='support for version 7.3 mat files via hdf5')
- make()
- make("install")
+ depends_on("zlib", when="+zlib")
+ depends_on("hdf5", when="+hdf5")
+
+ def configure_args(self):
+ args = []
+ if '+zlib' in self.spec:
+ args.append("--with-zlib=%s" % self.spec['zlib'].prefix)
+ if '+hdf5' in self.spec:
+ args.append("--with-hdf5=%s" % self.spec['hdf5'].prefix)
+ return args
diff --git a/var/spack/repos/builtin/packages/maven/package.py b/var/spack/repos/builtin/packages/maven/package.py
new file mode 100644
index 0000000000..c4e0a1d0a4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/maven/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 *
+from distutils.dir_util import copy_tree
+
+
+class Maven(Package):
+ """Apache Maven is a software project management and comprehension tool."""
+
+ homepage = "https://maven.apache.org/index.html"
+ url = "http://www.gtlib.gatech.edu/pub/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
+
+ version('3.3.9', '516923b3955b6035ba6b0a5b031fbd8b')
+
+ depends_on('jdk')
+
+ def install(self, spec, prefix):
+ # install pre-built distribution
+ copy_tree('.', prefix)
diff --git a/var/spack/repos/builtin/packages/mbedtls/package.py b/var/spack/repos/builtin/packages/mbedtls/package.py
index e1a42c0d9a..493ea59f0b 100644
--- a/var/spack/repos/builtin/packages/mbedtls/package.py
+++ b/var/spack/repos/builtin/packages/mbedtls/package.py
@@ -35,6 +35,7 @@ class Mbedtls(Package):
homepage = "https://tls.mbed.org"
url = "https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.2.1.tar.gz"
+ version('2.3.0', '98158e1160a0825a3e8db38881a177a0')
version('2.2.1', '73a38f96898d6d03e32f55dd9f9a67be')
version('2.2.0', 'eaf4586c1ef93ae872e606b6c1203942')
version('2.1.4', '40cdf67b6c6d92c9cbcfd552d39ea3ae')
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..ea77953f15
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mercurial/package.py
@@ -0,0 +1,69 @@
+##############################################################################
+# 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 llnl.util.tty as tty
+import os
+
+
+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.1', '3759dd10edb8c1a6dfb8ff0ce82658ce')
+ version('3.9', 'e2b355da744e94747daae3a5339d28a0')
+ version('3.8.4', 'cec2c3db688cb87142809089c6ae13e9')
+ version('3.8.3', '97aced7018614eeccc9621a3dea35fda')
+ version('3.8.2', 'c38daa0cbe264fc621dc3bb05933b0b3')
+ version('3.8.1', '172a8c588adca12308c2aca16608d7f4')
+
+ extends('python')
+ depends_on('python@2.6:2.8')
+ depends_on('py-docutils', type='build')
+
+ def install(self, spec, prefix):
+ make('install', 'PREFIX={0}'.format(prefix))
+
+ # Configuration of HTTPS certificate authorities
+ # https://www.mercurial-scm.org/wiki/CACertificates
+ hgrc_filename = join_path(prefix.etc, 'mercurial', 'hgrc')
+ mkdirp(os.path.dirname(hgrc_filename))
+
+ with open(hgrc_filename, 'w') as hgrc:
+ if os.path.exists('/etc/ssl/certs/ca-certificates.crt'):
+ # Debian/Ubuntu/Gentoo/Arch Linux
+ hgrc.write('[web]\ncacerts = /etc/ssl/certs/ca-certificates.crt') # noqa
+ elif os.path.exists('/etc/pki/tls/certs/ca-bundle.crt'):
+ # Fedora/RHEL/CentOS
+ hgrc.write('[web]\ncacerts = /etc/pki/tls/certs/ca-bundle.crt')
+ elif os.path.exists('/etc/ssl/ca-bundle.pem'):
+ # openSUSE/SLE
+ hgrc.write('[web]\ncacerts = /etc/ssl/ca-bundle.pem')
+ else:
+ tty.warn('CA certificate not found. You may not be able to '
+ 'connect to an HTTPS server. If your CA certificate '
+ 'is in a non-standard location, you should add it to '
+ '{0}'.format(hgrc_filename))
diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py
index 299b9a9267..f19bb466fd 100644
--- a/var/spack/repos/builtin/packages/mesa/package.py
+++ b/var/spack/repos/builtin/packages/mesa/package.py
@@ -30,28 +30,38 @@ class Mesa(Package):
specification - a system for rendering interactive 3D graphics."""
homepage = "http://www.mesa3d.org"
- url = "ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/8.0.5/MesaLib-8.0.5.tar.gz"
+ url = "ftp://ftp.freedesktop.org/pub/mesa/12.0.3/mesa-12.0.3.tar.gz"
- # version('10.4.4', '8d863a3c209bf5116b2babfccccc68ce')
- version('8.0.5', 'cda5d101f43b8784fa60bdeaca4056f2')
+ version('12.0.3', '60c5f9897ddc38b46f8144c7366e84ad')
- # mesa 7.x, 8.x, 9.x
- depends_on("libdrm@2.4.33")
- depends_on("llvm@3.0")
- depends_on("libxml2+python")
+ # General dependencies
+ depends_on('python@2.6.4:')
+ depends_on('py-mako@0.3.4:')
+ depends_on('flex@2.5.35:', type='build')
+ depends_on('bison@2.4.1:', type='build')
- # patch("llvm-fixes.patch") # using newer llvm
+ # For DRI and hardware acceleration
+ depends_on('libpthread-stubs')
+ depends_on('libdrm')
+ depends_on('openssl')
+ depends_on('libxcb@1.9.3:')
+ depends_on('libxshmfence@1.1:')
+ depends_on('libx11')
+ depends_on('libxext')
+ depends_on('libxdamage')
+ depends_on('libxfixes')
- # mesa 10.x
- # depends_on("py-mako")
- # depends_on("flex", type='build')
- # depends_on("bison", type='build')
- # depends_on("dri2proto")
- # depends_on("libxcb")
- # depends_on("libxshmfence")
+ depends_on('glproto@1.4.14:', type='build')
+ depends_on('dri2proto@2.6:', type='build')
+ depends_on('dri3proto@1.0:', type='build')
+ depends_on('presentproto@1.0:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ # TODO: Add package for systemd, provides libudev
+ # Using the system package manager to install systemd didn't work for me
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index 9f8ed5c9e8..ca48a47817 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -43,16 +43,12 @@ class Metis(Package):
version('5.0.2', 'acb521a4e8c2e6dd559a7f9abd0468c5')
version('4.0.3', 'd3848b454532ef18dc83e4fb160d1e10')
- variant('shared', default=True,
- description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds the library in debug mode')
- variant('gdb', default=False, description='Enables gdb support')
+ variant('shared', default=True, description='Enables the build of shared libraries.')
+ variant('debug', default=False, description='Builds the library in debug mode.')
+ variant('gdb', default=False, description='Enables gdb support.')
- variant('idx64', default=False,
- description='Use int64_t as default index type')
- variant('real64', default=False,
- description='Use double precision floating point types')
+ variant('idx64', default=False, description='Sets the bit width of METIS\'s index type to 64.')
+ variant('real64', default=False, description='Sets the bit width of METIS\'s real type to 64.')
depends_on('cmake@2.8:', when='@5:', type='build')
@@ -63,12 +59,37 @@ class Metis(Package):
return '%s/%smetis-%s.tar.gz' % (Metis.base_url, verdir, version)
@when('@:4')
+ def patch(self):
+ pass
+
+ @when('@5:')
+ def patch(self):
+ source_path = self.stage.source_path
+ metis_header = FileFilter(join_path(source_path, 'include', 'metis.h'))
+
+ metis_header.filter(
+ r'(\b)(IDXTYPEWIDTH )(\d+)(\b)',
+ r'\1\2{0}\4'.format('64' if '+idx64' in self.spec else '32'),
+ )
+ metis_header.filter(
+ r'(\b)(REALTYPEWIDTH )(\d+)(\b)',
+ r'\1\2{0}\4'.format('64' if '+real64' in self.spec else '32'),
+ )
+
+ # Make clang 7.3 happy.
+ # Prevents "ld: section __DATA/__thread_bss extends beyond end of file"
+ # See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059
+ # and https://github.com/Homebrew/homebrew-science/blob/master/metis.rb
+ if self.spec.satisfies('%clang@7.3.0'):
+ filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24',
+ join_path(source_path, 'GKlib', 'error.c'))
+
+ @when('@:4')
def install(self, spec, prefix):
# Process library spec and options
- unsupp_vars = [v for v in ('+gdb', '+idx64', '+real64') if v in spec]
- if unsupp_vars:
- msg = 'Given variants %s are unsupported by METIS 4!' % unsupp_vars
- raise InstallError(msg)
+ if any('+{0}'.format(v) in spec for v in ['gdb', 'idx64', 'real64']):
+ raise InstallError('METIS@:4 does not support the following '
+ 'variants: gdb, idx64, real64.')
options = ['COPTIONS=-fPIC']
if '+debug' in spec:
@@ -118,49 +139,48 @@ class Metis(Package):
join_path('Programs', 'io.o'), join_path('Test', 'mtest.c'),
'-o', '%s/mtest' % prefix.bin, '-lmetis', '-lm')
- test_bin = lambda testname: join_path(prefix.bin, testname)
- test_graph = lambda graphname: join_path(prefix.share, graphname)
-
- graph = test_graph('4elt.graph')
- os.system('%s %s' % (test_bin('mtest'), graph))
- os.system('%s %s 40' % (test_bin('kmetis'), graph))
- os.system('%s %s' % (test_bin('onmetis'), graph))
- graph = test_graph('test.mgraph')
- os.system('%s %s 2' % (test_bin('pmetis'), graph))
- os.system('%s %s 2' % (test_bin('kmetis'), graph))
- os.system('%s %s 5' % (test_bin('kmetis'), graph))
- graph = test_graph('metis.mesh')
- os.system('%s %s 10' % (test_bin('partnmesh'), graph))
- os.system('%s %s 10' % (test_bin('partdmesh'), graph))
- os.system('%s %s' % (test_bin('mesh2dual'), graph))
-
- # FIXME: The following code should replace the testing code in the
- # block above since it causes installs to fail when one or more of the
- # Metis tests fail, but it currently doesn't work because the 'mtest',
- # 'onmetis', and 'partnmesh' tests return error codes that trigger
- # false positives for failure.
- """
- Executable(test_bin('mtest'))(test_graph('4elt.graph'))
- Executable(test_bin('kmetis'))(test_graph('4elt.graph'), '40')
- Executable(test_bin('onmetis'))(test_graph('4elt.graph'))
-
- Executable(test_bin('pmetis'))(test_graph('test.mgraph'), '2')
- Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '2')
- Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '5')
-
- Executable(test_bin('partnmesh'))(test_graph('metis.mesh'), '10')
- Executable(test_bin('partdmesh'))(test_graph('metis.mesh'), '10')
- Executable(test_bin('mesh2dual'))(test_graph('metis.mesh'))
- """
+ if self.run_tests:
+ test_bin = lambda testname: join_path(prefix.bin, testname)
+ test_graph = lambda graphname: join_path(prefix.share, graphname)
+
+ graph = test_graph('4elt.graph')
+ os.system('%s %s' % (test_bin('mtest'), graph))
+ os.system('%s %s 40' % (test_bin('kmetis'), graph))
+ os.system('%s %s' % (test_bin('onmetis'), graph))
+ graph = test_graph('test.mgraph')
+ os.system('%s %s 2' % (test_bin('pmetis'), graph))
+ os.system('%s %s 2' % (test_bin('kmetis'), graph))
+ os.system('%s %s 5' % (test_bin('kmetis'), graph))
+ graph = test_graph('metis.mesh')
+ os.system('%s %s 10' % (test_bin('partnmesh'), graph))
+ os.system('%s %s 10' % (test_bin('partdmesh'), graph))
+ os.system('%s %s' % (test_bin('mesh2dual'), graph))
+
+ # FIXME: The following code should replace the testing code in the
+ # block above since it causes installs to fail when one or more of
+ # the Metis tests fail, but it currently doesn't work because the
+ # 'mtest', 'onmetis', and 'partnmesh' tests return error codes that
+ # trigger false positives for failure.
+ """
+ Executable(test_bin('mtest'))(test_graph('4elt.graph'))
+ Executable(test_bin('kmetis'))(test_graph('4elt.graph'), '40')
+ Executable(test_bin('onmetis'))(test_graph('4elt.graph'))
+
+ Executable(test_bin('pmetis'))(test_graph('test.mgraph'), '2')
+ Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '2')
+ Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '5')
+
+ Executable(test_bin('partnmesh'))(test_graph('metis.mesh'), '10')
+ Executable(test_bin('partdmesh'))(test_graph('metis.mesh'), '10')
+ Executable(test_bin('mesh2dual'))(test_graph('metis.mesh'))
+ """
@when('@5:')
def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
-
- build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
+ build_directory = join_path(source_directory, 'build')
+ options = std_cmake_args[:]
options.append('-DGKLIB_PATH:PATH=%s/GKlib' % source_directory)
options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
@@ -172,26 +192,24 @@ class Metis(Package):
if '+gdb' in spec:
options.append('-DGDB:BOOL=ON')
- metis_header = join_path(source_directory, 'include', 'metis.h')
- if '+idx64' in spec:
- filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header)
- if '+real64' in spec:
- filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header)
-
- # Make clang 7.3 happy.
- # Prevents "ld: section __DATA/__thread_bss extends beyond end of file"
- # See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059
- # and https://github.com/Homebrew/homebrew-science/blob/master/metis.rb
- if spec.satisfies('%clang@7.3.0'):
- filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24',
- join_path(source_directory, 'GKlib', 'error.c'))
-
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
make('install')
- # now run some tests:
+ # install GKlib headers, which will be needed for ParMETIS
+ GKlib_dist = join_path(prefix.include, 'GKlib')
+ mkdirp(GKlib_dist)
+ hfiles = glob.glob(join_path(source_directory, 'GKlib', '*.h'))
+ for hfile in hfiles:
+ install(hfile, GKlib_dist)
+
+ if self.run_tests:
+ # FIXME: On some systems, the installed binaries for METIS cannot
+ # be executed without first being read.
+ ls = which('ls')
+ ls('-a', '-l', prefix.bin)
+
for f in ['4elt', 'copter2', 'mdual']:
graph = join_path(source_directory, 'graphs', '%s.graph' % f)
Executable(join_path(prefix.bin, 'graphchk'))(graph)
@@ -202,10 +220,3 @@ class Metis(Package):
Executable(join_path(prefix.bin, 'gpmetis'))(graph, '2')
graph = join_path(source_directory, 'graphs', 'metis.mesh')
Executable(join_path(prefix.bin, 'mpmetis'))(graph, '2')
-
- # install GKlib headers, which will be needed for ParMETIS
- GKlib_dist = join_path(prefix.include, 'GKlib')
- mkdirp(GKlib_dist)
- hfiles = glob.glob(join_path(source_directory, 'GKlib', '*.h'))
- for hfile in hfiles:
- install(hfile, GKlib_dist)
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index fd91f705eb..9aa4ab8cf0 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -23,8 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import glob
-import string
class Mfem(Package):
@@ -35,11 +33,11 @@ class Mfem(Package):
version('3.2',
'2938c3deed4ec4f7fd5b5f5cfe656845282e86e2dcd477d292390058b7b94340',
- url='http://goo.gl/Y9T75B', expand=False, preferred=True)
+ url='http://goo.gl/Y9T75B', preferred=True, extension='.tar.gz')
version('3.1',
'841ea5cf58de6fae4de0f553b0e01ebaab9cd9c67fa821e8a715666ecf18fc57',
- url='http://goo.gl/xrScXn', expand=False)
+ url='http://goo.gl/xrScXn', extension='.tar.gz')
# version('3.1', git='https://github.com/mfem/mfem.git',
# commit='dbae60fe32e071989b52efaaf59d7d0eb2a3b574')
@@ -48,8 +46,11 @@ class Mfem(Package):
variant('suite-sparse', default=False,
description='Activate support for SuiteSparse')
variant('mpi', default=False, description='Activate support for MPI')
+ variant('superlu-dist', default=False,
+ description='Activate support for SuperLU_Dist')
variant('lapack', default=False, description='Activate support for LAPACK')
variant('debug', default=False, description='Build debug version')
+ variant('netcdf', default=False, description='Activate NetCDF support')
depends_on('blas', when='+lapack')
depends_on('lapack', when='+lapack')
@@ -68,6 +69,12 @@ class Mfem(Package):
depends_on('metis@5:', when='+suite-sparse ^suite-sparse@4.5:')
depends_on('cmake', when='^metis@5:', type='build')
+ depends_on('superlu-dist', when='@3.2: +superlu-dist')
+
+ depends_on('netcdf', when='@3.2: +netcdf')
+ depends_on('zlib', when='@3.2: +netcdf')
+ depends_on('hdf5', when='@3.2: +netcdf')
+
def check_variants(self, spec):
if '+mpi' in spec and ('+hypre' not in spec or '+metis' not in spec):
raise InstallError('mfem+mpi must be built with +hypre ' +
@@ -81,6 +88,12 @@ class Mfem(Package):
raise InstallError('To work around CMake bug with clang, must ' +
'build mfem with mfem[+variants] %clang ' +
'^cmake %gcc to force CMake to build with gcc')
+ if '@:3.1' in spec and '+superlu-dist' in spec:
+ raise InstallError('MFEM does not support SuperLU_DIST for ' +
+ 'versions 3.1 and earlier')
+ if '@:3.1' in spec and '+netcdf' in spec:
+ raise InstallError('MFEM does not support NetCDF for versions' +
+ '3.1 and earlier')
return
def install(self, spec, prefix):
@@ -89,8 +102,7 @@ class Mfem(Package):
options = ['PREFIX=%s' % prefix]
if '+lapack' in spec:
- lapack_lib = '-L{0} -llapack -L{1} -lblas'.format(
- spec['lapack'].prefix.lib, spec['blas'].prefix.lib)
+ lapack_lib = (spec['lapack'].lapack_libs + spec['blas'].blas_libs).ld_flags # NOQA: ignore=E501
options.extend([
'MFEM_USE_LAPACK=YES',
'LAPACK_OPT=-I%s' % spec['lapack'].prefix.include,
@@ -103,7 +115,14 @@ class Mfem(Package):
'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib +
' -lHYPRE'])
- if '+metis' in spec:
+ if 'parmetis' in spec:
+ metis_lib = '-L%s -lparmetis -lmetis' % spec['parmetis'].prefix.lib
+ metis_str = 'MFEM_USE_METIS_5=YES'
+ options.extend([metis_str,
+ 'METIS_DIR=%s' % spec['parmetis'].prefix,
+ 'METIS_OPT=-I%s' % spec['parmetis'].prefix.include,
+ 'METIS_LIB=%s' % metis_lib])
+ elif 'metis' in spec:
metis_lib = '-L%s -lmetis' % spec['metis'].prefix.lib
if spec['metis'].satisfies('@5:'):
metis_str = 'MFEM_USE_METIS_5=YES'
@@ -115,14 +134,27 @@ class Mfem(Package):
'METIS_OPT=-I%s' % spec['metis'].prefix.include,
'METIS_LIB=%s' % metis_lib])
- if '+mpi' in spec:
+ if 'mpi' in spec:
options.extend(['MFEM_USE_MPI=YES'])
+ if '+superlu-dist' in spec:
+ superlu_lib = '-L%s' % spec['superlu-dist'].prefix.lib
+ superlu_lib += ' -lsuperlu_dist'
+ sl_inc = 'SUPERLU_OPT=-I%s' % spec['superlu-dist'].prefix.include
+ options.extend(['MFEM_USE_SUPERLU=YES',
+ 'SUPERLU_DIR=%s' % spec['superlu-dist'].prefix,
+ sl_inc,
+ 'SUPERLU_LIB=%s' % superlu_lib])
+
if '+suite-sparse' in spec:
ssp = spec['suite-sparse'].prefix
ss_lib = '-L%s' % ssp.lib
- ss_lib += (' -lumfpack -lcholmod -lcolamd -lamd -lcamd' +
- ' -lccolamd -lsuitesparseconfig')
+
+ if '@3.2:' in spec:
+ ss_lib += ' -lklu -lbtf'
+
+ ss_lib += (' -lumfpack -lcholmod -lcolamd' +
+ ' -lamd -lcamd -lccolamd -lsuitesparseconfig')
no_librt_archs = ['darwin-i686', 'darwin-x86_64']
no_rt = any(map(lambda a: spec.satisfies('=' + a),
@@ -136,16 +168,23 @@ class Mfem(Package):
'SUITESPARSE_OPT=-I%s' % ssp.include,
'SUITESPARSE_LIB=%s' % ss_lib])
+ if '+netcdf' in spec:
+ np = spec['netcdf'].prefix
+ zp = spec['zlib'].prefix
+ h5p = spec['hdf5'].prefix
+ nlib = '-L%s -lnetcdf ' % np.lib
+ nlib += '-L%s -lhdf5_hl -lhdf5 ' % h5p.lib
+ nlib += '-L%s -lz' % zp.lib
+ options.extend(['MFEM_USE_NETCDF=YES',
+ 'NETCDF_DIR=%s' % np,
+ 'HDF5_DIR=%s' % h5p,
+ 'ZLIB_DIR=%s' % zp,
+ 'NETCDF_OPT=-I%s' % np.include,
+ 'NETCDF_LIB=%s' % nlib])
+
if '+debug' in spec:
options.extend(['MFEM_DEBUG=YES'])
- # Dirty hack to cope with URL redirect
- tgz_file = string.split(self.url, '/')[-1]
- tar = which('tar')
- tar('xzvf', tgz_file)
- cd(glob.glob('mfem*')[0])
- # End dirty hack to cope with URL redirect
-
make('config', *options)
make('all')
diff --git a/var/spack/repos/builtin/packages/mkfontdir/package.py b/var/spack/repos/builtin/packages/mkfontdir/package.py
new file mode 100644
index 0000000000..15c85b24e4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mkfontdir/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Mkfontdir(Package):
+ """mkfontdir creates the fonts.dir files needed by the legacy X server
+ core font system. The current implementation is a simple wrapper script
+ around the mkfontscale program, which must be built and installed first."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/mkfontdir"
+ url = "https://www.x.org/archive/individual/app/mkfontdir-1.0.7.tar.gz"
+
+ version('1.0.7', '52a5bc129f3f3ac54e7115608cec3cdc')
+
+ depends_on('mkfontscale', type='run')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/mkfontscale/package.py b/var/spack/repos/builtin/packages/mkfontscale/package.py
new file mode 100644
index 0000000000..4c907831b6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mkfontscale/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Mkfontscale(Package):
+ """mkfontscale creates the fonts.scale and fonts.dir index files used by the
+ legacy X11 font system."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/mkfontscale"
+ url = "https://www.x.org/archive/individual/app/mkfontscale-1.1.2.tar.gz"
+
+ version('1.1.2', 'fab4e1598b8948c124ec7a9f06d30e5b')
+
+ depends_on('libfontenc')
+ depends_on('freetype')
+
+ depends_on('xproto@7.0.25:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py
index 71a233ff3e..4a9a8785f7 100644
--- a/var/spack/repos/builtin/packages/mkl/package.py
+++ b/var/spack/repos/builtin/packages/mkl/package.py
@@ -9,7 +9,7 @@ class Mkl(IntelInstaller):
Note: You will have to add the download file to a
mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://software.llnl.gov/spack/mirrors.html.
+ mirror, see http://spack.readthedocs.io/en/latest/mirrors.html.
To set the threading layer at run time set MKL_THREADING_LAYER
variable to one of the following values: INTEL (default), SEQUENTIAL, PGI.
@@ -24,13 +24,41 @@ class Mkl(IntelInstaller):
version('11.3.3.210', 'f72546df27f5ebb0941b5d21fd804e34',
url="file://%s/l_mkl_11.3.3.210.tgz" % os.getcwd())
+ variant('shared', default=True, description='Builds shared library')
+ variant('ilp64', default=False, description='64 bit integers')
+ variant('openmp', default=False, description='OpenMP multithreading layer')
+
# virtual dependency
provides('blas')
provides('lapack')
# TODO: MKL also provides implementation of Scalapack.
- def install(self, spec, prefix):
+ @property
+ def blas_libs(self):
+ shared = True if '+shared' in self.spec else False
+ suffix = dso_suffix if '+shared' in self.spec else 'a'
+ mkl_integer = ['libmkl_intel_ilp64'] if '+ilp64' in self.spec else ['libmkl_intel_lp64'] # NOQA: ignore=E501
+ mkl_threading = ['libmkl_sequential']
+ if '+openmp' in self.spec:
+ mkl_threading = ['libmkl_intel_thread', 'libiomp5'] if '%intel' in self.spec else ['libmkl_gnu_thread'] # NOQA: ignore=E501
+ # TODO: TBB threading: ['libmkl_tbb_thread', 'libtbb', 'libstdc++']
+ mkl_libs = find_libraries(
+ mkl_integer + ['libmkl_core'] + mkl_threading,
+ root=join_path(self.prefix.lib, 'intel64'),
+ shared=shared
+ )
+ system_libs = [
+ 'libpthread.{0}'.format(suffix),
+ 'libm.{0}'.format(suffix),
+ 'libdl.{0}'.format(suffix)
+ ]
+ return mkl_libs + system_libs
+
+ @property
+ def lapack_libs(self):
+ return self.blas_libs
+ def install(self, spec, prefix):
self.intel_prefix = os.path.join(prefix, "pkg")
IntelInstaller.install(self, spec, prefix)
@@ -38,32 +66,6 @@ class Mkl(IntelInstaller):
for f in os.listdir(mkl_dir):
os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f))
- # Unfortunately MKL libs are natively distrubted in prefix/lib/intel64.
- # To make MKL play nice with Spack, symlink all files to prefix/lib:
- mkl_lib_dir = os.path.join(prefix, "lib", "intel64")
- for f in os.listdir(mkl_lib_dir):
- os.symlink(os.path.join(mkl_lib_dir, f),
- os.path.join(self.prefix, "lib", f))
-
- def setup_dependent_package(self, module, dspec):
- # For now use Single Dynamic Library:
- # To set the threading layer at run time, use the
- # mkl_set_threading_layer function or set MKL_THREADING_LAYER
- # variable to one of the following values: INTEL, SEQUENTIAL, PGI.
- # To set interface layer at run time, use the mkl_set_interface_layer
- # function or set the MKL_INTERFACE_LAYER variable to LP64 or ILP64.
-
- # Otherwise one would need to specify several libraries
- # (e.g. mkl_intel_lp64;mkl_sequential;mkl_core), which reflect
- # different interface and threading layers.
-
- name = 'libmkl_rt.%s' % dso_suffix
- libdir = find_library_path(name, self.prefix.lib64, self.prefix.lib)
-
- # Now set blas/lapack libs:
- self.spec.blas_shared_lib = join_path(libdir, name)
- self.spec.lapack_shared_lib = self.spec.blas_shared_lib
-
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up MKLROOT for everyone using MKL package
spack_env.set('MKLROOT', self.prefix)
diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py
index 893a543e97..4dfc5432d2 100644
--- a/var/spack/repos/builtin/packages/moab/package.py
+++ b/var/spack/repos/builtin/packages/moab/package.py
@@ -37,7 +37,7 @@ class Moab(Package):
homepage = "https://bitbucket.org/fathomteam/moab"
url = "http://ftp.mcs.anl.gov/pub/fathom/moab-4.6.3.tar.gz"
- version('4.9.1', 'bcb8bee3e58c076c7f31884db119088e')
+ version('4.9.1', '19cc2189fa266181ad9109b18d0b2ab8')
version('4.9.0', '40695d0a159040683cfa05586ad4a7c2')
version('4.8.2', '1dddd10f162fce3cfffaedc48f6f467d')
diff --git a/var/spack/repos/builtin/packages/mpc/package.py b/var/spack/repos/builtin/packages/mpc/package.py
index 71cacd5dfe..2fe3900981 100644
--- a/var/spack/repos/builtin/packages/mpc/package.py
+++ b/var/spack/repos/builtin/packages/mpc/package.py
@@ -35,12 +35,12 @@ class Mpc(Package):
version('1.0.3', 'd6a1d5f8ddea3abd2cc3e98f58352d26')
version('1.0.2', '68fadff3358fb3e7976c7a398a0af4c3')
- depends_on("gmp")
- depends_on("mpfr")
+ depends_on('gmp') # mpir is a drop-in replacement for this
+ depends_on('mpfr') # Could also be built against mpir
def url_for_version(self, version):
if version < Version("1.0.1"):
- return "http://www.multiprecision.org/mpc/download/mpc-%s.tar.gz" % version
+ return "http://www.multiprecision.org/mpc/download/mpc-%s.tar.gz" % version # NOQA
else:
return "ftp://ftp.gnu.org/gnu/mpc/mpc-%s.tar.gz" % version
diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py
index 5777cd1926..4612d03849 100644
--- a/var/spack/repos/builtin/packages/mpfr/package.py
+++ b/var/spack/repos/builtin/packages/mpfr/package.py
@@ -35,7 +35,7 @@ class Mpfr(Package):
version('3.1.3', '5fdfa3cfa5c86514ee4a241a1affa138')
version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19')
- depends_on('gmp')
+ depends_on('gmp') # mpir is a drop-in replacement for this
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 90670ee517..958fbe762c 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -23,11 +23,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
-class Mpich(Package):
+class Mpich(AutotoolsPackage):
"""MPICH is a high performance and widely portable implementation of
- the Message Passing Interface (MPI) standard."""
+ the Message Passing Interface (MPI) standard."""
+
homepage = "http://www.mpich.org"
url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
list_url = "http://www.mpich.org/static/downloads/"
@@ -41,10 +43,10 @@ class Mpich(Package):
version('3.1', '5643dd176499bfb7d25079aaff25f2ec')
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
- variant('verbs', default=False,
- description='Build support for OpenFabrics verbs.')
- variant('pmi', default=True, description='Build with PMI support')
- variant('hydra', default=True, description='Build the hydra process manager')
+ variant('hydra', default=True, description='Build the hydra process manager')
+ variant('pmi', default=True, description='Build with PMI support')
+ variant('romio', default=True, description='Enable ROMIO MPI I/O implementation')
+ variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
provides('mpi@:3.0', when='@3:')
provides('mpi@:1.3', when='@1:')
@@ -62,62 +64,68 @@ class Mpich(Package):
spack_env.set('MPICH_FC', spack_fc)
def setup_dependent_package(self, module, dep_spec):
- self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
- self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
- self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
- self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
-
- def install(self, spec, prefix):
- config_args = ["--prefix=" + prefix,
- "--with-pmi=" + ("yes" if '+pmi' in spec else 'no'),
- "--with-pm=" + ('hydra' if '+hydra' in spec else 'no'),
- "--enable-shared"]
-
- # Variants
- if '+verbs' in spec:
- config_args.append("--with-ibverbs")
+ # Is this a Cray machine? (TODO: We need a better test than this.)
+ if os.environ.get('CRAYPE_VERSION'):
+ self.spec.mpicc = spack_cc
+ self.spec.mpicxx = spack_cxx
+ self.spec.mpifc = spack_fc
+ self.spec.mpif77 = spack_f77
else:
- config_args.append("--without-ibverbs")
-
- # TODO: Spack should make it so that you can't actually find
- # these compilers if they're "disabled" for the current
- # compiler configuration.
- if not self.compiler.f77:
- config_args.append("--disable-f77")
-
- if not self.compiler.fc:
- config_args.append("--disable-fc")
-
- if not self.compiler.fc and not self.compiler.f77:
- config_args.append("--disable-fortran")
-
- configure(*config_args)
- make()
- make("install")
-
- self.filter_compilers()
-
+ self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
+ self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
+ self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
+ self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
+
+ self.spec.mpicxx_shared_libs = [
+ join_path(self.prefix.lib, 'libmpicxx.{0}'.format(dso_suffix)),
+ join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix))
+ ]
+
+ @AutotoolsPackage.precondition('autoreconf')
+ def die_without_fortran(self):
+ # Until we can pass variants such as +fortran through virtual
+ # dependencies depends_on('mpi'), require Fortran compiler to
+ # avoid delayed build errors in dependents.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ raise InstallError(
+ 'Mpich requires both C and Fortran compilers!'
+ )
+
+ def configure_args(self):
+ spec = self.spec
+ return [
+ '--enable-shared',
+ '--with-pm={0}'.format('hydra' if '+hydra' in spec else 'no'),
+ '--with-pmi={0}'.format('yes' if '+pmi' in spec else 'no'),
+ '--{0}-romio'.format('enable' if '+romio' in spec else 'disable'),
+ '--{0}-ibverbs'.format('with' if '+verbs' in spec else 'without')
+ ]
+
+ @AutotoolsPackage.sanity_check('install')
def filter_compilers(self):
"""Run after install to make the MPI compilers use the
- compilers that Spack built the package with.
-
- If this isn't done, they'll have CC, CXX, F77, and FC set
- to Spack's generic cc, c++, f77, and f90. We want them to
- be bound to whatever compiler they were built with.
- """
- bin = self.prefix.bin
- mpicc = join_path(bin, 'mpicc')
- mpicxx = join_path(bin, 'mpicxx')
- mpif77 = join_path(bin, 'mpif77')
- mpif90 = join_path(bin, 'mpif90')
+ compilers that Spack built the package with.
+
+ If this isn't done, they'll have CC, CXX, F77, and FC set
+ to Spack's generic cc, c++, f77, and f90. We want them to
+ be bound to whatever compiler they were built with."""
+
+ mpicc = join_path(self.prefix.bin, 'mpicc')
+ mpicxx = join_path(self.prefix.bin, 'mpicxx')
+ mpif77 = join_path(self.prefix.bin, 'mpif77')
+ mpif90 = join_path(self.prefix.bin, 'mpif90')
# Substitute Spack compile wrappers for the real
# underlying compiler
- kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
- filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
+ kwargs = {
+ 'ignore_absent': True,
+ 'backup': False,
+ 'string': True
+ }
+ filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
- filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
+ filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
# Remove this linking flag if present
# (it turns RPATH into RUNPATH)
diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py
new file mode 100644
index 0000000000..78e1dca68a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpip/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 *
+import os
+
+
+class Mpip(Package):
+ """mpiP: Lightweight, Scalable MPI Profiling"""
+ homepage = "http://mpip.sourceforge.net/"
+ url = "http://downloads.sourceforge.net/project/mpip/mpiP/mpiP-3.4.1/mpiP-3.4.1.tar.gz"
+
+ version("3.4.1", "1168adc83777ac31d6ebd385823aabbd")
+
+ depends_on("libelf", type="build")
+ depends_on("libdwarf", type="build")
+ depends_on('libunwind', when=os.uname()[4] == "x86_64", type="build")
+ depends_on("mpi", type="build")
+
+ def install(self, spec, prefix):
+ configure("--prefix=" + prefix, "--without-f77")
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/mpir/package.py b/var/spack/repos/builtin/packages/mpir/package.py
new file mode 100644
index 0000000000..b939a690b2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpir/package.py
@@ -0,0 +1,62 @@
+##############################################################################
+# 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 Mpir(Package):
+ """Multiple Precision Integers and Rationals."""
+
+ homepage = "https://github.com/wbhart/mpir"
+ url = "https://github.com/wbhart/mpir/archive/mpir-2.7.0.tar.gz"
+
+ version('2.7.0', '985b5d57bd0e74c74125ee885b9c8f71')
+ version('2.6.0', 'ec17d6a7e026114ceb734b2466aa0a91')
+ version('develop', git='https://github.com/wbhart/mpir.git')
+
+ # This setting allows mpir to act as a drop-in replacement for gmp
+ variant('gmp_compat', default=False,
+ description='Compile with GMP library compatibility')
+
+ # Build dependencies
+ depends_on('autoconf', type='build')
+
+ # Other dependencies
+ depends_on('yasm')
+
+ def install(self, spec, prefix):
+ # We definitely don't want to have MPIR build its
+ # own version of YASM. This tries to install it
+ # to a system directory.
+ options = ['--prefix={0}'.format(prefix),
+ '--with-system-yasm']
+
+ if '+gmp_compat' in spec:
+ options.extend(['--enable-gmpcompat'])
+
+ configure(*options)
+ make()
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py
index 490e99dd83..9da9e29a2e 100644
--- a/var/spack/repos/builtin/packages/mrnet/package.py
+++ b/var/spack/repos/builtin/packages/mrnet/package.py
@@ -37,13 +37,6 @@ class Mrnet(Package):
version('4.1.0', '5a248298b395b329e2371bf25366115c')
version('4.0.0', 'd00301c078cba57ef68613be32ceea2f')
- # Add a patch that brings mrnet-5.0.1 up to date with the current
- # development tree The development tree contains fixes needed for the
- # krell based tools
- variant('krellpatch', default=False,
- description="Build MRNet with krell openspeedshop based patch.")
- patch('krell-5.0.1.patch', when='@5.0.1+krellpatch')
-
variant('lwthreads', default=False,
description="Also build the MRNet LW threadsafe libraries")
parallel = False
@@ -51,8 +44,8 @@ class Mrnet(Package):
depends_on("boost")
def install(self, spec, prefix):
- # Build the MRNet LW thread safe libraries when the krelloptions
- # variant is present
+ # Build the MRNet LW thread safe libraries when the
+ # lwthreads variant is present
if '+lwthreads' in spec:
configure("--prefix=%s" % prefix, "--enable-shared",
"--enable-ltwt-threadsafe")
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
index 32bc42a9c3..fcb6549d29 100644
--- a/var/spack/repos/builtin/packages/mumps/package.py
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -34,6 +34,9 @@ class Mumps(Package):
homepage = "http://mumps.enseeiht.fr"
url = "http://mumps.enseeiht.fr/MUMPS_5.0.1.tar.gz"
+ version('5.0.2', '591bcb2c205dcb0283872608cdf04927')
+ # Alternate location if main server is down.
+ # version('5.0.1', 'b477573fdcc87babe861f62316833db0', url='http://pkgs.fedoraproject.org/repo/pkgs/MUMPS/MUMPS_5.0.1.tar.gz/md5/b477573fdcc87babe861f62316833db0/MUMPS_5.0.1.tar.gz')
version('5.0.1', 'b477573fdcc87babe861f62316833db0')
variant('mpi', default=True,
@@ -61,6 +64,7 @@ class Mumps(Package):
depends_on('metis@5:', when='+metis')
depends_on('parmetis', when="+parmetis")
depends_on('blas')
+ depends_on('lapack')
depends_on('scalapack', when='+mpi')
depends_on('mpi', when='+mpi')
@@ -75,9 +79,9 @@ class Mumps(Package):
raise RuntimeError(
'You cannot use the variants parmetis or ptscotch without mpi')
- makefile_conf = ["LIBBLAS = %s" % to_link_flags(
- self.spec['blas'].blas_shared_lib)
- ]
+ lapack_blas = (self.spec['lapack'].lapack_libs +
+ self.spec['blas'].blas_libs)
+ makefile_conf = ["LIBBLAS = %s" % lapack_blas.joined()]
orderings = ['-Dpord']
@@ -136,11 +140,12 @@ class Mumps(Package):
'OPTC = %s -O ' % fpic])
if '+mpi' in self.spec:
+ scalapack = self.spec['scalapack'].scalapack_libs
makefile_conf.extend(
["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'),
"FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
"FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
- "SCALAP = %s" % self.spec['scalapack'].fc_link,
+ "SCALAP = %s" % scalapack.ld_flags,
"MUMPS_TYPE = par"])
else:
makefile_conf.extend(
@@ -151,7 +156,13 @@ class Mumps(Package):
# TODO: change the value to the correct one according to the
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
- makefile_conf.append("CDEFS = -DAdd_")
+ if self.compiler.name == 'intel':
+ # Intel Fortran compiler provides the main() function so
+ # C examples linked with the Fortran compiler require a
+ # hack defined by _DMAIN_COMP (see examples/c_example.c)
+ makefile_conf.append("CDEFS = -DAdd_ -DMAIN_COMP")
+ else:
+ makefile_conf.append("CDEFS = -DAdd_")
if '+shared' in self.spec:
if sys.platform == 'darwin':
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index 17124a0572..18f2ebe0bb 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -28,12 +28,12 @@ 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"
+ url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2.tar.gz"
- version('2.2b', '5651e8b7a72d7c77ca68da48f3a5d108')
- version('2.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2')
- version('2.0', '9fbb68a4111a8b6338e476dc657388b4')
- version('1.9', '5dc58ed08fd3142c260b70fe297e127c')
+ version('2.2', '939b65ebe5b89a5bc822cdab0f31f96e')
+ version('2.1', '0095ceecb19bbb7fb262131cb9c2cdd6')
+ version('2.0', '9fbb68a4111a8b6338e476dc657388b4')
+ version('1.9', '5dc58ed08fd3142c260b70fe297e127c')
patch('ad_lustre_rwcontig_open_source.patch', when='@1.9')
@@ -93,6 +93,7 @@ class Mvapich2(Package):
##########
# FIXME : CUDA support is missing
+ depends_on('bison')
depends_on('libpciaccess')
def url_for_version(self, version):
@@ -225,8 +226,19 @@ class Mvapich2(Package):
self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx')
self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
+ self.spec.mpicxx_shared_libs = [
+ join_path(self.prefix.lib, 'libmpicxx.{0}'.format(dso_suffix)),
+ join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix))
+ ]
def install(self, spec, prefix):
+ # Until we can pass variants such as +fortran through virtual
+ # dependencies depends_on('mpi'), require Fortran compiler to
+ # avoid delayed build errors in dependents.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ raise InstallError('Mvapich2 requires both C and Fortran ',
+ 'compilers!')
+
# we'll set different configure flags depending on our
# environment
configure_args = [
diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py
index 113c48c18f..29e3b27d6e 100644
--- a/var/spack/repos/builtin/packages/mxml/package.py
+++ b/var/spack/repos/builtin/packages/mxml/package.py
@@ -26,10 +26,9 @@ from spack import *
class Mxml(Package):
- """
- Mini-XML is a small XML library that you can use to read and write XML
+ """Mini-XML is a small XML library that you can use to read and write XML
and XML-like data files in your application without requiring large
- non-standard libraries
+ non-standard libraries.
"""
homepage = "http://www.msweet.org"
diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py
index 792e3fe3c7..66cb2a6a54 100644
--- a/var/spack/repos/builtin/packages/nag/package.py
+++ b/var/spack/repos/builtin/packages/nag/package.py
@@ -30,7 +30,7 @@ class Nag(Package):
"""The NAG Fortran Compiler."""
homepage = "http://www.nag.com/nagware/np.asp"
- version('6.1', '1e29d9d435b7ccc2842a320150b28ba4')
+ version('6.1', 'f49bd548e0d5e2458b2dabb3ee01341a')
version('6.0', '3fa1e7f7b51ef8a23e6c687cdcad9f96')
# Licensing
@@ -43,8 +43,8 @@ class Nag(Package):
def url_for_version(self, version):
# TODO: url and checksum are architecture dependent
# TODO: We currently only support x86_64
- return 'http://www.nag.com/downloads/impl/npl6a%sna_amd64.tgz' % str(
- version).replace('.', '')
+ url = 'http://www.nag.com/downloads/impl/npl6a{0}na_amd64.tgz'
+ return url.format(version.joined)
def install(self, spec, prefix):
# Set installation directories
diff --git a/var/spack/repos/builtin/packages/xorg-util-macros/package.py b/var/spack/repos/builtin/packages/nano/package.py
index cd50d46826..3e87ec8ffe 100644
--- a/var/spack/repos/builtin/packages/xorg-util-macros/package.py
+++ b/var/spack/repos/builtin/packages/nano/package.py
@@ -25,15 +25,16 @@
from spack import *
-class XorgUtilMacros(Package):
- """The m4 macros used by all of the Xorg packages."""
+class Nano(Package):
+ """Tiny little text editor"""
- homepage = "http://www.example.com"
- url = "http://ftp.x.org/pub/individual/util/util-macros-1.19.0.tar.bz2"
+ homepage = "http://www.nano-editor.org"
+ url = "https://www.nano-editor.org/dist/v2.6/nano-2.6.3.tar.gz"
- version('1.19.0', '1cf984125e75f8204938d998a8b6c1e1')
+ version('2.6.3', '1213c7f17916e65afefc95054c1f90f9')
+ version('2.6.2', '58568a4b8a33841d774c25f285fc11c1')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/nauty/package.py b/var/spack/repos/builtin/packages/nauty/package.py
new file mode 100644
index 0000000000..0d5eed251b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nauty/package.py
@@ -0,0 +1,89 @@
+##############################################################################
+# 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
+##############################################################################
+
+import shutil
+from spack import *
+
+
+class Nauty(Package):
+ """nauty and Traces are programs for computing automorphism groups of
+ graphsq and digraphs"""
+ homepage = "http://pallini.di.uniroma1.it/index.html"
+ url = "http://pallini.di.uniroma1.it/nauty26r7.tar.gz"
+
+ version('2.6r7', 'b2b18e03ea7698db3fbe06c5d76ad8fe')
+ version('2.6r5', '91b03a7b069962e94fc9aac8831ce8d2')
+ version('2.5r9', 'e8ecd08b0892a1fb13329c147f08de6d')
+
+ def url_for_version(self, version):
+ url = "http://pallini.di.uniroma1.it/nauty{0}.tar.gz"
+ return url.format(version.joined)
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+ make()
+
+ exes = [
+ "NRswitchg",
+ "addedgeg",
+ "amtog",
+ "biplabg",
+ "catg",
+ "complg",
+ "converseg",
+ "copyg",
+ "countg",
+ "cubhamg",
+ "deledgeg",
+ "delptg",
+ "directg",
+ "dreadnaut",
+ "dretodot",
+ "dretog",
+ "genbg",
+ "genbgL",
+ "geng",
+ "genquarticg",
+ "genrang",
+ "genspecialg",
+ "gentourng",
+ "gentreeg",
+ "hamheuristic",
+ "labelg",
+ "linegraphg",
+ "listg",
+ "multig",
+ "newedgeg",
+ "pickg",
+ "planarg",
+ "ranlabg",
+ "shortg",
+ "subdivideg",
+ "twohamg",
+ "vcolg",
+ "watercluster2"]
+ mkdirp(prefix.bin)
+ for exe in exes:
+ shutil.copyfile(exe, join_path(prefix.bin, exe))
diff --git a/var/spack/repos/builtin/packages/ncdu/package.py b/var/spack/repos/builtin/packages/ncdu/package.py
index 2147319d3f..0842a592cc 100644
--- a/var/spack/repos/builtin/packages/ncdu/package.py
+++ b/var/spack/repos/builtin/packages/ncdu/package.py
@@ -26,8 +26,7 @@ from spack import *
class Ncdu(Package):
- """
- Ncdu is a disk usage analyzer with an ncurses interface. It is designed
+ """Ncdu is a disk usage analyzer with an ncurses interface. It is designed
to find space hogs on a remote server where you don't have an entire
gaphical setup available, but it is a useful tool even on regular desktop
systems. Ncdu aims to be fast, simple and easy to use, and should be able
diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py
new file mode 100644
index 0000000000..7d31c7a8f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ncl/package.py
@@ -0,0 +1,233 @@
+##############################################################################
+# 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
+import shutil
+import tempfile
+
+
+class Ncl(Package):
+ """NCL is an interpreted language designed specifically for
+ scientific data analysis and visualization. Supports NetCDF 3/4,
+ GRIB 1/2, HDF 4/5, HDF-EOD 2/5, shapefile, ASCII, binary.
+ Numerous analysis functions are built-in."""
+
+ homepage = "https://www.ncl.ucar.edu"
+
+ version('6.3.0', '4834df63d3b56778441246303ab921c4',
+ url='https://www.earthsystemgrid.org/download/fileDownload.html?'
+ 'logicalFileId=bec58cb3-cd9b-11e4-bb80-00c0f03d5b7c',
+ extension='tar.gz')
+ patch('spack_ncl.patch')
+
+ # This installation script is implemented according to this manual:
+ # http://www.ncl.ucar.edu/Download/build_from_src.shtml
+
+ variant('hdf4', default=False, description='Enable HDF4 support.')
+ variant('gdal', default=False, description='Enable GDAL support.')
+ variant('triangle', default=True, description='Enable Triangle support.')
+ variant('udunits2', default=True, description='Enable UDUNITS-2 support.')
+ variant('openmp', default=True, description='Enable OpenMP support.')
+
+ # Non-optional dependencies according to the manual:
+ depends_on('jpeg')
+ depends_on('netcdf')
+ depends_on('cairo')
+
+ # Also, the manual says that ncl requires zlib, but that comes as a
+ # mandatory dependency of libpng, which is a mandatory dependency of cairo.
+
+ # In Spack, we do not have an option to compile netcdf without netcdf-4
+ # support, so we will tell the ncl configuration script that we want
+ # support for netcdf-4, but the script assumes that hdf5 is compiled with
+ # szip support. We introduce this restriction with the following dependency
+ # statement.
+ depends_on('hdf5@:1.8+szip')
+
+ # In Spack, we also do not have an option to compile netcdf without DAP
+ # support, so we will tell the ncl configuration script that we have it.
+
+ # Some of the optional dependencies according to the manual:
+ depends_on('hdf', when='+hdf4')
+ depends_on('gdal', when='+gdal')
+ depends_on('udunits2', when='+udunits2')
+
+ # We need src files of triangle to appear in ncl's src tree if we want
+ # triangle's features.
+ resource(
+ name='triangle',
+ url='http://www.netlib.org/voronoi/triangle.zip',
+ md5='10aff8d7950f5e0e2fb6dd2e340be2c9',
+ placement='triangle_src',
+ when='+triangle')
+
+ def install(self, spec, prefix):
+
+ if (self.compiler.fc is None) or (self.compiler.cc is None):
+ raise InstallError('NCL package requires both '
+ 'C and Fortran compilers.')
+
+ self.prepare_site_config()
+ self.prepare_install_config()
+ self.prepare_src_tree()
+ make('Everything', parallel=False)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('NCARG_ROOT', self.spec.prefix)
+
+ def prepare_site_config(self):
+ fc_flags = []
+ cc_flags = []
+ c2f_flags = []
+
+ if '+openmp' in self.spec:
+ fc_flags.append(self.compiler.openmp_flag)
+ cc_flags.append(self.compiler.openmp_flag)
+
+ if self.compiler.name == 'gcc':
+ fc_flags.append('-fno-range-check')
+ c2f_flags.extend(['-lgfortran'])
+ elif self.compiler.name == 'intel':
+ fc_flags.append('-fp-model precise')
+ cc_flags.append('-fp-model precise')
+ c2f_flags.extend(['-lifcore', '-lifport'])
+
+ with open('./config/Spack', 'w') as f:
+ f.writelines([
+ '#define HdfDefines\n',
+ '#define CppCommand \'/usr/bin/env cpp -traditional\'\n',
+ '#define CCompiler cc\n',
+ '#define FCompiler fc\n',
+ ('#define CtoFLibraries ' + ' '.join(c2f_flags) + '\n'
+ if len(c2f_flags) > 0
+ else ''),
+ ('#define CtoFLibrariesUser ' + ' '.join(c2f_flags) + '\n'
+ if len(c2f_flags) > 0
+ else ''),
+ ('#define CcOptions ' + ' '.join(cc_flags) + '\n'
+ if len(cc_flags) > 0
+ else ''),
+ ('#define FcOptions ' + ' '.join(fc_flags) + '\n'
+ if len(fc_flags) > 0
+ else ''),
+ '#define BuildShared NO'
+ ])
+
+ def prepare_install_config(self):
+ # Remove the results of the previous configuration attempts.
+ self.delete_files('./Makefile', './config/Site.local')
+
+ # Generate an array of answers that will be passed to the interactive
+ # configuration script.
+ config_answers = [
+ # Enter Return to continue
+ '\n',
+ # Build NCL?
+ 'y\n',
+ # Parent installation directory :
+ '\'' + self.spec.prefix + '\'\n',
+ # System temp space directory :
+ '\'' + tempfile.mkdtemp(prefix='ncl_ncar_') + '\'\n',
+ # Build NetCDF4 feature support (optional)?
+ 'y\n'
+ ]
+
+ if '+hdf4' in self.spec:
+ config_answers.extend([
+ # Build HDF4 support (optional) into NCL?
+ 'y\n',
+ # Also build HDF4 support (optional) into raster library?
+ 'y\n',
+ # Did you build HDF4 with szip support?
+ 'y\n' if self.spec.satisfies('^hdf+szip') else 'n\n'
+ ])
+ else:
+ config_answers.extend([
+ # Build HDF4 support (optional) into NCL?
+ 'n\n',
+ # Also build HDF4 support (optional) into raster library?
+ 'n\n'
+ ])
+
+ config_answers.extend([
+ # Build Triangle support (optional) into NCL
+ 'y\n' if '+triangle' in self.spec else 'n\n',
+ # If you are using NetCDF V4.x, did you enable NetCDF-4 support?
+ 'y\n',
+ # Did you build NetCDF with OPeNDAP support?
+ 'y\n',
+ # Build GDAL support (optional) into NCL?
+ 'y\n' if '+gdal' in self.spec else 'n\n',
+ # Build Udunits-2 support (optional) into NCL?
+ 'y\n' if '+uduints2' in self.spec else 'n\n',
+ # Build Vis5d+ support (optional) into NCL?
+ 'n\n',
+ # Build HDF-EOS2 support (optional) into NCL?
+ 'n\n',
+ # Build HDF5 support (optional) into NCL?
+ 'y\n',
+ # Build HDF-EOS5 support (optional) into NCL?
+ 'n\n',
+ # Build GRIB2 support (optional) into NCL?
+ 'n\n',
+ # Enter local library search path(s) :
+ # The paths will be passed by the Spack wrapper.
+ ' \n',
+ # Enter local include search path(s) :
+ # All other paths will be passed by the Spack wrapper.
+ '\'' + join_path(self.spec['freetype'].prefix.include,
+ 'freetype2') + '\'\n',
+ # Go back and make more changes or review?
+ 'n\n',
+ # Save current configuration?
+ 'y\n'
+ ])
+
+ config_answers_filename = 'spack-config.in'
+ config_script = Executable('./Configure')
+
+ with open(config_answers_filename, 'w') as f:
+ f.writelines(config_answers)
+
+ with open(config_answers_filename, 'r') as f:
+ config_script(input=f)
+
+ def prepare_src_tree(self):
+ if '+triangle' in self.spec:
+ triangle_src = join_path(self.stage.source_path, 'triangle_src')
+ triangle_dst = join_path(self.stage.source_path, 'ni', 'src',
+ 'lib', 'hlu')
+ shutil.copy(join_path(triangle_src, 'triangle.h'), triangle_dst)
+ shutil.copy(join_path(triangle_src, 'triangle.c'), triangle_dst)
+
+ @staticmethod
+ def delete_files(*filenames):
+ for filename in filenames:
+ if os.path.exists(filename):
+ try:
+ os.remove(filename)
+ except OSError, e:
+ raise InstallError('Failed to delete file %s: %s' % (
+ e.filename, e.strerror))
diff --git a/var/spack/repos/builtin/packages/ncl/spack_ncl.patch b/var/spack/repos/builtin/packages/ncl/spack_ncl.patch
new file mode 100644
index 0000000000..ebbecc43ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ncl/spack_ncl.patch
@@ -0,0 +1,30 @@
+--- a/config/ymake 2015-03-16 22:21:42.000000000 +0100
++++ b/config/ymake 2016-10-14 13:44:49.530646098 +0200
+@@ -537,0 +538,3 @@
++# We want to have our own definitions for spack
++set sysincs = Spack
++
+--- a/Configure 2015-03-16 22:22:17.000000000 +0100
++++ b/Configure 2016-10-14 13:49:42.157631106 +0200
+@@ -1137,5 +1137,13 @@
+- if (! -d $incs[1]) then
+- echo " *** Warning: <$incs[1]> does not exist"
+- echo ""
+- goto proc_locincdir
+- else
++
++ # We don't want our path(s) to be preprocessed by cpp
++ # inside ymake script. That is why we pass them in quotes (')
++ # to this script. But if we do so, the following condition
++ # is always false. That is why we comment it out and promise
++ # to pass only correct path(s). You might want to do the same
++ # thing for the libraries search path(s).
++
++ # if (! -d $incs[1]) then
++ # echo " *** Warning: <$incs[1]> does not exist"
++ # echo ""
++ # goto proc_locincdir
++ # else
+@@ -1143 +1151 @@
+- endif
++ # endif
diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py
index 16d72b4593..28dfe8f059 100644
--- a/var/spack/repos/builtin/packages/nco/package.py
+++ b/var/spack/repos/builtin/packages/nco/package.py
@@ -32,22 +32,29 @@ class Nco(Package):
homepage = "https://sourceforge.net/projects/nco"
url = "https://github.com/nco/nco/archive/4.5.5.tar.gz"
+ version('4.6.1', 'ef43cc989229c2790a9094bd84728fd8')
version('4.5.5', '9f1f1cb149ad6407c5a03c20122223ce')
# See "Compilation Requirements" at:
# http://nco.sourceforge.net/#bld
+ variant('mpi', default=True)
depends_on('netcdf')
- depends_on('antlr@2.7.7+cxx') # (required for ncap2)
- depends_on('gsl') # (desirable for ncap2)
- depends_on('udunits2') # (allows dimensional unit transformations)
- # depends_on('opendap') # (enables network transparency),
+ depends_on('antlr@2.7.7+cxx') # required for ncap2
+ depends_on('gsl') # desirable for ncap2
+ depends_on('udunits2') # allows dimensional unit transformations
+ # depends_on('opendap') # enables network transparency
def install(self, spec, prefix):
+ # Workaround until variant forwarding works properly
+ if '+mpi' in spec and spec.satisfies('^netcdf~mpi'):
+ raise RuntimeError('Invalid spec. Package netcdf requires '
+ 'netcdf+mpi, but spec asked for netcdf~mpi.')
+
opts = [
'--prefix=%s' % prefix,
- '--disable-openmp', # TODO: Make this a variant
- '--disable-dap', # TODO: Make this a variant
+ '--disable-openmp', # TODO: Make this a variant
+ '--disable-dap', # TODO: Make this a variant
'--disable-esmf']
configure(*opts)
make()
diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py
index aaacbac7b1..e4fd5bf269 100644
--- a/var/spack/repos/builtin/packages/ncurses/package.py
+++ b/var/spack/repos/builtin/packages/ncurses/package.py
@@ -50,7 +50,10 @@ class Ncurses(Package):
"--enable-widec",
"--enable-overwrite",
"--disable-lib-suffixes",
- "--without-ada"]
+ "--without-ada",
+ "--enable-pc-files",
+ "--with-pkg-config-libdir={0}/lib/pkgconfig".format(prefix)
+ ]
configure(*opts)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py
index f61e6984b5..5c3cf300d2 100644
--- a/var/spack/repos/builtin/packages/ncview/package.py
+++ b/var/spack/repos/builtin/packages/ncview/package.py
@@ -32,14 +32,13 @@ class Ncview(Package):
version('2.1.7', 'debd6ca61410aac3514e53122ab2ba07')
- depends_on("netcdf")
- depends_on("udunits2")
-
- # OS Dependencies
- # Ubuntu: apt-get install libxaw7-dev
- # CentOS 7: yum install libXaw-devel
+ depends_on('netcdf')
+ depends_on('udunits2')
+ depends_on('libpng')
+ depends_on('libxaw')
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py
index ab40c14340..b1e406157b 100644
--- a/var/spack/repos/builtin/packages/netcdf/package.py
+++ b/var/spack/repos/builtin/packages/netcdf/package.py
@@ -27,8 +27,8 @@ from spack import *
class Netcdf(Package):
"""NetCDF is a set of software libraries and self-describing,
- machine-independent data formats that support the creation, access,
- and sharing of array-oriented scientific data.
+ machine-independent data formats that support the creation, access,
+ and sharing of array-oriented scientific data.
"""
@@ -41,21 +41,48 @@ class Netcdf(Package):
variant('mpi', default=True, description='Enables MPI parallelism')
variant('hdf4', default=False, description='Enable HDF4 support')
+ # These variants control the number of dimensions (i.e. coordinates and
+ # attributes) and variables (e.g. time, entity ID, number of coordinates)
+ # that can be used in any particular NetCDF file.
+ variant('maxdims', default=1024,
+ description='Defines the maximum dimensions of NetCDF files.')
+ variant('maxvars', default=8192,
+ description='Defines the maximum variables of NetCDF files.')
depends_on("m4", type='build')
depends_on("hdf", when='+hdf4')
# Required for DAP support
- depends_on("curl")
+ depends_on("curl@7.18.0:")
# Required for NetCDF-4 support
- depends_on("zlib")
- depends_on('hdf5@:1.8+mpi', when='@:4.4.0+mpi')
- depends_on('hdf5+mpi', when='@4.4.1:+mpi')
- depends_on('hdf5@:1.8~mpi', when='@:4.4.0~mpi')
- depends_on('hdf5~mpi', when='@4.4.1:~mpi')
+ depends_on("zlib@1.2.5:")
+ depends_on('hdf5')
+
+ # NetCDF 4.4.0 and prior have compatibility issues with HDF5 1.10 and later
+ # https://github.com/Unidata/netcdf-c/issues/250
+ depends_on('hdf5@:1.8', when='@:4.4.0')
+
+ def patch(self):
+ try:
+ max_dims = int(self.spec.variants['maxdims'].value)
+ max_vars = int(self.spec.variants['maxvars'].value)
+ except (ValueError, TypeError):
+ raise TypeError('NetCDF variant values max[dims|vars] must be '
+ 'integer values.')
+
+ ff = FileFilter(join_path('include', 'netcdf.h'))
+ ff.filter(r'^(#define\s+NC_MAX_DIMS\s+)\d+(.*)$',
+ r'\1{0}\2'.format(max_dims))
+ ff.filter(r'^(#define\s+NC_MAX_VARS\s+)\d+(.*)$',
+ r'\1{0}\2'.format(max_vars))
def install(self, spec, prefix):
+ # Workaround until variant forwarding works properly
+ if '+mpi' in spec and spec.satisfies('^hdf5~mpi'):
+ raise RuntimeError('Invalid spec. Package netcdf requires '
+ 'hdf5+mpi, but spec asked for hdf5~mpi.')
+
# Environment variables
CPPFLAGS = []
LDFLAGS = []
@@ -99,7 +126,7 @@ class Netcdf(Package):
LDFLAGS.append("-L%s/lib" % spec['hdf'].prefix)
LIBS.append("-l%s" % "jpeg")
- if 'szip' in spec:
+ if '+szip' in spec:
CPPFLAGS.append("-I%s/include" % spec['szip'].prefix)
LDFLAGS.append("-L%s/lib" % spec['szip'].prefix)
LIBS.append("-l%s" % "sz")
@@ -114,4 +141,8 @@ class Netcdf(Package):
configure(*config_args)
make()
+
+ if self.run_tests:
+ make("check")
+
make("install")
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py
index 08c94a5c9b..4b03259cbd 100644
--- a/var/spack/repos/builtin/packages/netlib-lapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py
@@ -1,4 +1,4 @@
-##############################################################################
+#############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
@@ -36,6 +36,7 @@ class NetlibLapack(Package):
homepage = "http://www.netlib.org/lapack/"
url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz"
+ version('3.6.1', '421b2cb72e15f237e144428f9c460ee0')
version('3.6.0', 'f2f6c67134e851fe189bb3ca1fbb5101')
version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf')
version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478')
@@ -66,6 +67,20 @@ class NetlibLapack(Package):
'${CMAKE_CURRENT_SOURCE_DIR}/cmake/',
'CBLAS/CMakeLists.txt', string=True)
+ @property
+ def blas_libs(self):
+ shared = True if '+shared' in self.spec else False
+ return find_libraries(
+ ['libblas'], root=self.prefix, shared=shared, recurse=True
+ )
+
+ @property
+ def lapack_libs(self):
+ shared = True if '+shared' in self.spec else False
+ return find_libraries(
+ ['liblapack'], root=self.prefix, shared=shared, recurse=True
+ )
+
def install_one(self, spec, prefix, shared):
cmake_args = [
'-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'),
@@ -75,13 +90,20 @@ class NetlibLapack(Package):
if spec.satisfies('@3.6.0:'):
cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS
+ if self.compiler.name == 'intel':
+ # Intel compiler finds serious syntax issues when trying to
+ # build CBLAS and LapackE
+ cmake_args.extend(['-DCBLAS=OFF'])
+ cmake_args.extend(['-DLAPACKE:BOOL=OFF'])
+
+ # deprecated routines are commonly need by, for example, suitesparse
+ # Note that OpenBLAS spack is built with deprecated routines
+ cmake_args.extend(['-DBUILD_DEPRECATED:BOOL=ON'])
+
if '+external-blas' in spec:
- # TODO : mechanism to specify the library should be more general,
- # TODO : but this allows to have an hook to an external blas
cmake_args.extend([
'-DUSE_OPTIMIZED_BLAS:BOOL=ON',
- '-DBLAS_LIBRARIES:PATH=%s' % join_path(
- spec['blas'].prefix.lib, 'libblas.a')
+ '-DBLAS_LIBRARIES:PATH=%s' % spec['blas'].blas_libs.joined(';')
])
cmake_args.extend(std_cmake_args)
@@ -99,18 +121,3 @@ class NetlibLapack(Package):
# Build shared libraries if requested.
if '+shared' in spec:
self.install_one(spec, prefix, True)
-
- def setup_dependent_package(self, module, dspec):
- # This is WIP for a prototype interface for virtual packages.
- # We can update this as more builds start depending on BLAS/LAPACK.
- libdir = find_library_path(
- 'libblas.a', self.prefix.lib64, self.prefix.lib)
-
- self.spec.blas_static_lib = join_path(libdir, 'libblas.a')
- self.spec.lapack_static_lib = join_path(libdir, 'liblapack.a')
-
- if '+shared' in self.spec:
- self.spec.blas_shared_lib = join_path(
- libdir, 'libblas.%s' % dso_suffix)
- self.spec.lapack_shared_lib = join_path(
- libdir, 'liblapack.%s' % dso_suffix)
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index 49b8633209..578d2d8988 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -28,10 +28,11 @@ import sys
class NetlibScalapack(Package):
"""ScaLAPACK is a library of high-performance linear algebra routines for
- parallel distributed memory machines"""
+ parallel distributed memory machines
+ """
homepage = "http://www.netlib.org/scalapack/"
- url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
+ url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
version('2.0.2', '2f75e600a2ba155ed9ce974a1c4b536f')
version('2.0.1', '17b8cde589ea0423afe1ec43e7499161')
@@ -39,33 +40,47 @@ class NetlibScalapack(Package):
# versions before 2.0.0 are not using cmake and requires blacs as
# a separated package
- variant('shared', default=True,
- description='Build the shared library version')
- variant('fpic', default=False, description="Build with -fpic compiler option")
+ variant(
+ 'shared',
+ default=True,
+ description='Build the shared library version'
+ )
+ variant(
+ 'fpic',
+ default=False,
+ description='Build with -fpic compiler option'
+ )
provides('scalapack')
depends_on('mpi')
depends_on('lapack')
+ depends_on('blas')
depends_on('cmake', when='@2.0.0:', type='build')
+ @property
+ def scalapack_libs(self):
+ shared = True if '+shared' in self.spec else False
+ return find_libraries(
+ ['libscalapack'], root=self.prefix, shared=shared, recurse=True
+ )
+
def install(self, spec, prefix):
options = [
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else
'OFF'),
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else
- 'ON'),
- # forces scalapack to use find_package(LAPACK):
- "-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON",
+ 'ON')
]
# Make sure we use Spack's Lapack:
+ blas = spec['blas'].blas_libs
+ lapack = spec['lapack'].lapack_libs
options.extend([
'-DLAPACK_FOUND=true',
'-DLAPACK_INCLUDE_DIRS=%s' % spec['lapack'].prefix.include,
- '-DLAPACK_LIBRARIES=%s' % (
- spec['lapack'].lapack_shared_lib if '+shared' in spec else
- spec['lapack'].lapack_static_lib),
+ '-DLAPACK_LIBRARIES=%s' % (lapack.joined(';')),
+ '-DBLAS_LIBRARIES=%s' % (blas.joined(';'))
])
if '+fpic' in spec:
@@ -84,12 +99,3 @@ class NetlibScalapack(Package):
# The shared libraries are not installed correctly on Darwin:
if (sys.platform == 'darwin') and ('+shared' in spec):
fix_darwin_install_name(prefix.lib)
-
- def setup_dependent_package(self, module, dependent_spec):
- spec = self.spec
- lib_suffix = dso_suffix if '+shared' in spec else 'a'
-
- spec.fc_link = '-L%s -lscalapack' % spec.prefix.lib
- spec.cc_link = spec.fc_link
- spec.libraries = [join_path(spec.prefix.lib,
- 'libscalapack.%s' % lib_suffix)]
diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py
index 02e9ef5f1e..7e2b758bc0 100644
--- a/var/spack/repos/builtin/packages/nettle/package.py
+++ b/var/spack/repos/builtin/packages/nettle/package.py
@@ -29,14 +29,19 @@ class Nettle(Package):
"""The Nettle package contains the low-level cryptographic library
that is designed to fit easily in many contexts."""
- homepage = "http://www.example.com"
+ homepage = "https://www.lysator.liu.se/~nisse/nettle/"
url = "http://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gz"
+ version('3.2', 'afb15b4764ebf1b4e6d06c62bd4d29e4')
version('2.7', '2caa1bd667c35db71becb93c5d89737f')
depends_on('gmp')
+ depends_on('m4', type='build')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/nmap/package.py b/var/spack/repos/builtin/packages/nmap/package.py
new file mode 100644
index 0000000000..f4576cde53
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nmap/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# 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 Nmap(AutotoolsPackage):
+ """Nmap ("Network Mapper") is a free and open source (license)
+ utility for network discovery and security auditing.
+ It also provides ncat an updated nc"""
+
+ homepage = "https://nmap.org"
+ url = "https://nmap.org/dist/nmap-7.31.tar.bz2"
+
+ version('7.31', 'f2f6660142a777862342a58cc54258ea')
+ version('7.30', '8d86797d5c9e56de571f9630c0e6b5f8')
diff --git a/var/spack/repos/builtin/packages/nwchem/package.py b/var/spack/repos/builtin/packages/nwchem/package.py
new file mode 100644
index 0000000000..a8b9f3d3e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nwchem/package.py
@@ -0,0 +1,170 @@
+##############################################################################
+# 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 sys
+import os
+
+
+class Nwchem(Package):
+ """High-performance computational chemistry software"""
+
+ homepage = "http://www.nwchem-sw.org"
+ url = "http://www.nwchem-sw.org/images/Nwchem-6.6.revision27746-src.2015-10-20.tar.gz"
+
+ version('6.6', 'c581001c004ea5e5dfacb783385825e3',
+ url='http://www.nwchem-sw.org/images/Nwchem-6.6.revision27746-src.2015-10-20.tar.gz')
+
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('mpi')
+ depends_on('scalapack')
+
+ depends_on('python@2.7:2.8', type=nolink)
+
+ # patches for 6.6-27746:
+ urls_for_patches = {
+ '@6.6': [
+ ('http://www.nwchem-sw.org/images/Tddft_mxvec20.patch.gz', 'f91c6a04df56e228fe946291d2f38c9a'),
+ ('http://www.nwchem-sw.org/images/Tools_lib64.patch.gz', 'b71e8dbad27f1c97b60a53ec34d3f6e0'),
+ ('http://www.nwchem-sw.org/images/Config_libs66.patch.gz', 'cc4be792e7b5128c3f9b7b1167ade2cf'),
+ ('http://www.nwchem-sw.org/images/Cosmo_meminit.patch.gz', '1d94685bf3b72d8ecd40c46334348ca7'),
+ ('http://www.nwchem-sw.org/images/Sym_abelian.patch.gz', 'b19cade61c787916a73a4aaf6e2445d6'),
+ ('http://www.nwchem-sw.org/images/Xccvs98.patch.gz', 'b9aecc516a3551dcf871cb2f066598cb'),
+ ('http://www.nwchem-sw.org/images/Dplot_tolrho.patch.gz', '0a5bdad63d2d0ffe46b28db7ad6d9cec'),
+ ('http://www.nwchem-sw.org/images/Driver_smalleig.patch.gz', 'c3f609947220c0adb524b02c316b5564'),
+ ('http://www.nwchem-sw.org/images/Ga_argv.patch.gz', '7a665c981cfc17187455e1826f095f6f'),
+ ('http://www.nwchem-sw.org/images/Raman_displ.patch.gz', 'ed334ca0b2fe81ce103ef8cada990c4c'),
+ ('http://www.nwchem-sw.org/images/Ga_defs.patch.gz', '0c3cab4d5cbef5acac16ffc5e6f869ef'),
+ ('http://www.nwchem-sw.org/images/Zgesvd.patch.gz', '8fd5a11622968ef4351bd3d5cddce8f2'),
+ ('http://www.nwchem-sw.org/images/Cosmo_dftprint.patch.gz', '64dcf27f3c6ced2cadfb504fa66e9d08'),
+ ('http://www.nwchem-sw.org/images/Txs_gcc6.patch.gz', '56595a7252da051da13f94edc54fe059'),
+ ('http://www.nwchem-sw.org/images/Gcc6_optfix.patch.gz', 'c6642c21363c09223784b47b8636047d'),
+ ('http://www.nwchem-sw.org/images/Util_gnumakefile.patch.gz', 'af74ea2e32088030137001ce5cb047c5'),
+ ('http://www.nwchem-sw.org/images/Util_getppn.patch.gz', '8dec8ee198bf5ec4c3a22a6dbf31683c'),
+ ('http://www.nwchem-sw.org/images/Gcc6_macs_optfix.patch.gz', 'a891a2713aac8b0423c8096461c243eb'),
+ ('http://www.nwchem-sw.org/images/Notdir_fc.patch.gz', '2dc997d4ab3719ac7964201adbc6fd79')
+ ]
+ }
+ # Iterate over patches
+ for condition, urls in urls_for_patches.iteritems():
+ for url, md5 in urls:
+ patch(url, when=condition, level=0, md5=md5)
+
+ def install(self, spec, prefix):
+ scalapack = spec['scalapack'].scalapack_libs
+ lapack = spec['lapack'].lapack_libs
+ blas = spec['blas'].blas_libs
+ # see http://www.nwchem-sw.org/index.php/Compiling_NWChem
+ args = []
+ args.extend([
+ 'NWCHEM_TOP=%s' % self.stage.source_path,
+ # NWCHEM is picky about FC and CC. They should NOT be full path.
+ # see http://www.nwchem-sw.org/index.php/Special:AWCforum/sp/id7524
+ 'CC=%s' % os.path.basename(spack_cc),
+ 'FC=%s' % os.path.basename(spack_fc),
+ 'USE_MPI=y',
+ 'MPI_LOC=%s' % spec['mpi'].prefix,
+ 'USE_PYTHONCONFIG=y',
+ 'PYTHONVERSION=%s' % spec['python'].version.up_to(2),
+ 'PYTHONHOME=%s' % spec['python'].prefix,
+ 'BLASOPT=%s' % ((lapack + blas).ld_flags),
+ 'BLAS_LIB=%s' % blas.ld_flags,
+ 'LAPACK_LIB=%s' % lapack.ld_flags,
+ 'USE_SCALAPACK=y',
+ 'SCALAPACK=%s' % scalapack.ld_flags,
+ 'NWCHEM_MODULES=all python',
+ 'NWCHEM_LONG_PATHS=Y' # by default NWCHEM_TOP is 64 char max
+ ])
+
+ # TODO: query if blas/lapack/scalapack uses 64bit Ints
+ # A flag to distinguish between 32bit and 64bit integers in linear
+ # algebra (Blas, Lapack, Scalapack)
+ use32bitLinAlg = True
+
+ if use32bitLinAlg:
+ args.extend([
+ 'USE_64TO32=y',
+ 'BLAS_SIZE=4',
+ 'LAPACK_SIZE=4',
+ 'SCALAPACK_SIZE=4'
+ ])
+ else:
+ args.extend([
+ 'BLAS_SIZE=8',
+ 'LAPACK_SIZE=8'
+ 'SCALAPACK_SIZE=8'
+ ])
+
+ if sys.platform == 'darwin':
+ target = 'MACX64'
+ args.extend([
+ 'CFLAGS_FORGA=-DMPICH_NO_ATTR_TYPE_TAGS'
+ ])
+ else:
+ target = 'LINUX64'
+
+ args.extend(['NWCHEM_TARGET=%s' % target])
+
+ with working_dir('src'):
+ make('nwchem_config', *args)
+ if use32bitLinAlg:
+ make('64_to_32', *args)
+ make(*args)
+
+ # need to install by hand. Follow Ubuntu:
+ # http://packages.ubuntu.com/trusty/all/nwchem-data/filelist
+ # http://packages.ubuntu.com/trusty/amd64/nwchem/filelist
+ share_path = join_path(prefix, 'share', 'nwchem')
+ mkdirp(prefix.bin)
+
+ install_tree('data', share_path)
+ install_tree(join_path('basis', 'libraries'),
+ join_path(share_path, 'libraries'))
+ install_tree(join_path('nwpw', 'libraryps'),
+ join_path(share_path, 'libraryps'))
+
+ b_path = join_path(self.stage.source_path, 'bin',
+ target, 'nwchem')
+ chmod = which('chmod')
+ chmod('+x', b_path)
+ install(b_path, prefix.bin)
+
+ # Finally, make user's life easier by creating a .nwchemrc file
+ # to point to the required data files.
+ nwchemrc = """\
+ nwchem_basis_library {data}/libraries/
+ nwchem_nwpw_library {data}/libraryps/
+ ffield amber
+ amber_1 {data}/amber_s/
+ amber_2 {data}/amber_q/
+ amber_3 {data}/amber_x/
+ amber_4 {data}/amber_u/
+ spce {data}/solvents/spce.rst
+ charmm_s {data}/charmm_s/
+ charmm_x {data}/charmm_x/
+""".format(data=share_path)
+ with open(".nwchemrc", 'w') as f:
+ f.write(nwchemrc)
+ install(".nwchemrc", share_path)
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py
index 4f9f7b2e12..2d518d83c3 100644
--- a/var/spack/repos/builtin/packages/oce/package.py
+++ b/var/spack/repos/builtin/packages/oce/package.py
@@ -54,6 +54,11 @@ class Oce(Package):
# https://github.com/tpaviot/oce/commit/61cb965b9ffeca419005bc15e635e67589c421dd.patch
patch('null.patch', when='@0.16:0.17.1')
+ # fix build with Xcode 8 "previous definition of CLOCK_REALTIME"
+ # reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643
+ if (platform.system() == "Darwin") and (platform.mac_ver()[0] == '10.12'):
+ patch('sierra.patch')
+
def install(self, spec, prefix):
options = []
options.extend(std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/oce/sierra.patch b/var/spack/repos/builtin/packages/oce/sierra.patch
new file mode 100644
index 0000000000..8db3af5e37
--- /dev/null
+++ b/var/spack/repos/builtin/packages/oce/sierra.patch
@@ -0,0 +1,45 @@
+diff --git a/adm/cmake/TKernel/CMakeLists.txt b/adm/cmake/TKernel/CMakeLists.txt
+index 54e241e..72873c6 100644
+--- a/adm/cmake/TKernel/CMakeLists.txt
++++ b/adm/cmake/TKernel/CMakeLists.txt
+@@ -29,7 +29,7 @@ if(WIN32)
+ set(TOOLKIT_LIBS ${TOOLKIT_LIBS} ${CSF_SOCKETLibs_LIB} ${CSF_advapi32_LIB} ${CSF_gdi32_LIB} ${CSF_user32_LIB} ${CSF_kernel32_LIB} ${CSF_psapi_LIB})
+ else(WIN32)
+ #  An implementation for Mac OS X has been added in src/OSD/gettime_osx.h
+- if(NOT APPLE)
++ if(APPLE)
+ include( CheckFunctionExists )
+ check_function_exists( clock_gettime CLOCK_GETTIME_IN_LIBC )
+ if(NOT CLOCK_GETTIME_IN_LIBC)
+@@ -40,7 +40,7 @@ else(WIN32)
+ endif(NOT CLOCK_GETTIME_IN_LIBRT)
+ set(TOOLKIT_LIBS ${TOOLKIT_LIBS} rt)
+ endif(NOT CLOCK_GETTIME_IN_LIBC)
+- endif(NOT APPLE)
++ endif(APPLE)
+ endif(WIN32)
+
+ # Adde-DHAVE_TBB in TKernel in order to benefit from Standard_MMgrTBBalloc
+@@ -70,4 +70,3 @@ if (OCE_BUILD_TKERNEL_WITH_INSTALL_RPATH)
+ set_target_properties_install_rpath(${TOOLKIT} "${OCE_INSTALL_LIB_DIR_RPATH};${OCE_INSTALL_PACKAGE_LIB_DIR_RPATH}")
+ set_target_properties(${TOOLKIT} PROPERTIES BUILD_WITH_INSTALL_RPATH ON)
+ endif ()
+-
+diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx
+index 444f844..25970d0 100644
+--- a/src/OSD/OSD_Chronometer.cxx
++++ b/src/OSD/OSD_Chronometer.cxx
+@@ -51,7 +51,7 @@
+ #include <mach/mach.h>
+ #endif
+
+-#if defined(__APPLE__) && defined(__MACH__)
++#if defined(__OOOOPPLE__) && defined(__MACH__)
+ #include "gettime_osx.h"
+ #endif
+
+@@ -283,4 +283,3 @@ void OSD_Chronometer::Show (Standard_Real& user,
+ system = Cumul_sys;
+ if (!StopSav) Start();
+ }
+-
diff --git a/var/spack/repos/builtin/packages/oclock/package.py b/var/spack/repos/builtin/packages/oclock/package.py
new file mode 100644
index 0000000000..84da93c36e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/oclock/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Oclock(Package):
+ """oclock is a simple analog clock using the SHAPE extension to make
+ a round (possibly transparent) window."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/oclock"
+ url = "https://www.x.org/archive/individual/app/oclock-1.0.3.tar.gz"
+
+ version('1.0.3', 'f25b05d987ef8ed6dd5a887c82eace62')
+
+ depends_on('libx11')
+ depends_on('libxmu')
+ depends_on('libxext')
+ depends_on('libxt')
+ depends_on('libxkbfile')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py
index 6fa2e0368f..adb760f06d 100644
--- a/var/spack/repos/builtin/packages/octopus/package.py
+++ b/var/spack/repos/builtin/packages/octopus/package.py
@@ -46,13 +46,13 @@ class Octopus(Package):
# FEAST, Libfm, PFFT, ISF, PNFFT
def install(self, spec, prefix):
+ lapack = spec['lapack'].lapack_libs
+ blas = spec['blas'].blas_libs
args = []
args.extend([
'--prefix=%s' % prefix,
- '--with-blas=%s' % to_link_flags(
- spec['blas'].blas_shared_lib),
- '--with-lapack=%s' % to_link_flags(
- spec['lapack'].lapack_shared_lib),
+ '--with-blas=%s' % blas.ld_flags,
+ '--with-lapack=%s' % lapack.ld_flags,
'--with-gsl-prefix=%s' % spec['gsl'].prefix,
'--with-libxc-prefix=%s' % spec['libxc'].prefix,
'CC=%s' % spec['mpi'].mpicc,
@@ -70,10 +70,13 @@ class Octopus(Package):
# --with-berkeleygw-prefix=${prefix}
])
- # Supposedly configure does not pick up the required flags for gfortran
- # Without it there are:
- # Error: Line truncated @ global.F90:157:132
- # Error: Unterminated character constant @ global.F90:157:20
+ # When preprocessor expands macros (i.e. CFLAGS) defined as quoted
+ # strings the result may be > 132 chars and is terminated.
+ # This will look to a compiler as an Unterminated character constant
+ # and produce Line truncated errors. To vercome this, add flags to
+ # let compiler know that the entire line is meaningful.
+ # TODO: For the lack of better approach, assume that clang is mixed
+ # with GNU fortran.
if spec.satisfies('%clang') or spec.satisfies('%gcc'):
args.extend([
'FCFLAGS=-O2 -ffree-line-length-none'
diff --git a/var/spack/repos/builtin/packages/opari2/package.py b/var/spack/repos/builtin/packages/opari2/package.py
index e901f8ed39..20c67716a4 100644
--- a/var/spack/repos/builtin/packages/opari2/package.py
+++ b/var/spack/repos/builtin/packages/opari2/package.py
@@ -22,13 +22,11 @@
# 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 Opari2(Package):
- """
- OPARI2 is a source-to-source instrumentation tool for OpenMP and hybrid
+ """OPARI2 is a source-to-source instrumentation tool for OpenMP and hybrid
codes. It surrounds OpenMP directives and runtime library calls with calls
to the POMP2 measurement interface. OPARI2 will provide you with a new
initialization method that allows for multi-directory and parallel builds
diff --git a/var/spack/repos/builtin/packages/openblas/openblas_icc.patch b/var/spack/repos/builtin/packages/openblas/openblas_icc.patch
new file mode 100644
index 0000000000..fb379aea41
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openblas/openblas_icc.patch
@@ -0,0 +1,253 @@
+diff --git a/kernel/x86_64/cscal_microk_bulldozer-2.c b/kernel/x86_64/cscal_microk_bulldozer-2.c
+index f470cf8..3abffc4 100644
+--- a/kernel/x86_64/cscal_microk_bulldozer-2.c
++++ b/kernel/x86_64/cscal_microk_bulldozer-2.c
+@@ -120,7 +120,7 @@ static void cscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -212,7 +212,7 @@ static void cscal_kernel_16_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -289,7 +289,7 @@ static void cscal_kernel_16_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -334,7 +334,7 @@ static void cscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+diff --git a/kernel/x86_64/cscal_microk_haswell-2.c b/kernel/x86_64/cscal_microk_haswell-2.c
+index 0424de3..48e3395 100644
+--- a/kernel/x86_64/cscal_microk_haswell-2.c
++++ b/kernel/x86_64/cscal_microk_haswell-2.c
+@@ -120,7 +120,7 @@ static void cscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "0", "1",
++ : "cc", //"0", "1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -212,7 +212,7 @@ static void cscal_kernel_16_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "0", "1",
++ : "cc", // "0", "1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -289,7 +289,7 @@ static void cscal_kernel_16_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -334,7 +334,7 @@ static void cscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "0", "1",
++ : "cc", //"0", "1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+diff --git a/kernel/x86_64/cscal_microk_steamroller-2.c b/kernel/x86_64/cscal_microk_steamroller-2.c
+index 763e7ad..8346e17 100644
+--- a/kernel/x86_64/cscal_microk_steamroller-2.c
++++ b/kernel/x86_64/cscal_microk_steamroller-2.c
+@@ -121,7 +121,7 @@ static void cscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "0", "1",
++ : "cc", //"0", "1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -213,7 +213,7 @@ static void cscal_kernel_16_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "0", "1",
++ : "cc", //"0", "1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -290,7 +290,7 @@ static void cscal_kernel_16_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -335,7 +335,7 @@ static void cscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "0", "1",
++ : "cc", //"0", "1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+diff --git a/kernel/x86_64/dscal.c b/kernel/x86_64/dscal.c
+index bbc1c96..b6bde6c 100644
+--- a/kernel/x86_64/dscal.c
++++ b/kernel/x86_64/dscal.c
+@@ -141,7 +141,7 @@ static void dscal_kernel_inc_8(BLASLONG n, FLOAT *alpha, FLOAT *x, BLASLONG inc_
+ "r" (alpha), // 3
+ "r" (inc_x), // 4
+ "r" (inc_x3) // 5
+- : "cc", "%0", "%1", "%2",
++ : "cc", //"%0", "%1", "%2",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+diff --git a/kernel/x86_64/zscal_microk_bulldozer-2.c b/kernel/x86_64/zscal_microk_bulldozer-2.c
+index 28fe734..03882d6 100644
+--- a/kernel/x86_64/zscal_microk_bulldozer-2.c
++++ b/kernel/x86_64/zscal_microk_bulldozer-2.c
+@@ -120,7 +120,7 @@ static void zscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -212,7 +212,7 @@ static void zscal_kernel_8_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -289,7 +289,7 @@ static void zscal_kernel_8_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -334,7 +334,7 @@ static void zscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+diff --git a/kernel/x86_64/zscal_microk_haswell-2.c b/kernel/x86_64/zscal_microk_haswell-2.c
+index a93308e..b1a34c1 100644
+--- a/kernel/x86_64/zscal_microk_haswell-2.c
++++ b/kernel/x86_64/zscal_microk_haswell-2.c
+@@ -120,7 +120,7 @@ static void zscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -212,7 +212,7 @@ static void zscal_kernel_8_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -289,7 +289,7 @@ static void zscal_kernel_8_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -334,7 +334,7 @@ static void zscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+diff --git a/kernel/x86_64/zscal_microk_steamroller-2.c b/kernel/x86_64/zscal_microk_steamroller-2.c
+index d611bf5..97b07ad 100644
+--- a/kernel/x86_64/zscal_microk_steamroller-2.c
++++ b/kernel/x86_64/zscal_microk_steamroller-2.c
+@@ -121,7 +121,7 @@ static void zscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -213,7 +213,7 @@ static void zscal_kernel_8_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -290,7 +290,7 @@ static void zscal_kernel_8_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
+@@ -335,7 +335,7 @@ static void zscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
+ "r" (n), // 0
+ "r" (x), // 1
+ "r" (alpha) // 2
+- : "cc", "%0", "%1",
++ : "cc", //"%0", "%1",
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11",
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 37f7a7005d..efdbc1d8b2 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -30,8 +30,9 @@ import os
class Openblas(Package):
"""OpenBLAS: An optimized BLAS library"""
homepage = "http://www.openblas.net"
- url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
+ url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
+ version('0.2.19', '28c998054fd377279741c6f0b9ea7941')
version('0.2.18', '805e7f660877d588ea7e3792cda2ee65')
version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1')
version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc')
@@ -49,6 +50,20 @@ class Openblas(Package):
provides('lapack')
patch('make.patch')
+ # This patch is in a pull request to OpenBLAS that has not been handled
+ # https://github.com/xianyi/OpenBLAS/pull/915
+ patch('openblas_icc.patch', when='%intel')
+
+ @property
+ def blas_libs(self):
+ shared = True if '+shared' in self.spec else False
+ return find_libraries(
+ ['libopenblas'], root=self.prefix, shared=shared, recurse=True
+ )
+
+ @property
+ def lapack_libs(self):
+ return self.blas_libs
def install(self, spec, prefix):
# As of 06/2016 there is no mechanism to specify that packages which
@@ -99,41 +114,11 @@ class Openblas(Package):
# no quotes around prefix (spack doesn't use a shell)
make('install', "PREFIX=%s" % prefix, *make_defs)
- # Blas virtual package should provide blas.a and libblas.a
- with working_dir(prefix.lib):
- symlink('libopenblas.a', 'blas.a')
- symlink('libopenblas.a', 'libblas.a')
- if '+shared' in spec:
- symlink('libopenblas.%s' % dso_suffix,
- 'libblas.%s' % dso_suffix)
-
- # Lapack virtual package should provide liblapack.a
- with working_dir(prefix.lib):
- symlink('libopenblas.a', 'liblapack.a')
- if '+shared' in spec:
- symlink('libopenblas.%s' % dso_suffix,
- 'liblapack.%s' % dso_suffix)
-
# Openblas may pass its own test but still fail to compile Lapack
# symbols. To make sure we get working Blas and Lapack, do a small
# test.
self.check_install(spec)
- def setup_dependent_package(self, module, dspec):
- # This is WIP for a prototype interface for virtual packages.
- # We can update this as more builds start depending on BLAS/LAPACK.
- libdir = find_library_path('libopenblas.a',
- self.prefix.lib64,
- self.prefix.lib)
-
- self.spec.blas_static_lib = join_path(libdir, 'libopenblas.a')
- self.spec.lapack_static_lib = self.spec.blas_static_lib
-
- if '+shared' in self.spec:
- self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' %
- dso_suffix)
- self.spec.lapack_shared_lib = self.spec.blas_shared_lib
-
def check_install(self, spec):
source_file = join_path(os.path.dirname(self.module.__file__),
'test_cblas_dgemm.c')
@@ -141,10 +126,10 @@ class Openblas(Package):
'test_cblas_dgemm.output')
include_flags = ["-I%s" % join_path(spec.prefix, "include")]
- link_flags = ["-L%s" % join_path(spec.prefix, "lib"),
- "-llapack",
- "-lblas",
- "-lpthread"]
+ link_flags = self.lapack_libs.ld_flags.split()
+ if self.compiler.name == 'intel':
+ link_flags.extend(["-lifcore"])
+ link_flags.extend(["-lpthread"])
if '+openmp' in spec:
link_flags.extend([self.compiler.openmp_flag])
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..eb76960024
--- /dev/null
+++ b/var/spack/repos/builtin/packages/opencoarrays/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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.7.4/OpenCoarrays-1.7.4.tar.gz"
+
+ version('1.7.4', '85ba87def461e3ff5a164de2e6482930')
+ version('1.6.2', '5a4da993794f3e04ea7855a6678981ba')
+
+ depends_on('cmake', type='build')
+ depends_on('mpi')
+
+ provides('coarrays')
+
+ def cmake_args(self):
+ args = []
+ args.append("-DCMAKE_C_COMPILER=%s" % self.spec['mpi'].mpicc)
+ args.append("-DCMAKE_Fortran_COMPILER=%s" % self.spec['mpi'].mpifc)
+ return args
diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py
index 8f592342b0..03cc7ba427 100644
--- a/var/spack/repos/builtin/packages/opencv/package.py
+++ b/var/spack/repos/builtin/packages/opencv/package.py
@@ -76,7 +76,7 @@ class Opencv(Package):
depends_on('vtk', when='+vtk')
depends_on('qt', when='+qt')
depends_on('jdk', when='+java')
- depends_on('py-numpy', when='+python')
+ depends_on('py-numpy', when='+python', type='nolink')
extends('python', when='+python')
diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py
index 1bc5b04f6f..988ebc155d 100644
--- a/var/spack/repos/builtin/packages/openjpeg/package.py
+++ b/var/spack/repos/builtin/packages/openjpeg/package.py
@@ -25,17 +25,18 @@
from spack import *
-class Openjpeg(Package):
- """
- OpenJPEG is an open-source JPEG 2000 codec written in C language.
+class Openjpeg(CMakePackage):
+ """OpenJPEG is an open-source JPEG 2000 codec written in C language.
+
It has been developed in order to promote the use of JPEG 2000, a
still-image compression standard from the Joint Photographic
Experts Group (JPEG).
Since April 2015, it is officially recognized by ISO/IEC and
ITU-T as a JPEG 2000 Reference Software.
"""
+
homepage = "https://github.com/uclouvain/openjpeg"
- url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
+ url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
version('2.1', '3e1c451c087f8462955426da38aa3b3d')
version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5')
@@ -44,9 +45,3 @@ class Openjpeg(Package):
version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e')
depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
-
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index b0efe27def..72b9b8dbd2 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -23,9 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
-
-import llnl.util.tty as tty
-
from spack import *
@@ -50,12 +47,14 @@ def _verbs_dir():
class Openmpi(Package):
- """Open MPI is a project combining technologies and resources from
- several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI)
- in order to build the best MPI library available. A completely
- new MPI-2 compliant implementation, Open MPI offers advantages
- for system and software vendors, application developers and
- computer science researchers.
+ """The Open MPI Project is an open source Message Passing Interface
+ implementation that is developed and maintained by a consortium
+ of academic, research, and industry partners. Open MPI is
+ therefore able to combine the expertise, technologies, and
+ resources from all across the High Performance Computing
+ community in order to build the best MPI library available.
+ Open MPI offers advantages for system and software vendors,
+ application developers and computer science researchers.
"""
homepage = "http://www.open-mpi.org"
@@ -63,6 +62,7 @@ class Openmpi(Package):
list_url = "http://www.open-mpi.org/software/ompi/"
list_depth = 3
+ version('2.0.1', '6f78155bd7203039d2448390f3b51c96')
version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674')
version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b')
version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c')
@@ -127,21 +127,10 @@ class Openmpi(Package):
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
-
- def setup_environment(self, spack_env, run_env):
- # 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):
- tty.warn('OpenMPI : FORTRAN compiler not found')
- tty.warn('OpenMPI : FORTRAN bindings will be disabled')
- spack_env.unset('FC')
- spack_env.unset('F77')
- # Setting an attribute here and using it in the 'install'
- # method is needed to ensure tty.warn is actually displayed
- # to user and not redirected to spack-build.out
- self.config_extra = ['--enable-mpi-fortran=none',
- '--disable-oshmem-fortran']
+ self.spec.mpicxx_shared_libs = [
+ join_path(self.prefix.lib, 'libmpi_cxx.{0}'.format(dso_suffix)),
+ join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix))
+ ]
@property
def verbs(self):
@@ -154,11 +143,22 @@ class Openmpi(Package):
return 'verbs'
def install(self, spec, prefix):
+ # Until we can pass variants such as +fortran through virtual
+ # dependencies depends_on('mpi'), require Fortran compiler to
+ # avoid delayed build errors in dependents.
+ 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",
"--enable-static"]
+ # for Open-MPI 2.0:, C++ bindings are disabled by default.
+ if self.spec.satisfies('@2.0:'):
+ config_args.extend(['--enable-mpi-cxx'])
+
if getattr(self, 'config_extra', None) is not None:
config_args.extend(self.config_extra)
diff --git a/var/spack/repos/builtin/packages/openscenegraph/package.py b/var/spack/repos/builtin/packages/openscenegraph/package.py
new file mode 100644
index 0000000000..565941ff0e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openscenegraph/package.py
@@ -0,0 +1,77 @@
+##############################################################################
+# 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 Openscenegraph(Package):
+ """OpenSceneGraph is an open source, high performance 3D graphics toolkit
+ that's used in a variety of visual simulation applications."""
+
+ homepage = "http://www.openscenegraph.org"
+ url = "http://trac.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.3.zip"
+
+ version('3.2.3', '02ffdad7744c747d8fad0d7babb58427')
+ version('3.1.5', '1c90b851b109849c985006486ef59822')
+
+ variant('debug', default=False, description='Builds a debug version of the library')
+ variant('shared', default=True, description='Builds a shared version of the library')
+
+ depends_on('cmake@2.8.7:', type='build')
+ depends_on('qt@4:')
+ depends_on('zlib')
+
+ def install(self, spec, prefix):
+ build_type = 'Debug' if '+debug' in spec else 'Release'
+ shared_status = 'ON' if '+shared' in spec else 'OFF'
+
+ cmake_args = std_cmake_args[:]
+ cmake_args.extend([
+ '-DCMAKE_BUILD_TYPE={0}'.format(build_type),
+ '-DDYNAMIC_OPENSCENEGRAPH={0}'.format(shared_status),
+ '-DDYNAMIC_OPENTHREADS={0}'.format(shared_status),
+ ])
+
+ # NOTE: This is necessary in order to allow OpenSceneGraph to compile
+ # despite containing a number of implicit bool to int conversions.
+ if spec.satisfies('%gcc'):
+ cmake_args.extend([
+ '-DCMAKE_C_FLAGS=-fpermissive',
+ '-DCMAKE_CXX_FLAGS=-fpermissive',
+ ])
+
+ with working_dir('spack-build', create=True):
+ cmake(
+ '..',
+ '-DZLIB_INCLUDE_DIR={0}'.format(spec['zlib'].prefix.include),
+ '-DZLIB_LIBRARY={0}/libz.{1}'.format(spec['zlib'].prefix.lib,
+ dso_suffix),
+ '-DBUILD_OSG_APPLICATIONS=OFF',
+ '-DOSG_NOTIFY_DISABLED=ON',
+ '-DLIB_POSTFIX=',
+ *cmake_args
+ )
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py
index 5e141060b2..c9707f760c 100644
--- a/var/spack/repos/builtin/packages/openspeedshop/package.py
+++ b/var/spack/repos/builtin/packages/openspeedshop/package.py
@@ -22,97 +22,105 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-##########################################################################
+##############################################################################
# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
#
-# 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; either version 2 of the License, or (at your option) any later
-# version.
+# 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; either version 2 of the License, or (at your option)
+# any later version.
#
# 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 GNU General Public License for more
-# details.
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
#
# You should have received a copy of the GNU 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
+import os.path
class Openspeedshop(Package):
"""OpenSpeedShop is a community effort by The Krell Institute with
- current direct funding from DOEs NNSA. It builds on top of a broad
- list of community infrastructures, most notably Dyninst and MRNet
- from UW, libmonitor from Rice, and PAPI from UTK. OpenSpeedShop is an
- open source multi platform Linux performance tool which is targeted
- to support performance analysis of applications running on both
- single node and large scale IA64, IA32, EM64T, AMD64, PPC, ARM, Blue
- Gene and Cray platforms. OpenSpeedShop development is hosted by the
- Krell Institute. The infrastructure and base components of
- OpenSpeedShop are released as open source code primarily under LGPL.
-
+ current direct funding from DOEs NNSA. It builds on top of a
+ broad list of community infrastructures, most notably Dyninst
+ and MRNet from UW, libmonitor from Rice, and PAPI from UTK.
+ OpenSpeedShop is an open source multi platform Linux performance
+ tool which is targeted to support performance analysis of
+ applications running on both single node and large scale IA64,
+ IA32, EM64T, AMD64, PPC, ARM, Power8, Intel Phi, Blue Gene and
+ Cray platforms. OpenSpeedShop development is hosted by the Krell
+ Institute. The infrastructure and base components of OpenSpeedShop
+ are released as open source code primarily under LGPL.
"""
homepage = "http://www.openspeedshop.org"
- url = "https://github.com/OpenSpeedShop"
+ url = "https://github.com/OpenSpeedShop"
version('2.2', '16cb051179c2038de4e8a845edf1d573')
# Use when the git repository is available
version('2.2', branch='master',
git='https://github.com/OpenSpeedShop/openspeedshop.git')
# Optional mirror template
- # url="file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.2.tar.gz"
- # version('2.2', '643337740dc6c2faca60f42d3620b0e1')
+ # url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.2.tar.gz"
+ # version('2.2', '517a7798507241ad8abd8b0626a4d2cf')
parallel = False
- variant('offline', default=True,
+ variant('offline', default=False,
description="build with offline instrumentor enabled.")
- variant('cbtf', default=False,
+ variant('cbtf', default=True,
description="build with cbtf instrumentor enabled.")
variant('runtime', default=False,
description="build only the runtime libraries and collectors.")
variant('frontend', default=False,
- description="build only the front-end tool using the runtime_dir "
- "to point to the target build.")
+ description="build only the FE tool using the runtime_dir \
+ to point to target build.")
variant('cuda', default=False,
description="build with cuda packages included.")
variant('ptgf', default=False,
description="build with the PTGF based gui package enabled.")
variant('rtfe', default=False,
- description="build for generic cluster platforms that have "
- "different processors on the fe and be nodes.")
+ description="build for clusters heterogeneous processors \
+ on fe/be nodes.")
# MPI variants
variant('openmpi', default=False,
- description="Build mpi experiment collector for openmpi MPI.")
+ description="Build mpi collector for openmpi \
+ MPI when variant is enabled.")
variant('mpt', default=False,
- description="Build mpi experiment collector for SGI MPT MPI.")
+ description="Build mpi collector for SGI \
+ MPT MPI when variant is enabled.")
variant('mvapich2', default=False,
- description="Build mpi experiment collector for mvapich2 MPI.")
+ description="Build mpi collector for mvapich2\
+ MPI when variant is enabled.")
variant('mvapich', default=False,
- description="Build mpi experiment collector for mvapich MPI.")
+ description="Build mpi collector for mvapich\
+ MPI when variant is enabled.")
variant('mpich2', default=False,
- description="Build mpi experiment collector for mpich2 MPI.")
+ description="Build mpi collector for mpich2\
+ MPI when variant is enabled.")
variant('mpich', default=False,
- description="Build mpi experiment collector for mpich MPI.")
-
- depends_on("cmake@3.0.2", type='build')
- # Dependencies for openspeedshop that are common to all the variants of
- # the OpenSpeedShop build
- depends_on("bison")
- depends_on("flex")
- depends_on("binutils@2.24+krellpatch")
+ description="Build mpi collector for mpich\
+ MPI when variant is enabled.")
+
+ depends_on("cmake@3.0.2:", type='build')
+ # Dependencies for openspeedshop that are common to all
+ # the variants of the OpenSpeedShop build
+ depends_on("bison", type='build')
+ depends_on("flex", type='build')
+ depends_on("binutils@2.24+krellpatch", type='build')
depends_on("libelf")
depends_on("libdwarf")
depends_on("sqlite")
depends_on("boost@1.50.0:")
- depends_on("dyninst@9.1.0")
- depends_on("python")
+ depends_on("dyninst@9.1.0:")
+ depends_on("libxml2+python")
depends_on("qt@3.3.8b+krellpatch")
# Dependencies only for the openspeedshop offline package.
@@ -130,16 +138,16 @@ class Openspeedshop(Package):
depends_on("cbtf", when='+cbtf')
depends_on("cbtf-krell", when='+cbtf')
depends_on("cbtf-argonavis", when='+cbtf+cuda')
- depends_on("mrnet@5.0.1:+lwthreads+krellpatch", when='+cbtf')
+ depends_on("mrnet@5.0.1:+lwthreads", when='+cbtf')
def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
- # Sets build type parameters into cmakeOptions the options that will
- # enable the cbtf-krell built type settings
+ # Sets build type parameters into cmakeOptions the
+ # options that will enable the cbtf-krell built type settings
compile_flags = "-O2 -g"
BuildTypeOptions = []
- # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the
- # stdcmakeargs
+ # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it
+ # to be, not the stdcmakeargs
for word in cmakeOptions[:]:
if word.startswith('-DCMAKE_BUILD_TYPE'):
cmakeOptions.remove(word)
@@ -147,67 +155,130 @@ class Openspeedshop(Package):
cmakeOptions.remove(word)
if word.startswith('-DCMAKE_C_FLAGS'):
cmakeOptions.remove(word)
- BuildTypeOptions.extend([
- '-DCMAKE_BUILD_TYPE=None',
- '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
- '-DCMAKE_C_FLAGS=%s' % compile_flags
- ])
+ BuildTypeOptions.extend(['-DCMAKE_BUILD_TYPE=None',
+ '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags])
cmakeOptions.extend(BuildTypeOptions)
+ def set_defaultbase_cmakeOptions(self, spec, cmakeOptions):
+ # Appends to cmakeOptions the options that will enable
+ # the appropriate base level options to the openspeedshop
+ # cmake build.
+ python_vers = format(spec['python'].version.up_to(2))
+ python_pv = '/python' + python_vers
+ python_pvs = '/libpython' + python_vers + '.' + format(dso_suffix)
+
+ BaseOptions = []
+
+ BaseOptions.append('-DBINUTILS_DIR=%s' % spec['binutils'].prefix)
+ BaseOptions.append('-DLIBELF_DIR=%s' % spec['libelf'].prefix)
+ BaseOptions.append('-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix)
+ BaseOptions.append(
+ '-DPYTHON_EXECUTABLE=%s'
+ % join_path(spec['python'].prefix + '/bin/python'))
+ BaseOptions.append(
+ '-DPYTHON_INCLUDE_DIR=%s'
+ % join_path(spec['python'].prefix.include) + python_pv)
+ BaseOptions.append(
+ '-DPYTHON_LIBRARY=%s'
+ % join_path(spec['python'].prefix.lib) + python_pvs)
+ BaseOptions.append('-DBoost_NO_SYSTEM_PATHS=TRUE')
+ BaseOptions.append('-DBoost_NO_BOOST_CMAKE=TRUE')
+ BaseOptions.append('-DBOOST_ROOT=%s' % spec['boost'].prefix)
+ BaseOptions.append('-DBoost_DIR=%s' % spec['boost'].prefix)
+ BaseOptions.append('-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib)
+ BaseOptions.append('-DDYNINST_DIR=%s' % spec['dyninst'].prefix)
+
+ cmakeOptions.extend(BaseOptions)
+
def set_mpi_cmakeOptions(self, spec, cmakeOptions):
- # Appends to cmakeOptions the options that will enable the appropriate
- # MPI implementations
+ # Appends to cmakeOptions the options that will enable
+ # the appropriate MPI implementations
MPIOptions = []
# openmpi
if '+openmpi' in spec:
- MPIOptions.extend([
- '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix
- ])
+ MPIOptions.append('-DOPENMPI_DIR=%s' % spec['openmpi'].prefix)
# mpich
if '+mpich' in spec:
- MPIOptions.extend([
- '-DMPICH_DIR=%s' % spec['mpich'].prefix
- ])
+ MPIOptions.append('-DMPICH_DIR=%s' % spec['mpich'].prefix)
# mpich2
if '+mpich2' in spec:
- MPIOptions.extend([
- '-DMPICH2_DIR=%s' % spec['mpich2'].prefix
- ])
+ MPIOptions.append('-DMPICH2_DIR=%s' % spec['mpich2'].prefix)
# mvapich
if '+mvapich' in spec:
- MPIOptions.extend([
- '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix
- ])
+ MPIOptions.append('-DMVAPICH_DIR=%s' % spec['mvapich'].prefix)
# mvapich2
if '+mvapich2' in spec:
- MPIOptions.extend([
- '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix
- ])
+ MPIOptions.append('-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix)
# mpt
if '+mpt' in spec:
- MPIOptions.extend([
- '-DMPT_DIR=%s' % spec['mpt'].prefix
- ])
+ MPIOptions.append('-DMPT_DIR=%s' % spec['mpt'].prefix)
cmakeOptions.extend(MPIOptions)
- def install(self, spec, prefix):
-
- # openmpi_prefix_path = "/opt/openmpi-1.8.2"
- # mvapich_prefix_path = "/usr/local/tools/mvapich-gnu"
- # '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix,
- # '-DOPENMPI_DIR=%s' % openmpi_prefix_path,
- # '-DMVAPICH_DIR=%s' % mvapich_prefix_path,
+ def setup_environment(self, spack_env, run_env):
+ """Set up the compile and runtime environments for a package."""
+
+ # Common settings to both offline and cbtf versions
+ # of OpenSpeedShop
+ run_env.prepend_path('PATH', self.prefix.bin)
+
+ # Find Dyninst library path, this is needed to
+ # set the DYNINSTAPI_RT_LIB library which is
+ # required for OpenSpeedShop to find loop level
+ # performance information
+ dyninst_libdir = find_libraries(['libdyninstAPI_RT'],
+ root=self.spec['dyninst'].prefix,
+ shared=True, recurse=True)
+
+ # Set Dyninst RT library path to support OSS loop resolution code
+ run_env.set('DYNINSTAPI_RT_LIB', dyninst_libdir)
+
+ # Find openspeedshop library path
+ oss_libdir = find_libraries(['libopenss-framework'],
+ root=self.spec['openspeedshop'].prefix,
+ shared=True, recurse=True)
+ run_env.prepend_path('LD_LIBRARY_PATH',
+ os.path.dirname(oss_libdir.joined()))
+
+ # Settings specific to the version, checking here
+ # for the cbtf instrumentor
+ if '+cbtf' in self.spec:
+ cbtf_mc = '/sbin/cbtf_mrnet_commnode'
+ cbtf_lmb = '/sbin/cbtf_libcbtf_mrnet_backend'
+ run_env.set('XPLAT_RSH', 'ssh')
+ run_env.set('MRNET_COMM_PATH',
+ join_path(self.spec['cbtf-krell'].prefix + cbtf_mc))
+
+ run_env.set('CBTF_MRNET_BACKEND_PATH',
+ join_path(self.spec['cbtf-krell'].prefix + cbtf_lmb))
+
+ run_env.prepend_path('PATH', self.spec['mrnet'].prefix.bin)
+ run_env.prepend_path('PATH', self.spec['cbtf-krell'].prefix.bin)
+ run_env.prepend_path('PATH', self.spec['cbtf-krell'].prefix.sbin)
+
+ elif '+offline' in self.spec:
+ # Had to use this form of syntax self.prefix.lib and
+ # self.prefix.lib64 returned None all the time
+ run_env.set('OPENSS_RAWDATA_DIR', '.')
+ run_env.set('OPENSS_PLUGIN_PATH',
+ join_path(oss_libdir + '/openspeedshop'))
+ run_env.prepend_path('PATH', self.spec['papi'].prefix.bin)
+ run_env.prepend_path('PATH', self.spec['libdwarf'].prefix.bin)
+
+ if '+mpich' in self.spec:
+ run_env.set('OPENSS_MPI_IMPLEMENTATION', 'mpich')
+ if '+mpich2' in self.spec:
+ run_env.set('OPENSS_MPI_IMPLEMENTATION', 'mpich2')
+ if '+mvapich2' in self.spec:
+ run_env.set('OPENSS_MPI_IMPLEMENTATION', 'mvapich2')
+ if '+openmpi' in self.spec:
+ run_env.set('OPENSS_MPI_IMPLEMENTATION', 'openmpi')
- # FIXME: How do we make this dynamic in spack?
- # FIXME: That is, can we specify the paths to cuda dynamically?
- # WAITING for external package support.
- # if '+cuda' in spec:
- # cuda_prefix_path = "/usr/local/cuda-6.0"
- # cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI"
+ def install(self, spec, prefix):
if '+offline' in spec:
instrumentor_setting = "offline"
@@ -217,18 +288,17 @@ class Openspeedshop(Package):
cmakeOptions = []
cmakeOptions.extend([
'-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
- '-DINSTRUMENTOR=%s' % instrumentor_setting,
- '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
- '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
- '-DPAPI_DIR=%s' % spec['papi'].prefix])
+ '-DINSTRUMENTOR=%s' % instrumentor_setting,
+ '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
+ '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
+ '-DPAPI_DIR=%s' % spec['papi'].prefix])
# Add any MPI implementations coming from variant settings
self.set_mpi_cmakeOptions(spec, cmakeOptions)
cmakeOptions.extend(std_cmake_args)
- # Adjust the build options to the favored ones for this
- # build
+ # Adjust the build options to the favored
+ # ones for this build
self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
cmake('..', *cmakeOptions)
@@ -239,50 +309,35 @@ class Openspeedshop(Package):
else:
cmake_prefix_path = join_path(spec['dyninst'].prefix)
with working_dir('build', create=True):
-
- # python_vers=join_path(spec['python'].version[:2])
- # '-DOPENMPI_DIR=%s' % openmpi_prefix_path,
- # '-DMVAPICH_DIR=%s' % mvapich_prefix_path,
- # '-DMPICH_DIR=%s' % spec['mpich'].prefix,
- # '-DMPICH2_DIR=%s' % spec['mpich2'].prefix,
- # '-DBoost_NO_SYSTEM_PATHS=TRUE',
- # '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- # '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix,
-
- python_vers = '%d.%d' % spec['python'].version[:2]
-
cmakeOptions = []
- cmakeOptions.extend([
- '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
- '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
- '-DINSTRUMENTOR=%s' % instrumentor_setting,
- '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
- '-DLIBELF_DIR=%s' % spec['libelf'].prefix,
- '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix,
- '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
- '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
- '-DPAPI_DIR=%s' % spec['papi'].prefix,
- '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix,
- '-DQTLIB_DIR=%s' % spec['qt'].prefix,
- '-DPYTHON_EXECUTABLE=%s' % join_path(
- spec['python'].prefix, '/bin/python'),
- '-DPYTHON_INCLUDE_DIR=%s' % join_path(
- spec['python'].prefix.include,
- 'python' + python_vers),
- '-DPYTHON_LIBRARY=%s' % join_path(
- spec['python'].prefix.lib,
- 'libpython' + python_vers + '.so'),
- '-DBoost_NO_SYSTEM_PATHS=TRUE',
- '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- '-DDYNINST_DIR=%s' % spec['dyninst'].prefix])
+
+ # Appends base options to cmakeOptions
+ self.set_defaultbase_cmakeOptions(spec, cmakeOptions)
+
+ cmakeOptions.extend(
+ ['-DCMAKE_INSTALL_PREFIX=%s'
+ % prefix,
+ '-DCMAKE_PREFIX_PATH=%s'
+ % cmake_prefix_path,
+ '-DINSTRUMENTOR=%s'
+ % instrumentor_setting,
+ '-DLIBMONITOR_DIR=%s'
+ % spec['libmonitor'].prefix,
+ '-DLIBUNWIND_DIR=%s'
+ % spec['libunwind'].prefix,
+ '-DPAPI_DIR=%s'
+ % spec['papi'].prefix,
+ '-DSQLITE3_DIR=%s'
+ % spec['sqlite'].prefix,
+ '-DQTLIB_DIR=%s'
+ % spec['qt'].prefix])
# Add any MPI implementations coming from variant settings
self.set_mpi_cmakeOptions(spec, cmakeOptions)
cmakeOptions.extend(std_cmake_args)
- # Adjust the build options to the favored ones for this
- # build
+ # Adjust the build options to the favored
+ # ones for this build
self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
cmake('..', *cmakeOptions)
@@ -293,74 +348,37 @@ class Openspeedshop(Package):
elif '+cbtf' in spec:
instrumentor_setting = "cbtf"
- cmake_prefix_path = ':'.join(spec['cbtf'].prefix,
- spec['cbtf-krell'].prefix,
- spec['dyninst'].prefix)
-
# resolve_symbols = "symtabapi"
- # runtime_platform_cray = "cray"
- # if '+cray' in spec:
- # if '+runtime' in spec:
- # #-DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_INSTALL_DIR} \
- # with working_dir('build_cbtf_cray_runtime', create=True):
- # python_vers='%d.%d' % spec['python'].version[:2]
- # cmake('..',
- # '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- # '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
- # '-DRUNTIME_PLATFORM=%s' % runtime_platform_cray,
- # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
- # '-DRESOLVE_SYMBOLS=%s' % resolve_symbols,
- # '-DINSTRUMENTOR=%s' % instrumentor_setting,
- # '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
- # '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
- # '-DCBTF_KRELL_CN_RUNTIME_DIR=%s' % spec['cbtf-krell'].prefix,
- # '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
- # '-DLIBELF_DIR=%s' % spec['libelf'].prefix,
- # '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix,
- # '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
- # '-DPAPI_DIR=%s' % spec['papi'].prefix,
- # '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
- # '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
- # '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- # '-DBoost_NO_SYSTEM_PATHS=TRUE',
- # '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- # *std_cmake_args)
-
- # make("clean")
- # make()
- # make("install")
-
- # elif '+mic' in spec:
- # comment out else and shift over the default case below
- # until arch detection is in else:
+ cmake_prefix_path = join_path(spec['cbtf'].prefix) \
+ + ':' + join_path(spec['cbtf-krell'].prefix)\
+ + ':' + join_path(spec['dyninst'].prefix)
if '+runtime' in spec:
with working_dir('build_cbtf_runtime', create=True):
- python_vers = '%d.%d' % spec['python'].version[:2]
- cmake(
- '..',
- '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
- '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
- '-DINSTRUMENTOR=%s' % instrumentor_setting,
- '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
- '-DLIBELF_DIR=%s' % spec['libelf'].prefix,
- '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix,
- '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
- '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
- '-DPYTHON_EXECUTABLE=%s' % join_path(
- spec['python'].prefix, 'bin', 'python'),
- '-DPYTHON_INCLUDE_DIR=%s' % join_path(
- spec['python'].prefix.include,
- 'python' + python_vers),
- '-DPYTHON_LIBRARY=%s' % join_path(
- spec['python'].prefix.lib,
- 'libpython' + python_vers + '.so'),
- '-DBoost_NO_SYSTEM_PATHS=TRUE',
- '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
- '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- *std_cmake_args)
+ cmakeOptions = []
+
+ # Appends base options to cmakeOptions
+ self.set_defaultbase_cmakeOptions(spec, cmakeOptions)
+
+ cmakeOptions.extend(
+ ['-DCMAKE_INSTALL_PREFIX=%s'
+ % prefix,
+ '-DCMAKE_PREFIX_PATH=%s'
+ % cmake_prefix_path,
+ '-DINSTRUMENTOR=%s'
+ % instrumentor_setting,
+ '-DCBTF_DIR=%s'
+ % spec['cbtf'].prefix,
+ '-DCBTF_KRELL_DIR=%s'
+ % spec['cbtf-krell'].prefix,
+ '-DMRNET_DIR=%s'
+ % spec['mrnet'].prefix])
+
+ # Adjust the build options to the
+ # favored ones for this build
+ self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
+
+ cmake('..', *cmakeOptions)
make("clean")
make()
@@ -368,96 +386,35 @@ class Openspeedshop(Package):
else:
with working_dir('build_cbtf', create=True):
- python_vers = '%d.%d' % spec['python'].version[:2]
- # python_vers=join_path(spec['python'].version[:2])
- cmake(
- '..',
- '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
- '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
- '-DINSTRUMENTOR=%s' % instrumentor_setting,
- '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
- '-DLIBELF_DIR=%s' % spec['libelf'].prefix,
- '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix,
- '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix,
- '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
- '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
- '-DQTLIB_DIR=%s' % spec['qt'].prefix,
- '-DPYTHON_EXECUTABLE=%s' % join_path(
- spec['python'].prefix, 'bin', 'python'),
- '-DPYTHON_INCLUDE_DIR=%s' % join_path(
- spec['python'].prefix.include,
- 'python' + python_vers),
- '-DPYTHON_LIBRARY=%s' % join_path(
- spec['python'].prefix.lib,
- 'libpython' + python_vers + '.so'),
- '-DBoost_NO_SYSTEM_PATHS=TRUE',
- '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
- '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- *std_cmake_args)
+ cmakeOptions = []
+
+ # Appends base options to cmakeOptions
+ self.set_defaultbase_cmakeOptions(spec, cmakeOptions)
+
+ cmakeOptions.extend(
+ ['-DCMAKE_INSTALL_PREFIX=%s'
+ % prefix,
+ '-DCMAKE_PREFIX_PATH=%s'
+ % cmake_prefix_path,
+ '-DINSTRUMENTOR=%s'
+ % instrumentor_setting,
+ '-DSQLITE3_DIR=%s'
+ % spec['sqlite'].prefix,
+ '-DCBTF_DIR=%s'
+ % spec['cbtf'].prefix,
+ '-DCBTF_KRELL_DIR=%s'
+ % spec['cbtf-krell'].prefix,
+ '-DQTLIB_DIR=%s'
+ % spec['qt'].prefix,
+ '-DMRNET_DIR=%s'
+ % spec['mrnet'].prefix])
+
+ # Adjust the build options to the favored
+ # ones for this build
+ self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
+
+ cmake('..', *cmakeOptions)
make("clean")
make()
make("install")
-
-# if '+frontend' in spec:
-# with working_dir('build_frontend', create=True):
-# tbd
-
-# if '+cbtf' in spec:
-# if cray build type detected:
-# if '+runtime' in spec:
-# with working_dir('build_cray_cbtf_compute', create=True):
-# tbd
-# else:
-# with working_dir('build_cray_cbtf_frontend', create=True):
-# tbd
-# with working_dir('build_cray_osscbtf_frontend', create=True):
-# tbd
-# fi
-# elif '+intelmic' in spec:
-# if '+runtime' in spec:
-# with working_dir('build_intelmic_cbtf_compute', create=True):
-# tbd
-# else:
-# with working_dir('build_intelmic_cbtf_frontend', create=True):
-# tbd
-# with working_dir('build_intelmic_osscbtf_frontend', create=True):
-# fi
-# else
-# with working_dir('build_cluster_cbtf', create=True):
-# tbd
-# with working_dir('build_cluster osscbtf', create=True):
-# tbd
-# fi
-# elif '+offline' in spec:
-# if cray build type detected:
-# if '+runtime' in spec:
-# with working_dir('build_cray_ossoff_compute', create=True):
-# tbd
-# else:
-# with working_dir('build_cray_ossoff_frontend', create=True):
-# tbd
-# fi
-# elif '+intelmic' in spec:
-# if '+runtime' in spec:
-# with working_dir('build_intelmic_ossoff_compute', create=True):
-# tbd
-# else:
-# with working_dir('build_intelmic_ossoff_frontend', create=True):
-# tbd
-# fi
-# elif bgq build type detected:
-# if '+runtime' in spec:
-# with working_dir('build_bgq_ossoff_compute', create=True):
-# tbd
-# else:
-# with working_dir('build_bgq_ossoff_frontend', create=True):
-# tbd
-# fi
-# else
-# with working_dir('build_cluster ossoff', create=True):
-# tbd
-# fi
-# fi
diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py
index 8d9049a8f7..12b5ed9c52 100644
--- a/var/spack/repos/builtin/packages/openssl/package.py
+++ b/var/spack/repos/builtin/packages/openssl/package.py
@@ -36,24 +36,21 @@ class Openssl(Package):
homepage = "http://www.openssl.org"
url = "ftp://openssl.org/source/openssl-1.0.1h.tar.gz"
- version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf')
- version('1.0.1r', '1abd905e079542ccae948af37e393d28')
- version('1.0.1t', '9837746fcf8a6727d46d22ca35953da1')
- version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a')
- version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5')
- version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d')
- version('1.0.2g', 'f3c710c045cdee5fd114feb69feba7aa')
+ version('1.0.2j', '96322138f0b69e61b7212bc53d5e912b')
+ version('1.0.2i', '678374e63f8df456a697d3e5e5a931fb')
version('1.0.2h', '9392e65072ce4b614c1392eefc1f23d0')
+ version('1.0.2g', 'f3c710c045cdee5fd114feb69feba7aa')
+ version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d')
+ version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5')
+ version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a')
+ version('1.0.1u', '130bb19745db2a5a09f22ccbbf7e69d0')
+ version('1.0.1t', '9837746fcf8a6727d46d22ca35953da1')
+ version('1.0.1r', '1abd905e079542ccae948af37e393d28')
+ version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf')
depends_on("zlib")
parallel = False
- def url_for_version(self, version):
- if '@system' in self.spec:
- return '@system (reserved version for system openssl)'
- else:
- return super(Openssl, self).url_for_version(self.version)
-
def handle_fetch_error(self, error):
tty.warn("Fetching OpenSSL failed. This may indicate that OpenSSL has "
"been updated, and the version in your instance of Spack is "
diff --git a/var/spack/repos/builtin/packages/opium/package.py b/var/spack/repos/builtin/packages/opium/package.py
index 2c81d92cc0..521f917230 100644
--- a/var/spack/repos/builtin/packages/opium/package.py
+++ b/var/spack/repos/builtin/packages/opium/package.py
@@ -29,7 +29,7 @@ class Opium(Package):
"""DFT pseudopotential generation project"""
homepage = "https://opium.sourceforge.net/index.html"
- url = "https://downloads.sourceforge.net/project/opium/opium/opium-v3.8/opium-v3.8-src.tgz"
+ url = "https://downloads.sourceforge.net/project/opium/opium/opium-v3.8/opium-v3.8-src.tgz"
version('3.8', 'f710c0f869e70352b4a510c31e13bf9f')
@@ -37,12 +37,8 @@ class Opium(Package):
depends_on('lapack')
def install(self, spec, prefix):
- options = [
- 'LDFLAGS=%s %s' % (
- to_link_flags(spec['lapack'].lapack_shared_lib),
- to_link_flags(spec['blas'].blas_shared_lib)
- )
- ]
+ libs = spec['lapack'].lapack_libs + spec['blas'].blas_libs
+ options = ['LDFLAGS=%s' % libs.ld_flags]
configure(*options)
with working_dir("src", create=False):
diff --git a/var/spack/repos/builtin/packages/panda/package.py b/var/spack/repos/builtin/packages/panda/package.py
new file mode 100644
index 0000000000..e30c2c869d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/panda/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Panda(Package):
+ """PANDA: Parallel AdjaceNcy Decomposition Algorithm"""
+ homepage = "http://comopt.ifi.uni-heidelberg.de/software/PANDA/index.html"
+ url = "http://comopt.ifi.uni-heidelberg.de/software/PANDA/downloads/current_panda.tar"
+
+ version('current', 'b06dc312ee56e13eefea9c915b70fcef')
+
+ # Note: Panda can also be built without MPI support
+
+ depends_on("cmake", type="build")
+ depends_on("mpi")
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake("..", *std_cmake_args)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py
index 2da20e9dc2..5cf3edb8da 100644
--- a/var/spack/repos/builtin/packages/pango/package.py
+++ b/var/spack/repos/builtin/packages/pango/package.py
@@ -38,8 +38,10 @@ class Pango(Package):
version('1.36.8', '217a9a753006275215fa9fa127760ece')
version('1.40.1', '6fc88c6529890d6c8e03074d57a3eceb')
+ depends_on("pkg-config", type="build")
depends_on("harfbuzz")
depends_on("cairo")
+ depends_on("glib")
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py
index 5c4abe1730..90a7490e75 100644
--- a/var/spack/repos/builtin/packages/papi/package.py
+++ b/var/spack/repos/builtin/packages/papi/package.py
@@ -41,6 +41,7 @@ class Papi(Package):
homepage = "http://icl.cs.utk.edu/papi/index.html"
url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz"
+ version('5.5.0', '5e1244a04ca031d4cc29b46ce3dd05b5')
version('5.4.3', '3211b5a5bb389fe692370f5cf4cc2412')
version('5.4.1', '9134a99219c79767a11463a76b0b01a2')
version('5.3.0', '367961dd0ab426e5ae367c2713924ffb')
diff --git a/var/spack/repos/builtin/packages/parallel/package.py b/var/spack/repos/builtin/packages/parallel/package.py
index 2306dace55..81c0195651 100644
--- a/var/spack/repos/builtin/packages/parallel/package.py
+++ b/var/spack/repos/builtin/packages/parallel/package.py
@@ -26,8 +26,7 @@ from spack import *
class Parallel(Package):
- """
- GNU parallel is a shell tool for executing jobs in parallel using
+ """GNU parallel is a shell tool for executing jobs in parallel using
one or more computers. A job can be a single command or a small
script that has to be run for each of the lines in the input.
"""
diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py
index 1b6e3ce8e6..0a2ffdbb84 100644
--- a/var/spack/repos/builtin/packages/paraver/package.py
+++ b/var/spack/repos/builtin/packages/paraver/package.py
@@ -32,9 +32,11 @@ class Paraver(Package):
is expressed on its input trace format. Traces for parallel MPI,
OpenMP and other programs can be genereated with Extrae."""
homepage = "http://www.bsc.es/computer-sciences/performance-tools/paraver"
- url = "http://www.bsc.es/ssl/apps/performanceTools/files/paraver-sources-4.5.3.tar.gz"
+ url = "http://www.bsc.es/ssl/apps/performanceTools/files/paraver-sources-4.6.2.tar.gz"
- version('4.5.3', '625de9ec0d639acd18d1aaa644b38f72')
+ # NOTE: Paraver provides only latest version for download.
+ # Don't keep/add older versions.
+ version('4.6.2', 'c54e124382b597574628b00e31649803')
depends_on("boost")
# depends_on("extrae")
diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py
index 2750df2bdb..74e00cc9e0 100644
--- a/var/spack/repos/builtin/packages/parmetis/package.py
+++ b/var/spack/repos/builtin/packages/parmetis/package.py
@@ -38,21 +38,19 @@ class Parmetis(Package):
version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628')
version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce')
- variant('shared', default=True,
- description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds the library in debug mode')
- variant('gdb', default=False, description='Enables gdb support')
+ variant('shared', default=True, description='Enables the build of shared libraries.')
+ variant('debug', default=False, description='Builds the library in debug mode.')
+ variant('gdb', default=False, description='Enables gdb support.')
- depends_on('cmake@2.8:', type='build') # build dependency
+ depends_on('cmake@2.8:', type='build')
depends_on('mpi')
depends_on('metis@5:')
patch('enable_external_metis.patch')
# bug fixes from PETSc developers
- # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/
+ # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ # NOQA: E501
patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch')
- # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
+ # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ # NOQA: E501
patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch')
def url_for_version(self, version):
@@ -60,12 +58,10 @@ class Parmetis(Package):
return '%s/%sparmetis-%s.tar.gz' % (Parmetis.base_url, verdir, version)
def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
-
- build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
+ build_directory = join_path(source_directory, 'build')
+ options = std_cmake_args[:]
options.extend([
'-DGKLIB_PATH:PATH=%s/GKlib' % spec['metis'].prefix.include,
'-DMETIS_PATH:PATH=%s' % spec['metis'].prefix,
diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py
index cd1f679062..c391f491eb 100644
--- a/var/spack/repos/builtin/packages/patchelf/package.py
+++ b/var/spack/repos/builtin/packages/patchelf/package.py
@@ -30,10 +30,12 @@ class Patchelf(Package):
ELF executables."""
homepage = "https://nixos.org/patchelf.html"
- url = "http://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz"
+ url = "http://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz"
+
list_url = "http://nixos.org/releases/patchelf/"
list_depth = 2
+ version('0.9', '3c265508526760f233620f35d79c79fc')
version('0.8', '407b229e6a681ffb0e2cdd5915cb2d01')
def install(self, spec, prefix):
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/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py
index 074d28540b..bed01aeefb 100644
--- a/var/spack/repos/builtin/packages/pdt/package.py
+++ b/var/spack/repos/builtin/packages/pdt/package.py
@@ -22,7 +22,6 @@
# 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 *
@@ -36,14 +35,16 @@ class Pdt(Package):
"""
homepage = "https://www.cs.uoregon.edu/research/pdt/home.php"
+ url = "http://www.cs.uoregon.edu/research/paracomp/pdtoolkit/Download/pdtoolkit-3.22.1.tar.gz"
- version('3.21', '3092ca0d8833b69992c17e63ae66c263')
- version('3.19', '5c5e1e6607086aa13bf4b1b9befc5864')
-
- def url_for_version(self, version):
- return 'https://www.cs.uoregon.edu/research/tau/pdt_releases/pdtoolkit-%s.tar.gz' % (version)
+ version('3.22.1', 'b56b9b3e621161c7fd9e4908b944840d')
+ version('3.22', '982d667617802962a1f7fe6c4c31184f')
+ version('3.21', '3092ca0d8833b69992c17e63ae66c263')
+ version('3.20', 'c3edabe202926abe04552e33cd39672d')
+ version('3.19', '5c5e1e6607086aa13bf4b1b9befc5864')
+ version('3.18.1', 'e401534f5c476c3e77f05b7f73b6c4f2')
def install(self, spec, prefix):
configure('-prefix=%s' % prefix)
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 66e1abdf1a..4ac96b8127 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -22,13 +22,14 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+
import os
+import sys
from spack import *
class Petsc(Package):
- """
- PETSc is a suite of data structures and routines for the scalable
+ """PETSc is a suite of data structures and routines for the scalable
(parallel) solution of scientific applications modeled by partial
differential equations.
"""
@@ -36,6 +37,7 @@ class Petsc(Package):
homepage = "http://www.mcs.anl.gov/petsc/index.html"
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
+ version('3.7.4', 'aaf94fa54ef83022c14091f10866eedf')
version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34')
version('3.6.4', '7632da2375a3df35b8891c9526dbdde7')
version('3.6.3', '91dd3522de5a5ef039ff8f50800db606')
@@ -73,7 +75,7 @@ class Petsc(Package):
depends_on('python @2.6:2.7')
# Other dependencies
- depends_on('boost', when='+boost')
+ depends_on('boost', when='@:3.5+boost')
depends_on('metis@5:', when='+metis')
depends_on('hdf5+mpi', when='+hdf5+mpi')
@@ -115,10 +117,17 @@ class Petsc(Package):
'--with-mpi=1',
'--with-mpi-dir=%s' % self.spec['mpi'].prefix,
]
+ if sys.platform != "darwin":
+ compiler_opts.extend([
+ '--with-cpp=cpp',
+ '--with-cxxcpp=cpp',
+ ])
return compiler_opts
def install(self, spec, prefix):
- options = ['--with-ssl=0']
+ options = ['--with-ssl=0',
+ '--download-c2html=0',
+ '--download-hwloc=0']
options.extend(self.mpi_dependent_options())
options.extend([
'--with-precision=%s' % (
@@ -126,9 +135,15 @@ class Petsc(Package):
'--with-scalar-type=%s' % (
'complex' if '+complex' in spec else 'real'),
'--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'),
- '--with-debugging=%s' % ('1' if '+debug' in spec else '0'),
- '--with-blas-lapack-dir=%s' % spec['lapack'].prefix
+ '--with-debugging=%s' % ('1' if '+debug' in spec else '0')
])
+ # Make sure we use exactly the same Blas/Lapack libraries
+ # across the DAG. To that end list them explicitly
+ lapack_blas = spec['lapack'].lapack_libs + spec['blas'].blas_libs
+ options.extend([
+ '--with-blas-lapack-lib=%s' % lapack_blas.joined()
+ ])
+
# Activates library support if needed
for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis',
'mumps', 'scalapack'):
diff --git a/var/spack/repos/builtin/packages/pexsi/make.inc b/var/spack/repos/builtin/packages/pexsi/make.inc
new file mode 100644
index 0000000000..a8020fb370
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pexsi/make.inc
@@ -0,0 +1,79 @@
+# Different compiling and linking options.
+SUFFIX = linux
+
+# Compiler and tools
+################################################################
+CC = @MPICC
+CXX = @MPICXX
+FC = @MPIFC
+LOADER = @MPICXX
+
+
+AR = ar
+ARFLAGS = rvcu
+# For System V based machine without ranlib, like Cray and SGI,
+# use touch instead.
+RANLIB = @RANLIB
+
+CP = cp
+RM = rm
+RMFLAGS = -f
+################################################################
+
+# PEXSI directory
+PEXSI_DIR = @PEXSI_STAGE
+
+# Required libraries directories
+DSUPERLU_DIR = @SUPERLU_PREFIX
+METIS_DIR = @METIS_PREFIX
+PARMETIS_DIR = @PARMETIS_PREFIX
+LAPACK_DIR = @LAPACK_PREFIX
+BLAS_DIR = @BLAS_PREFIX
+
+# Includes
+PEXSI_INCLUDE = -I${PEXSI_DIR}/include
+DSUPERLU_INCLUDE = -I${DSUPERLU_DIR}/include
+INCLUDES = ${PEXSI_INCLUDE} ${DSUPERLU_INCLUDE}
+
+# Libraries
+CPP_LIB = @STDCXX_LIB @MPICXX_LIB
+#GFORTRAN_LIB = /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.a
+LAPACK_LIB = @LAPACK_LIBS
+BLAS_LIB = @BLAS_LIBS
+DSUPERLU_LIB = ${DSUPERLU_DIR}/lib/libsuperlu_dist.a
+PEXSI_LIB = ${PEXSI_DIR}/src/libpexsi_${SUFFIX}.a
+
+# Graph partitioning libraries
+METIS_LIB = -L${METIS_DIR}/lib -lmetis
+PARMETIS_LIB = -L${PARMETIS_DIR}/libparmetis -lparmetis
+
+# Different compiling and linking options.
+COMPILE_DEF = -DDEBUG=0 -DRELEASE
+COMPILE_FLAG = -O3 -w
+
+LIBS = ${PEXSI_LIB} ${DSUPERLU_LIB} ${PARMETIS_LIB} ${METIS_LIB} ${LAPACK_LIB} ${BLAS_LIB} ${GFORTRAN_LIB}
+
+COMPILE_DEF += -DAdd_
+
+CPPFLAG = -std=c++11
+
+CFLAGS = ${COMPILE_FLAG} ${PROFILE_FLAG} ${INCLUDES}
+FFLAGS = ${COMPILE_FLAG} ${PROFILE_FLAG} ${INCLUDES}
+CXXFLAGS = ${COMPILE_FLAG} ${CPPFLAG} ${PROFILE_FLAG} ${INCLUDES}
+CCDEFS = ${COMPILE_DEF}
+CPPDEFS = ${COMPILE_DEF}
+LOADOPTS = ${PROFILE_FLAG} ${LIBS}
+FLOADOPTS = ${PROFILE_FLAG} ${LIBS} ${CPP_LIB}
+
+# Generate auto-dependencies
+%.d: %.c
+ @set -e; rm -f $@; \
+ $(CC) -M $(CCDEFS) $(CFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@;\
+ rm -f $@.$$$$
+
+%.d: %.cpp
+ @set -e; rm -f $@; \
+ $(CXX) -M $(CPPDEFS) $(CXXFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@;\
+ rm -f $@.$$$$
diff --git a/var/spack/repos/builtin/packages/pexsi/package.py b/var/spack/repos/builtin/packages/pexsi/package.py
new file mode 100644
index 0000000000..9fc71d4c52
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pexsi/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
+##############################################################################
+
+import inspect
+import os.path
+import shutil
+
+from spack import *
+
+
+class Pexsi(Package):
+ """The PEXSI library is written in C++, and uses message passing interface
+ (MPI) to parallelize the computation on distributed memory computing
+ systems and achieve scalability on more than 10,000 processors.
+
+ The Pole EXpansion and Selected Inversion (PEXSI) method is a fast
+ method for electronic structure calculation based on Kohn-Sham density
+ functional theory. It efficiently evaluates certain selected elements
+ of matrix functions, e.g., the Fermi-Dirac function of the KS Hamiltonian,
+ which yields a density matrix. It can be used as an alternative to
+ diagonalization methods for obtaining the density, energy and forces
+ in electronic structure calculations.
+ """
+ homepage = 'https://math.berkeley.edu/~linlin/pexsi/index.html'
+ url = 'https://math.berkeley.edu/~linlin/pexsi/download/pexsi_v0.9.0.tar.gz'
+
+ version('0.9.0', '0c1a2de891ba1445dfc184b2fa270ed8')
+
+ depends_on('parmetis')
+ depends_on('superlu-dist@3.3', when='@0.9.0')
+
+ parallel = False
+
+ def install(self, spec, prefix):
+
+ substitutions = {
+ '@MPICC': self.spec['mpi'].mpicc,
+ '@MPICXX': self.spec['mpi'].mpicxx,
+ '@MPIFC': self.spec['mpi'].mpifc,
+ '@MPICXX_LIB': ' '.join(self.spec['mpi'].mpicxx_shared_libs),
+ '@RANLIB': 'ranlib',
+ '@PEXSI_STAGE': self.stage.source_path,
+ '@SUPERLU_PREFIX': self.spec['superlu-dist'].prefix,
+ '@METIS_PREFIX': self.spec['metis'].prefix,
+ '@PARMETIS_PREFIX': self.spec['parmetis'].prefix,
+ '@LAPACK_PREFIX': self.spec['lapack'].prefix,
+ '@BLAS_PREFIX': self.spec['blas'].prefix,
+ '@LAPACK_LIBS': self.spec['lapack'].lapack_libs.joined(),
+ '@BLAS_LIBS': self.spec['lapack'].blas_libs.joined(),
+ '@STDCXX_LIB': ' '.join(self.compiler.stdcxx_libs)
+ }
+
+ template = join_path(
+ os.path.dirname(inspect.getmodule(self).__file__),
+ 'make.inc'
+ )
+ makefile = join_path(
+ self.stage.source_path,
+ 'make.inc'
+ )
+ shutil.copy(template, makefile)
+ for key, value in substitutions.items():
+ filter_file(key, value, makefile)
+
+ make()
+ # 'make install' does not exist, despite what documentation says
+ mkdirp(self.prefix.lib)
+ install(
+ join_path(self.stage.source_path, 'src', 'libpexsi_linux.a'),
+ join_path(self.prefix.lib, 'libpexsi.a')
+ )
+ install_tree(
+ join_path(self.stage.source_path, 'include'),
+ self.prefix.include
+ )
+ # fortran "interface"
+ make('-C', 'fortran')
+ install_tree(
+ join_path(self.stage.source_path, 'fortran'),
+ join_path(self.prefix, 'fortran')
+ )
diff --git a/var/spack/repos/builtin/packages/pfft/package.py b/var/spack/repos/builtin/packages/pfft/package.py
new file mode 100644
index 0000000000..575f0af3c5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pfft/package.py
@@ -0,0 +1,64 @@
+##############################################################################
+# 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 Pfft(AutotoolsPackage):
+ """PFFT is a software library for computing massively parallel,
+ fast Fourier transformations on distributed memory architectures.
+ PFFT can be understood as a generalization of FFTW-MPI to
+ multidimensional data decomposition."""
+
+ homepage = "https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software.php.en"
+ url = "https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software/pfft-1.0.8-alpha.tar.gz"
+
+ version('1.0.8-alpha', '46457fbe8e38d02ff87d439b63dc0709')
+
+ depends_on('fftw+mpi+pfft_patches')
+ depends_on('mpi')
+
+ def install(self, spec, prefix):
+ options = ['--prefix={0}'.format(prefix)]
+ if not self.compiler.f77 or not self.compiler.fc:
+ options.append("--disable-fortran")
+
+ configure(*options)
+ make()
+ if self.run_tests:
+ make("check")
+ make("install")
+
+ if '+float' in spec['fftw']:
+ configure('--enable-float', *options)
+ make()
+ if self.run_tests:
+ make("check")
+ make("install")
+ if '+long_double' in spec['fftw']:
+ configure('--enable-long-double', *options)
+ make()
+ if self.run_tests:
+ make("check")
+ make("install")
diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py
index c58d563682..6fa8457dc9 100644
--- a/var/spack/repos/builtin/packages/pgi/package.py
+++ b/var/spack/repos/builtin/packages/pgi/package.py
@@ -36,7 +36,7 @@ class Pgi(Package):
architecture) to the format: pgi-<version>.tar.gz. Spack will search your
current directory for a file of this format. Alternatively, add this
file to a mirror so that Spack can find it. For instructions on how to
- set up a mirror, see http://software.llnl.gov/spack/mirrors.html"""
+ set up a mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "http://www.pgroup.com/"
url = "file://%s/pgi-16.3.tar.gz" % os.getcwd()
diff --git a/var/spack/repos/builtin/packages/piranha/package.py b/var/spack/repos/builtin/packages/piranha/package.py
new file mode 100644
index 0000000000..dbf949f000
--- /dev/null
+++ b/var/spack/repos/builtin/packages/piranha/package.py
@@ -0,0 +1,73 @@
+##############################################################################
+# 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 Piranha(Package):
+ """Piranha is a computer-algebra library for the symbolic manipulation of
+ sparse multivariate polynomials and other closely-related symbolic objects
+ (such as Poisson series)."""
+
+ homepage = "https://bluescarni.github.io/piranha/sphinx/"
+ url = "https://github.com/bluescarni/piranha/archive/v0.5.tar.gz"
+
+ version('0.5', '99546bae2be115737b6316751eb0b84d')
+ version('develop', git='https://github.com/bluescarni/piranha.git')
+
+ variant('python', default=True,
+ description='Build the Python bindings')
+
+ # Build dependencies
+ depends_on('cmake@3.0:', type='build')
+ extends('python', when='+pyranha')
+ depends_on('python@2.6:', type='build', when='+pyranha')
+
+ # Other dependencies
+ depends_on('boost+iostreams+regex+serialization',
+ when='~python')
+ depends_on('boost+iostreams+regex+serialization+python',
+ when='+python')
+ depends_on('bzip2')
+ depends_on('gmp') # mpir is a drop-in replacement for this
+ depends_on('mpfr') # Could also be built against mpir
+
+ def install(self, spec, prefix):
+ options = []
+ options.extend(std_cmake_args)
+
+ # Python bindings
+ options.extend([
+ '-DBUILD_PYRANHA=%s' % (
+ 'ON' if '+python' in spec else 'OFF'),
+ '-DBUILD_TESTS:BOOL=ON',
+ ])
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *options)
+
+ make()
+ make('install')
+ if self.run_tests:
+ make('test')
diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py
index 3d7e332a3f..c780fd64aa 100644
--- a/var/spack/repos/builtin/packages/pixman/package.py
+++ b/var/spack/repos/builtin/packages/pixman/package.py
@@ -23,21 +23,32 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
class Pixman(Package):
"""The Pixman package contains a library that provides low-level
- pixel manipulation features such as image compositing and
- trapezoid rasterization."""
+ pixel manipulation features such as image compositing and
+ trapezoid rasterization."""
+
homepage = "http://www.pixman.org"
url = "http://cairographics.org/releases/pixman-0.32.6.tar.gz"
+ version('0.34.0', 'e80ebae4da01e77f68744319f01d52a3')
version('0.32.6', '3a30859719a41bd0f5cccffbfefdd4c2')
- depends_on("libpng")
+ depends_on('pkg-config', type='build')
+ depends_on('libpng')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix,
- "--disable-gtk")
+ config_args = ["--prefix=" + prefix,
+ "--disable-gtk"]
+
+ if sys.platform == "darwin":
+ config_args.append("--disable-mmx")
+
+ configure(*config_args)
+
make()
- make("install")
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py
index 45e8e8b74e..a98f65fb07 100644
--- a/var/spack/repos/builtin/packages/pkg-config/package.py
+++ b/var/spack/repos/builtin/packages/pkg-config/package.py
@@ -30,23 +30,27 @@ class PkgConfig(Package):
and libraries"""
homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/"
- url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz"
+ url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz"
version('0.29.1', 'f739a28cae4e0ca291f82d1d41ef107d')
version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d')
parallel = False
+ variant('internal_glib', default=True,
+ description='Builds with internal glib')
# The following patch is needed for gcc-6.1
patch('g_date_strftime.patch')
def install(self, spec, prefix):
- configure("--prefix={0}".format(prefix),
- "--enable-shared",
- # There's a bootstrapping problem here;
- # glib uses pkg-config as well, so break
- # the cycle by using the internal glib.
- "--with-internal-glib")
+ args = ["--prefix={0}".format(prefix),
+ "--enable-shared"]
+ if "+internal_glib" in spec:
+ # There's a bootstrapping problem here;
+ # glib uses pkg-config as well, so break
+ # the cycle by using the internal glib.
+ args.append("--with-internal-glib")
+ configure(*args)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py
index b670b4c2b8..60dfdf7405 100644
--- a/var/spack/repos/builtin/packages/plumed/package.py
+++ b/var/spack/repos/builtin/packages/plumed/package.py
@@ -45,10 +45,20 @@ class Plumed(Package):
version('2.2.3', 'a6e3863e40aac07eb8cf739cbd14ecf8')
+ # Variants. PLUMED by default builds a number of optional modules.
+ # The ones listed here are not built by default for various reasons,
+ # such as stability, lack of testing, or lack of demand.
+ variant('crystallization', default=False,
+ description='Build support for optional crystallization module.')
+ variant('imd', default=False,
+ description='Build support for optional imd module.')
+ variant('manyrestraints', default=False,
+ description='Build support for optional manyrestraints module.')
variant('shared', default=True, description='Builds shared libraries')
variant('mpi', default=True, description='Activates MPI support')
variant('gsl', default=True, description='Activates GSL support')
+ # Dependencies. LAPACK and BLAS are recommended but not essential.
depends_on('zlib')
depends_on('blas')
depends_on('lapack')
@@ -56,6 +66,8 @@ class Plumed(Package):
depends_on('mpi', when='+mpi')
depends_on('gsl', when='+gsl')
+ depends_on('autoconf', type='build')
+
# Dictionary mapping PLUMED versions to the patches it provides
# interactively
plumed_patches = {
@@ -88,6 +100,12 @@ class Plumed(Package):
module.plumed = Executable(join_path(self.spec.prefix.bin, 'plumed'))
def install(self, spec, prefix):
+ # This part is needed to avoid linking with gsl cblas
+ # interface which will mask the cblas interface
+ # provided by optimized libraries due to linking order
+ filter_file('-lgslcblas', '', 'configure.ac')
+ autoreconf('-ivf')
+
# From plumed docs :
# Also consider that this is different with respect to what some other
# configure script does in that variables such as MPICXX are
@@ -96,17 +114,45 @@ class Plumed(Package):
# with MPI you should use:
#
# > ./configure CXX="$MPICXX"
- configure_opts = [
- 'CXX={0}'.format(spec['mpi'].mpicxx)
- ] if '+mpi' in self.spec else []
+ configure_opts = ['--prefix=' + prefix]
+
+ # If using MPI then ensure the correct compiler wrapper is used.
+ if '+mpi' in spec:
+ configure_opts.extend([
+ '--enable-mpi',
+ 'CXX={0}'.format(spec['mpi'].mpicxx)
+ ])
+
+ # If the MPI dependency is provided by the intel-mpi package then
+ # the following additional argument is required to allow it to
+ # build.
+ if spec.satisfies('^intel-mpi'):
+ configure_opts.extend([
+ 'STATIC_LIBS=-mt_mpi'
+ ])
+ # Additional arguments
configure_opts.extend([
- '--prefix={0}'.format(prefix),
'--enable-shared={0}'.format('yes' if '+shared' in spec else 'no'),
- '--enable-mpi={0}'.format('yes' if '+mpi' in spec else 'no'),
'--enable-gsl={0}'.format('yes' if '+gsl' in spec else 'no')
])
+ # Construct list of optional modules
+ module_opts = []
+ module_opts.extend([
+ '+crystallization' if (
+ '+crystallization' in spec) else '-crystallization',
+ '+imd' if '+imd' in spec else '-imd',
+ '+manyrestraints' if (
+ '+manyrestraints' in spec) else '-manyrestraints'
+ ])
+
+ # If we have specified any optional modules then add the argument to
+ # enable or disable them.
+ if module_opts:
+ configure_opts.extend([
+ '--enable-modules={0}'.format("".join(module_opts))])
+
configure(*configure_opts)
make()
make('install')
diff --git a/var/spack/repos/builtin/packages/pngwriter/package.py b/var/spack/repos/builtin/packages/pngwriter/package.py
new file mode 100644
index 0000000000..4c0370a7ef
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pngwriter/package.py
@@ -0,0 +1,58 @@
+##############################################################################
+# 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 Pngwriter(Package):
+ """PNGwriter is a very easy to use open source graphics library that uses
+ PNG as its output format. The interface has been designed to be as simple
+ and intuitive as possible. It supports plotting and reading pixels in the
+ RGB (red, green, blue), HSV (hue, saturation, value/brightness) and CMYK
+ (cyan, magenta, yellow, black) colour spaces, basic shapes, scaling,
+ bilinear interpolation, full TrueType antialiased and rotated text support,
+ bezier curves, opening existing PNG images and more.
+ """
+
+ homepage = "http://pngwriter.sourceforge.net/"
+ url = "https://github.com/pngwriter/pngwriter/archive/0.5.6.tar.gz"
+
+ version('dev', branch='dev',
+ git='https://github.com/pngwriter/pngwriter.git')
+ version('master', branch='master',
+ git='https://github.com/pngwriter/pngwriter.git')
+ version('0.5.6', 'c13bd1fdc0e331a246e6127b5f262136')
+
+ depends_on('cmake', type='build')
+ depends_on('libpng')
+ depends_on('zlib')
+ depends_on('freetype')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('-DCMAKE_INSTALL_PREFIX=%s' % prefix,
+ '..', *std_cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/polymake/package.py b/var/spack/repos/builtin/packages/polymake/package.py
new file mode 100644
index 0000000000..c0bb9082ae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/polymake/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# 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 Polymake(Package):
+ """polymake is open source software for research in polyhedral geometry"""
+ homepage = "https://polymake.org/doku.php"
+ url = "https://polymake.org/lib/exe/fetch.php/download/polymake-3.0r1.tar.bz2"
+
+ version('3.0r2', '08584547589f052ea50e2148109202ab')
+ version('3.0r1', '63ecbecf9697c6826724d8a041d2cac0')
+
+ # Note: Could also be built with nauty instead of bliss
+
+ depends_on("bliss")
+ depends_on("boost")
+ depends_on("cddlib")
+ depends_on("gmp")
+ depends_on("lrslib")
+ depends_on("mpfr")
+ depends_on("ppl")
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix,
+ "--with-bliss=%s" % spec["bliss"].prefix,
+ "--with-boost=%s" % spec["boost"].prefix,
+ "--with-cdd=%s" % spec["cddlib"].prefix,
+ "--with-gmp=%s" % spec["gmp"].prefix,
+ "--with-lrs=%s" % spec["lrslib"].prefix,
+ "--with-mpfr=%s" % spec["mpfr"].prefix,
+ "--with-ppl=%s" % spec["ppl"].prefix)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/porta/Makefile.spack.patch b/var/spack/repos/builtin/packages/porta/Makefile.spack.patch
new file mode 100644
index 0000000000..1cd8fcc3c0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/porta/Makefile.spack.patch
@@ -0,0 +1,23 @@
+--- old/src/Makefile.spack
++++ new/src/Makefile.spack
+@@ -0,0 +1,20 @@
++# Set PREFIX to the install location for both building and installing
++
++all: valid xporta
++
++valid: common.lo arith.lo inout.lo log.lo valid.lo
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++
++xporta: common.lo arith.lo inout.lo log.lo \
++ porta.lo four_mot.lo portsort.lo largecalc.lo mp.lo
++ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
++
++%.lo: %.c
++ libtool --mode=compile --tag=CC cc -g -O3 -c $*.c
++
++install:
++ mkdir -p $(PREFIX)/bin
++ libtool --mode=install cp valid $(PREFIX)/bin/valid
++ libtool --mode=install cp xporta $(PREFIX)/bin/xporta
++
++.PHONY: all install
diff --git a/var/spack/repos/builtin/packages/porta/package.py b/var/spack/repos/builtin/packages/porta/package.py
new file mode 100644
index 0000000000..b620daf78f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/porta/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 Porta(Package):
+ """PORTA is a collection of routines for analyzing polytopes and
+ polyhedra"""
+ homepage = "http://porta.zib.de"
+ url = "http://porta.zib.de/porta-1.4.1.tgz"
+
+ version('1.4.1', '585179bf19d214ed364663a5d17bd5fc')
+
+ depends_on("libtool", type="build")
+
+ patch("Makefile.spack.patch")
+
+ def install(self, spec, prefix):
+ with working_dir("src"):
+ make("-f", "Makefile.spack", "PREFIX=%s" % prefix)
+ make("-f", "Makefile.spack", "PREFIX=%s" % prefix, "install")
diff --git a/var/spack/repos/builtin/packages/presentproto/package.py b/var/spack/repos/builtin/packages/presentproto/package.py
new file mode 100644
index 0000000000..ca145abb6b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/presentproto/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 Presentproto(Package):
+ """Present protocol specification and Xlib/Xserver headers."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/presentproto/"
+ url = "https://www.x.org/archive/individual/proto/presentproto-1.0.tar.gz"
+
+ version('1.0', '57eaf4bb58e86476ec89cfb42d675961')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/printproto/package.py b/var/spack/repos/builtin/packages/printproto/package.py
new file mode 100644
index 0000000000..151924dd49
--- /dev/null
+++ b/var/spack/repos/builtin/packages/printproto/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 Printproto(Package):
+ """Xprint extension to the X11 protocol - a portable, network-transparent
+ printing system."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/printproto"
+ url = "https://www.x.org/archive/individual/proto/printproto-1.0.5.tar.gz"
+
+ version('1.0.5', '5afeb3a7de8a14b417239a14ea724268')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/proxymngr/package.py b/var/spack/repos/builtin/packages/proxymngr/package.py
new file mode 100644
index 0000000000..896f4a516b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/proxymngr/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Proxymngr(Package):
+ """The proxy manager (proxymngr) is responsible for resolving requests from
+ xfindproxy (and other similar clients), starting new proxies when
+ appropriate, and keeping track of all of the available proxy services.
+ The proxy manager strives to reuse existing proxies whenever possible."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/proxymngr"
+ url = "https://www.x.org/archive/individual/app/proxymngr-1.0.4.tar.gz"
+
+ version('1.0.4', 'a165cf704f6a413f0bacf65ea470331f')
+
+ depends_on('libice')
+ depends_on('libxt')
+ depends_on('lbxproxy')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('xproxymanagementprotocol', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py
index 6296d0cee6..566aa50f44 100644
--- a/var/spack/repos/builtin/packages/psi4/package.py
+++ b/var/spack/repos/builtin/packages/psi4/package.py
@@ -32,7 +32,7 @@ class Psi4(Package):
a variety of molecular properties."""
homepage = "http://www.psicode.org/"
- url = "https://github.com/psi4/psi4/archive/0.5.tar.gz"
+ url = "https://github.com/psi4/psi4/archive/0.5.tar.gz"
version('0.5', '53041b8a9be3958384171d0d22f9fdd0')
@@ -62,9 +62,10 @@ class Psi4(Package):
def install(self, spec, prefix):
cmake_args = [
'-DBLAS_TYPE={0}'.format(spec['blas'].name.upper()),
- '-DBLAS_LIBRARIES={0}'.format(spec['blas'].blas_shared_lib),
+ '-DBLAS_LIBRARIES={0}'.format(spec['blas'].blas_libs.joined()),
'-DLAPACK_TYPE={0}'.format(spec['lapack'].name.upper()),
- '-DLAPACK_LIBRARIES={0}'.format(spec['lapack'].lapack_shared_lib),
+ '-DLAPACK_LIBRARIES={0}'.format(
+ spec['lapack'].lapack_libs.joined()),
'-DBOOST_INCLUDEDIR={0}'.format(spec['boost'].prefix.include),
'-DBOOST_LIBRARYDIR={0}'.format(spec['boost'].prefix.lib),
'-DENABLE_CHEMPS2=OFF'
@@ -90,9 +91,9 @@ class Psi4(Package):
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
- cc_files = ['bin/psi4-config']
+ cc_files = ['bin/psi4-config']
cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h']
- template = 'share/psi4/plugin/Makefile.template'
+ template = 'share/psi4/plugin/Makefile.template'
for filename in cc_files:
filter_file(os.environ['CC'], self.compiler.cc,
diff --git a/var/spack/repos/builtin/packages/py-3to2/package.py b/var/spack/repos/builtin/packages/py-3to2/package.py
index 1071a3c209..d0b6857aaf 100644
--- a/var/spack/repos/builtin/packages/py-3to2/package.py
+++ b/var/spack/repos/builtin/packages/py-3to2/package.py
@@ -37,4 +37,4 @@ class Py3to2(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py
index ca59105b4c..73e144b00e 100644
--- a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py
+++ b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py
@@ -36,4 +36,4 @@ class PySqlalchemy(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-alabaster/package.py b/var/spack/repos/builtin/packages/py-alabaster/package.py
new file mode 100644
index 0000000000..24cb5dce22
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-alabaster/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 PyAlabaster(Package):
+ """Alabaster is a visually (c)lean, responsive, configurable theme
+ for the Sphinx documentation system."""
+
+ homepage = "https://pypi.python.org/pypi/alabaster"
+ url = "https://pypi.python.org/packages/source/a/alabaster/alabaster-0.7.9.tar.gz"
+
+ version('0.7.9', 'b29646a8bbe7aa52830375b7d17b5d7a',
+ url="https://pypi.python.org/packages/71/c3/70da7d8ac18a4f4c502887bd2549e05745fa403e2cd9d06a8a9910a762bc/alabaster-0.7.9.tar.gz")
+
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py
index 2549972a6d..64312da9dc 100644
--- a/var/spack/repos/builtin/packages/py-argcomplete/package.py
+++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py
@@ -36,4 +36,4 @@ class PyArgcomplete(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-astroid/package.py b/var/spack/repos/builtin/packages/py-astroid/package.py
index a47b7ffa33..ff5683c705 100644
--- a/var/spack/repos/builtin/packages/py-astroid/package.py
+++ b/var/spack/repos/builtin/packages/py-astroid/package.py
@@ -42,4 +42,4 @@ class PyAstroid(Package):
depends_on('py-six', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py
index 25dce87e49..1565db0bdd 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@@ -56,6 +56,5 @@ class PyAstropy(Package):
depends_on('expat')
def install(self, spec, prefix):
- python('setup.py', 'build', '--use-system-cfitsio',
- '--use-system-expat')
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('build', '--use-system-cfitsio', '--use-system-expat')
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-autopep8/package.py b/var/spack/repos/builtin/packages/py-autopep8/package.py
index f6c08e2728..6d093f32f6 100644
--- a/var/spack/repos/builtin/packages/py-autopep8/package.py
+++ b/var/spack/repos/builtin/packages/py-autopep8/package.py
@@ -1,16 +1,53 @@
+##############################################################################
+# 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 PyAutopep8(Package):
- """Automatic pep8 formatter"""
+ """autopep8 automatically formats Python code to conform to the
+ PEP 8 style guide."""
+
homepage = "https://github.com/hhatto/autopep8"
- url = "https://github.com/hhatto/autopep8/archive/ver1.2.2.tar.gz"
+ url = "https://github.com/hhatto/autopep8/archive/v1.2.4.tar.gz"
+ version('1.2.4', '0458db85159a9e1b45f3e71ce6c158da')
version('1.2.2', 'def3d023fc9dfd1b7113602e965ad8e1')
- extends('python')
+ extends('python', ignore='bin/pep8')
+ depends_on('python@2.6:2.7,3.2:')
+
+ depends_on('py-pycodestyle@1.5.7:1.7.0', type=nolink)
+
depends_on('py-setuptools', type='build')
- depends_on('py-pep8', type=nolink)
+
+ def url_for_version(self, version):
+ url = "https://github.com/hhatto/autopep8/archive/{0}{1}.tar.gz"
+ if version >= Version('1.2.3'):
+ return url.format('v', version)
+ else:
+ return url.format('ver', version)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-babel/package.py b/var/spack/repos/builtin/packages/py-babel/package.py
new file mode 100644
index 0000000000..8beb216fd3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-babel/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 PyBabel(Package):
+ """Babel is an integrated collection of utilities that assist in
+ internationalizing and localizing Python applications, with an
+ emphasis on web-based applications."""
+
+ homepage = "http://babel.pocoo.org/en/latest/"
+ url = "https://pypi.python.org/packages/source/B/Babel/Babel-2.3.4.tar.gz"
+
+ version('2.3.4', 'afa20bc55b0e991833030129ad498f35',
+ url="https://pypi.python.org/packages/6e/96/ba2a2462ed25ca0e651fb7b66e7080f5315f91425a07ea5b34d7c870c114/Babel-2.3.4.tar.gz")
+
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-pytz', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py
index 9c7f6454df..3f5bf989c1 100644
--- a/var/spack/repos/builtin/packages/py-basemap/package.py
+++ b/var/spack/repos/builtin/packages/py-basemap/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
class PyBasemap(Package):
@@ -37,10 +38,83 @@ class PyBasemap(Package):
extends('python')
depends_on('py-setuptools', type='build')
depends_on('py-numpy', type=nolink)
- depends_on('py-matplotlib+gui', type=nolink)
+ depends_on('py-matplotlib', type=nolink)
depends_on('pil', type=nolink)
depends_on("geos")
def install(self, spec, prefix):
env['GEOS_DIR'] = spec['geos'].prefix
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
+
+ # We are not sure if this fix is needed before Python 3.5.2.
+ # If it is needed, this test should be changed.
+ # See: https://github.com/LLNL/spack/pull/1964
+ if spec['python'].version >= Version('3.5.2'):
+ # Use symlinks to join the two mpl_toolkits/ directories into
+ # one, inside of basemap. This is because Basemap tries to
+ # "add to" an existing package in Matplotlib, which is only
+ # legal Python for "Implicit Namespace Packages":
+ # https://www.python.org/dev/peps/pep-0420/
+ # https://github.com/Homebrew/homebrew-python/issues/112
+ # In practice, Python will see only the basemap version of
+ # mpl_toolkits
+ path_m = find_package_dir(
+ spec['py-matplotlib'].prefix, 'mpl_toolkits')
+ path_b = find_package_dir(spec.prefix, 'mpl_toolkits')
+ link_dir(path_m, path_b)
+
+
+def find_package_dir(spack_package_root, name):
+
+ """Finds directory with a specific name, somewhere inside a Spack
+ package.
+
+ spack_package_root:
+ Root directory to start searching
+ oldname:
+ Original name of package (not fully qualified, just the leaf)
+ newname:
+ What to rename it to
+
+ """
+ for root, dirs, files in os.walk(spack_package_root):
+ path = os.path.join(root, name)
+
+ # Make sure it's a directory
+ if not os.path.isdir(path):
+ continue
+
+ # Make sure it's really a package
+ if not os.path.exists(os.path.join(path, '__init__.py')):
+ continue
+
+ return path
+
+ return None
+
+
+def link_dir(src_root, dest_root, link=os.symlink):
+ """Link all files in src_root into directory dest_root"""
+
+ for src_path, dirnames, filenames in os.walk(src_root):
+ if not filenames:
+ continue # avoid explicitly making empty dirs
+
+ # Avoid internal Python stuff
+ src_leaf = os.path.split(src_path)[1]
+ if src_leaf.startswith('__'):
+ continue
+
+ # Make sure the destination directory exists
+ dest_path = os.path.join(dest_root, src_path[len(src_root) + 1:])
+ try:
+ os.makedirs(dest_path)
+ except:
+ pass
+
+ # Link all files from src to dest directory
+ for fname in filenames:
+ src = os.path.join(src_path, fname)
+ dst = os.path.join(dest_path, fname)
+ if not os.path.exists(dst):
+ link(src, dst)
diff --git a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py
index 64368fe70d..71014b5bdb 100644
--- a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py
+++ b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py
@@ -37,5 +37,7 @@ class PyBeautifulsoup4(Package):
extends('python')
+ depends_on('py-setuptools', type='build')
+
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-biopython/package.py b/var/spack/repos/builtin/packages/py-biopython/package.py
index c3edf9735b..9e1b693a0d 100644
--- a/var/spack/repos/builtin/packages/py-biopython/package.py
+++ b/var/spack/repos/builtin/packages/py-biopython/package.py
@@ -41,4 +41,4 @@ class PyBiopython(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-blessings/package.py b/var/spack/repos/builtin/packages/py-blessings/package.py
index e6fc6aa983..700c0ff4b3 100644
--- a/var/spack/repos/builtin/packages/py-blessings/package.py
+++ b/var/spack/repos/builtin/packages/py-blessings/package.py
@@ -37,4 +37,4 @@ class PyBlessings(Package):
extends("python")
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py
index ad2ee749d3..20d78846bb 100644
--- a/var/spack/repos/builtin/packages/py-bottleneck/package.py
+++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py
@@ -36,4 +36,4 @@ class PyBottleneck(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-cclib/package.py b/var/spack/repos/builtin/packages/py-cclib/package.py
new file mode 100644
index 0000000000..33b1d25c7e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cclib/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 PyCclib(Package):
+ """Open source library for parsing and interpreting the results of
+ computational chemistry packages"""
+
+ homepage = "https://cclib.github.io/"
+ url = "https://github.com/cclib/cclib/releases/download/v1.5/cclib-1.5.tar.gz"
+
+ version('1.5', 'c06940101c4796bce82036b13fecb73c')
+
+ extends('python')
+
+ depends_on('py-numpy@1.5:', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py
index 3c1044783f..5cd983b343 100644
--- a/var/spack/repos/builtin/packages/py-cffi/package.py
+++ b/var/spack/repos/builtin/packages/py-cffi/package.py
@@ -22,6 +22,8 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+import os
+
from spack import *
@@ -39,4 +41,12 @@ class PyCffi(Package):
depends_on('libffi')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ # This sets the compiler (and flags) that distutils will use
+ # to create the final shared library. It will use the
+ # compiler specified by the environment variable 'CC' for all
+ # other compilation. We are setting the 'LDSHARED" to the
+ # spack compiler wrapper plus a few extra flags necessary for
+ # building the shared library.
+ os.environ['LDSHARED'] = "{0} -shared -pthread".format(spack_cc)
+
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-configparser/package.py b/var/spack/repos/builtin/packages/py-configparser/package.py
new file mode 100644
index 0000000000..1ad4ed619e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-configparser/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 PyConfigparser(Package):
+ """This library brings the updated configparser from Python 3.5 to
+ Python 2.6-3.5."""
+
+ homepage = "https://pypi.python.org/pypi/configparser"
+ url = "https://pypi.python.org/packages/source/c/configparser/configparser-3.5.0.tar.gz"
+
+ version('3.5.0', 'cfdd915a5b7a6c09917a64a573140538',
+ url="https://pypi.python.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz")
+
+ extends('python')
+ depends_on('python@2.6:2.7,3.4:')
+
+ depends_on('py-ordereddict', when='^python@2.6:2.6.999', type=nolink)
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-coverage/package.py b/var/spack/repos/builtin/packages/py-coverage/package.py
index c2a698b0bd..8cd8440b7e 100644
--- a/var/spack/repos/builtin/packages/py-coverage/package.py
+++ b/var/spack/repos/builtin/packages/py-coverage/package.py
@@ -27,7 +27,7 @@ from spack import *
class PyCoverage(Package):
""" Testing coverage checker for python """
- # FIXME: add a proper url for your package's homepage here.
+
homepage = "http://nedbatchelder.com/code/coverage/"
url = "https://pypi.python.org/packages/source/c/coverage/coverage-4.0a6.tar.gz"
@@ -38,4 +38,4 @@ class PyCoverage(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py
index 5f50e3b6c2..5b0394a138 100644
--- a/var/spack/repos/builtin/packages/py-csvkit/package.py
+++ b/var/spack/repos/builtin/packages/py-csvkit/package.py
@@ -44,4 +44,4 @@ class PyCsvkit(Package):
depends_on('py-openpyxl', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
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-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py
index 4b3e1cabe1..e532286081 100644
--- a/var/spack/repos/builtin/packages/py-cython/package.py
+++ b/var/spack/repos/builtin/packages/py-cython/package.py
@@ -40,4 +40,4 @@ class PyCython(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py
index 4bc2c6fc99..c72046b627 100644
--- a/var/spack/repos/builtin/packages/py-dask/package.py
+++ b/var/spack/repos/builtin/packages/py-dask/package.py
@@ -37,4 +37,4 @@ class PyDask(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py
index 40945232c1..f147e2357b 100644
--- a/var/spack/repos/builtin/packages/py-dateutil/package.py
+++ b/var/spack/repos/builtin/packages/py-dateutil/package.py
@@ -39,4 +39,4 @@ class PyDateutil(Package):
depends_on('py-six', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py
index 7f83bce75e..eff893cc82 100644
--- a/var/spack/repos/builtin/packages/py-dbf/package.py
+++ b/var/spack/repos/builtin/packages/py-dbf/package.py
@@ -37,4 +37,4 @@ class PyDbf(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py
index 9101b07a0d..30f764edc3 100644
--- a/var/spack/repos/builtin/packages/py-decorator/package.py
+++ b/var/spack/repos/builtin/packages/py-decorator/package.py
@@ -39,4 +39,4 @@ class PyDecorator(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-docutils/package.py b/var/spack/repos/builtin/packages/py-docutils/package.py
index 3a938d918b..114131df90 100644
--- a/var/spack/repos/builtin/packages/py-docutils/package.py
+++ b/var/spack/repos/builtin/packages/py-docutils/package.py
@@ -40,4 +40,4 @@ class PyDocutils(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-emcee/package.py b/var/spack/repos/builtin/packages/py-emcee/package.py
index 397f737cb1..2045ec9d59 100644
--- a/var/spack/repos/builtin/packages/py-emcee/package.py
+++ b/var/spack/repos/builtin/packages/py-emcee/package.py
@@ -38,4 +38,4 @@ class PyEmcee(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-enum34/package.py b/var/spack/repos/builtin/packages/py-enum34/package.py
new file mode 100644
index 0000000000..2f294bac12
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-enum34/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 PyEnum34(Package):
+ """Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4."""
+
+ homepage = "https://pypi.python.org/pypi/enum34"
+ url = "https://pypi.python.org/packages/source/e/enum34/enum34-1.1.6.tar.gz"
+
+ version('1.1.6', '5f13a0841a61f7fc295c514490d120d0',
+ url="https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz")
+
+ extends('python')
+ depends_on('python@2.4:2.8,3.3:')
+
+ depends_on('py-ordereddict', when='^python@:2.6.999', type=nolink)
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-epydoc/package.py b/var/spack/repos/builtin/packages/py-epydoc/package.py
index 9d4b93dad4..ed490cb396 100644
--- a/var/spack/repos/builtin/packages/py-epydoc/package.py
+++ b/var/spack/repos/builtin/packages/py-epydoc/package.py
@@ -36,4 +36,4 @@ class PyEpydoc(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py
index 2fabe03d66..8bb36bc02f 100644
--- a/var/spack/repos/builtin/packages/py-flake8/package.py
+++ b/var/spack/repos/builtin/packages/py-flake8/package.py
@@ -28,13 +28,40 @@ from spack import *
class PyFlake8(Package):
"""Flake8 is a wrapper around PyFlakes, pep8 and Ned Batchelder's
McCabe script."""
- homepage = "http://flake8.readthedocs.io/en/latest/"
- url = "https://pypi.python.org/packages/source/f/flake8/flake8-2.5.4.tar.gz"
- version('2.5.4', 'a4585b3569b95c3f66acb8294a7f06ef')
+ homepage = "https://github.com/PyCQA/flake8"
+ url = "https://github.com/PyCQA/flake8/archive/3.0.4.tar.gz"
- extends('python')
- depends_on('py-setuptools', type='build')
+ version('3.0.4', 'cf2a7d8c92070f7b62253404ffb54df7')
+ version('2.5.4', '366dd1de6c300254c830b81e66979f06')
+
+ extends('python', ignore='bin/(pyflakes|pycodestyle)')
+ depends_on('python@2.7:2.8,3.4:')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-flake8 requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+
+ # pyflakes >= 0.8.1, != 1.2.0, != 1.2.1, != 1.2.2, < 1.3.0
+ depends_on('py-pyflakes@0.8.1:1.1.0,1.2.3:1.2.3', when='@3.0.4', type=nolink) # noqa
+ # pyflakes >= 0.8.1, < 1.1
+ depends_on('py-pyflakes@0.8.1:1.0.0', when='@2.5.4', type=nolink)
+
+ # pycodestyle >= 2.0.0, < 2.1.0
+ depends_on('py-pycodestyle@2.0.0:2.0.999', when='@3.0.4', type=nolink)
+ # pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2
+ depends_on('py-pycodestyle@1.5.7,1.7.0:', when='@2.5.4', type=nolink)
+
+ # mccabe >= 0.5.0, < 0.6.0
+ depends_on('py-mccabe@0.5.0:0.5.999', when='@3.0.4', type=nolink)
+ # mccabe >= 0.2.1, < 0.5
+ depends_on('py-mccabe@0.2.1:0.4.0', when='@2.5.4', type=nolink)
+
+ depends_on('py-configparser', when='^python@:3.3.999', type=nolink)
+ depends_on('py-enum34', when='^python@:3.1.999', type=nolink)
+
+ # TODO: Add test dependencies
+ # depends_on('py-nose', type='test')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-funcsigs/package.py b/var/spack/repos/builtin/packages/py-funcsigs/package.py
index c3d37f6b98..b82a37cae9 100644
--- a/var/spack/repos/builtin/packages/py-funcsigs/package.py
+++ b/var/spack/repos/builtin/packages/py-funcsigs/package.py
@@ -37,4 +37,4 @@ class PyFuncsigs(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-genshi/package.py b/var/spack/repos/builtin/packages/py-genshi/package.py
index ea8d26c796..e7eb7bebdd 100644
--- a/var/spack/repos/builtin/packages/py-genshi/package.py
+++ b/var/spack/repos/builtin/packages/py-genshi/package.py
@@ -39,4 +39,4 @@ class PyGenshi(Package):
depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py
index a448a66e51..cc273103f2 100644
--- a/var/spack/repos/builtin/packages/py-gnuplot/package.py
+++ b/var/spack/repos/builtin/packages/py-gnuplot/package.py
@@ -37,4 +37,4 @@ class PyGnuplot(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py
index 90a67c51bd..0579787ba2 100644
--- a/var/spack/repos/builtin/packages/py-h5py/package.py
+++ b/var/spack/repos/builtin/packages/py-h5py/package.py
@@ -56,11 +56,10 @@ class PyH5py(Package):
depends_on('py-six', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'configure',
- '--hdf5={0}'.format(spec['hdf5'].prefix))
+ setup_py('configure', '--hdf5={0}'.format(spec['hdf5'].prefix))
if '+mpi' in spec:
env['CC'] = spec['mpi'].mpicc
- python('setup.py', 'configure', '--mpi')
+ setup_py('configure', '--mpi')
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-imagesize/package.py b/var/spack/repos/builtin/packages/py-imagesize/package.py
new file mode 100644
index 0000000000..941e64610e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-imagesize/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 PyImagesize(Package):
+ """Parses image file headers and returns image size. Supports PNG, JPEG,
+ JPEG2000, and GIF image file formats."""
+
+ homepage = "https://pypi.python.org/pypi/imagesize"
+ url = "https://pypi.python.org/packages/source/i/imagesize/imagesize-0.7.1.tar.gz"
+
+ version('0.7.1', '976148283286a6ba5f69b0f81aef8052',
+ url="https://pypi.python.org/packages/53/72/6c6f1e787d9cab2cc733cf042f125abec07209a58308831c9f292504e826/imagesize-0.7.1.tar.gz")
+
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py
index d7446c06d4..c58b722e3b 100644
--- a/var/spack/repos/builtin/packages/py-iminuit/package.py
+++ b/var/spack/repos/builtin/packages/py-iminuit/package.py
@@ -43,4 +43,4 @@ class PyIminuit(Package):
depends_on('py-cython', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py
index ac3291e21e..d7ee2e3c95 100644
--- a/var/spack/repos/builtin/packages/py-ipython/package.py
+++ b/var/spack/repos/builtin/packages/py-ipython/package.py
@@ -39,4 +39,4 @@ class PyIpython(Package):
depends_on('py-setuptools', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-jdcal/package.py b/var/spack/repos/builtin/packages/py-jdcal/package.py
index 32acf75131..60ee91c9b6 100644
--- a/var/spack/repos/builtin/packages/py-jdcal/package.py
+++ b/var/spack/repos/builtin/packages/py-jdcal/package.py
@@ -36,4 +36,4 @@ class PyJdcal(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py
index 943edf521a..8ef4f568c5 100644
--- a/var/spack/repos/builtin/packages/py-jinja2/package.py
+++ b/var/spack/repos/builtin/packages/py-jinja2/package.py
@@ -22,29 +22,28 @@
# 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 depends_on, extends, version, nolink
-from spack import Package
+from spack import *
class PyJinja2(Package):
- """
- Jinja2 is a template engine written in pure Python. It provides
+ """Jinja2 is a template engine written in pure Python. It provides
a Django inspired non-XML syntax but supports inline expressions
- and an optional sandboxed environment.
- """
+ and an optional sandboxed environment."""
homepage = "http://jinja.pocoo.org/"
- url = "https://github.com/pallets/jinja/archive/2.8.tar.gz"
+ url = "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz"
- version('2.8', '4114200650d7630594e3bc70af23f59e')
- version('2.7.3', '55b87bdc8e585b8b5b86734eefce2621')
- version('2.7.2', '8e8f226809ae6363009b9296e30adf30')
- version('2.7.1', '69b6675553c81b1087f95cae7f2179bb')
- version('2.7', 'ec70433f325051dcedacbb2465028a35')
+ version('2.8', 'edb51693fe22c53cee5403775c71a99e')
+ version('2.7.3', 'b9dffd2f3b43d673802fe857c8445b1a')
+ version('2.7.2', 'df1581455564e97010e38bc792012aa5')
+ version('2.7.1', '282aed153e69f970d6e76f78ed9d027a')
+ version('2.7', 'c2fb12cbbb523c57d3d15bfe4dc0e8fe')
- extends("python")
- depends_on("py-setuptools", type='build')
- depends_on("py-markupsafe", type=nolink)
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-markupsafe', type=nolink)
+ depends_on('py-babel@0.8:', type=nolink) # optional, required for i18n
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-lockfile/package.py b/var/spack/repos/builtin/packages/py-lockfile/package.py
index b873625bdb..856276ec89 100644
--- a/var/spack/repos/builtin/packages/py-lockfile/package.py
+++ b/var/spack/repos/builtin/packages/py-lockfile/package.py
@@ -45,4 +45,4 @@ class PyLockfile(Package):
depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-logilab-common/package.py b/var/spack/repos/builtin/packages/py-logilab-common/package.py
index ac1b933e43..e66cdc8479 100644
--- a/var/spack/repos/builtin/packages/py-logilab-common/package.py
+++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py
@@ -38,4 +38,4 @@ class PyLogilabCommon(Package):
depends_on("py-six", type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-macs2/package.py b/var/spack/repos/builtin/packages/py-macs2/package.py
new file mode 100644
index 0000000000..df5b00555f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-macs2/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 PyMacs2(Package):
+ """MACS2 Model-based Analysis of ChIP-Seq"""
+
+ homepage = "https://github.com/taoliu/MACS"
+ url = "https://pypi.python.org/packages/9f/99/a8ac96b357f6b0a6f559fe0f5a81bcae12b98579551620ce07c5183aee2c/MACS2-2.1.1.20160309.tar.gz"
+
+ version('2.1.1.20160309', '2008ba838f83f34f8e0fddefe2a3a0159f4a740707c68058f815b31ddad53d26')
+
+ extends('python')
+ depends_on('python@2.7:2.8')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-macs2 requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+ depends_on('py-numpy@1.6:', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-mako/package.py b/var/spack/repos/builtin/packages/py-mako/package.py
index 18a8dc0e68..460666081e 100644
--- a/var/spack/repos/builtin/packages/py-mako/package.py
+++ b/var/spack/repos/builtin/packages/py-mako/package.py
@@ -32,10 +32,15 @@ class PyMako(Package):
homepage = "https://pypi.python.org/pypi/mako"
url = "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.1.tar.gz"
+ version('1.0.4', 'c5fc31a323dd4990683d2f2da02d4e20')
version('1.0.1', '9f0aafd177b039ef67b90ea350497a54')
- depends_on('py-setuptools', type='build')
extends('python')
+ depends_on('py-setuptools', type='build')
+ # depends_on('py-mock', type='test') # TODO: Add test deptype
+ # depends_on('py-pytest', type='test') # TODO: Add test deptype
+ depends_on('py-markupsafe@0.9.2:', type=nolink)
+
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py
index 0a039d1d47..5ba5bfb997 100644
--- a/var/spack/repos/builtin/packages/py-markupsafe/package.py
+++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py
@@ -22,29 +22,27 @@
# 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 depends_on, extends, version
-from spack import Package
+from spack import *
class PyMarkupsafe(Package):
- """
- MarkupSafe is a library for Python that implements a unicode
- string that is aware of HTML escaping rules and can be used
- to implement automatic string escaping. It is used by Jinja 2,
- the Mako templating engine, the Pylons web framework and many more.
- """
+ """MarkupSafe is a library for Python that implements a unicode
+ string that is aware of HTML escaping rules and can be used to
+ implement automatic string escaping. It is used by Jinja 2, the
+ Mako templating engine, the Pylons web framework and many more."""
homepage = "http://www.pocoo.org/projects/markupsafe/"
- url = "https://github.com/pallets/markupsafe/archive/0.23.tar.gz"
+ url = "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz"
- version('0.23', '1a0dadc95169832367c9dcf142155cde')
- version('0.22', '7a2ac7427b58def567628d06dc328396')
- version('0.21', 'aebcd93ee05269773c8b80bb6c86fc2f')
- version('0.20', '0c1fef97c8fd6a986d708f08d7f84a02')
- version('0.19', '64b05361adb92c11839fc470e308c593')
+ version('0.23', 'f5ab3deee4c37cd6a922fb81e730da6e')
+ version('0.22', 'cb3ec29fd5361add24cfd0c6e2953b3e')
+ version('0.21', 'fde838d9337fa51744283f46a1db2e74')
+ version('0.20', '7da066d9cb191a70aa85d0a3d43565d1')
+ version('0.19', 'ccb3f746c807c5500850987006854a6d')
- extends("python")
- depends_on("py-setuptools", type='build')
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % 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..38859ebe15 100644
--- a/var/spack/repos/builtin/packages/py-matplotlib/package.py
+++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py
@@ -27,55 +27,95 @@ 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"
+ url = "https://pypi.io/packages/source/m/matplotlib/matplotlib-1.4.2.tar.gz"
- version('1.4.2', '7d22efb6cce475025733c50487bd8898')
+ version('1.5.3', 'ba993b06113040fee6628d74b80af0fd')
+ version('1.5.1', 'f51847d8692cb63df64cd0bd0304fd20')
version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267')
+ version('1.4.2', '7d22efb6cce475025733c50487bd8898')
+
+ # See: http://matplotlib.org/users/installing.html
- variant('gui', default=False, description='Enable GUI')
+ # Variants enabled by default for a standard configuration
+ variant('tk', default=True, description='Enable Tk GUI')
+ variant('image', default=True,
+ description='Enable reading/saving JPEG, BMP and TIFF files')
+
+ # Variants optionally available to user
variant('ipython', default=False, description='Enable ipython support')
+ variant('qt', default=False, description='Enable Qt GUI')
+ variant('latex', default=False,
+ description='Enable LaTeX text rendering support')
+ variant('animation', default=False,
+ description='Enable animation support')
+ # Python 2.7, 3.4, or 3.5
extends('python', ignore=r'bin/nosetests.*$|bin/pbr$')
+ # ------ Required dependencies
depends_on('py-setuptools', type='build')
- depends_on('py-pyside', when='+gui', type=nolink)
- depends_on('py-ipython', when='+ipython', type=nolink)
+
+ depends_on('libpng@1.2:')
+ depends_on('freetype@2.3:')
+
+ depends_on('py-numpy@1.6:', type=nolink)
+ depends_on('py-dateutil@1.1:', 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)
-
- 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-cycler@0.9:', type=nolink)
+
+ # ------ Optional GUI frameworks
+ depends_on('tk@8.3:', when='+tk') # not 8.6.0 or 8.6.1
+ depends_on('qt', when='+qt')
+ depends_on('py-pyside', when='+qt', type=nolink)
+
+ # --------- Optional external programs
+ # ffmpeg/avconv or mencoder
+ depends_on('ImageMagick', when='+animation')
+
+ # --------- Optional dependencies
+ depends_on('pkg-config', type='build') # why not...
+ depends_on('py-pillow', when='+image', type=nolink)
+ depends_on('py-ipython', when='+ipython')
+ depends_on('ghostscript', when='+latex', type='run')
+ depends_on('texlive', when='+latex', type='run')
+
+ # 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 '+qt' in spec or '+tk' 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)
+
+ # Only make Qt4 be the default backend if Tk is turned off
+ if '+qt' in spec and '+tk' not in spec:
+ rc.filter('^backend.*', 'backend : Qt4Agg', **kwargs)
+
+ # Additional options in case user is doing Qt4:
+ if '+qt' in spec:
+ rc.filter('^#backend.qt4.*', 'backend.qt4 : PySide', **kwargs)
diff --git a/var/spack/repos/builtin/packages/py-mccabe/package.py b/var/spack/repos/builtin/packages/py-mccabe/package.py
new file mode 100644
index 0000000000..ec913acb16
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-mccabe/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 PyMccabe(Package):
+ """Ned's script to check McCabe complexity."""
+
+ homepage = "https://github.com/PyCQA/mccabe"
+ url = "https://github.com/PyCQA/mccabe/archive/0.5.2.tar.gz"
+
+ version('0.5.2', '3cdf2d7faa1464b18905fe9a7063a632')
+ version('0.5.1', '864b364829156701bec797712be8ece0')
+ version('0.5.0', '71c0ce5e5c4676753525154f6c5d3af8')
+ version('0.4.0', '9cf5712e5f1785aaa27273a4328babe4')
+ version('0.3.1', '45c48c0978e6fc1f31fedcb918178abb')
+ version('0.3', 'c583f58ea28be12842c001473d77504d')
+ version('0.2.1', 'fcba311ebd999f48359a8ab28da94b30')
+ version('0.2', '36d4808c37e187dbb1fe2373a0ac6645')
+ version('0.1', '3c9e8e72612a9c01d865630cc569150a')
+
+ extends('python')
+ depends_on('python@2.7:2.8,3.3:')
+
+ depends_on('py-setuptools', type='build')
+
+ # TODO: Add test dependencies
+ # depends_on('py-pytest', type='test')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-mistune/package.py b/var/spack/repos/builtin/packages/py-mistune/package.py
index 399c10005e..2daee1ed9a 100644
--- a/var/spack/repos/builtin/packages/py-mistune/package.py
+++ b/var/spack/repos/builtin/packages/py-mistune/package.py
@@ -43,4 +43,4 @@ class PyMistune(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mock/package.py b/var/spack/repos/builtin/packages/py-mock/package.py
index 2c70535f19..d397b72329 100644
--- a/var/spack/repos/builtin/packages/py-mock/package.py
+++ b/var/spack/repos/builtin/packages/py-mock/package.py
@@ -40,4 +40,4 @@ class PyMock(Package):
depends_on('py-setuptools@17.1:', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py
index 1f0e52804e..11b1584397 100644
--- a/var/spack/repos/builtin/packages/py-mpi4py/package.py
+++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py
@@ -43,4 +43,4 @@ class PyMpi4py(Package):
depends_on('mpi')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py
index e5bae34694..846852aeb5 100644
--- a/var/spack/repos/builtin/packages/py-mpmath/package.py
+++ b/var/spack/repos/builtin/packages/py-mpmath/package.py
@@ -35,4 +35,4 @@ class PyMpmath(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mx/package.py b/var/spack/repos/builtin/packages/py-mx/package.py
index f5631916f6..e72b281665 100644
--- a/var/spack/repos/builtin/packages/py-mx/package.py
+++ b/var/spack/repos/builtin/packages/py-mx/package.py
@@ -40,4 +40,4 @@ class PyMx(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mysqldb1/package.py b/var/spack/repos/builtin/packages/py-mysqldb1/package.py
index 693fda6dbb..14534a57ca 100644
--- a/var/spack/repos/builtin/packages/py-mysqldb1/package.py
+++ b/var/spack/repos/builtin/packages/py-mysqldb1/package.py
@@ -36,4 +36,4 @@ class PyMysqldb1(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-nestle/package.py b/var/spack/repos/builtin/packages/py-nestle/package.py
index 81f9fe4d09..03096586b9 100644
--- a/var/spack/repos/builtin/packages/py-nestle/package.py
+++ b/var/spack/repos/builtin/packages/py-nestle/package.py
@@ -41,4 +41,4 @@ class PyNestle(Package):
depends_on('py-scipy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-netcdf/package.py b/var/spack/repos/builtin/packages/py-netcdf/package.py
index e4f67d75a6..d238855d1e 100644
--- a/var/spack/repos/builtin/packages/py-netcdf/package.py
+++ b/var/spack/repos/builtin/packages/py-netcdf/package.py
@@ -35,7 +35,8 @@ class PyNetcdf(Package):
extends('python')
depends_on('py-numpy', type=nolink)
depends_on('py-cython', type=nolink)
+ depends_on('py-setuptools', type=nolink)
depends_on('netcdf')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py
index 79ad420f8f..aaeaac9674 100644
--- a/var/spack/repos/builtin/packages/py-networkx/package.py
+++ b/var/spack/repos/builtin/packages/py-networkx/package.py
@@ -39,4 +39,4 @@ class PyNetworkx(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py
index eb3dd77219..f1872c85b4 100644
--- a/var/spack/repos/builtin/packages/py-nose/package.py
+++ b/var/spack/repos/builtin/packages/py-nose/package.py
@@ -40,4 +40,4 @@ class PyNose(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py
index b3b2e1d47d..51b4ef2e92 100644
--- a/var/spack/repos/builtin/packages/py-numexpr/package.py
+++ b/var/spack/repos/builtin/packages/py-numexpr/package.py
@@ -37,4 +37,4 @@ class PyNumexpr(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
index f800b5e834..22b4d98b9d 100644
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -32,9 +32,12 @@ class PyNumpy(Package):
sophisticated (broadcasting) functions, tools for integrating C/C++ and
Fortran code, and useful linear algebra, Fourier transform, and random
number capabilities"""
+
homepage = "http://www.numpy.org/"
- url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz"
+ url = "https://pypi.io/packages/source/n/numpy/numpy-1.9.1.tar.gz"
+ version('1.11.2', '03bd7927c314c43780271bf1ab795ebc')
+ version('1.11.1', '2f44a895a8104ffac140c3a70edbd450')
version('1.11.0', 'bc56fb9fc2895aa4961802ffbdb31d0b')
version('1.10.4', 'aed294de0aa1ac7bd3f9745f4f1968ad')
version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645')
@@ -44,6 +47,7 @@ class PyNumpy(Package):
variant('lapack', default=True)
extends('python')
+ depends_on('python@2.6:2.8,3.2:')
depends_on('py-nose', type='build')
depends_on('py-setuptools', type='build')
depends_on('blas', when='+blas')
@@ -62,21 +66,21 @@ class PyNumpy(Package):
'numpy/core/include')
def install(self, spec, prefix):
- libraries = []
- library_dirs = []
+ # for build notes see http://www.scipy.org/scipylib/building/linux.html
+ lapackblas = LibraryList('')
+ if '+lapack' in spec:
+ lapackblas += spec['lapack'].lapack_libs
if '+blas' in spec:
- libraries.append('blas')
- library_dirs.append(spec['blas'].prefix.lib)
- if '+lapack' in spec:
- libraries.append('lapack')
- library_dirs.append(spec['lapack'].prefix.lib)
+ lapackblas += spec['blas'].blas_libs
if '+blas' in spec or '+lapack' in spec:
with open('site.cfg', 'w') as f:
f.write('[DEFAULT]\n')
- f.write('libraries=%s\n' % ','.join(libraries))
- f.write('library_dirs=%s\n' % ':'.join(library_dirs))
- f.write('rpath=%s\n' % ':'.join(library_dirs))
+ f.write('libraries=%s\n' % ','.join(lapackblas.names))
+ f.write('library_dirs=%s\n' % ':'.join(lapackblas.directories))
+ if not ((platform.system() == "Darwin") and
+ (platform.mac_ver()[0] == '10.12')):
+ f.write('rpath=%s\n' % ':'.join(lapackblas.directories))
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py
index fa32cb879f..94949076ef 100644
--- a/var/spack/repos/builtin/packages/py-openpyxl/package.py
+++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py
@@ -39,4 +39,4 @@ class PyOpenpyxl(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-ordereddict/package.py b/var/spack/repos/builtin/packages/py-ordereddict/package.py
new file mode 100644
index 0000000000..6e038b789c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ordereddict/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 PyOrdereddict(Package):
+ """A drop-in substitute for Py2.7's new collections.
+ OrderedDict that works in Python 2.4-2.6."""
+
+ homepage = "https://pypi.python.org/pypi/ordereddict"
+ url = "https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz"
+
+ version('1.1', 'a0ed854ee442051b249bfad0f638bbec')
+
+ extends('python')
+ depends_on('python@2.4:2.6.999')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py
index 37234ae652..ae797cee40 100644
--- a/var/spack/repos/builtin/packages/py-pandas/package.py
+++ b/var/spack/repos/builtin/packages/py-pandas/package.py
@@ -51,4 +51,4 @@ class PyPandas(Package):
depends_on('py-bottleneck', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pbr/package.py b/var/spack/repos/builtin/packages/py-pbr/package.py
index a0cfe0e5a5..0251e436b1 100644
--- a/var/spack/repos/builtin/packages/py-pbr/package.py
+++ b/var/spack/repos/builtin/packages/py-pbr/package.py
@@ -38,4 +38,4 @@ class PyPbr(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pep8/package.py b/var/spack/repos/builtin/packages/py-pep8/package.py
deleted file mode 100644
index 87d1da9ab0..0000000000
--- a/var/spack/repos/builtin/packages/py-pep8/package.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from spack import *
-
-
-class PyPep8(Package):
- """python pep8 format checker"""
- homepage = "https://github.com/PyCQA/pycodestyle"
- url = "https://github.com/PyCQA/pycodestyle/archive/1.7.0.tar.gz"
-
- version('1.7.0', '31070a3a6391928893cbf5fa523eb8d9')
-
- extends('python')
- depends_on('py-setuptools', type='build')
-
- def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-periodictable/package.py b/var/spack/repos/builtin/packages/py-periodictable/package.py
index 51d9cc2046..4a5b015e60 100644
--- a/var/spack/repos/builtin/packages/py-periodictable/package.py
+++ b/var/spack/repos/builtin/packages/py-periodictable/package.py
@@ -39,4 +39,4 @@ class PyPeriodictable(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pexpect/package.py b/var/spack/repos/builtin/packages/py-pexpect/package.py
index 8a99c0473b..9e43e4526e 100644
--- a/var/spack/repos/builtin/packages/py-pexpect/package.py
+++ b/var/spack/repos/builtin/packages/py-pexpect/package.py
@@ -35,4 +35,4 @@ class PyPexpect(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-phonopy/package.py b/var/spack/repos/builtin/packages/py-phonopy/package.py
index d5b3313a98..a4ad03f34d 100644
--- a/var/spack/repos/builtin/packages/py-phonopy/package.py
+++ b/var/spack/repos/builtin/packages/py-phonopy/package.py
@@ -40,4 +40,4 @@ class PyPhonopy(Package):
depends_on('py-pyyaml', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--home=%s' % prefix)
+ setup_py('install', '--home=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pil/package.py b/var/spack/repos/builtin/packages/py-pil/package.py
index 2b3cce26d3..f5d684962d 100644
--- a/var/spack/repos/builtin/packages/py-pil/package.py
+++ b/var/spack/repos/builtin/packages/py-pil/package.py
@@ -37,7 +37,10 @@ class PyPil(Package):
provides('pil')
+ # py-pil currently only works with Python2.
+ # If you are using Python 3, try using py-pillow instead.
extends('python')
+ depends_on('python@1.5.2:2.8')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py
index 1d8b3faa6f..3125a822b4 100644
--- a/var/spack/repos/builtin/packages/py-pillow/package.py
+++ b/var/spack/repos/builtin/packages/py-pillow/package.py
@@ -32,7 +32,7 @@ class PyPillow(Package):
capabilities."""
homepage = "https://python-pillow.org/"
- url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
+ url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
# TODO: This version should be deleted once the next release comes out.
# TODO: It fixes a bug that prevented us from linking to Tk/Tcl.
@@ -129,5 +129,5 @@ class PyPillow(Package):
variants = ['jpeg', 'zlib', 'tiff', 'freetype', 'lcms', 'jpeg2000']
build_args = list(map(variant_to_flag, variants))
- python('setup.py', 'build_ext', *build_args)
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('build_ext', *build_args)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-ply/package.py b/var/spack/repos/builtin/packages/py-ply/package.py
index 47cd3b5dc8..d249de64fa 100644
--- a/var/spack/repos/builtin/packages/py-ply/package.py
+++ b/var/spack/repos/builtin/packages/py-ply/package.py
@@ -35,4 +35,4 @@ class PyPly(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pmw/package.py b/var/spack/repos/builtin/packages/py-pmw/package.py
index e0a332a6bf..5173864f62 100644
--- a/var/spack/repos/builtin/packages/py-pmw/package.py
+++ b/var/spack/repos/builtin/packages/py-pmw/package.py
@@ -36,4 +36,4 @@ class PyPmw(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py
index cf814733d4..55a323a0d6 100644
--- a/var/spack/repos/builtin/packages/py-prettytable/package.py
+++ b/var/spack/repos/builtin/packages/py-prettytable/package.py
@@ -22,16 +22,15 @@
# 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 depends_on, extends, version
-from spack import Package
+from spack import *
class PyPrettytable(Package):
- """
- PrettyTable is a simple Python library designed to make
+ """PrettyTable is a simple Python library designed to make
it quick and easy to represent tabular data in visually
- appealing ASCII tables
+ appealing ASCII tables.
"""
+
homepage = "https://code.google.com/archive/p/prettytable/"
url = "https://pypi.python.org/packages/e0/a1/36203205f77ccf98f3c6cf17cf068c972e6458d7e58509ca66da949ca347/prettytable-0.7.2.tar.gz"
@@ -41,4 +40,4 @@ class PyPrettytable(Package):
depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-proj/package.py b/var/spack/repos/builtin/packages/py-proj/package.py
new file mode 100644
index 0000000000..2835bfcca8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-proj/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written by David Beckingsale, david@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 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 PyProj(Package):
+ """Python interface to the PROJ.4 Library."""
+ homepage = "http://jswhit.github.io/pyproj/"
+ url = "https://github.com/jswhit/pyproj/tarball/v1.9.5.1rel"
+
+ # This is not a tagged release of pyproj.
+ # The changes in this "version" fix some bugs, especially with Python3 use.
+ version('1.9.5.1.1', 'd035e4bc704d136db79b43ab371b27d2',
+ url='https://www.github.com/jswhit/pyproj/tarball/0be612cc9f972e38b50a90c946a9b353e2ab140f')
+
+ version('1.9.5.1', 'a4b80d7170fc82aee363d7f980279835')
+
+ extends('python')
+
+ depends_on('py-cython', type='build')
+ depends_on('py-setuptools', type='build')
+
+ # NOTE: py-proj does NOT depends_on('proj').
+ # The py-proj git repo actually includes the correct version of PROJ.4,
+ # which is built internally as part of the py-proj build.
+ # Adding depends_on('proj') will cause mysterious build errors.
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py
index dd2b5651de..d1186775bb 100644
--- a/var/spack/repos/builtin/packages/py-protobuf/package.py
+++ b/var/spack/repos/builtin/packages/py-protobuf/package.py
@@ -47,4 +47,4 @@ class PyProtobuf(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pudb/package.py b/var/spack/repos/builtin/packages/py-pudb/package.py
new file mode 100644
index 0000000000..dd2c751389
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pudb/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 PyPudb(Package):
+ """Full-screen console debugger for Python"""
+
+ homepage = "http://mathema.tician.de/software/pudb"
+ url = "https://pypi.io/packages/source/p/pudb/pudb-2016.2.tar.gz"
+
+ version('2016.2', '4573b70163329c1cb59836a357bfdf7c')
+
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-urwid@1.1.1:', type=nolink)
+ depends_on('py-pygments@1.0:', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-py/package.py b/var/spack/repos/builtin/packages/py-py/package.py
new file mode 100644
index 0000000000..f624aaf389
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-py/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 PyPy(Package):
+ """library with cross-python path, ini-parsing, io, code, log facilities"""
+
+ homepage = "http://pylib.readthedocs.io/en/latest/"
+ url = "https://pypi.python.org/packages/source/p/py/py-1.4.31.tar.gz"
+
+ version('1.4.31', '5d2c63c56dc3f2115ec35c066ecd582b')
+
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-py2cairo/package.py b/var/spack/repos/builtin/packages/py-py2cairo/package.py
new file mode 100644
index 0000000000..efc3645745
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-py2cairo/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 PyPy2cairo(Package):
+ """bindings for the Cairo for Python 2,
+ to be used in Python."""
+
+ homepage = "https://pypi.python.org/pypi/pycairo"
+ url = "https://cairographics.org/releases/py2cairo-1.10.0.tar.bz2"
+
+ version('1.10.0', '20337132c4ab06c1146ad384d55372c5')
+
+ extends('python')
+ depends_on("cairo")
+ depends_on("pixman")
+
+ def install(self, spec, prefix):
+ python('waf', 'configure', '--prefix=%s' % prefix)
+ python('waf', 'build')
+ python('waf', 'install')
diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py
index a79c2e477b..aed0859021 100644
--- a/var/spack/repos/builtin/packages/py-py2neo/package.py
+++ b/var/spack/repos/builtin/packages/py-py2neo/package.py
@@ -27,9 +27,10 @@ from spack import Package
class PyPy2neo(Package):
- """FIXME: put a proper description of your package here."""
- # FIXME: add a proper url for your package's homepage here.
- homepage = "http://www.example.com"
+ """Py2neo is a client library and toolkit for working with Neo4j from
+ within Python applications and from the command line."""
+
+ homepage = "http://py2neo.org/"
url = "https://github.com/nigelsmall/py2neo/archive/py2neo-2.0.8.tar.gz"
version('2.0.8', 'e3ec5172a9e006515ef4155688a05a55')
@@ -42,4 +43,4 @@ class PyPy2neo(Package):
extends("python")
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pychecker/package.py b/var/spack/repos/builtin/packages/py-pychecker/package.py
index e81c3dbc9b..b1f8aad33f 100644
--- a/var/spack/repos/builtin/packages/py-pychecker/package.py
+++ b/var/spack/repos/builtin/packages/py-pychecker/package.py
@@ -35,4 +35,4 @@ class PyPychecker(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pycodestyle/package.py b/var/spack/repos/builtin/packages/py-pycodestyle/package.py
new file mode 100644
index 0000000000..964822aac9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pycodestyle/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 PyPycodestyle(Package):
+ """pycodestyle is a tool to check your Python code against some of the
+ style conventions in PEP 8. Note: formerly called pep8."""
+
+ homepage = "https://github.com/PyCQA/pycodestyle"
+ url = "https://github.com/PyCQA/pycodestyle/archive/2.0.0.tar.gz"
+
+ version('2.0.0', '5c3e90001f538bf3b7896d60e92eb6f6')
+ version('1.7.0', '31070a3a6391928893cbf5fa523eb8d9')
+ version('1.6.2', '8df18246d82ddd3d19ffe7518f983955')
+ version('1.6.1', '9d59bdc7c60f46f7cee86c732e28aa1a')
+ version('1.6', '340fa7e39bb44fb08db6eddf7cdc880a')
+ version('1.5.7', '6d0f5fc7d95755999bc9275cad5cbf3e')
+ version('1.5.6', 'c5c30e3d267b48bf3dfe7568e803a813')
+ version('1.5.5', 'cfa12df9b86b3a1dfb13aced1927e12f')
+ version('1.5.4', '3977a760829652543544074c684610ee')
+
+ extends('python')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-pycodestyle requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pycparser/package.py b/var/spack/repos/builtin/packages/py-pycparser/package.py
index ef1b772ffc..e7b91f4495 100644
--- a/var/spack/repos/builtin/packages/py-pycparser/package.py
+++ b/var/spack/repos/builtin/packages/py-pycparser/package.py
@@ -36,4 +36,4 @@ class PyPycparser(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pydatalog/package.py b/var/spack/repos/builtin/packages/py-pydatalog/package.py
index da157d3679..b2203ae04c 100644
--- a/var/spack/repos/builtin/packages/py-pydatalog/package.py
+++ b/var/spack/repos/builtin/packages/py-pydatalog/package.py
@@ -35,4 +35,4 @@ class PyPydatalog(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py
index bf781daf83..96a5645541 100644
--- a/var/spack/repos/builtin/packages/py-pyelftools/package.py
+++ b/var/spack/repos/builtin/packages/py-pyelftools/package.py
@@ -36,4 +36,4 @@ class PyPyelftools(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pyflakes/package.py b/var/spack/repos/builtin/packages/py-pyflakes/package.py
new file mode 100644
index 0000000000..50bc8ab462
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyflakes/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 PyPyflakes(Package):
+ """A simple program which checks Python source files for errors.."""
+
+ homepage = "https://github.com/PyCQA/pyflakes"
+ url = "https://github.com/PyCQA/pyflakes/archive/1.3.0.tar.gz"
+
+ version('1.3.0', 'a76173deb7a84fe860c0b60e2fbcdfe2')
+ version('1.2.3', '2ac2e148a5c46b6bb06c4785be76f7cc')
+ version('1.2.2', 'fe759b9381a6500e67a2ddbbeb5161a4')
+ version('1.2.1', '444a06b256e0a70e41c11698b7190e84')
+ version('1.2.0', '5d1c87bf09696c4c35dc3103f2a1185c')
+ version('1.1.0', '4e18bf78c0455ebcd41e5d6104392c88')
+ version('1.0.0', 'e2ea22a825c5100f12e54b71771cde71')
+ version('0.9.2', 'd02d5f68e944085fd6ec163a34737a96')
+ version('0.9.1', '8108d2248e93ca6a315fa2dd31ee9bb1')
+ version('0.9.0', '43c2bcee88606bde55dbf25a253ef886')
+
+ extends('python')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-pyflakes requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pygments/package.py b/var/spack/repos/builtin/packages/py-pygments/package.py
index 2d22bd9f03..c61b080e14 100644
--- a/var/spack/repos/builtin/packages/py-pygments/package.py
+++ b/var/spack/repos/builtin/packages/py-pygments/package.py
@@ -27,14 +27,17 @@ from spack import *
class PyPygments(Package):
"""Pygments is a syntax highlighting package written in Python."""
+
homepage = "https://pypi.python.org/pypi/pygments"
url = "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz"
+ version('2.1.3', 'ed3fba2467c8afcda4d317e4ef2c6150')
version('2.0.1', 'e0daf4c14a4fe5b630da765904de4d6c')
version('2.0.2', '238587a1370d62405edabd0794b3ec4a')
extends('python')
+
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pygobject/package.py b/var/spack/repos/builtin/packages/py-pygobject/package.py
new file mode 100644
index 0000000000..675eb8f004
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pygobject/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 PyPygobject(AutotoolsPackage):
+ """bindings for the GLib, and GObject,
+ to be used in Python."""
+
+ homepage = "https://pypi.python.org/pypi/pygobject"
+ url = "https://pypi.python.org/packages/6d/15/97c8b5ccca2be14cf59a2f79e15e3a82a1c3408a6b76b4107689a8b94846/pygobject-2.28.3.tar.bz2"
+
+ version('2.28.3', 'aa64900b274c4661a5c32e52922977f9')
+
+ extends('python')
+ depends_on("libffi")
+ depends_on('glib')
+ depends_on('py-py2cairo')
+ depends_on('gobject-introspection')
+
+ patch('pygobject-2.28.6-introspection-1.patch')
+
+ def install(self, spec, prefix):
+ make('install', parallel=False)
diff --git a/var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-introspection-1.patch b/var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-introspection-1.patch
new file mode 100644
index 0000000000..ef96ba3352
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-introspection-1.patch
@@ -0,0 +1,35 @@
+Submitted By: Andrew Benton <andy@benton.eu.com>
+Date: 2012-03-29
+Initial Package Version: 2.28.6
+Upstream Status: not submitted
+Origin: me
+Description: Fixes compiling with a recent version of gobject-introspection
+
+--- pygobject-2.28.6/gi/pygi-info.c-orig 2012-03-29 02:27:37.494228732 +0100
++++ pygobject-2.28.6/gi/pygi-info.c 2012-03-29 02:26:37.735132310 +0100
+@@ -162,9 +162,6 @@
+ case GI_INFO_TYPE_CONSTANT:
+ type = &PyGIConstantInfo_Type;
+ break;
+- case GI_INFO_TYPE_ERROR_DOMAIN:
+- type = &PyGIErrorDomainInfo_Type;
+- break;
+ case GI_INFO_TYPE_UNION:
+ type = &PyGIUnionInfo_Type;
+ break;
+@@ -481,7 +478,6 @@
+ case GI_INFO_TYPE_INVALID:
+ case GI_INFO_TYPE_FUNCTION:
+ case GI_INFO_TYPE_CONSTANT:
+- case GI_INFO_TYPE_ERROR_DOMAIN:
+ case GI_INFO_TYPE_VALUE:
+ case GI_INFO_TYPE_SIGNAL:
+ case GI_INFO_TYPE_PROPERTY:
+@@ -860,7 +856,6 @@
+ case GI_INFO_TYPE_INVALID:
+ case GI_INFO_TYPE_FUNCTION:
+ case GI_INFO_TYPE_CONSTANT:
+- case GI_INFO_TYPE_ERROR_DOMAIN:
+ case GI_INFO_TYPE_VALUE:
+ case GI_INFO_TYPE_SIGNAL:
+ case GI_INFO_TYPE_PROPERTY:
diff --git a/var/spack/repos/builtin/packages/py-pygtk/package.py b/var/spack/repos/builtin/packages/py-pygtk/package.py
new file mode 100644
index 0000000000..56e0b39fd5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pygtk/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 PyPygtk(AutotoolsPackage):
+ """bindings for the Gtk in Python"""
+ homepage = "http://www.pygtk.org/"
+ url = "http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz"
+
+ version('2.24.0', 'd27c7f245a9e027f6b6cd9acb7468e36')
+
+ extends('python')
+ depends_on("libffi")
+ depends_on('cairo')
+ depends_on('glib')
+ depends_on('gtkplus')
+ depends_on('py-pygobject')
+ depends_on('py-py2cairo')
+
+ def install(self, spec, prefix):
+ make('install', parallel=False)
diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py
index c505d44530..10f60f0ab9 100644
--- a/var/spack/repos/builtin/packages/py-pylint/package.py
+++ b/var/spack/repos/builtin/packages/py-pylint/package.py
@@ -38,4 +38,4 @@ class PyPylint(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pypar/package.py b/var/spack/repos/builtin/packages/py-pypar/package.py
index 6fef71304c..90d1f957b6 100644
--- a/var/spack/repos/builtin/packages/py-pypar/package.py
+++ b/var/spack/repos/builtin/packages/py-pypar/package.py
@@ -39,4 +39,4 @@ class PyPypar(Package):
def install(self, spec, prefix):
with working_dir('source'):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pyparsing/package.py b/var/spack/repos/builtin/packages/py-pyparsing/package.py
index 67d255b02d..c3b4432d33 100644
--- a/var/spack/repos/builtin/packages/py-pyparsing/package.py
+++ b/var/spack/repos/builtin/packages/py-pyparsing/package.py
@@ -35,4 +35,4 @@ class PyPyparsing(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
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/py-pytables/package.py b/var/spack/repos/builtin/packages/py-pytables/package.py
index f87e74211f..289d76242b 100644
--- a/var/spack/repos/builtin/packages/py-pytables/package.py
+++ b/var/spack/repos/builtin/packages/py-pytables/package.py
@@ -42,4 +42,4 @@ class PyPytables(Package):
def install(self, spec, prefix):
env["HDF5_DIR"] = spec['hdf5'].prefix
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pytest/package.py b/var/spack/repos/builtin/packages/py-pytest/package.py
new file mode 100644
index 0000000000..4208b9d3ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytest/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 PyPytest(Package):
+ """pytest: simple powerful testing with Python."""
+
+ homepage = "http://doc.pytest.org/en/latest/"
+ url = "https://pypi.python.org/packages/source/p/pytest/pytest-3.0.2.tar.gz"
+
+ version('3.0.2', '61dc36e65a6f6c11c53b1388e043a9f5',
+ url="https://pypi.python.org/packages/2b/05/e20806c99afaff43331f5fd8770bb346145303882f98ef3275fa1dd66f6d/pytest-3.0.2.tar.gz")
+
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-py@1.4.29:', type=nolink)
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-python-daemon/package.py b/var/spack/repos/builtin/packages/py-python-daemon/package.py
index a30dc00ba4..c696b7490b 100644
--- a/var/spack/repos/builtin/packages/py-python-daemon/package.py
+++ b/var/spack/repos/builtin/packages/py-python-daemon/package.py
@@ -47,4 +47,4 @@ class PyPythonDaemon(Package):
depends_on("py-lockfile", type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py
index 96f686d591..486b86a467 100644
--- a/var/spack/repos/builtin/packages/py-pytz/package.py
+++ b/var/spack/repos/builtin/packages/py-pytz/package.py
@@ -27,14 +27,19 @@ from spack import *
class PyPytz(Package):
"""World timezone definitions, modern and historical."""
+
homepage = "https://pypi.python.org/pypi/pytz"
url = "https://pypi.python.org/packages/source/p/pytz/pytz-2014.10.tar.gz"
+ version('2016.6.1', 'b6c28a3b968bc1d8badfb61b93874e03',
+ url="https://pypi.python.org/packages/5d/8e/6635d8f3f9f48c03bb925fab543383089858271f9cfd1216b83247e8df94/pytz-2016.6.1.tar.gz")
version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7')
version('2015.4', '417a47b1c432d90333e42084a605d3d8')
version('2016.3', 'abae92c3301b27bd8a9f56b14f52cb29')
extends('python')
+ depends_on('py-setuptools', type='build')
+
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py
index 8da391fac1..d760fcaae9 100644
--- a/var/spack/repos/builtin/packages/py-pyyaml/package.py
+++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py
@@ -35,4 +35,4 @@ class PyPyyaml(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-restview/package.py b/var/spack/repos/builtin/packages/py-restview/package.py
index 047214c58e..9b0bd437c0 100644
--- a/var/spack/repos/builtin/packages/py-restview/package.py
+++ b/var/spack/repos/builtin/packages/py-restview/package.py
@@ -38,4 +38,4 @@ class PyRestview(Package):
depends_on('py-pygments', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-rpy2/package.py b/var/spack/repos/builtin/packages/py-rpy2/package.py
index f86d813766..9db55e949b 100644
--- a/var/spack/repos/builtin/packages/py-rpy2/package.py
+++ b/var/spack/repos/builtin/packages/py-rpy2/package.py
@@ -44,4 +44,4 @@ class PyRpy2(Package):
depends_on('R')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-scientificpython/package.py b/var/spack/repos/builtin/packages/py-scientificpython/package.py
index e2273dc164..6e8b9d38c1 100644
--- a/var/spack/repos/builtin/packages/py-scientificpython/package.py
+++ b/var/spack/repos/builtin/packages/py-scientificpython/package.py
@@ -38,4 +38,4 @@ class PyScientificpython(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py
index fbeb5c95ca..124d2ec4b7 100644
--- a/var/spack/repos/builtin/packages/py-scikit-image/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py
@@ -45,4 +45,4 @@ class PyScikitImage(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
index 3cd7ea74f3..09318a6c56 100644
--- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
@@ -41,4 +41,4 @@ class PyScikitLearn(Package):
depends_on('py-scipy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
index cab516e1df..71bf83c3f0 100644
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -26,26 +26,29 @@ from spack import *
class PyScipy(Package):
- """Scientific Library for Python."""
+ """SciPy (pronounced "Sigh Pie") is a Scientific Library for Python.
+ It provides many user-friendly and efficient numerical routines such
+ as routines for numerical integration and optimization."""
+
homepage = "http://www.scipy.org/"
- url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz"
+ url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz"
+ version('0.18.1', '5fb5fb7ccb113ab3a039702b6c2f3327',
+ url="https://pypi.python.org/packages/22/41/b1538a75309ae4913cdbbdc8d1cc54cae6d37981d2759532c1aa37a41121/scipy-0.18.1.tar.gz")
version('0.17.0', '5ff2971e1ce90e762c59d2cd84837224')
version('0.15.1', 'be56cd8e60591d6332aac792a5880110')
version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a')
extends('python')
+ depends_on('python@2.6:2.8,3.2:')
depends_on('py-nose', type='build')
- depends_on('py-numpy+blas+lapack', type=nolink)
+ # Known not to work with 2.23, 2.25
+ depends_on('binutils@2.26:', type='build')
+ depends_on('py-numpy@1.7.1:+blas+lapack', type=nolink)
+ depends_on('blas')
+ depends_on('lapack')
def install(self, spec, prefix):
- if 'atlas' in spec:
- # libatlas.so actually isn't always installed, but this
- # seems to make the build autodetect things correctly.
- env['ATLAS'] = join_path(
- spec['atlas'].prefix.lib, 'libatlas.' + dso_suffix)
- else:
- env['BLAS'] = spec['blas'].blas_shared_lib
- env['LAPACK'] = spec['lapack'].lapack_shared_lib
-
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ # NOTE: scipy picks up Blas/Lapack from numpy, see
+ # http://www.scipy.org/scipylib/building/linux.html#step-4-build-numpy-1-5-0
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py
index 08d5e5d552..d696fdf776 100644
--- a/var/spack/repos/builtin/packages/py-setuptools/package.py
+++ b/var/spack/repos/builtin/packages/py-setuptools/package.py
@@ -32,6 +32,8 @@ class PySetuptools(Package):
homepage = "https://pypi.python.org/pypi/setuptools"
url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz"
+ version('25.2.0', 'a0dbb65889c46214c691f6c516cf959c',
+ url="https://pypi.python.org/packages/9f/32/81c324675725d78e7f6da777483a3453611a427db0145dfb878940469692/setuptools-25.2.0.tar.gz")
version('20.7.0', '5d12b39bf3e75e80fdce54e44b255615')
version('20.6.7', '45d6110f3ec14924e44c33411db64fe6')
version('20.5', 'fadc1e1123ddbe31006e5e43e927362b')
@@ -43,4 +45,4 @@ class PySetuptools(Package):
extends('python')
def install(self, spec, prefix):
- setup_py('install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-shiboken/package.py b/var/spack/repos/builtin/packages/py-shiboken/package.py
index 0713f26ebc..c6c23acd33 100644
--- a/var/spack/repos/builtin/packages/py-shiboken/package.py
+++ b/var/spack/repos/builtin/packages/py-shiboken/package.py
@@ -64,6 +64,4 @@ class PyShiboken(Package):
'shiboken_postinstall.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/py-six/package.py b/var/spack/repos/builtin/packages/py-six/package.py
index da0c7aa003..e7b7177586 100644
--- a/var/spack/repos/builtin/packages/py-six/package.py
+++ b/var/spack/repos/builtin/packages/py-six/package.py
@@ -27,14 +27,16 @@ from spack import *
class PySix(Package):
"""Python 2 and 3 compatibility utilities."""
+
homepage = "https://pypi.python.org/pypi/six"
url = "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz"
- version('1.9.0', '476881ef4012262dfc8adc645ee786c4')
version('1.10.0', '34eed507548117b2ab523ab14b2f8b55')
+ version('1.9.0', '476881ef4012262dfc8adc645ee786c4')
extends('python')
+
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py
index feb3856e8b..d5e32fd5e2 100644
--- a/var/spack/repos/builtin/packages/py-sncosmo/package.py
+++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py
@@ -48,4 +48,4 @@ class PySncosmo(Package):
depends_on('py-nestle', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-snowballstemmer/package.py b/var/spack/repos/builtin/packages/py-snowballstemmer/package.py
new file mode 100644
index 0000000000..44c0548932
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snowballstemmer/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# 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 PySnowballstemmer(Package):
+ """This package provides 16 stemmer algorithms (15 + Poerter
+ English stemmer) generated from Snowball algorithms."""
+
+ homepage = "https://pypi.python.org/pypi/snowballstemmer"
+ url = "https://pypi.python.org/packages/source/s/snowballstemmer/snowballstemmer-1.2.1.tar.gz"
+
+ version('1.2.1', '643b019667a708a922172e33a99bf2fa')
+
+ extends('python')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-sphinx-rtd-theme/package.py b/var/spack/repos/builtin/packages/py-sphinx-rtd-theme/package.py
new file mode 100644
index 0000000000..9c57628e2c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sphinx-rtd-theme/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 PySphinxRtdTheme(Package):
+ """ReadTheDocs.org theme for Sphinx."""
+
+ homepage = "https://pypi.python.org/pypi/sphinx_rtd_theme"
+ url = "https://pypi.python.org/packages/source/s/sphinx_rtd_theme/sphinx_rtd_theme-0.1.10a0.tar.gz"
+
+ version('0.1.10a0', '83bd95cae55aa8b773a8cc3a41094282',
+ url="https://pypi.python.org/packages/da/6b/1b75f13d8aa3333f19c6cdf1f0bc9f52ea739cae464fbee050307c121857/sphinx_rtd_theme-0.1.10a0.tar.gz")
+
+ extends('python')
+
+ depends_on('py-setuptools', type='build')
+
+ def install(self, spec, prefix):
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py
index 2295a6a0c3..923962a2dc 100644
--- a/var/spack/repos/builtin/packages/py-sphinx/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinx/package.py
@@ -30,9 +30,25 @@ class PySphinx(Package):
homepage = "http://sphinx-doc.org"
url = "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.3.1.tar.gz"
+ version('1.4.5', '5c2cd2dac45dfa6123d067e32a89e89a',
+ url='https://pypi.python.org/packages/8b/78/eeea2b837f911cdc301f5f05163f9729a2381cadd03ccf35b25afe816c90/Sphinx-1.4.5.tar.gz')
version('1.3.1', '8786a194acf9673464c5455b11fd4332')
- extends('python')
+ extends('python', ignore='bin/(pybabel|pygmentize)')
+
+ # Most Python packages only require py-setuptools as a build dependency.
+ # However, py-sphinx requires py-setuptools during runtime as well.
+ depends_on('py-setuptools', type=nolink)
+
+ depends_on('py-six@1.4:', type=nolink)
+ depends_on('py-jinja2@2.3:', type=nolink)
+ depends_on('py-pygments@2.0:', type=nolink)
+ depends_on('py-docutils@0.11:', type=nolink)
+ depends_on('py-snowballstemmer@1.1:', type=nolink)
+ depends_on('py-babel@1.3:', type=nolink) # not 2.0
+ depends_on('py-alabaster@0.7:', type=nolink)
+ depends_on('py-imagesize', when='@1.4:', type=nolink)
+ depends_on('py-sphinx-rtd-theme@0.1:', type=nolink) # optional as of 1.4
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py
index 0e972480f3..74fb2add0d 100644
--- a/var/spack/repos/builtin/packages/py-storm/package.py
+++ b/var/spack/repos/builtin/packages/py-storm/package.py
@@ -37,4 +37,4 @@ class PyStorm(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-symengine/package.py b/var/spack/repos/builtin/packages/py-symengine/package.py
new file mode 100644
index 0000000000..7f7cd84a77
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-symengine/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 PySymengine(Package):
+ """Python wrappers for SymEngine, a symbolic manipulation library."""
+
+ homepage = "https://github.com/symengine/symengine.py"
+ url = "https://github.com/symengine/symengine.py/archive/v0.2.0.tar.gz"
+
+ version('0.2.0', 'e1d114fa12be4c8c7e9f24007e07718c')
+ version('develop', git='https://github.com/symengine/symengine.py.git')
+
+ # Build dependencies
+ extends('python')
+ depends_on('python@2.7:2.8,3.3:')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-cython@0.19.1:')
+ depends_on('cmake@2.8.7:', type='build')
+ depends_on('symengine@0.2.0:')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s --symengine-dir=%s' %
+ (prefix, spec['symengine'].prefix))
diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py
index 3d8b86ac4d..7d1b016263 100644
--- a/var/spack/repos/builtin/packages/py-sympy/package.py
+++ b/var/spack/repos/builtin/packages/py-sympy/package.py
@@ -37,4 +37,4 @@ class PySympy(Package):
depends_on('py-mpmath', when='@1.0:')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-tappy/package.py b/var/spack/repos/builtin/packages/py-tappy/package.py
index 03e9528ad7..c195d08fd9 100644
--- a/var/spack/repos/builtin/packages/py-tappy/package.py
+++ b/var/spack/repos/builtin/packages/py-tappy/package.py
@@ -37,4 +37,4 @@ class PyTappy(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py
index 672a3ee587..e20de3ff79 100644
--- a/var/spack/repos/builtin/packages/py-tuiview/package.py
+++ b/var/spack/repos/builtin/packages/py-tuiview/package.py
@@ -26,10 +26,10 @@ from spack import *
class PyTuiview(Package):
+ """TuiView is a lightweight raster GIS with powerful raster attribute
+ table manipulation abilities.
"""
- TuiView is a lightweight raster GIS with powerful raster attribute
- table manipulation abilities.
- """
+
homepage = "https://bitbucket.org/chchrsc/tuiview"
url = "https://bitbucket.org/chchrsc/tuiview/get/tuiview-1.1.7.tar.gz"
@@ -41,4 +41,4 @@ class PyTuiview(Package):
depends_on("gdal")
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-twisted/package.py b/var/spack/repos/builtin/packages/py-twisted/package.py
index edf1e7b0d7..80023c2123 100644
--- a/var/spack/repos/builtin/packages/py-twisted/package.py
+++ b/var/spack/repos/builtin/packages/py-twisted/package.py
@@ -38,4 +38,4 @@ class PyTwisted(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-unittest2/package.py b/var/spack/repos/builtin/packages/py-unittest2/package.py
index 174ab0ca5f..ddd50a37d4 100644
--- a/var/spack/repos/builtin/packages/py-unittest2/package.py
+++ b/var/spack/repos/builtin/packages/py-unittest2/package.py
@@ -38,4 +38,4 @@ class PyUnittest2(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
index 95e6dcbff0..4aee545d74 100644
--- a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
+++ b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
@@ -39,4 +39,4 @@ class PyUnittest2py3k(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-urwid/package.py b/var/spack/repos/builtin/packages/py-urwid/package.py
index 943fb250f6..61dec3f1cd 100644
--- a/var/spack/repos/builtin/packages/py-urwid/package.py
+++ b/var/spack/repos/builtin/packages/py-urwid/package.py
@@ -37,4 +37,4 @@ class PyUrwid(Package):
extends("python")
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py
index 0ed567df95..f373067144 100644
--- a/var/spack/repos/builtin/packages/py-virtualenv/package.py
+++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py
@@ -38,4 +38,4 @@ class PyVirtualenv(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-wcsaxes/package.py b/var/spack/repos/builtin/packages/py-wcsaxes/package.py
index 9588b879fa..ddc10d3e22 100644
--- a/var/spack/repos/builtin/packages/py-wcsaxes/package.py
+++ b/var/spack/repos/builtin/packages/py-wcsaxes/package.py
@@ -40,4 +40,4 @@ class PyWcsaxes(Package):
depends_on('py-astropy', type=nolink)
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix={0}'.format(prefix))
+ setup_py('install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py
index f0ad340835..ce495bf6d0 100644
--- a/var/spack/repos/builtin/packages/py-wheel/package.py
+++ b/var/spack/repos/builtin/packages/py-wheel/package.py
@@ -37,4 +37,4 @@ class PyWheel(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py
index 81c3c928c0..9638b8a36b 100644
--- a/var/spack/repos/builtin/packages/py-xlrd/package.py
+++ b/var/spack/repos/builtin/packages/py-xlrd/package.py
@@ -37,4 +37,4 @@ class PyXlrd(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-xpyb/package.py b/var/spack/repos/builtin/packages/py-xpyb/package.py
new file mode 100644
index 0000000000..49c6343c45
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-xpyb/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 PyXpyb(Package):
+ """xpyb provides a Python binding to the X Window System protocol
+ via libxcb."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xpyb-1.3.1.tar.gz"
+
+ version('1.3.1', '75d567e25517fb883a56f10b77fd2757')
+
+ extends('python')
+
+ depends_on('libxcb@1.5:')
+
+ depends_on('xcb-proto@1.7.1:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/py-yapf/package.py b/var/spack/repos/builtin/packages/py-yapf/package.py
index bc26b82b07..eab4d54abc 100644
--- a/var/spack/repos/builtin/packages/py-yapf/package.py
+++ b/var/spack/repos/builtin/packages/py-yapf/package.py
@@ -37,4 +37,4 @@ class PyYapf(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-yt/package.py b/var/spack/repos/builtin/packages/py-yt/package.py
new file mode 100644
index 0000000000..646bd4db2f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-yt/package.py
@@ -0,0 +1,78 @@
+##############################################################################
+# 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 PyYt(Package):
+ """Volumetric Data Analysis
+
+ yt is a python package for analyzing and visualizing
+ volumetric, multi-resolution data from astrophysical
+ simulations, radio telescopes, and a burgeoning
+ interdisciplinary community.
+ """
+ homepage = "http://yt-project.org"
+ url = "https://bitbucket.org/yt_analysis/yt"
+
+ version("3.3.1", hg="https://bitbucket.org/yt_analysis/yt",
+ tag="yt-3.3.1", commit="9bc3d0e9b750c923d44d73c447df64fc431f5838")
+ version("3.2.3", hg="https://bitbucket.org/yt_analysis/yt",
+ tag="yt-3.2.3", commit="83d2c1e9313e7d83eb5b96888451ff2646fd8ff3")
+ version("3.1.0", hg="https://bitbucket.org/yt_analysis/yt",
+ tag="yt-3.1.0", commit="fd7cdc4836188a3badf81adb477bcc1b9632e485")
+ version("3.0.2", hg="https://bitbucket.org/yt_analysis/yt",
+ tag="yt-3.0.2", commit="511887af4c995a78fe606e58ce8162c88380ecdc")
+ version("2.6.3", hg="https://bitbucket.org/yt_analysis/yt",
+ tag="yt-2.6.3", commit="816186f16396a16853810ac9ebcde5057d8d5b1a")
+ version("development", hg="https://bitbucket.org/yt_analysis/yt",
+ branch="yt")
+
+ variant("astropy", default=True, description="enable astropy support")
+ variant("h5py", default=True, description="enable h5py support")
+ variant("scipy", default=True, description="enable scipy support")
+
+ extends("python")
+
+ depends_on("py-astropy", type="nolink", when="+astropy")
+ depends_on("py-cython", type="nolink")
+ depends_on("py-h5py", type="nolink", when="+h5py")
+ depends_on("py-ipython", type="nolink")
+ depends_on("py-matplotlib", type="nolink")
+ depends_on("py-numpy", type="nolink")
+ depends_on("py-scipy", type="nolink", when="+scipy")
+ depends_on("py-setuptools", type="build")
+ depends_on("py-sympy", type="nolink")
+ depends_on("python @2.7:2.999,3.4:")
+
+ def install(self, spec, prefix):
+ setup_py("install", "--prefix=%s" % prefix)
+ self.check_install(spec, prefix)
+
+ def check_install(self, spec, prefix):
+ # The Python interpreter path can be too long for this
+ # yt = Executable(join_path(prefix.bin, "yt"))
+ # yt("--help")
+ python(join_path(prefix.bin, "yt"), "--help")
diff --git a/var/spack/repos/builtin/packages/python/ncurses.patch b/var/spack/repos/builtin/packages/python/ncurses.patch
new file mode 100644
index 0000000000..9054c03e7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/python/ncurses.patch
@@ -0,0 +1,11 @@
+--- a/setup.py 2016-08-30 15:39:59.334926574 -0500
++++ b/setup.py 2016-08-30 15:46:57.227946339 -0500
+@@ -745,8 +745,6 @@
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index c4e6754969..370e14b2ae 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -74,6 +74,8 @@ class Python(Package):
depends_on("tk", when="+tk")
depends_on("tcl", when="+tk")
+ patch('ncurses.patch')
+
@when('@2.7,3.4:')
def patch(self):
# NOTE: Python's default installation procedure makes it possible for a
@@ -110,6 +112,8 @@ class Python(Package):
'CPPFLAGS=-I{0}'.format(' -I'.join(dp.include for dp in dep_pfxs)),
'LDFLAGS=-L{0}'.format(' -L'.join(dp.lib for dp in dep_pfxs)),
]
+ if spec.satisfies("platform=darwin") and ('%gcc' in spec):
+ config_args.append('--disable-toolbox-glue')
if '+ucs4' in spec:
if spec.satisfies('@:2.7'):
@@ -133,6 +137,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)))
@@ -196,8 +202,27 @@ class Python(Package):
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
"""Set PYTHONPATH to include site-packages dir for the
extension and any other python extensions it depends on."""
- pythonhome = self.prefix
- spack_env.set('PYTHONHOME', pythonhome)
+ # The python executable for version 3 may be python3 or python
+ # See https://github.com/LLNL/spack/pull/2173#issuecomment-257170199
+ pythonex = 'python{0}'.format('3' if self.spec.satisfies('@3') else '')
+ if os.path.isdir(self.prefix.bin):
+ base = self.prefix.bin
+ else:
+ base = self.prefix
+ if not os.path.isfile(os.path.join(base, pythonex)):
+ if self.spec.satisfies('@3'):
+ python = Executable(os.path.join(base, 'python'))
+ version = python('-c', 'import sys; print(sys.version)',
+ output=str)
+ if version.startswith('3'):
+ pythonex = 'python'
+ else:
+ raise RuntimeError('Cannot locate python executable')
+ else:
+ raise RuntimeError('Cannot locate python executable')
+ python = Executable(os.path.join(base, pythonex))
+ prefix = python('-c', 'import sys; print(sys.prefix)', output=str)
+ spack_env.set('PYTHONHOME', prefix.strip('\n'))
python_paths = []
for d in extension_spec.traverse(deptype=nolink, deptype_query='run'):
@@ -321,7 +346,7 @@ sys.__egginsert = p + len(new)
super(Python, self).activate(ext_pkg, **args)
- exts = spack.install_layout.extension_map(self.spec)
+ exts = spack.store.layout.extension_map(self.spec)
exts[ext_pkg.name] = ext_pkg.spec
self.write_easy_install_pth(exts)
@@ -329,7 +354,7 @@ sys.__egginsert = p + len(new)
args.update(ignore=self.python_ignore(ext_pkg, args))
super(Python, self).deactivate(ext_pkg, **args)
- exts = spack.install_layout.extension_map(self.spec)
+ exts = spack.store.layout.extension_map(self.spec)
# Make deactivate idempotent
if ext_pkg.name in exts:
del exts[ext_pkg.name]
diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py
index 2733d8b652..4456c16bd2 100644
--- a/var/spack/repos/builtin/packages/qhull/package.py
+++ b/var/spack/repos/builtin/packages/qhull/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Qhull(Package):
+class Qhull(CMakePackage):
"""Qhull computes the convex hull, Delaunay triangulation, Voronoi
diagram, halfspace intersection about a point, furt hest-site
Delaunay triangulation, and furthest-site Voronoi diagram. The
@@ -37,19 +37,10 @@ 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')
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make("install")
+ depends_on('cmake@2.6:', type='build')
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-creator/package.py b/var/spack/repos/builtin/packages/qt-creator/package.py
new file mode 100644
index 0000000000..347cf4d6ee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt-creator/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 QtCreator(Package):
+ """The Qt Creator IDE."""
+ homepage = 'https://www.qt.io/ide/'
+ url = 'http://download.qt.io/official_releases/qtcreator/4.1/4.1.0/qt-creator-opensource-src-4.1.0.tar.gz'
+
+ list_url = 'http://download.qt.io/official_releases/qtcreator/'
+ list_depth = 3
+
+ version('4.1.0', '657727e4209befa4bf5889dff62d9e0a')
+
+ depends_on("qt")
+
+ def install(self, spec, prefix):
+ os.environ['INSTALL_ROOT'] = self.prefix
+ qmake = which('qmake')
+ qmake('-r')
+ make()
+ make("install")
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 e496a3e4d5..6447d7d6d4 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -24,12 +24,17 @@
##############################################################################
from spack import *
import os
+import sys
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,90 +45,118 @@ 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.")
+ variant('webkit', default=False, description="Build the Webkit extension")
+ variant('examples', default=False, description="Build examples.")
+ variant('dbus', default=False, description="Build with D-Bus support.")
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
- # Use system openssl for security.
- # depends_on("openssl")
+ # https://github.com/xboxdrv/xboxdrv/issues/188
+ patch('btn_trigger_happy.patch', when='@5.7.0:')
+
+ patch('qt4-corewlan-new-osx.patch', when='@4')
+ patch('qt4-pcre-include-conflict.patch', when='@4')
+ patch('qt4-el-capitan.patch', when='@4')
+ # Use system openssl for security.
+ depends_on("openssl")
depends_on("glib")
depends_on("gtkplus", when='+gtk')
depends_on("libxml2")
depends_on("zlib")
- depends_on("dbus", when='@4:')
+ depends_on("dbus", when='@4:+dbus')
depends_on("libtiff")
depends_on("libpng@1.2.56", when='@3')
depends_on("libpng", when='@4:')
depends_on("libmng")
depends_on("jpeg")
-
- # Webkit
- # depends_on("gperf")
- # depends_on("flex", type='build')
- # depends_on("bison", type='build')
- # depends_on("ruby")
- # depends_on("icu4c")
+ depends_on("icu4c")
# OpenGL hardware acceleration
depends_on("mesa", when='@4:+mesa')
- depends_on("libxcb")
+ depends_on("libxcb", when=sys.platform != 'darwin')
+
+ # Webkit
+ depends_on("flex", when='+webkit', type='build')
+ depends_on("bison", when='+webkit', type='build')
+ depends_on("gperf", when='+webkit')
+ depends_on("fontconfig", when='+webkit')
+
+ # Multimedia
+ # depends_on("gstreamer", when='+multimedia')
+ # depends_on("pulse", when='+multimedia')
+ # depends_on("flac", when='+multimedia')
+ # depends_on("ogg", when='+multimedia')
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
- def setup_environment(self, spack_env, env):
- env.set('QTDIR', self.prefix)
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('QTDIR', self.prefix)
def setup_dependent_environment(self, spack_env, run_env, dspec):
spack_env.set('QTDIR', self.prefix)
+ def setup_dependent_package(self, module, ext_spec):
+ module.qmake = Executable(join_path(self.spec.prefix.bin, 'qmake'))
+
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):
@@ -136,7 +169,6 @@ class Qt(Package):
'-shared',
'-confirm-license',
'-openssl-linked',
- '-dbus-linked',
'-optimized-qmake',
'-no-openvg',
'-no-pch',
@@ -144,10 +176,45 @@ class Qt(Package):
'-no-nis'
]
- if '+gtk' in self.spec:
- config_args.append('-gtkstyle')
+ if '~examples' in self.spec:
+ config_args.extend(['-nomake', 'examples'])
+
+ if '@4' in self.spec:
+ config_args.append('-no-phonon')
+
+ if '+dbus' in self.spec:
+ config_args.append('-dbus-linked')
else:
- config_args.append('-no-gtkstyle')
+ config_args.append('-no-dbus')
+
+ if '@5:' in self.spec and sys.platform == 'darwin':
+ config_args.extend([
+ '-no-xinput2',
+ '-no-xcb-xlib',
+ '-no-pulseaudio',
+ '-no-alsa',
+ ])
+
+ if '@4' in self.spec and sys.platform == 'darwin':
+ sdkpath = which('xcrun')('--show-sdk-path',
+ # XXX(macos): 10.11 SDK fails to configure
+ '--sdk', 'macosx10.9',
+ output=str)
+ config_args.extend([
+ '-sdk', sdkpath.strip(),
+ ])
+ use_clang_platform = False
+ if self.spec.compiler.name == 'clang' and \
+ str(self.spec.compiler.version).endwith('-apple'):
+ use_clang_platform = True
+ # No one uses gcc-4.2.1 anymore; this is clang.
+ if self.spec.compiler.name == 'gcc' and \
+ str(self.spec.compiler.version) == '4.2.1':
+ use_clang_platform = True
+ if use_clang_platform:
+ config_args.extend([
+ '-platform', 'unsupported/macx-clang',
+ ])
return config_args
@@ -156,7 +223,7 @@ class Qt(Package):
@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',
@@ -168,18 +235,37 @@ class Qt(Package):
@when('@4')
def configure(self):
configure('-fast',
- '-no-webkit',
+ '-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'),
+ '-{0}webkit'.format('' if '+webkit' in self.spec else 'no-'),
+ '-arch', str(self.spec.architecture.target),
*self.common_config_args)
- @when('@5')
+ @when('@5.0:5.6')
def configure(self):
+ webkit_args = [] if '+webkit' in self.spec else ['-skip', 'qtwebkit']
configure('-no-eglfs',
'-no-directfb',
- '-qt-xcb',
- # If someone wants to get a webkit build working, be my
- # guest!
- '-skip', 'qtwebkit',
- *self.common_config_args)
+ '-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'),
+ *(webkit_args + self.common_config_args))
+
+ @when('@5.7:')
+ def configure(self):
+ config_args = self.common_config_args
+
+ if not sys.platform == 'darwin':
+ config_args.extend([
+ '-qt-xcb',
+ ])
+
+ if '~webkit' in self.spec:
+ config_args.extend([
+ '-skip', 'webengine',
+ ])
+
+ configure('-no-eglfs',
+ '-no-directfb',
+ '-{0}gtk'.format('' if '+gtk' in self.spec else 'no-'),
+ *config_args)
def install(self, spec, prefix):
self.configure()
diff --git a/var/spack/repos/builtin/packages/qt/qt4-corewlan-new-osx.patch b/var/spack/repos/builtin/packages/qt/qt4-corewlan-new-osx.patch
new file mode 100644
index 0000000000..370edf7fa5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/qt4-corewlan-new-osx.patch
@@ -0,0 +1,16 @@
+diff -Nr -U5 qt-everywhere-opensource-src-4.8.6/src/plugins/bearer/corewlan/corewlan.pro qt-everywhere-opensource-src-4.8.6.corewlan-new-osx/src/plugins/bearer/corewlan/corewlan.pro
+--- qt-everywhere-opensource-src-4.8.6/src/plugins/bearer/corewlan/corewlan.pro 2014-04-10 14:37:12.000000000 -0400
++++ qt-everywhere-opensource-src-4.8.6.corewlan-new-osx/src/plugins/bearer/corewlan/corewlan.pro 2015-12-02 12:21:34.608585392 -0500
+@@ -3,11 +3,11 @@
+
+ QT = core network
+ LIBS += -framework Foundation -framework SystemConfiguration
+
+ contains(QT_CONFIG, corewlan) {
+- isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10\.[67]\.sdk") {
++ isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, ".*MacOSX10\.([6789]|1[01])\.sdk") {
+ LIBS += -framework CoreWLAN -framework Security
+ }
+ }
+
+ HEADERS += qcorewlanengine.h \
diff --git a/var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch b/var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch
new file mode 100644
index 0000000000..35f154d3b0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/qt4-el-capitan.patch
@@ -0,0 +1,31 @@
+From 27aa46933bb32a88c310fe5918a49a3f34d65dfe Mon Sep 17 00:00:00 2001
+From: Mike McQuaid <mike@mikemcquaid.com>
+Date: Sun, 13 Sep 2015 11:55:59 +0100
+Subject: [PATCH] Fix El Capitan build.
+
+---
+ src/gui/painting/qpaintengine_mac.cpp | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
+index 4aa0668..63b646d 100644
+--- a/src/gui/painting/qpaintengine_mac.cpp
++++ b/src/gui/painting/qpaintengine_mac.cpp
+@@ -340,13 +340,7 @@ CGColorSpaceRef QCoreGraphicsPaintEngine::macDisplayColorSpace(const QWidget *wi
+ }
+
+ // Get the color space from the display profile.
+- CGColorSpaceRef colorSpace = 0;
+- CMProfileRef displayProfile = 0;
+- CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
+- if (err == noErr) {
+- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile);
+- CMCloseProfile(displayProfile);
+- }
++ CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID);
+
+ // Fallback: use generic DeviceRGB
+ if (colorSpace == 0)
+--
+2.3.8 (Apple Git-58)
+
diff --git a/var/spack/repos/builtin/packages/qt/qt4-pcre-include-conflict.patch b/var/spack/repos/builtin/packages/qt/qt4-pcre-include-conflict.patch
new file mode 100644
index 0000000000..854e564bfb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/qt4-pcre-include-conflict.patch
@@ -0,0 +1,16 @@
+diff -U5 -Nru qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h qt-everywhere-opensource-src-4.8.6.pcre/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h
+--- qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h 2014-04-10 14:37:12.000000000 -0400
++++ qt-everywhere-opensource-src-4.8.6.pcre/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h 2016-08-29 15:30:02.216546252 -0400
+@@ -32,11 +32,11 @@
+
+ #include "MacroAssembler.h"
+ #include "RegexPattern.h"
+ #include <UString.h>
+
+-#include <pcre.h>
++#include <pcre/pcre.h>
+ struct JSRegExp; // temporary, remove when fallback is removed.
+
+ #if CPU(X86) && !COMPILER(MSVC)
+ #define YARR_CALL __attribute__ ((regparm (3)))
+ #else
diff --git a/var/spack/repos/builtin/packages/qthreads/ldflags.patch b/var/spack/repos/builtin/packages/qthreads/ldflags.patch
deleted file mode 100644
index 0c15eab386..0000000000
--- a/var/spack/repos/builtin/packages/qthreads/ldflags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -40456,7 +40456,7 @@
- hwloc_saved_LDFLAGS="$LDFLAGS"
- if test "x$with_hwloc" != x; then
- CPPFLAGS="-I$with_hwloc/include $CPPFLAGS"
-- LDFLAGS="-L$with_hwloc/lib $CPPFLAGS"
-+ LDFLAGS="-L$with_hwloc/lib $LDFLAGS"
- fi
-
-
diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py
index 2eaff0a240..aa2f0ac67a 100644
--- a/var/spack/repos/builtin/packages/qthreads/package.py
+++ b/var/spack/repos/builtin/packages/qthreads/package.py
@@ -37,16 +37,20 @@ 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')
+ url = "https://github.com/Qthreads/qthreads/releases/download/1.10/qthread-1.10.tar.bz2"
+ version("1.11", "68b5f9a41cfd1a2ac112cc4db0612326")
+ version("1.10", "d1cf3cf3f30586921359f7840171e551")
- patch("ldflags.patch")
- patch("restrict.patch")
- patch("trap.patch")
+ patch("restrict.patch", when="@:1.10")
+ patch("trap.patch", when="@:1.10")
+
+ depends_on("hwloc")
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
- "--enable-guard-pages")
+ "--enable-guard-pages",
+ "--with-topology=hwloc",
+ "--with-hwloc=%s" % spec["hwloc"].prefix)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/r-datatable/package.py b/var/spack/repos/builtin/packages/r-datatable/package.py
index 8b50643341..fb0b2f1053 100644
--- a/var/spack/repos/builtin/packages/r-datatable/package.py
+++ b/var/spack/repos/builtin/packages/r-datatable/package.py
@@ -39,7 +39,7 @@ class RDatatable(Package):
extends('R')
- depends_on('r-chron')
+ depends_on('r-chron', type='nolink')
def install(self, spec, prefix):
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
diff --git a/var/spack/repos/builtin/packages/r-stringi/package.py b/var/spack/repos/builtin/packages/r-stringi/package.py
index 22774dedec..cc57caf8cd 100644
--- a/var/spack/repos/builtin/packages/r-stringi/package.py
+++ b/var/spack/repos/builtin/packages/r-stringi/package.py
@@ -44,7 +44,7 @@ class RStringi(Package):
extends('R')
- depends_on('icu')
+ depends_on('icu4c')
def install(self, spec, prefix):
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py
index e9db4b4fc8..dccf9a581c 100644
--- a/var/spack/repos/builtin/packages/raja/package.py
+++ b/var/spack/repos/builtin/packages/raja/package.py
@@ -32,6 +32,7 @@ class Raja(Package):
version('git', git='https://github.com/LLNL/RAJA.git', branch="master")
def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
- make()
- make('install')
+ with working_dir('build', create=True):
+ cmake('..', *std_cmake_args)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/randrproto/package.py b/var/spack/repos/builtin/packages/randrproto/package.py
new file mode 100644
index 0000000000..ecff886a3b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/randrproto/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Randrproto(Package):
+ """X Resize and Rotate Extension (RandR).
+
+ This extension defines a protocol for clients to dynamically change X
+ screens, so as to resize, rotate and reflect the root window of a screen.
+ """
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/randrproto"
+ url = "https://www.x.org/archive/individual/proto/randrproto-1.5.0.tar.gz"
+
+ version('1.5.0', '863d6ee3e0b2708f75d968470ed31eb9')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/recordproto/package.py b/var/spack/repos/builtin/packages/recordproto/package.py
new file mode 100644
index 0000000000..02018a76ff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/recordproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Recordproto(Package):
+ """X Record Extension.
+
+ This extension defines a protocol for the recording and playback of user
+ actions in the X Window System."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/recordproto"
+ url = "https://www.x.org/archive/individual/proto/recordproto-1.14.2.tar.gz"
+
+ version('1.14.2', '868235e1e150e68916d5a316ebc4ccc4')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/rendercheck/package.py b/var/spack/repos/builtin/packages/rendercheck/package.py
new file mode 100644
index 0000000000..07cc809e9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rendercheck/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Rendercheck(Package):
+ """rendercheck is a program to test a Render extension implementation
+ against separate calculations of expected output."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/rendercheck"
+ url = "https://www.x.org/archive/individual/app/rendercheck-1.5.tar.gz"
+
+ version('1.5', '92ddef6d01f02529521af103f9b9bf60')
+
+ depends_on('libxrender')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/renderproto/package.py b/var/spack/repos/builtin/packages/renderproto/package.py
new file mode 100644
index 0000000000..10be4c941c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/renderproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Renderproto(Package):
+ """X Rendering Extension.
+
+ This extension defines the protcol for a digital image composition as
+ the foundation of a new rendering model within the X Window System."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/renderproto"
+ url = "https://www.x.org/archive/individual/proto/renderproto-0.11.1.tar.gz"
+
+ version('0.11.1', '9b103359123e375bb7760f7dbae3dece')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/resourceproto/package.py b/var/spack/repos/builtin/packages/resourceproto/package.py
new file mode 100644
index 0000000000..4e0a495d83
--- /dev/null
+++ b/var/spack/repos/builtin/packages/resourceproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Resourceproto(Package):
+ """X Resource Extension.
+
+ This extension defines a protocol that allows a client to query the
+ X server about its usage of various resources."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/resourceproto"
+ url = "https://www.x.org/archive/individual/proto/resourceproto-1.2.0.tar.gz"
+
+ version('1.2.0', '33091d5358ec32dd7562a1aa225a70aa')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/rgb/package.py b/var/spack/repos/builtin/packages/rgb/package.py
new file mode 100644
index 0000000000..ddc5419305
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rgb/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Rgb(Package):
+ """X color name database.
+
+ This package includes both the list mapping X color names to RGB values
+ (rgb.txt) and, if configured to use a database for color lookup, the
+ rgb program to convert the text file into the binary database format.
+
+ The "others" subdirectory contains some alternate color databases."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/rgb"
+ url = "https://www.x.org/archive/individual/app/rgb-1.0.6.tar.gz"
+
+ version('1.0.6', '9759d058108f39066bbdf1d5d6de048c')
+
+ depends_on('xorg-server')
+
+ depends_on('xproto', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/root/math_uint.patch b/var/spack/repos/builtin/packages/root/math_uint.patch
new file mode 100644
index 0000000000..ff4a38b91c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/root/math_uint.patch
@@ -0,0 +1,115 @@
+From 5f3faffdd869bce5e254ae70f69290e4651a061d Mon Sep 17 00:00:00 2001
+From: Lorenzo Moneta <Lorenzo.Moneta@cern.ch>
+Date: Mon, 4 Jan 2016 15:38:23 +0100
+Subject: [PATCH] Fix ROOT-7886. Use unsigned int instead of uint
+
+---
+ math/mathcore/inc/Math/Delaunay2D.h | 2 +-
+ math/mathcore/src/Delaunay2D.cxx | 30 +++++++++++++++---------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/math/mathcore/inc/Math/Delaunay2D.h b/math/mathcore/inc/Math/Delaunay2D.h
+index 6255e78..472bded 100644
+--- a/math/mathcore/inc/Math/Delaunay2D.h
++++ b/math/mathcore/inc/Math/Delaunay2D.h
+@@ -273,7 +273,7 @@ class Delaunay2D {
+ double fYCellStep; //! inverse denominator to calculate X cell = fNCells / (fYNmax - fYNmin)
+ std::set<UInt_t> fCells[(fNCells+1)*(fNCells+1)]; //! grid cells with containing triangles
+
+- inline unsigned int Cell(uint x, uint y) const {
++ inline unsigned int Cell(UInt_t x, UInt_t y) const {
+ return x*(fNCells+1) + y;
+ }
+
+diff --git a/math/mathcore/src/Delaunay2D.cxx b/math/mathcore/src/Delaunay2D.cxx
+index c4d4680..9a82858 100644
+--- a/math/mathcore/src/Delaunay2D.cxx
++++ b/math/mathcore/src/Delaunay2D.cxx
+@@ -190,7 +190,7 @@ void Delaunay2D::DoFindTriangles() {
+
+ Triangle tri;
+
+- auto transform = [&] (const uint i) {
++ auto transform = [&] (const unsigned int i) {
+ tri.x[i] = face.vertex(i)->point().x();
+ tri.y[i] = face.vertex(i)->point().y();
+ tri.idx[i] = face.vertex(i)->info();
+@@ -326,7 +326,7 @@ void Delaunay2D::DoFindTriangles() {
+ for(int t = 0; t < out.numberoftriangles; ++t){
+ Triangle tri;
+
+- auto transform = [&] (const uint v) {
++ auto transform = [&] (const unsigned int v) {
+ //each triangle as numberofcorners vertices ( = 3)
+ tri.idx[v] = out.trianglelist[t*out.numberofcorners + v];
+
+@@ -354,14 +354,14 @@ void Delaunay2D::DoFindTriangles() {
+ auto bx = std::minmax({tri.x[0], tri.x[1], tri.x[2]});
+ auto by = std::minmax({tri.y[0], tri.y[1], tri.y[2]});
+
+- uint cellXmin = CellX(bx.first);
+- uint cellXmax = CellX(bx.second);
++ unsigned int cellXmin = CellX(bx.first);
++ unsigned int cellXmax = CellX(bx.second);
+
+- uint cellYmin = CellY(by.first);
+- uint cellYmax = CellY(by.second);
++ unsigned int cellYmin = CellY(by.first);
++ unsigned int cellYmax = CellY(by.second);
+
+- for(uint i = cellXmin; i <= cellXmax; ++i)
+- for(uint j = cellYmin; j <= cellYmax; ++j){
++ for(unsigned int i = cellXmin; i <= cellXmax; ++i)
++ for(unsigned int j = cellYmin; j <= cellYmax; ++j){
+ //printf("(%u,%u) = %u\n", i, j, Cell(i,j));
+ fCells[Cell(i,j)].insert(t);
+ }
+@@ -382,7 +382,7 @@ double Delaunay2D::DoInterpolateNormalized(double xx, double yy)
+ /// FindAllTriangles();
+
+ //see comment in header for CGAL fallback section
+- auto bayCoords = [&] (const uint t) -> std::tuple<double, double, double> {
++ auto bayCoords = [&] (const unsigned int t) -> std::tuple<double, double, double> {
+ double la = ( (fTriangles[t].y[1] - fTriangles[t].y[2])*(xx - fTriangles[t].x[2])
+ + (fTriangles[t].x[2] - fTriangles[t].x[1])*(yy - fTriangles[t].y[2]) ) * fTriangles[t].invDenom;
+ double lb = ( (fTriangles[t].y[2] - fTriangles[t].y[0])*(xx - fTriangles[t].x[2])
+@@ -401,7 +401,7 @@ double Delaunay2D::DoInterpolateNormalized(double xx, double yy)
+ if(cX < 0 || cX > fNCells || cY < 0 || cY > fNCells)
+ return fZout; //TODO some more fancy interpolation here
+
+- for(uint t : fCells[Cell(cX, cY)]){
++ for(unsigned int t : fCells[Cell(cX, cY)]){
+ auto coords = bayCoords(t);
+
+ if(inTriangle(coords)){
+@@ -415,7 +415,7 @@ double Delaunay2D::DoInterpolateNormalized(double xx, double yy)
+
+ //debugging
+
+- /*for(uint t = 0; t < fNdt; ++t){
++ /*for(unsigned int t = 0; t < fNdt; ++t){
+ auto coords = bayCoords(t);
+
+ if(inTriangle(coords)){
+@@ -423,17 +423,17 @@ double Delaunay2D::DoInterpolateNormalized(double xx, double yy)
+ //brute force found a triangle -> grid not
+ printf("Found triangle %u for (%f,%f) -> (%u,%u)\n", t, xx,yy, cX, cY);
+ printf("Triangles in grid cell: ");
+- for(uint x : fCells[Cell(cX, cY)])
++ for(unsigned int x : fCells[Cell(cX, cY)])
+ printf("%u ", x);
+ printf("\n");
+
+ printf("Triangle %u is in cells: ", t);
+- for(uint i = 0; i <= fNCells; ++i)
+- for(uint j = 0; j <= fNCells; ++j)
++ for(unsigned int i = 0; i <= fNCells; ++i)
++ for(unsigned int j = 0; j <= fNCells; ++j)
+ if(fCells[Cell(i,j)].count(t))
+ printf("(%u,%u) ", i, j);
+ printf("\n");
+- for(uint i = 0; i < 3; ++i)
++ for(unsigned int i = 0; i < 3; ++i)
+ printf("\tpoint %u (%u): (%f,%f) -> (%u,%u)\n", i, fTriangles[t].idx[i], fTriangles[t].x[i], fTriangles[t].y[i], CellX(fTriangles[t].x[i]), CellY(fTriangles[t].y[i]));
+
+ //we found the triangle -> interpolate using the barycentric interpolation
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py
new file mode 100644
index 0000000000..0f66dcebaa
--- /dev/null
+++ b/var/spack/repos/builtin/packages/root/package.py
@@ -0,0 +1,89 @@
+##############################################################################
+# 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 sys
+
+
+class Root(Package):
+ """ROOT is a data analysis framework."""
+ homepage = "https://root.cern.ch"
+ url = "https://root.cern.ch/download/root_v6.07.02.source.tar.gz"
+
+ version('6.06.06', '4308449892210c8d36e36924261fea26')
+ version('6.06.04', '55a2f98dd4cea79c9c4e32407c2d6d17')
+ version('6.06.02', 'e9b8b86838f65b0a78d8d02c66c2ec55')
+
+ if sys.platform == 'darwin':
+ patch('math_uint.patch', when='@6.06.02')
+ patch('root6-60606-mathmore.patch', when='@6.06.06')
+
+ variant('graphviz', default=False, description='Enable graphviz support')
+
+ depends_on("cmake", type='build')
+ depends_on("pcre")
+ depends_on("fftw")
+ depends_on("graphviz", when="+graphviz")
+ depends_on("python")
+ depends_on("gsl")
+ depends_on("libxml2+python")
+ depends_on("jpeg")
+ if sys.platform != 'darwin':
+ depends_on("libpng")
+ depends_on("openssl")
+ depends_on("freetype")
+
+ def install(self, spec, prefix):
+ build_directory = join_path(self.stage.path, 'spack-build')
+ source_directory = self.stage.source_path
+ options = [source_directory]
+ if '+debug' in spec:
+ options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
+ else:
+ options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
+ options.append('-Dcxx14=on')
+ options.append('-Dcocoa=off')
+ options.append('-Dbonjour=off')
+ options.append('-Dx11=on')
+ options.extend(std_cmake_args)
+ if sys.platform == 'darwin':
+ darwin_options = [
+ '-Dcastor=OFF',
+ '-Drfio=OFF',
+ '-Ddcache=OFF']
+ options.extend(darwin_options)
+ with working_dir(build_directory, create=True):
+ cmake(*options)
+ make()
+ make("install")
+
+ def setup_dependent_environment(self, spack_env, run_env, dspec):
+ spack_env.set('ROOTSYS', self.prefix)
+ spack_env.set('ROOT_VERSION', 'v6')
+ spack_env.prepend_path('PYTHONPATH', self.prefix.lib)
+
+ def url_for_version(self, version):
+ """Handle ROOT's unusual version string."""
+ return "https://root.cern.ch/download/root_v%s.source.tar.gz" % version
diff --git a/var/spack/repos/builtin/packages/root/root6-60606-mathmore.patch b/var/spack/repos/builtin/packages/root/root6-60606-mathmore.patch
new file mode 100644
index 0000000000..d009a5af0d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/root/root6-60606-mathmore.patch
@@ -0,0 +1,29 @@
+diff --git a/math/mathmore/inc/Math/QuantFuncMathMore.h b/math/mathmore/inc/Math/QuantFuncMathMore.h
+index fd6679c..03ccc03 100644
+--- a/math/mathmore/inc/Math/QuantFuncMathMore.h
++++ b/math/mathmore/inc/Math/QuantFuncMathMore.h
+@@ -25,17 +25,6 @@
+ **********************************************************************/
+
+
+-#if defined(__CINT__) && !defined(__MAKECINT__)
+-// avoid to include header file when using CINT
+-#ifndef _WIN32
+-#include "../lib/libMathMore.so"
+-#else
+-#include "../bin/libMathMore.dll"
+-#endif
+-
+-#else
+-
+-
+ #ifndef ROOT_Math_QuantFuncMathMore
+ #define ROOT_Math_QuantFuncMathMore
+
+@@ -190,5 +179,3 @@ namespace MathMore {
+
+
+ #endif // ROOT_Math_QuantFuncMathMore
+-
+-#endif // if defined (__CINT__) && !defined(__MAKECINT__)
+
diff --git a/var/spack/repos/builtin/packages/rstart/package.py b/var/spack/repos/builtin/packages/rstart/package.py
new file mode 100644
index 0000000000..7b80e88ae7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rstart/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Rstart(Package):
+ """This package includes both the client and server sides implementing
+ the protocol described in the "A Flexible Remote Execution Protocol
+ Based on rsh" paper found in the specs/ subdirectory.
+
+ This software has been deprecated in favor of the X11 forwarding
+ provided in common ssh implementations."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/rstart"
+ url = "https://www.x.org/archive/individual/app/rstart-1.0.5.tar.gz"
+
+ version('1.0.5', '32db3625cb5e841e17d6bc696f21edfb')
+
+ depends_on('xproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/samtools/package.py b/var/spack/repos/builtin/packages/samtools/package.py
index 6b0b224785..b82a7e55d6 100644
--- a/var/spack/repos/builtin/packages/samtools/package.py
+++ b/var/spack/repos/builtin/packages/samtools/package.py
@@ -42,7 +42,8 @@ class Samtools(Package):
def install(self, spec, prefix):
if self.spec.version >= Version('1.3.1'):
- configure('--prefix={0}'.format(prefix), '--with-ncurses')
+ configure('--prefix={0}'.format(prefix), '--with-ncurses',
+ 'CURSES_LIB=-lncurses')
make()
make('install')
else:
diff --git a/var/spack/repos/builtin/packages/sbt/package.py b/var/spack/repos/builtin/packages/sbt/package.py
new file mode 100644
index 0000000000..0d675ef8ff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sbt/package.py
@@ -0,0 +1,18 @@
+from spack import *
+import shutil
+
+
+class Sbt(Package):
+ """Scala Build Tool"""
+
+ homepage = "http://http://www.scala-sbt.org"
+ url = "http://http://www.scala-sbt.org/download.html"
+
+ version('0.13.12', 'cec3071d46ef13334c8097cc3467ff28',
+ url='https://dl.bintray.com/sbt/native-packages/sbt/0.13.12/sbt-0.13.12.tgz')
+
+ depends_on('jdk')
+
+ def install(self, spec, prefix):
+ shutil.copytree('bin', join_path(prefix, 'bin'), symlinks=True)
+ shutil.copytree('conf', join_path(prefix, 'conf'), symlinks=True)
diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py
index 2c32bde4a1..d20e529384 100644
--- a/var/spack/repos/builtin/packages/scons/package.py
+++ b/var/spack/repos/builtin/packages/scons/package.py
@@ -35,4 +35,4 @@ class Scons(Package):
extends('python')
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ setup_py('install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py
index d40e08740f..e0f7972304 100644
--- a/var/spack/repos/builtin/packages/scorep/package.py
+++ b/var/spack/repos/builtin/packages/scorep/package.py
@@ -22,15 +22,13 @@
# 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 Scorep(Package):
- """
- The Score-P measurement infrastructure is a highly scalable and easy-to-use
- tool suite for profiling, event tracing, and online analysis of HPC
- applications.
+ """The Score-P measurement infrastructure is a highly scalable and
+ easy-to-use tool suite for profiling, event tracing, and online analysis
+ of HPC applications.
"""
homepage = "http://www.vi-hps.org/projects/score-p"
diff --git a/var/spack/repos/builtin/packages/screen/package.py b/var/spack/repos/builtin/packages/screen/package.py
index 17335603e6..7edfb44a4d 100644
--- a/var/spack/repos/builtin/packages/screen/package.py
+++ b/var/spack/repos/builtin/packages/screen/package.py
@@ -26,8 +26,7 @@ from spack import *
class Screen(Package):
- """
- Screen is a full-screen window manager that multiplexes a physical
+ """Screen is a full-screen window manager that multiplexes a physical
terminal between several processes, typically interactive shells.
"""
diff --git a/var/spack/repos/builtin/packages/scripts/package.py b/var/spack/repos/builtin/packages/scripts/package.py
new file mode 100644
index 0000000000..7086cfd6fe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scripts/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Scripts(Package):
+ """Various X related scripts."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/scripts"
+ url = "https://www.x.org/archive/individual/app/scripts-1.0.1.tar.gz"
+
+ version('1.0.1', '1e8294a126a2a7556b21025a8d933e8b')
+
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/scrnsaverproto/package.py b/var/spack/repos/builtin/packages/scrnsaverproto/package.py
new file mode 100644
index 0000000000..3675fd0eff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scrnsaverproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Scrnsaverproto(Package):
+ """MIT Screen Saver Extension.
+
+ This extension defines a protocol to control screensaver features
+ and also to query screensaver info on specific windows."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/scrnsaverproto"
+ url = "https://www.x.org/archive/individual/proto/scrnsaverproto-1.2.2.tar.gz"
+
+ version('1.2.2', '21704f1bad472d94abd22fea5704bb48')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/sdl2/package.py b/var/spack/repos/builtin/packages/sdl2/package.py
new file mode 100644
index 0000000000..98f8861fed
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sdl2/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Sdl2(Package):
+ """Simple DirectMedia Layer is a cross-platform development library designed
+ to provide low level access to audio, keyboard, mouse, joystick, and
+ graphics hardware via OpenGL and Direct3D."""
+
+ homepage = "https://wiki.libsdl.org/FrontPage"
+ url = "https://libsdl.org/release/SDL2-2.0.5.tar.gz"
+
+ version('2.0.5', 'd4055424d556b4a908aa76fad63abd3c')
+
+ depends_on('cmake', type='build')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('..', *std_cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/sdl2_image/package.py b/var/spack/repos/builtin/packages/sdl2_image/package.py
new file mode 100644
index 0000000000..5df207ac55
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sdl2_image/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 Sdl2Image(Package):
+ """SDL is designed to provide the bare bones of creating a graphical
+ program. """
+
+ homepage = "http://sdl.beuc.net/sdl.wiki/SDL_image"
+ url = "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz"
+
+ version('2.0.1', 'd94b94555ba022fa249a53a021dc3606')
+
+ depends_on('sdl2')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/sessreg/package.py b/var/spack/repos/builtin/packages/sessreg/package.py
new file mode 100644
index 0000000000..2ab505cc7a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sessreg/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Sessreg(Package):
+ """Sessreg is a simple program for managing utmp/wtmp entries for X
+ sessions. It was originally written for use with xdm, but may also be
+ used with other display managers such as gdm or kdm."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/sessreg"
+ url = "https://www.x.org/archive/individual/app/sessreg-1.1.0.tar.gz"
+
+ version('1.1.0', '5d7eb499043c7fdd8d53c5ba43660312')
+
+ depends_on('xproto@7.0.25:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def patch(self):
+ kwargs = {'string': True}
+ filter_file('$(CPP) $(DEFS)', '$(CPP) -P $(DEFS)',
+ 'man/Makefile.in', **kwargs)
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/setxkbmap/package.py b/var/spack/repos/builtin/packages/setxkbmap/package.py
new file mode 100644
index 0000000000..db365530c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/setxkbmap/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Setxkbmap(Package):
+ """setxkbmap is an X11 client to change the keymaps in the X server for a
+ specified keyboard to use the layout determined by the options listed
+ on the command line."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/setxkbmap"
+ url = "https://www.x.org/archive/individual/app/setxkbmap-1.3.1.tar.gz"
+
+ version('1.3.1', 'fdfc0fc643a50fb0b5fa7546e4d28868')
+
+ depends_on('libxkbfile')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/showfont/package.py b/var/spack/repos/builtin/packages/showfont/package.py
new file mode 100644
index 0000000000..232988193b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/showfont/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Showfont(Package):
+ """showfont displays data about a font from an X font server.
+ The information shown includes font information, font properties,
+ character metrics, and character bitmaps."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/showfont"
+ url = "https://www.x.org/archive/individual/app/showfont-1.0.5.tar.gz"
+
+ version('1.0.5', 'cea973363df01fb27a87e939600137fd')
+
+ depends_on('libfs')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py
index 5113c88bdf..691d53a9f1 100644
--- a/var/spack/repos/builtin/packages/silo/package.py
+++ b/var/spack/repos/builtin/packages/silo/package.py
@@ -41,7 +41,8 @@ class Silo(Package):
variant('silex', default=False,
description='Builds Silex, a GUI for viewing Silo files')
- depends_on('hdf5')
+ # silo uses the obsolete function H5Pset_fapl_mpiposix:
+ depends_on("hdf5 @:1.8.12")
depends_on('qt', when='+silex')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py
index fd6c42d9fc..e208400eea 100644
--- a/var/spack/repos/builtin/packages/slepc/package.py
+++ b/var/spack/repos/builtin/packages/slepc/package.py
@@ -34,6 +34,7 @@ class Slepc(Package):
homepage = "http://www.grycap.upv.es/slepc"
url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz"
+ version('3.7.3', '3ef9bcc645a10c1779d56b3500472ceb66df692e389d635087d30e7c46424df9')
version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2')
version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876')
version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df')
diff --git a/var/spack/repos/builtin/packages/smproxy/package.py b/var/spack/repos/builtin/packages/smproxy/package.py
new file mode 100644
index 0000000000..5bdde800d4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/smproxy/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Smproxy(Package):
+ """smproxy allows X applications that do not support X11R6 session
+ management to participate in an X11R6 session."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/smproxy"
+ url = "https://www.x.org/archive/individual/app/smproxy-1.0.6.tar.gz"
+
+ version('1.0.6', '012c259f5a89e5c636037446d44eb354')
+
+ depends_on('libsm')
+ depends_on('libice')
+ depends_on('libxt')
+ depends_on('libxmu')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/spark/package.py b/var/spack/repos/builtin/packages/spark/package.py
new file mode 100644
index 0000000000..10b0ebed7f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spark/package.py
@@ -0,0 +1,75 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Alfredo Gimenez, gimenez1@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 shutil
+
+
+class Spark(Package):
+ """Apache Spark is a fast and general engine
+ for large-scale data processing.
+ """
+
+ homepage = "http://spark.apache.org"
+ url = "http://mirrors.ocf.berkeley.edu/apache/spark/spark-2.0.0/spark-2.0.0-bin-without-hadoop.tgz"
+
+ variant('hadoop', default=False,
+ description='Build with Hadoop')
+
+ depends_on('jdk', type=('build', 'run'))
+ depends_on('hadoop', when='+hadoop', type=('build', 'run'))
+
+ version('2.0.0', '8a5307d973da6949a385aefb6ff747bb')
+ version('1.6.2', '304394fbe2899211217f0cd9e9b2b5d9')
+ version('1.6.1', 'fcf4961649f15af1fea78c882e65b001')
+
+ def install(self, spec, prefix):
+
+ def install_dir(dirname):
+ install_tree(dirname, join_path(prefix, dirname))
+
+ install_dir('bin')
+ install_dir('conf')
+ install_dir('jars')
+ install_dir('python')
+ install_dir('R')
+ install_dir('sbin')
+ install_dir('yarn')
+
+ # required for spark to recognize binary distribution
+ shutil.copy('RELEASE', prefix)
+
+ @when('+hadoop')
+ def setup_environment(self, spack_env, run_env):
+
+ env['JAVA_HOME'] = self.spec['jdk'].prefix
+ # spack_env.set('JAVA_HOME', self.spec['jdk'].prefix)
+
+ hadoop_bin_path = join_path(self.spec['hadoop'].prefix.bin, 'hadoop')
+ hadoop_bin = Executable(hadoop_bin_path)
+ hadoop_classpath = hadoop_bin('classpath', return_output=True)
+
+ run_env.set('SPARK_DIST_CLASSPATH', hadoop_classpath)
diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py
index 513f8ec6d4..c57ee72323 100644
--- a/var/spack/repos/builtin/packages/sqlite/package.py
+++ b/var/spack/repos/builtin/packages/sqlite/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+from spack import architecture
class Sqlite(Package):
@@ -33,9 +34,17 @@ class Sqlite(Package):
homepage = "www.sqlite.org"
version('3.8.5', '0544ef6d7afd8ca797935ccc2685a9ed',
- url='http://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz')
+ url='https://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz')
+
+ def get_arch(self):
+ arch = architecture.Arch()
+ arch.platform = architecture.platform()
+ return str(arch.platform.target('default_target'))
def install(self, spec, prefix):
- configure("--prefix=" + prefix)
+ config = ["--prefix=" + prefix]
+ if self.get_arch() == 'ppc64le':
+ config.append("--build=powerpc64le-redhat-linux-gnu")
+ configure(*config)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/star-ccm-plus/package.py b/var/spack/repos/builtin/packages/star-ccm-plus/package.py
new file mode 100644
index 0000000000..ba1516b62a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/star-ccm-plus/package.py
@@ -0,0 +1,78 @@
+##############################################################################
+# 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 glob
+import os
+
+
+class StarCcmPlus(Package):
+ """STAR-CCM+ (Computational Continuum Mechanics) CFD solver."""
+
+ homepage = "http://mdx.plm.automation.siemens.com/star-ccm-plus"
+
+ version('11.06.010_02', 'd349c6ac8293d8e6e7a53533d695588f')
+
+ variant('docs', default=False, description='Install the documentation')
+
+ # Licensing
+ license_required = True
+ license_vars = ['CDLMD_LICENSE_FILE', 'LM_LICENSE_FILE']
+
+ def url_for_version(self, version):
+ return "file://{0}/STAR-CCM+{1}_linux-x86_64.tar.gz".format(
+ os.getcwd(), version)
+
+ def install(self, spec, prefix):
+ # There is a known issue with the LaunchAnywhere application.
+ # Specifically, it cannot handle long prompts or prompts
+ # containing special characters and backslashes. It results in
+ # the following error message:
+ #
+ # An internal LaunchAnywhere application error has occured and this
+ # application cannot proceed. (LAX)
+ #
+ # Stack Trace:
+ # java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
+ # at java.util.Properties.loadConvert(Unknown Source)
+ # at java.util.Properties.load0(Unknown Source)
+ # at java.util.Properties.load(Unknown Source)
+ # at com.zerog.common.java.util.PropertiesUtil.loadProperties(
+ # Unknown Source)
+ # at com.zerog.lax.LAX.<init>(Unknown Source)
+ # at com.zerog.lax.LAX.main(Unknown Source)
+ #
+ # https://www.maplesoft.com/support/faqs/detail.aspx?sid=35272
+ env['PS1'] = '>'
+ env['PROMPT_COMMAND'] = ''
+
+ installer = Executable(glob.glob('*.bin')[0])
+
+ installer(
+ '-i', 'silent',
+ '-DINSTALLDIR={0}'.format(prefix),
+ '-DINSTALLFLEX=false',
+ '-DADDSYSTEMPATH=false',
+ '-DNODOC={0}'.format('false' if '+docs' in spec else 'true')
+ )
diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py
index ec2fae5e9b..eae4971ace 100644
--- a/var/spack/repos/builtin/packages/stat/package.py
+++ b/var/spack/repos/builtin/packages/stat/package.py
@@ -27,22 +27,36 @@ from spack import *
class Stat(Package):
"""Library to create, manipulate, and export graphs Graphlib."""
+
homepage = "http://paradyn.org/STAT/STAT.html"
url = "https://github.com/lee218llnl/stat/archive/v2.0.0.tar.gz"
version('2.2.0', '26bd69dd57a15afdd5d0ebdb0b7fb6fc')
version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91')
version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b')
+ version('3.0.0', 'a97cb235c266371c4a26329112de48a2',
+ url='https://github.com/LLNL/STAT/releases/download/v3.0.0/STAT-3.0.0.tar.gz')
+ # TODO: dysect requires Dyninst patch for version 3.0.0b
variant('dysect', default=False, description="enable DySectAPI")
+ variant('examples', default=False, description="enable examples")
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
depends_on('libelf')
depends_on('libdwarf')
- depends_on('dyninst')
- depends_on('graphlib')
+ depends_on('dyninst', when='~dysect')
+ depends_on('dyninst@8.2.1+stat_dysect', when='+dysect')
+ depends_on('graphlib@2.0.0', when='@2.0.0:2.2.0')
+ depends_on('graphlib@3.0.0', when='@3:')
depends_on('graphviz', type=alldeps)
depends_on('launchmon')
depends_on('mrnet')
+ depends_on('python')
+ depends_on('py-pygtk')
+ depends_on('swig')
+ depends_on('mpi', when='+examples')
patch('configure_mpicxx.patch', when='@2.1.0')
@@ -50,8 +64,6 @@ class Stat(Package):
configure_args = [
"--enable-gui",
"--prefix=%s" % prefix,
- # Examples require MPI: avoid this dependency.
- "--disable-examples",
"--with-launchmon=%s" % spec['launchmon'].prefix,
"--with-mrnet=%s" % spec['mrnet'].prefix,
"--with-graphlib=%s" % spec['graphlib'].prefix,
@@ -60,7 +72,8 @@ class Stat(Package):
]
if '+dysect' in spec:
configure_args.append('--enable-dysectapi')
+ if '~examples' in spec:
+ configure_args.append('--disable-examples')
configure(*configure_args)
- make(parallel=False)
make("install")
diff --git a/var/spack/repos/builtin/packages/sublime-text/package.py b/var/spack/repos/builtin/packages/sublime-text/package.py
new file mode 100644
index 0000000000..81d8690db8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sublime-text/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# 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 *
+from distutils.dir_util import copy_tree
+
+
+class SublimeText(Package):
+ """Sublime Text is a sophisticated text editor for code, markup and
+ prose."""
+
+ homepage = "http://www.sublimetext.com/"
+ url = "https://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2"
+
+ version('3126', 'acc34252b0ea7dff1f581c5db1564dcb')
+ version('2.0.2', '699cd26d7fe0bada29eb1b2cd7b50e4b')
+
+ # Sublime text comes as a pre-compiled binary.
+ # Since we can't link to Spack packages, we'll just have to
+ # add them as runtime dependencies.
+
+ # depends_on('libgobject', type='run')
+ depends_on('glib', type='run')
+ depends_on('libx11', type='run')
+ depends_on('pcre', type='run')
+ depends_on('libffi', type='run')
+ depends_on('libxcb', type='run')
+ depends_on('libxau', type='run')
+
+ def url_for_version(self, version):
+ if version.up_to(1) == '2':
+ return "https://download.sublimetext.com/Sublime%20Text%20{0}%20x64.tar.bz2".format(version)
+ else:
+ return "https://download.sublimetext.com/sublime_text_3_build_{0}_x64.tar.bz2".format(version)
+
+ def install(self, spec, prefix):
+ # Sublime text comes as a pre-compiled binary.
+ copy_tree('.', prefix)
diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py
index 26d143e4aa..02b7d96378 100644
--- a/var/spack/repos/builtin/packages/subversion/package.py
+++ b/var/spack/repos/builtin/packages/subversion/package.py
@@ -46,6 +46,9 @@ class Subversion(Package):
# depends_on('perl')
# depends_on('ruby')
+ # Installation has race cases.
+ parallel = False
+
def install(self, spec, prefix):
# configure, build, install:
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py
index a71bfd8bd4..aa22e1ecce 100644
--- a/var/spack/repos/builtin/packages/suite-sparse/package.py
+++ b/var/spack/repos/builtin/packages/suite-sparse/package.py
@@ -36,6 +36,7 @@ class SuiteSparse(Package):
version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319')
variant('tbb', default=True, description='Build with Intel TBB')
+ variant('fpic', default=True, description='Build position independent code (required to link with shared libraries)')
depends_on('blas')
depends_on('lapack')
@@ -62,7 +63,21 @@ class SuiteSparse(Package):
'CC=cc',
'CXX=c++',
'F77=f77',
+ 'CUDA_ROOT =',
+ 'GPU_BLAS_PATH =',
+ 'GPU_CONFIG =',
+ 'CUDA_PATH =',
+ 'CUDART_LIB =',
+ 'CUBLAS_LIB =',
+ 'CUDA_INC_PATH =',
+ 'NV20 =',
+ 'NV30 =',
+ 'NV35 =',
+ 'NVCC = echo',
+ 'NVCCFLAGS =',
])
+ if '+fpic' in spec:
+ make_args.extend(['CFLAGS=-fPIC', 'FFLAGS=-fPIC'])
# use Spack's metis in CHOLMOD/Partition module,
# otherwise internal Metis will be compiled
@@ -80,8 +95,8 @@ class SuiteSparse(Package):
# Make sure Spack's Blas/Lapack is used. Otherwise System's
# Blas/Lapack might be picked up.
- blas = to_link_flags(spec['blas'].blas_shared_lib)
- lapack = to_link_flags(spec['lapack'].lapack_shared_lib)
+ blas = spec['blas'].blas_libs.ld_flags
+ lapack = spec['lapack'].lapack_libs.ld_flags
if '@4.5.1' in spec:
# adding -lstdc++ is clearly an ugly way to do this, but it follows
# with the TCOV path of SparseSuite 4.5.1's Suitesparse_config.mk
diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py
index 7582954ab1..6ee247b7ea 100644
--- a/var/spack/repos/builtin/packages/sundials/package.py
+++ b/var/spack/repos/builtin/packages/sundials/package.py
@@ -31,7 +31,7 @@ class Sundials(Package):
Solvers)"""
homepage = "http://computation.llnl.gov/casc/sundials/"
- url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz"
+ url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz"
version('2.6.2', '3deeb0ede9f514184c6bd83ecab77d95')
@@ -79,9 +79,9 @@ class Sundials(Package):
if '+lapack' in spec:
cmake_args.extend([
'-DLAPACK_ENABLE=ON',
- '-DLAPACK_LIBRARIES={0};{1}'.format(
- spec['lapack'].lapack_shared_lib,
- spec['blas'].blas_shared_lib
+ '-DLAPACK_LIBRARIES={0}'.format(
+ (spec['lapack'].lapack_libs +
+ spec['blas'].blas_libs).joined(';')
)
])
else:
@@ -113,7 +113,7 @@ class Sundials(Package):
elif '+pthread' in spec:
cmake_args.append('-DSUPERLUMT_THREAD_TYPE=Pthread')
else:
- msg = 'You must choose either +openmp or +pthread when '
+ msg = 'You must choose either +openmp or +pthread when '
msg += 'building with SuperLU_MT'
raise RuntimeError(msg)
else:
diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py
index 4b3354e379..e9c345eeb2 100644
--- a/var/spack/repos/builtin/packages/superlu-dist/package.py
+++ b/var/spack/repos/builtin/packages/superlu-dist/package.py
@@ -30,13 +30,16 @@ class SuperluDist(Package):
"""A general purpose library for the direct solution of large, sparse,
nonsymmetric systems of linear equations on high performance machines."""
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
- url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"
+ url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"
+ version('5.1.1', '12638c631733a27dcbd87110e9f9cb1e')
+ version('5.1.0', '6bb86e630bd4bd8650243aed8fd92eb9')
version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670')
version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae')
version('4.2', 'ae9fafae161f775fbac6eba11e530a65')
version('4.1', '4edee38cc29f687bd0c8eb361096a455')
version('4.0', 'c0b98b611df227ae050bc1635c6940e0')
+ version('3.3', 'f4805659157d93a962500902c219046b')
depends_on('mpi')
depends_on('blas')
@@ -45,15 +48,14 @@ class SuperluDist(Package):
depends_on('metis@5:')
def install(self, spec, prefix):
+ lapack_blas = spec['lapack'].lapack_libs + spec['blas'].blas_libs
makefile_inc = []
makefile_inc.extend([
'PLAT = _mac_x',
'DSuperLUroot = %s' % self.stage.source_path,
'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a',
'BLASDEF = -DUSE_VENDOR_BLAS',
- 'BLASLIB = %s %s' %
- (to_link_flags(spec['lapack'].lapack_shared_lib),
- to_link_flags(spec['blas'].blas_shared_lib)),
+ 'BLASLIB = %s' % lapack_blas.ld_flags,
'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib,
'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib,
'FLIBS =',
@@ -61,14 +63,13 @@ class SuperluDist(Package):
'ARCH = ar',
'ARCHFLAGS = cr',
'RANLIB = true',
- 'CC = %s' % spec['mpi'].mpicc,
- 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %
- (spec['parmetis'].prefix.include,
- spec['metis'].prefix.include),
+ 'CC = {0}'.format(self.spec['mpi'].mpicc),
+ 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' % (
+ spec['parmetis'].prefix.include, spec['metis'].prefix.include),
'NOOPTS = -fPIC -std=c99',
- 'FORTRAN = %s' % spec['mpi'].mpif77,
+ 'FORTRAN = {0}'.format(self.spec['mpi'].mpif77),
'F90FLAGS = -O2',
- 'LOADER = %s' % spec['mpi'].mpif77,
+ 'LOADER = {0}'.format(self.spec['mpi'].mpif77),
'LOADOPTS =',
'CDEFS = -DAdd_'
])
diff --git a/var/spack/repos/builtin/packages/superlu-mt/package.py b/var/spack/repos/builtin/packages/superlu-mt/package.py
index e849273e08..ea94c2d4c5 100644
--- a/var/spack/repos/builtin/packages/superlu-mt/package.py
+++ b/var/spack/repos/builtin/packages/superlu-mt/package.py
@@ -86,7 +86,7 @@ class SuperluMt(Package):
if '+blas' in spec:
config.extend([
'BLASDEF = -DUSE_VENDOR_BLAS',
- 'BLASLIB = -L{0} -lblas'.format(spec['blas'].prefix.lib)
+ 'BLASLIB = {0}'.format(spec['blas'].blas_libs.ld_flags)
])
else:
config.append('BLASLIB = ../lib/libblas$(PLAT).a')
diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py
index c634c1d1ba..d9cff650b6 100644
--- a/var/spack/repos/builtin/packages/superlu/package.py
+++ b/var/spack/repos/builtin/packages/superlu/package.py
@@ -42,7 +42,7 @@ class Superlu(Package):
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
# BLAS support
'-Denable_blaslib=OFF',
- '-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_shared_lib)
+ '-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_libs.joined())
]
cmake_args.extend(std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py
index 636aa26bd2..1c424b5ca0 100644
--- a/var/spack/repos/builtin/packages/swiftsim/package.py
+++ b/var/spack/repos/builtin/packages/swiftsim/package.py
@@ -22,15 +22,12 @@
# 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 llnl.util.tty as tty
-class Swiftsim(Package):
- """
- SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides
+class Swiftsim(AutotoolsPackage):
+ """SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides
astrophysicists with a state of the art framework to perform
particle based simulations.
"""
@@ -61,20 +58,15 @@ class Swiftsim(Package):
tty.warn('This is needed to clone SWIFT repository')
spack_env.set('GIT_SSL_NO_VERIFY', 1)
- def install(self, spec, prefix):
- # Generate configure from configure.ac
- # and Makefile.am
+ def autoreconf(self, spec, prefix):
libtoolize()
aclocal()
autoconf()
autogen = Executable('./autogen.sh')
autogen()
- # Configure and install
- options = ['--prefix=%s' % prefix,
- '--enable-mpi' if '+mpi' in spec else '--disable-mpi',
- '--with-metis={0}'.format(spec['metis'].prefix),
- '--enable-optimization']
- configure(*options)
- make()
- make("install")
+ def configure_args(self):
+ return ['--prefix=%s' % self.prefix,
+ '--enable-mpi' if '+mpi' in self.spec else '--disable-mpi',
+ '--with-metis={0}'.format(self.spec['metis'].prefix),
+ '--enable-optimization']
diff --git a/var/spack/repos/builtin/packages/symengine/package.py b/var/spack/repos/builtin/packages/symengine/package.py
new file mode 100644
index 0000000000..f3fc13474c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/symengine/package.py
@@ -0,0 +1,113 @@
+##############################################################################
+# 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 Symengine(Package):
+ """SymEngine is a fast symbolic manipulation library, written in C++."""
+
+ homepage = "https://github.com/symengine/symengine"
+ url = "https://github.com/symengine/symengine/archive/v0.2.0.tar.gz"
+
+ version('0.2.0', '45401561add36a13c1f0b0c5f8d7422d')
+ version('0.1.0', '41ad7daed61fc5a77c285eb6c7303425')
+ version('develop', git='https://github.com/symengine/symengine.git')
+
+ variant('flint', default=True,
+ description='Compile with Flint integer library')
+ variant('mpc', default=True,
+ description='Compile with MPC library')
+ variant('mpfr', default=True,
+ description='Compile with MPFR library')
+ variant('piranha', default=False,
+ description='Compile with Piranha integer library')
+ variant('thread_safe', default=True,
+ description='Enable thread safety option')
+ variant('openmp', default=False,
+ description='Enable OpenMP support')
+ variant('shared', default=True,
+ description='Enables the build of shared libraries')
+
+ # Build dependencies
+ depends_on('cmake', type='build')
+
+ # Other dependencies
+ depends_on('gmp') # mpir is a drop-in replacement for this
+ depends_on('mpc', when='+mpc') # Could also be built against mpir
+ depends_on('mpfr', when='+mpfr') # Could also be built against mpir
+ depends_on('flint', when='+flint') # Could also be built against mpir
+ depends_on('piranha', when='+piranha~flint') # Could also be built against mpir # NOQA
+
+ def install(self, spec, prefix):
+ options = []
+ options.extend(std_cmake_args)
+
+ # CMAKE_BUILD_TYPE should be Debug | Release
+ for word in options[:]:
+ if word.startswith('-DCMAKE_BUILD_TYPE'):
+ options.remove(word)
+
+ # See https://github.com/symengine/symengine/blob/master/README.md
+ # for build options
+ options.extend([
+ '-DCMAKE_BUILD_TYPE=Release',
+ '-DWITH_SYMENGINE_RCP:BOOL=ON',
+ '-DWITH_SYMENGINE_THREAD_SAFE:BOOL=%s' % (
+ 'ON' if ('+thread_safe' or '+openmp') in spec else 'OFF'),
+ '-DBUILD_TESTS:BOOL=ON',
+ '-DBUILD_BENCHMARKS:BOOL=ON',
+ '-DWITH_MPC:BOOL=%s' % (
+ 'ON' if '+mpc' in spec else 'OFF'),
+ '-DWITH_MPFR:BOOL=%s' % (
+ 'ON' if '+mpfr' in spec else 'OFF'),
+ '-DINTEGER_CLASS:STRING=gmp',
+ '-DWITH_OPENMP:BOOL=%s' % (
+ 'ON' if '+openmp' in spec else 'OFF'),
+ '-DBUILD_SHARED_LIBS:BOOL=%s' % (
+ 'ON' if '+shared' in spec else 'OFF'),
+ ])
+
+ if '+flint' in spec:
+ options.extend([
+ '-DWITH_FLINT:BOOL=ON',
+ '-DINTEGER_CLASS:STRING=flint'
+ ])
+ elif '+piranha' in spec:
+ options.extend([
+ '-DWITH_PIRANHA:BOOL=ON',
+ '-DINTEGER_CLASS:STRING=piranha'
+ ])
+ else:
+ options.extend([
+ '-DINTEGER_CLASS:STRING=gmp'
+ ])
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *options)
+
+ make()
+ make('install')
+ if self.run_tests:
+ ctest()
diff --git a/var/spack/repos/builtin/packages/sympol/lrs_mp_close.patch b/var/spack/repos/builtin/packages/sympol/lrs_mp_close.patch
new file mode 100644
index 0000000000..503a61ff65
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sympol/lrs_mp_close.patch
@@ -0,0 +1,10 @@
+--- old/sympol/raycomputationlrs.cpp
++++ new/sympol/raycomputationlrs.cpp
+@@ -66,7 +66,6 @@
+ return true;
+ }
+
+- lrs_mp_close();
+
+ if (RayComputationLRS::ms_fIn != NULL) {
+ if (std::fclose(RayComputationLRS::ms_fIn)) {
diff --git a/var/spack/repos/builtin/packages/sympol/package.py b/var/spack/repos/builtin/packages/sympol/package.py
new file mode 100644
index 0000000000..7ce4995f03
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sympol/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Sympol(Package):
+ """SymPol is a C++ tool to work with symmetric polyhedra"""
+ homepage = "http://www.math.uni-rostock.de/~rehn/software/sympol.html"
+ url = "http://www.math.uni-rostock.de/~rehn/software/sympol-0.1.8.tar.gz"
+
+ version('0.1.8', '7cba1997f8532c754cb7259bf70caacb')
+
+ depends_on("cmake", type='build')
+
+ depends_on("bliss")
+ depends_on("boost")
+ depends_on("gmp")
+ depends_on("lrslib")
+
+ patch("lrs_mp_close.patch")
+
+ def install(self, spec, prefix):
+ cmake(".", *std_cmake_args)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/szip/package.py b/var/spack/repos/builtin/packages/szip/package.py
index b2ca6f3995..91934f7d03 100644
--- a/var/spack/repos/builtin/packages/szip/package.py
+++ b/var/spack/repos/builtin/packages/szip/package.py
@@ -25,24 +25,21 @@
from spack import *
-class Szip(Package):
- """An implementation of the extended-Rice lossless compression algorithm.
- It provides lossless compression of scientific data, and is provided
- with HDF software products.
+class Szip(AutotoolsPackage):
+ """Szip is an implementation of the extended-Rice lossless
+ compression algorithm.
+ It provides lossless compression of scientific data, and is
+ provided with HDF software products.
"""
homepage = "https://www.hdfgroup.org/doc_resource/SZIP/"
- url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz"
+ url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz"
version('2.1', '902f831bcefb69c6b635374424acbead')
- def install(self, spec, prefix):
- configure('--prefix=%s' % prefix,
- '--enable-production',
- '--enable-shared',
- '--enable-static',
- '--enable-encoding')
-
- make()
- make("install")
+ def configure_args(self):
+ return ['--enable-production',
+ '--enable-shared',
+ '--enable-static',
+ '--enable-encoding']
diff --git a/var/spack/repos/builtin/packages/tar/package.py b/var/spack/repos/builtin/packages/tar/package.py
index f5995cb007..7b6313827f 100644
--- a/var/spack/repos/builtin/packages/tar/package.py
+++ b/var/spack/repos/builtin/packages/tar/package.py
@@ -25,11 +25,11 @@
from spack import *
-class Tar(Package):
+class Tar(AutotoolsPackage):
"""GNU Tar provides the ability to create tar archives, as well as various
other kinds of manipulation."""
homepage = "https://www.gnu.org/software/tar/"
- url = "https://ftp.gnu.org/gnu/tar/tar-1.28.tar.gz"
+ url = "https://ftp.gnu.org/gnu/tar/tar-1.28.tar.gz"
version('1.29', 'cae466e6e58c7292355e7080248f244db3a4cf755f33f4fa25ca7f9a7ed09af0')
version('1.28', '6ea3dbea1f2b0409b234048e021a9fd7')
@@ -38,8 +38,3 @@ class Tar(Package):
# https://github.com/Homebrew/homebrew-core/commit/aef9a1792de4648d0322b4b04d32287532f046bb
# TODO: when=sys.platform=='darwin' ?
patch('gnutar-configure-xattrs.patch', when='@1.28')
-
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
- make()
- make('install')
diff --git a/var/spack/repos/builtin/packages/taskd/package.py b/var/spack/repos/builtin/packages/taskd/package.py
index d13f480374..bfe77aaa5c 100644
--- a/var/spack/repos/builtin/packages/taskd/package.py
+++ b/var/spack/repos/builtin/packages/taskd/package.py
@@ -27,7 +27,7 @@ from spack import *
class Taskd(Package):
"""TaskWarrior task synchronization daemon"""
- # FIXME: add a proper url for your package's homepage here.
+
homepage = "http://www.taskwarrior.org"
url = "http://taskwarrior.org/download/taskd-1.1.0.tar.gz"
diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py
index a77df8d37c..991841f137 100644
--- a/var/spack/repos/builtin/packages/tau/package.py
+++ b/var/spack/repos/builtin/packages/tau/package.py
@@ -22,21 +22,18 @@
# 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
-import os.path
-
+import glob
from llnl.util.filesystem import join_path
class Tau(Package):
- """
- A portable profiling and tracing toolkit for performance
+ """A portable profiling and tracing toolkit for performance
analysis of parallel programs written in Fortran, C, C++, UPC,
Java, Python.
"""
+
homepage = "http://www.cs.uoregon.edu/research/tau"
url = "https://www.cs.uoregon.edu/research/tau/tau_releases/tau-2.25.tar.gz"
@@ -149,3 +146,15 @@ class Tau(Package):
dest = join_path(self.prefix, d)
if os.path.isdir(src) and not os.path.exists(dest):
os.symlink(join_path(subdir, d), dest)
+
+ def setup_environment(self, spack_env, run_env):
+ pattern = join_path(self.prefix.lib, 'Makefile.*')
+ files = glob.glob(pattern)
+
+ # This function is called both at install time to set up
+ # the build environment and after install to generate the associated
+ # module file. In the former case there is no `self.prefix.lib`
+ # directory to inspect. The conditional below will set `TAU_MAKEFILE`
+ # in the latter case.
+ if files:
+ run_env.set('TAU_MAKEFILE', files[0])
diff --git a/var/spack/repos/builtin/packages/tethex/package.py b/var/spack/repos/builtin/packages/tethex/package.py
new file mode 100644
index 0000000000..624942498e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tethex/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Tethex(Package):
+ """Tethex is designed to convert triangular (in 2D) or tetrahedral (in 3D)
+ Gmsh's mesh to quadrilateral or hexahedral one respectively. These meshes
+ can be used in software packages working with hexahedrals only - for
+ example, deal.II.
+ """
+
+ homepage = "https://github.com/martemyev/tethex"
+ url = "https://github.com/martemyev/tethex/archive/v0.0.7.tar.gz"
+
+ version('0.0.7', '6c9e4a18a6637deb4400c6d77ec03184')
+ version('develop', git='https://github.com/martemyev/tethex.git')
+
+ depends_on('cmake', type='build')
+
+ def install(self, spec, prefix):
+ cmake('.')
+ make()
+
+ # install by hand
+ mkdirp(prefix.bin)
+ install('tethex', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/texlive/package.py b/var/spack/repos/builtin/packages/texlive/package.py
index 64158e74cb..36b3fad2f6 100644
--- a/var/spack/repos/builtin/packages/texlive/package.py
+++ b/var/spack/repos/builtin/packages/texlive/package.py
@@ -32,8 +32,10 @@ class Texlive(Package):
homepage = "http://www.tug.org/texlive"
- version('live', 'e671eea7f142c438959493cc42a2a59b',
- url="http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz")
+ # pull from specific site because the texlive mirrors do not all
+ # update in synchrony.
+ version('live', '6d171d370f3a2f2b936b9b0c87e8d0fe',
+ url="http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet/install-tl-unx.tar.gz")
# There does not seem to be a complete list of schemes.
# Examples include:
@@ -47,7 +49,7 @@ class Texlive(Package):
variant('scheme', default="small",
description='Package subset to install (e.g. full, small, basic)')
- depends_on('perl')
+ depends_on('perl', type='build')
def install(self, spec, prefix):
env = os.environ
diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py
index 573ee38a79..89c9751486 100644
--- a/var/spack/repos/builtin/packages/tmux/package.py
+++ b/var/spack/repos/builtin/packages/tmux/package.py
@@ -35,9 +35,10 @@ class Tmux(Package):
homepage = "http://tmux.github.io"
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.3', 'fcfd1611d705d8b31df3c26ebc93bd3e')
version('2.2', 'bd95ee7205e489c62c616bb7af040099')
+ version('2.1', '74a2855695bccb51b6e301383ad4818c')
+ version('1.9a', 'b07601711f96f1d260b390513b509a2d')
depends_on('libevent')
depends_on('ncurses')
diff --git a/var/spack/repos/builtin/packages/transset/package.py b/var/spack/repos/builtin/packages/transset/package.py
new file mode 100644
index 0000000000..0f60738741
--- /dev/null
+++ b/var/spack/repos/builtin/packages/transset/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Transset(Package):
+ """transset is an utility for setting opacity property."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/transset"
+ url = "https://www.x.org/archive/individual/app/transset-1.0.1.tar.gz"
+
+ version('1.0.1', '4bbee6f6ea6fbd403280b4bb311db6dc')
+
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/trapproto/package.py b/var/spack/repos/builtin/packages/trapproto/package.py
new file mode 100644
index 0000000000..eebab74410
--- /dev/null
+++ b/var/spack/repos/builtin/packages/trapproto/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# 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 Trapproto(Package):
+ """X.org TrapProto protocol headers."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/trapproto"
+ url = "https://www.x.org/archive/individual/proto/trapproto-3.4.3.tar.gz"
+
+ version('3.4.3', '1344759ae8d7d923e64f5eec078a679b')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/tree/package.py b/var/spack/repos/builtin/packages/tree/package.py
index 8e0e176c4c..795f8c997e 100644
--- a/var/spack/repos/builtin/packages/tree/package.py
+++ b/var/spack/repos/builtin/packages/tree/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
class Tree(Package):
@@ -39,8 +40,24 @@ class Tree(Package):
version('1.7.0', 'abe3e03e469c542d8e157cdd93f4d8a6')
def install(self, spec, prefix):
- filter_file(r'^prefix =.*', 'prefix = %s' % prefix, 'Makefile')
- filter_file(r'^CFLAGS', '# use spack settings instead... CFLAGS',
- 'Makefile')
- make()
- make('install')
+ objs = [
+ 'tree.o',
+ 'unix.o',
+ 'html.o',
+ 'xml.o',
+ 'json.o',
+ 'hash.o',
+ 'color.o'
+ ]
+ if (sys.platform == 'darwin'):
+ objs.append('strverscmp.o')
+
+ args = [
+ 'prefix=%s' % prefix,
+ 'CC=%s' % spack_cc,
+ 'CFLAGS=',
+ 'OBJS=%s' % ' '.join(objs),
+ 'install'
+ ]
+
+ make(*args)
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index d39e45f054..07393f9e9b 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -36,25 +36,30 @@ import sys
# https://github.com/trilinos/Trilinos/issues/175
-class Trilinos(Package):
+class Trilinos(CMakePackage):
"""The Trilinos Project is an effort to develop algorithms and enabling
technologies within an object-oriented software framework for the solution
of large-scale, complex multi-physics engineering and scientific problems.
A unique design feature of Trilinos is its focus on packages.
"""
homepage = "https://trilinos.org/"
- url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz"
+ base_url = "https://github.com/trilinos/Trilinos/archive"
- version('12.6.4', 'db25056617c688f6f25092376a03200f')
- version('12.6.3', '960f5f4d3f7c3da818e5a5fb4684559eff7e0c25f959ef576561b8a52f0e4d1e')
- version('12.6.2', '0c076090508170ddee5efeed317745027f9418319720dc40a072e478775279f9')
- version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4')
- version('12.4.2', '7c830f7f0f68b8ad324690603baf404e')
- version('12.2.1', '6161926ea247863c690e927687f83be9')
- version('12.0.1', 'bd99741d047471e127b8296b2ec08017')
- version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426')
- version('11.14.2', 'a43590cf896c677890d75bfe75bc6254')
- version('11.14.1', '40febc57f76668be8b6a77b7607bb67f')
+ version('12.8.1', '01c0026f1e2050842857db941060ecd5')
+ version('12.6.4', 'c2ea7b5aa0d10bcabdb9b9a6e3bac3ea')
+ version('12.6.3', '8de5cc00981a0ca0defea6199b2fe4c1')
+ version('12.6.2', 'dc7f9924872778798149ecadd81605a5')
+ version('12.6.1', '8aecea78546e7558f63ecc9a3b2949da')
+ version('12.4.2', '4c25a757d86bde3531090bd900a2cea8')
+ version('12.2.1', '85d011f7f99a776a9c6c2625e8cb721c')
+ version('12.0.1', 'bcb3fdefd14d05dd6aa65ba4c5b9aa0e')
+ version('11.14.3', 'dea62e57ebe51a886bee0b10a2176969')
+ version('11.14.2', 'e7c3cdbbfe3279a8a68838b873ad6d51')
+ version('11.14.1', 'b7760b142eef66c79ed13de7c9560f81')
+
+ def url_for_version(self, version):
+ return '%s/trilinos-release-%s.tar.gz' % \
+ (Trilinos.base_url, version.dashed)
variant('metis', default=True,
description='Compile with METIS and ParMETIS')
@@ -84,7 +89,6 @@ class Trilinos(Package):
depends_on('boost', when='+boost')
depends_on('matio')
depends_on('glm')
- depends_on('swig')
depends_on('metis@5:', when='+metis')
depends_on('suite-sparse', when='+suite-sparse')
@@ -106,6 +110,8 @@ class Trilinos(Package):
depends_on('hypre~internal-superlu', when='+hypre')
depends_on('hdf5+mpi', when='+hdf5')
depends_on('python', when='+python')
+ depends_on('py-numpy', when='+python')
+ depends_on('swig', when='+python')
patch('umfpack_from_suitesparse.patch')
@@ -118,15 +124,17 @@ class Trilinos(Package):
raise RuntimeError('The superlu-dist variant can only be used' +
' with Trilinos @12.0.1:')
- def install(self, spec, prefix):
+ def cmake_args(self):
+ spec = self.spec
self.variants_check()
cxx_flags = []
options = []
- options.extend(std_cmake_args)
mpi_bin = spec['mpi'].prefix.bin
# Note: -DXYZ_LIBRARY_NAMES= needs semicolon separated list of names
+ blas = spec['blas'].blas_libs
+ lapack = spec['lapack'].lapack_libs
options.extend([
'-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON',
'-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON',
@@ -140,20 +148,27 @@ class Trilinos(Package):
'-DTPL_ENABLE_MPI:BOOL=ON',
'-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix,
'-DTPL_ENABLE_BLAS=ON',
- '-DBLAS_LIBRARY_NAMES=%s' % to_lib_name(
- spec['blas'].blas_shared_lib),
- '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib,
+ '-DBLAS_LIBRARY_NAMES=%s' % ';'.join(blas.names),
+ '-DBLAS_LIBRARY_DIRS=%s' % ';'.join(blas.directories),
'-DTPL_ENABLE_LAPACK=ON',
- '-DLAPACK_LIBRARY_NAMES=%s' % to_lib_name(
- spec['lapack'].lapack_shared_lib),
- '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix.lib,
+ '-DLAPACK_LIBRARY_NAMES=%s' % ';'.join(lapack.names),
+ '-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories),
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON',
'-DTrilinos_ENABLE_CXX11:BOOL=ON',
'-DTPL_ENABLE_Netcdf:BOOL=ON',
'-DTPL_ENABLE_HYPRE:BOOL=%s' % (
- 'ON' if '+hypre' in spec else 'OFF')
+ 'ON' if '+hypre' in spec else 'OFF'),
+ '-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % self.prefix
])
+ if spec.satisfies('%intel') and spec.satisfies('@12.6.2'):
+ # Panzer uses some std:chrono that is not recognized by Intel
+ # Don't know which (maybe all) Trilinos versions this applies to
+ # Don't know which (maybe all) Intel versions this applies to
+ options.extend([
+ '-DTrilinos_ENABLE_Panzer:BOOL=OFF'
+ ])
+
if '+hdf5' in spec:
options.extend([
'-DTPL_ENABLE_HDF5:BOOL=ON',
@@ -172,20 +187,25 @@ class Trilinos(Package):
else:
options.extend(['-DTPL_ENABLE_Boost:BOOL=OFF'])
- # Fortran lib
- libgfortran = os.path.dirname(os.popen(
- '%s --print-file-name libgfortran.a' %
- join_path(mpi_bin, 'mpif90')).read())
- options.extend([
- '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % (
- libgfortran),
- '-DTrilinos_ENABLE_Fortran=ON'
- ])
+ if '+hdf5' in spec:
+ options.extend([
+ '-DTPL_ENABLE_HDF5:BOOL=ON',
+ '-DHDF5_INCLUDE_DIRS:PATH=%s' % spec['hdf5'].prefix.include,
+ '-DHDF5_LIBRARY_DIRS:PATH=%s' % spec['hdf5'].prefix.lib
+ ])
+ else:
+ options.extend(['-DTPL_ENABLE_HDF5:BOOL=OFF'])
- # for build-debug only:
- # options.extend([
- # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE'
- # ])
+ # Fortran lib
+ if spec.satisfies('%gcc') or spec.satisfies('%clang'):
+ libgfortran = os.path.dirname(os.popen(
+ '%s --print-file-name libgfortran.a' %
+ join_path(mpi_bin, 'mpif90')).read())
+ options.extend([
+ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % (
+ libgfortran),
+ '-DTrilinos_ENABLE_Fortran=ON'
+ ])
# suite-sparse related
if '+suite-sparse' in spec:
@@ -306,27 +326,20 @@ class Trilinos(Package):
options.extend([
'-DTrilinos_ENABLE_FEI=OFF'
])
+ return options
- with working_dir('spack-build', create=True):
- cmake('..', *options)
- make()
- make('install')
-
- # When trilinos is built with Python, libpytrilinos is included
- # through cmake configure files. Namely, Trilinos_LIBRARIES in
- # TrilinosConfig.cmake contains pytrilinos. This leads to a
- # run-time error: Symbol not found: _PyBool_Type and prevents
- # Trilinos to be used in any C++ code, which links executable
- # against the libraries listed in Trilinos_LIBRARIES. See
- # https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509
- # A workaround it to remove PyTrilinos from the COMPONENTS_LIST :
- if '+python' in self.spec:
- filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)',
- (r'\1\3'),
- '%s/cmake/Trilinos/TrilinosConfig.cmake' %
- prefix.lib)
-
- # The shared libraries are not installed correctly on Darwin;
- # correct this
- if (sys.platform == 'darwin') and ('+shared' in spec):
- fix_darwin_install_name(prefix.lib)
+ @CMakePackage.sanity_check('install')
+ def filter_python(self):
+ # When trilinos is built with Python, libpytrilinos is included
+ # through cmake configure files. Namely, Trilinos_LIBRARIES in
+ # TrilinosConfig.cmake contains pytrilinos. This leads to a
+ # run-time error: Symbol not found: _PyBool_Type and prevents
+ # Trilinos to be used in any C++ code, which links executable
+ # against the libraries listed in Trilinos_LIBRARIES. See
+ # https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509
+ # A workaround is to remove PyTrilinos from the COMPONENTS_LIST :
+ if '+python' in self.spec:
+ filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)',
+ (r'\1\3'),
+ '%s/cmake/Trilinos/TrilinosConfig.cmake' %
+ self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/turbomole/package.py b/var/spack/repos/builtin/packages/turbomole/package.py
index 6ccce23f97..b2d7e90057 100644
--- a/var/spack/repos/builtin/packages/turbomole/package.py
+++ b/var/spack/repos/builtin/packages/turbomole/package.py
@@ -29,14 +29,14 @@ import subprocess
class Turbomole(Package):
"""TURBOMOLE: Program Package for ab initio Electronic Structure
- Calculations. NB: Requires a license to download."""
-
- # NOTE: Turbomole requires purchase of a license to download. Go to the
- # NOTE: Turbomole home page, http://www.turbomole-gmbh.com, for details.
- # NOTE: Spack will search the current directory for this file. It is
- # NOTE: probably best to add this file to a Spack mirror so that it can be
- # NOTE: found from anywhere. For information on setting up a Spack mirror
- # NOTE: see http://software.llnl.gov/spack/mirrors.html
+ Calculations.
+
+ Note: Turbomole requires purchase of a license to download. Go to the
+ Turbomole home page, http://www.turbomole-gmbh.com, for details.
+ Spack will search the current directory for this file. It is
+ probably best to add this file to a Spack mirror so that it can be
+ found from anywhere. For information on setting up a Spack mirror
+ see http://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "http://www.turbomole-gmbh.com/"
diff --git a/var/spack/repos/builtin/packages/twm/package.py b/var/spack/repos/builtin/packages/twm/package.py
new file mode 100644
index 0000000000..3e37f4903d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/twm/package.py
@@ -0,0 +1,56 @@
+##############################################################################
+# 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 Twm(Package):
+ """twm is a window manager for the X Window System. It provides
+ titlebars, shaped windows, several forms of icon management,
+ user-defined macro functions, click-to-type and pointer-driven
+ keyboard focus, and user-specified key and pointer button bindings."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/twm"
+ url = "https://www.x.org/archive/individual/app/twm-1.0.9.tar.gz"
+
+ version('1.0.9', 'e98fcb32f774ac1ff7bf82101b79f61e')
+
+ depends_on('libx11')
+ depends_on('libxext')
+ depends_on('libxt')
+ depends_on('libxmu')
+ depends_on('libice')
+ depends_on('libsm')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('bison', type='build')
+ depends_on('flex', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/uberftp/package.py b/var/spack/repos/builtin/packages/uberftp/package.py
new file mode 100644
index 0000000000..b1b7dada6f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/uberftp/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 Uberftp(Package):
+ """UberFTP is an interactive (text-based) client for GridFTP"""
+
+ homepage = "http://toolkit.globus.org/grid_software/data/uberftp.php"
+ url = "https://github.com/JasonAlt/UberFTP/archive/Version_2_8.tar.gz"
+
+ version('2_8', 'bc7a159955a9c4b9f5f42f3d2b8fc830')
+ version('2_7', 'faaea2d6e1958c1105cfc9147824e03c')
+ version('2_6', '784210976f259f9d19c0798c19778d34')
+
+ depends_on('globus_toolkit')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/util-macros/package.py b/var/spack/repos/builtin/packages/util-macros/package.py
new file mode 100644
index 0000000000..486d4463b0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/util-macros/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 UtilMacros(Package):
+ """This is a set of autoconf macros used by the configure.ac scripts in
+ other Xorg modular packages, and is needed to generate new versions
+ of their configure scripts with autoconf."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/util/macros/"
+ url = "https://www.x.org/archive/individual/util/util-macros-1.19.0.tar.bz2"
+
+ version('1.19.0', '1cf984125e75f8204938d998a8b6c1e1')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/veclibfort/package.py b/var/spack/repos/builtin/packages/veclibfort/package.py
new file mode 100644
index 0000000000..b906d4f9c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/veclibfort/package.py
@@ -0,0 +1,70 @@
+##############################################################################
+# 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 sys
+
+
+class Veclibfort(Package):
+ """Lightweight but flexible shim designed to rectify the incompatibilities
+ between the Accelerate/vecLib BLAS and LAPACK libraries shipped with macOS
+ and FORTRAN code compiled with modern compilers such as GNU Fortran."""
+
+ homepage = "https://github.com/mcg1969/vecLibFort"
+ url = "https://github.com/mcg1969/vecLibFort/archive/0.4.2.tar.gz"
+
+ version('0.4.2', '83395ffcbe8a2122c3f726a5c3a7cf93')
+ version('develop', git='https://github.com/mcg1969/vecLibFort.git')
+
+ variant('shared', default=True,
+ description="Build shared libraries as well as static libs.")
+
+ # virtual dependency
+ provides('blas')
+ provides('lapack')
+
+ @property
+ def blas_libs(self):
+ shared = True if '+shared' in self.spec else False
+ return find_libraries(
+ ['libvecLibFort'], root=self.prefix, shared=shared, recurse=True
+ )
+
+ @property
+ def lapack_libs(self):
+ return self.blas_libs
+
+ def install(self, spec, prefix):
+ if sys.platform != 'darwin':
+ raise InstallError('vecLibFort can be installed on macOS only')
+
+ make('all')
+ make('PREFIX=%s' % prefix, 'install')
+
+ # test
+ fc = which('fc')
+ flags = ['-o', 'tester', '-O', 'tester.f90']
+ flags.extend(self.lapack_libs.ld_flags.split())
+ fc(*flags)
+ Executable('./tester')()
diff --git a/var/spack/repos/builtin/packages/videoproto/package.py b/var/spack/repos/builtin/packages/videoproto/package.py
new file mode 100644
index 0000000000..93b0e61ca4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/videoproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Videoproto(Package):
+ """X Video Extension.
+
+ This extension provides a protocol for a video output mechanism,
+ mainly to rescale video playback in the video controller hardware."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/videoproto"
+ url = "https://www.x.org/archive/individual/proto/videoproto-2.3.3.tar.gz"
+
+ version('2.3.3', 'd984100603ee2420072f27bb491f4b7d')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/viewres/package.py b/var/spack/repos/builtin/packages/viewres/package.py
new file mode 100644
index 0000000000..3a32555075
--- /dev/null
+++ b/var/spack/repos/builtin/packages/viewres/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Viewres(Package):
+ """viewres displays a tree showing the widget class hierarchy of the
+ Athena Widget Set (libXaw)."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/viewres"
+ url = "https://www.x.org/archive/individual/app/viewres-1.0.4.tar.gz"
+
+ version('1.0.4', 'a3c7fe561945951f848e319680753760')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py
index 01eccfab57..26aeb4aad9 100644
--- a/var/spack/repos/builtin/packages/vim/package.py
+++ b/var/spack/repos/builtin/packages/vim/package.py
@@ -38,6 +38,7 @@ class Vim(Package):
url = "ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2"
list_url = "http://ftp.vim.org/pub/vim/unix/"
+ version('8.0', '808d2ebdab521e18bc5e0eaede0db867')
version('7.4', '607e135c559be642f210094ad023dc65')
version('7.3', '5b9510a17074e2b37d8bb38ae09edbf2')
version('7.2', 'f0901284b338e448bfd79ccca0041254')
@@ -66,19 +67,21 @@ class Vim(Package):
variant('gui', default=False, description="build with gui (gvim)")
# virtual dependency?
+ depends_on('ncurses', when="@8.0:")
+
def install(self, spec, prefix):
feature_set = None
for fs in self.feature_sets:
if "+" + fs in spec:
if feature_set is not None:
- tty.error(
+ raise InstallError(
"Only one feature set allowed, specified %s and %s"
% (feature_set, fs))
feature_set = fs
if '+gui' in spec:
if feature_set is not None:
- if feature_set is not 'huge':
- tty.error(
+ if feature_set != 'huge':
+ raise InstallError(
"+gui variant requires 'huge' feature set, "
"%s was specified" % feature_set)
feature_set = 'huge'
diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py
index d88caeb00a..ba1224daee 100644
--- a/var/spack/repos/builtin/packages/visit/package.py
+++ b/var/spack/repos/builtin/packages/visit/package.py
@@ -31,29 +31,34 @@ class Visit(Package):
homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/"
url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz"
- version('2.10.1', '3cbca162fdb0249f17c4456605c4211e')
+ version('2.10.3', 'a1082a6f6dab3e2dcb58993603456c2b')
version('2.10.2', '253de0837a9d69fb689befc98ea4d068')
+ version('2.10.1', '3cbca162fdb0249f17c4456605c4211e')
- depends_on("vtk@6.1.0~opengl2")
- depends_on("qt@4.8.6")
- depends_on("python")
- depends_on("silo+shared")
+ depends_on('cmake', type='build')
+ depends_on('vtk@6.1.0~opengl2')
+ depends_on('qt@4.8.6')
+ depends_on('python')
+ depends_on('silo+shared')
+ depends_on('hdf5~mpi')
def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
+ qt_bin = spec['qt'].prefix.bin
+ python_bin = spec['python'].prefix.bin
- feature_args = std_cmake_args[:]
- feature_args.extend([
- "-DVTK_MAJOR_VERSION=6",
- "-DVTK_MINOR_VERSION=1",
- "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec[
- 'qt'].prefix.bin,
- "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec[
- 'python'].prefix.bin,
- "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix,
- "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix])
-
- cmake('../src', *feature_args)
+ with working_dir('spack-build', create=True):
+ cmake_args = std_cmake_args[:]
+ cmake_args.extend([
+ '-DVTK_MAJOR_VERSION=6',
+ '-DVTK_MINOR_VERSION=1',
+ '-DVISIT_USE_GLEW=OFF',
+ '-DVISIT_LOC_QMAKE_EXE:FILEPATH={0}/qmake-qt4'.format(qt_bin),
+ '-DPYTHON_EXECUTABLE:FILEPATH={0}/python'.format(python_bin),
+ '-DVISIT_SILO_DIR:PATH={0}'.format(spec['silo'].prefix),
+ '-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix),
+ '-DVISIT_VTK_DIR:PATH={0}'.format(spec['vtk'].prefix),
+ ])
+ cmake(join_path('..', 'src'), *cmake_args)
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/vizglow/package.py b/var/spack/repos/builtin/packages/vizglow/package.py
new file mode 100644
index 0000000000..9e4506b05a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vizglow/package.py
@@ -0,0 +1,58 @@
+##############################################################################
+# 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 glob
+import os
+
+
+class Vizglow(Package):
+ """VizGlow software tool is used for high-fidelity multi-dimensional
+ modeling of non-equilibrium plasma discharges.
+
+ Note: VizGlow is licensed software. You will need to create an account on
+ the EsgeeTech homepage and download VizGlow yourself. Spack will search
+ your current directory for a file of this format. Alternatively, add this
+ file to a mirror so that Spack can find it. For instructions on how to
+ set up a mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "http://esgeetech.com/products/vizglow-plasma-modeling/"
+
+ version('2.2a-15', 'be2b5044f30f2b2c3bbe87a0037bf228', expand=False,
+ url="file://{0}/VizGlow_v2.2alpha15-Linux-x86_64-R31October2016-Install".format(os.getcwd()))
+
+ # Licensing
+ license_required = True
+ license_comment = '#'
+ license_files = ['esgeelm.lic']
+ license_vars = ['ESGEE_LICENSE_FILE']
+
+ def install(self, spec, prefix):
+ installer = glob.glob('VizGlow*Install')[0]
+
+ chmod = which('chmod')
+ chmod('+x', installer)
+
+ installer = Executable(installer)
+ installer('--mode', 'silent', '--prefix', prefix)
diff --git a/var/spack/repos/builtin/packages/vtk/gcc.patch b/var/spack/repos/builtin/packages/vtk/gcc.patch
new file mode 100644
index 0000000000..37ba5ac45a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/gcc.patch
@@ -0,0 +1,21 @@
+--- old/CMake/vtkCompilerExtras.cmake
++++ new/CMake/vtkCompilerExtras.cmake
+@@ -26,6 +26,8 @@
+ execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+ OUTPUT_VARIABLE _gcc_version_info
+ ERROR_VARIABLE _gcc_version_info)
++
++ string (REPLACE ";" "" _gcc_version_info "${_gcc_version_info}")
+
+ string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
+ _gcc_version "${_gcc_version_info}")
+--- old/CMake/GenerateExportHeader.cmake
++++ new/CMake/GenerateExportHeader.cmake
+@@ -166,6 +166,7 @@
+ execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+ OUTPUT_VARIABLE _gcc_version_info
+ ERROR_VARIABLE _gcc_version_info)
++ string (REPLACE ";" "" _gcc_version_info "${_gcc_version_info}")
+ string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
+ _gcc_version "${_gcc_version_info}")
+ # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py
index 087c0e93eb..c2d5ff399f 100644
--- a/var/spack/repos/builtin/packages/vtk/package.py
+++ b/var/spack/repos/builtin/packages/vtk/package.py
@@ -22,6 +22,7 @@
# 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 *
@@ -29,60 +30,70 @@ class Vtk(Package):
"""The Visualization Toolkit (VTK) is an open-source, freely
available software system for 3D computer graphics, image
processing and visualization. """
+
homepage = "http://www.vtk.org"
- url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz"
+ base_url = "http://www.vtk.org/files/release"
- version("7.0.0", "5fe35312db5fb2341139b8e4955c367d",
- url="http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz")
+ version('7.0.0', '5fe35312db5fb2341139b8e4955c367d')
+ version('6.3.0', '0231ca4840408e9dd60af48b314c5b6d')
+ version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d')
- version("6.3.0", '0231ca4840408e9dd60af48b314c5b6d',
- url="http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz")
+ # VTK7 defaults to OpenGL2 rendering backend
+ variant('opengl2', default=True, description='Build with OpenGL2 instead of OpenGL as rendering backend')
+ variant('python', default=False, description='Build the python modules')
- version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d')
+ patch('gcc.patch')
depends_on('cmake', type='build')
- depends_on("qt")
+ depends_on('qt')
- # VTK7 defaults to OpenGL2 rendering backend
- variant('opengl2', default=True,
- description='Build with OpenGL instead of OpenGL2 backend')
+ extends('python', when='+python')
+ depends_on('python', when='+python')
+
+ def url_for_version(self, ver):
+ return '{0}/{1}/VTK-{2}.tar.gz'.format(Vtk.base_url, ver.up_to(2), ver)
def install(self, spec, prefix):
def feature_to_bool(feature, on='ON', off='OFF'):
- if feature in spec:
- return on
- return off
+ return on if '+{0}'.format(feature) in spec else off
with working_dir('spack-build', create=True):
- cmake_args = [
- "..",
- "-DBUILD_SHARED_LIBS=ON",
- # Disable wrappers for other languages.
- "-DVTK_WRAP_PYTHON=OFF",
- "-DVTK_WRAP_JAVA=OFF",
- "-DVTK_WRAP_TCL=OFF"]
- cmake_args.extend(std_cmake_args)
+ opengl_ver = 'OpenGL{0}'.format('2' if '+opengl2' in spec else '')
+ qt_ver = spec['qt'].version.up_to(1)
+ qt_bin = spec['qt'].prefix.bin
- # Enable Qt support here.
+ cmake_args = std_cmake_args[:]
cmake_args.extend([
- "-DQT_QMAKE_EXECUTABLE:PATH=%s/qmake" % spec['qt'].prefix.bin,
- "-DVTK_Group_Qt:BOOL=ON",
- # Ignore webkit because it's hard to build w/Qt
- "-DVTK_Group_Qt=OFF",
- "-DModule_vtkGUISupportQt:BOOL=ON",
- "-DModule_vtkGUISupportQtOpenGL:BOOL=ON"
- ])
+ '-DBUILD_SHARED_LIBS=ON',
+ '-DVTK_RENDERING_BACKEND:STRING={0}'.format(opengl_ver),
+
+ # Enable/Disable wrappers for Python.
+ '-DVTK_WRAP_PYTHON={0}'.format(feature_to_bool('python')),
- if spec['qt'].satisfies('@5'):
- cmake_args.append("-DVTK_QT_VERSION:STRING=5")
+ # Disable wrappers for other languages.
+ '-DVTK_WRAP_JAVA=OFF',
+ '-DVTK_WRAP_TCL=OFF',
+
+ # Enable Qt support here.
+ '-DVTK_QT_VERSION:STRING={0}'.format(qt_ver),
+ '-DQT_QMAKE_EXECUTABLE:PATH={0}/qmake'.format(qt_bin),
+ '-DVTK_Group_Qt:BOOL=ON',
+ ])
- if spec.satisfies("@6.1.0"):
- cmake_args.append("-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY")
- cmake_args.append("-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY")
+ # NOTE: The following definitions are required in order to allow
+ # VTK to build with qt~webkit versions (see the documentation for
+ # more info: http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup).
+ if '~webkit' in spec['qt']:
+ cmake_args.extend([
+ '-DVTK_Group_Qt:BOOL=OFF',
+ '-DModule_vtkGUISupportQt:BOOL=ON',
+ '-DModule_vtkGUISupportQtOpenGL:BOOL=ON',
+ ])
- cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' %
- feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL'))
+ if spec.satisfies('@:6.1.0'):
+ cmake_args.append('-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY')
+ cmake_args.append('-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY')
- cmake(*cmake_args)
+ cmake('..', *cmake_args)
make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/wannier90/make.sys b/var/spack/repos/builtin/packages/wannier90/make.sys
new file mode 100644
index 0000000000..f96fa23fb2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/wannier90/make.sys
@@ -0,0 +1,7 @@
+F90 = @F90
+COMMS=mpi
+MPIF90=@MPIF90
+FCOPTS=-O2 -fpic
+LDOPTS=-O2 -fpic
+
+LIBS = @LIBS
diff --git a/var/spack/repos/builtin/packages/wannier90/package.py b/var/spack/repos/builtin/packages/wannier90/package.py
new file mode 100644
index 0000000000..119d2cf769
--- /dev/null
+++ b/var/spack/repos/builtin/packages/wannier90/package.py
@@ -0,0 +1,116 @@
+##############################################################################
+# 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
+##############################################################################
+import inspect
+import os.path
+import shutil
+
+from spack import *
+
+
+class Wannier90(Package):
+ """Wannier90 calculates maximally-localised Wannier functions (MLWFs).
+
+ Wannier90 is released under the GNU General Public License.
+ """
+ homepage = 'http://wannier.org'
+ url = 'http://wannier.org/code/wannier90-2.0.1.tar.gz'
+
+ version('2.0.1', '4edd742506eaba93317249d33261fb22')
+
+ depends_on('mpi')
+ depends_on('lapack')
+ depends_on('blas')
+
+ parallel = False
+
+ def install(self, spec, prefix):
+
+ lapack = self.spec['lapack'].lapack_libs
+ blas = self.spec['blas'].blas_libs
+ substitutions = {
+ '@F90': spack_fc,
+ '@MPIF90': self.spec['mpi'].mpifc,
+ '@LIBS': (lapack + blas).joined()
+ }
+ #######
+ # TODO : this part is replicated in PEXSI
+ # TODO : and may be a common pattern for Editable Makefiles
+ # TODO : see #1186
+ template = join_path(
+ os.path.dirname(inspect.getmodule(self).__file__),
+ 'make.sys'
+ )
+ makefile = join_path(
+ self.stage.source_path,
+ 'make.sys'
+ )
+
+ shutil.copy(template, makefile)
+ for key, value in substitutions.items():
+ filter_file(key, value, makefile)
+ ######
+
+ make('wannier')
+ mkdirp(self.prefix.bin)
+ install(
+ join_path(self.stage.source_path, 'wannier90.x'),
+ join_path(self.prefix.bin, 'wannier90.x')
+ )
+
+ make('post')
+ install(
+ join_path(self.stage.source_path, 'postw90.x'),
+ join_path(self.prefix.bin, 'postw90.x')
+ )
+
+ make('lib')
+ mkdirp(self.prefix.lib)
+ install(
+ join_path(self.stage.source_path, 'libwannier.a'),
+ join_path(self.prefix.lib, 'libwannier.a')
+ )
+
+ make('w90chk2chk')
+ install(
+ join_path(self.stage.source_path, 'w90chk2chk.x'),
+ join_path(self.prefix.bin, 'w90chk2chk.x')
+ )
+
+ make('w90vdw')
+ install(
+ join_path(self.stage.source_path, 'utility', 'w90vdw', 'w90vdw.x'),
+ join_path(self.prefix.bin, 'w90vdw.x')
+ )
+
+ make('w90pov')
+ install(
+ join_path(self.stage.source_path, 'utility', 'w90pov', 'w90pov'),
+ join_path(self.prefix.bin, 'w90pov')
+ )
+
+ install_tree(
+ join_path(self.stage.source_path, 'pseudo'),
+ join_path(self.prefix.bin, 'pseudo')
+ )
diff --git a/var/spack/repos/builtin/packages/windowswmproto/package.py b/var/spack/repos/builtin/packages/windowswmproto/package.py
new file mode 100644
index 0000000000..f163d1afb0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/windowswmproto/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 Windowswmproto(Package):
+ """This module provides the definition of the WindowsWM extension to the
+ X11 protocol, used for coordination between an X11 server and the
+ Microsoft Windows native window manager.
+
+ WindowsWM is only intended to be used on Cygwin when running a
+ rootless XWin server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/windowswmproto"
+ url = "https://www.x.org/archive/individual/proto/windowswmproto-1.0.4.tar.gz"
+
+ version('1.0.4', '558db92a8e4e1b07e9c62eca3f04dd8d')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/x11perf/package.py b/var/spack/repos/builtin/packages/x11perf/package.py
new file mode 100644
index 0000000000..91db1e8a59
--- /dev/null
+++ b/var/spack/repos/builtin/packages/x11perf/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class X11perf(Package):
+ """Simple X server performance benchmarker."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/x11perf"
+ url = "https://www.x.org/archive/individual/app/x11perf-1.6.0.tar.gz"
+
+ version('1.6.0', '8dcdb74db8c70dca4b4eab11dc33dd31')
+
+ depends_on('libx11')
+ depends_on('libxmu')
+ depends_on('libxrender')
+ depends_on('libxft')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xauth/package.py b/var/spack/repos/builtin/packages/xauth/package.py
new file mode 100644
index 0000000000..6d6a03c899
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xauth/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Xauth(Package):
+ """The xauth program is used to edit and display the authorization
+ information used in connecting to the X server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xauth"
+ url = "https://www.x.org/archive/individual/app/xauth-1.0.9.tar.gz"
+
+ version('1.0.9', 'def3b4588504ee3d8ec7be607826df02')
+
+ depends_on('libx11')
+ depends_on('libxau')
+ depends_on('libxext')
+ depends_on('libxmu')
+
+ depends_on('xproto@7.0.17:')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ # make('check') # TODO: add package for cmdtest build dependency
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xbacklight/package.py b/var/spack/repos/builtin/packages/xbacklight/package.py
new file mode 100644
index 0000000000..f1a9ecc124
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xbacklight/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xbacklight(Package):
+ """Xbacklight is used to adjust the backlight brightness where supported.
+ It uses the RandR extension to find all outputs on the X server
+ supporting backlight brightness control and changes them all in the
+ same way."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xbacklight"
+ url = "https://www.x.org/archive/individual/app/xbacklight-1.2.1.tar.gz"
+
+ version('1.2.1', 'e8e4c86b0f867e23aa3532618a697609')
+
+ depends_on('libxcb')
+ depends_on('xcb-util')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xbiff/package.py b/var/spack/repos/builtin/packages/xbiff/package.py
new file mode 100644
index 0000000000..f5c53c5997
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xbiff/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Xbiff(Package):
+ """xbiff provides graphical notification of new e-mail.
+ It only handles mail stored in a filesystem accessible file,
+ not via IMAP, POP or other remote access protocols."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xbiff"
+ url = "https://www.x.org/archive/individual/app/xbiff-1.0.3.tar.gz"
+
+ version('1.0.3', '779c888cb45da82a612e7f47971df9ab')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxext')
+ depends_on('libx11')
+
+ depends_on('xbitmaps', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xbitmaps/package.py b/var/spack/repos/builtin/packages/xbitmaps/package.py
new file mode 100644
index 0000000000..1c6fb79d3a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xbitmaps/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 Xbitmaps(Package):
+ """The xbitmaps package contains bitmap images used by multiple
+ applications built in Xorg."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/data/bitmaps/"
+ url = "https://www.x.org/archive/individual/data/xbitmaps-1.1.1.tar.gz"
+
+ version('1.1.1', '288bbe310db67280a9e2e5ebc5602595')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcalc/package.py b/var/spack/repos/builtin/packages/xcalc/package.py
new file mode 100644
index 0000000000..a470d1c9d0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcalc/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xcalc(Package):
+ """xcalc is a scientific calculator X11 client that can emulate a TI-30
+ or an HP-10C."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xcalc"
+ url = "https://www.x.org/archive/individual/app/xcalc-1.0.6.tar.gz"
+
+ version('1.0.6', 'a192ebb5e5f33925c71713501173d8e0')
+
+ depends_on('libxaw')
+ depends_on('libxt')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-demo/package.py b/var/spack/repos/builtin/packages/xcb-demo/package.py
new file mode 100644
index 0000000000..62433e3b32
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-demo/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 XcbDemo(Package):
+ """xcb-demo: A collection of demo programs that use the XCB library."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-demo-0.1.tar.gz"
+
+ version('0.1', '803c5c91d54e734e6f6fa3f04f2463ff')
+
+ depends_on('libxcb')
+ depends_on('xcb-util')
+ depends_on('xcb-util-image')
+ depends_on('xcb-util-wm')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ # FIXME: crashes with the following error message
+ # X11/XCB/xcb.h: No such file or directory
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-proto/package.py b/var/spack/repos/builtin/packages/xcb-proto/package.py
index 587983f6bd..d2ac54d34f 100644
--- a/var/spack/repos/builtin/packages/xcb-proto/package.py
+++ b/var/spack/repos/builtin/packages/xcb-proto/package.py
@@ -26,15 +26,19 @@ from spack import *
class XcbProto(Package):
- """Protocol for libxcb"""
+ """xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to
+ generate the majority of its code and API."""
homepage = "http://xcb.freedesktop.org/"
url = "http://xcb.freedesktop.org/dist/xcb-proto-1.11.tar.gz"
+ version('1.12', '5ee1ec124ea8d56bd9e83b8e9e0b84c4')
version('1.11', 'c8c6cb72c84f58270f4db1f39607f66a')
+ extends('python')
+
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
- make()
- make("install")
+ # make('check') # fails xmllint validation
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-util-cursor/package.py b/var/spack/repos/builtin/packages/xcb-util-cursor/package.py
new file mode 100644
index 0000000000..b25fb181a6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-util-cursor/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 XcbUtilCursor(Package):
+ """The XCB util modules provides a number of libraries which sit on top
+ of libxcb, the core X protocol library, and some of the extension
+ libraries. These experimental libraries provide convenience functions
+ and interfaces which make the raw X protocol more usable. Some of the
+ libraries also provide client-side code which is not strictly part of
+ the X protocol but which have traditionally been provided by Xlib."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.3.tar.gz"
+
+ version('0.1.3', '4b0768fa497127131a47f07e5c8cf745')
+
+ depends_on('libxcb@1.4:')
+ depends_on('xcb-util-renderutil')
+ depends_on('xcb-util-image')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-util-errors/package.py b/var/spack/repos/builtin/packages/xcb-util-errors/package.py
new file mode 100644
index 0000000000..c287a0ec6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-util-errors/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 XcbUtilErrors(Package):
+ """The XCB util modules provides a number of libraries which sit on top
+ of libxcb, the core X protocol library, and some of the extension
+ libraries. These experimental libraries provide convenience functions
+ and interfaces which make the raw X protocol more usable. Some of the
+ libraries also provide client-side code which is not strictly part of
+ the X protocol but which have traditionally been provided by Xlib."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-util-errors-1.0.tar.gz"
+
+ version('1.0', 'dc4a6ce073a81a0b7e614a2988f275cc')
+
+ depends_on('libxcb@1.4:')
+
+ depends_on('xcb-proto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-util-image/package.py b/var/spack/repos/builtin/packages/xcb-util-image/package.py
new file mode 100644
index 0000000000..4413c7e11d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-util-image/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 XcbUtilImage(Package):
+ """The XCB util modules provides a number of libraries which sit on top
+ of libxcb, the core X protocol library, and some of the extension
+ libraries. These experimental libraries provide convenience functions
+ and interfaces which make the raw X protocol more usable. Some of the
+ libraries also provide client-side code which is not strictly part of
+ the X protocol but which have traditionally been provided by Xlib."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-util-image-0.4.0.tar.gz"
+
+ version('0.4.0', '32c9c2f72ebd58a2b2e210f27fee86f7')
+
+ depends_on('libxcb@1.4:')
+ depends_on('xcb-util')
+
+ depends_on('xproto@7.0.8:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py b/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py
new file mode 100644
index 0000000000..0de6391b18
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 XcbUtilKeysyms(Package):
+ """The XCB util modules provides a number of libraries which sit on top
+ of libxcb, the core X protocol library, and some of the extension
+ libraries. These experimental libraries provide convenience functions
+ and interfaces which make the raw X protocol more usable. Some of the
+ libraries also provide client-side code which is not strictly part of
+ the X protocol but which have traditionally been provided by Xlib."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-util-keysyms-0.4.0.tar.gz"
+
+ version('0.4.0', '2decde7b02b4b3bde99a02c17b64d5dc')
+
+ depends_on('libxcb@1.4:')
+
+ depends_on('xproto@7.0.8:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py b/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py
new file mode 100644
index 0000000000..d41c88206c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class XcbUtilRenderutil(Package):
+ """The XCB util modules provides a number of libraries which sit on top
+ of libxcb, the core X protocol library, and some of the extension
+ libraries. These experimental libraries provide convenience functions
+ and interfaces which make the raw X protocol more usable. Some of the
+ libraries also provide client-side code which is not strictly part of
+ the X protocol but which have traditionally been provided by Xlib."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-util-renderutil-0.3.9.tar.gz"
+
+ version('0.3.9', 'ac18c1b70ae69845e112f1d987926436')
+
+ depends_on('libxcb@1.4:')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-util-wm/package.py b/var/spack/repos/builtin/packages/xcb-util-wm/package.py
new file mode 100644
index 0000000000..ef3db06aec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-util-wm/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class XcbUtilWm(Package):
+ """The XCB util modules provides a number of libraries which sit on top
+ of libxcb, the core X protocol library, and some of the extension
+ libraries. These experimental libraries provide convenience functions
+ and interfaces which make the raw X protocol more usable. Some of the
+ libraries also provide client-side code which is not strictly part of
+ the X protocol but which have traditionally been provided by Xlib."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-util-wm-0.4.1.tar.gz"
+
+ version('0.4.1', '0831399918359bf82930124fa9fd6a9b')
+
+ depends_on('libxcb@1.4:')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcb-util/package.py b/var/spack/repos/builtin/packages/xcb-util/package.py
new file mode 100644
index 0000000000..820592a319
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcb-util/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class XcbUtil(Package):
+ """The XCB util modules provides a number of libraries which sit on top
+ of libxcb, the core X protocol library, and some of the extension
+ libraries. These experimental libraries provide convenience functions
+ and interfaces which make the raw X protocol more usable. Some of the
+ libraries also provide client-side code which is not strictly part of
+ the X protocol but which have traditionally been provided by Xlib."""
+
+ homepage = "https://xcb.freedesktop.org/"
+ url = "https://xcb.freedesktop.org/dist/xcb-util-0.4.0.tar.gz"
+
+ version('0.4.0', '157d82738aa89934b6adaf3ca508a0f5')
+
+ depends_on('libxcb@1.4:')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xclipboard/package.py b/var/spack/repos/builtin/packages/xclipboard/package.py
new file mode 100644
index 0000000000..d9af19da71
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xclipboard/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 Xclipboard(Package):
+ """xclipboard is used to collect and display text selections that are
+ sent to the CLIPBOARD by other clients. It is typically used to save
+ CLIPBOARD selections for later use. It stores each CLIPBOARD
+ selection as a separate string, each of which can be selected."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xclipboard"
+ url = "https://www.x.org/archive/individual/app/xclipboard-1.1.3.tar.gz"
+
+ version('1.1.3', 'cee91df9df1b5d63034681546fd78c0b')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt@1.1:')
+ depends_on('libx11')
+ depends_on('libxkbfile')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xclock/package.py b/var/spack/repos/builtin/packages/xclock/package.py
new file mode 100644
index 0000000000..5bd38826db
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xclock/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 Xclock(Package):
+ """xclock is the classic X Window System clock utility. It displays
+ the time in analog or digital form, continuously updated at a
+ frequency which may be specified by the user."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xclock"
+ url = "https://www.x.org/archive/individual/app/xclock-1.0.7.tar.gz"
+
+ version('1.0.7', 'bbade10e6234d8db276212014e8c77fa')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libx11')
+ depends_on('libxrender')
+ depends_on('libxft')
+ depends_on('libxkbfile')
+ depends_on('libxt')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcmiscproto/package.py b/var/spack/repos/builtin/packages/xcmiscproto/package.py
new file mode 100644
index 0000000000..2b15d1b3e7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcmiscproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Xcmiscproto(Package):
+ """XC-MISC Extension.
+
+ This extension defines a protocol that provides Xlib two ways to query
+ the server for available resource IDs."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/xcmiscproto"
+ url = "https://www.x.org/archive/individual/proto/xcmiscproto-1.2.2.tar.gz"
+
+ version('1.2.2', 'ded6cd23fb2800df93ebf2b3f3b01119')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcmsdb/package.py b/var/spack/repos/builtin/packages/xcmsdb/package.py
new file mode 100644
index 0000000000..4d12e3a843
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcmsdb/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xcmsdb(Package):
+ """xcmsdb is used to load, query, or remove Device Color Characterization
+ data stored in properties on the root window of the screen as
+ specified in section 7, Device Color Characterization, of the
+ X11 Inter-Client Communication Conventions Manual (ICCCM)."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xcmsdb"
+ url = "https://www.x.org/archive/individual/app/xcmsdb-1.0.5.tar.gz"
+
+ version('1.0.5', 'e7b1699c831b44d7005bff45977ed56a')
+
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcompmgr/package.py b/var/spack/repos/builtin/packages/xcompmgr/package.py
new file mode 100644
index 0000000000..fc5bbb4b9c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcompmgr/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Xcompmgr(Package):
+ """xcompmgr is a sample compositing manager for X servers supporting the
+ XFIXES, DAMAGE, RENDER, and COMPOSITE extensions. It enables basic
+ eye-candy effects."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xcompmgr"
+ url = "https://www.x.org/archive/individual/app/xcompmgr-1.1.7.tar.gz"
+
+ version('1.1.7', '4992895c8934bbc99bb2447dfe5081f2')
+
+ depends_on('libxcomposite')
+ depends_on('libxfixes')
+ depends_on('libxdamage')
+ depends_on('libxrender')
+ depends_on('libxext')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xconsole/package.py b/var/spack/repos/builtin/packages/xconsole/package.py
new file mode 100644
index 0000000000..f86fe753b6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xconsole/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xconsole(Package):
+ """xconsole displays in a X11 window the messages which are usually sent
+ to /dev/console."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xconsole"
+ url = "https://www.x.org/archive/individual/app/xconsole-1.0.6.tar.gz"
+
+ version('1.0.6', '46cb988e31a0cf9a02c2bbc4a82bd572')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt@1.0:')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xcursor-themes/package.py b/var/spack/repos/builtin/packages/xcursor-themes/package.py
new file mode 100644
index 0000000000..7c38c9999c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcursor-themes/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 XcursorThemes(Package):
+ """This is a default set of cursor themes for use with libXcursor,
+ originally created for the XFree86 Project, and now shipped as part
+ of the X.Org software distribution."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/data/cursors"
+ url = "https://www.x.org/archive/individual/data/xcursor-themes-1.0.4.tar.gz"
+
+ version('1.0.4', 'c82628f35e9950ba225050ad5803b92a')
+
+ depends_on('libxcursor')
+
+ depends_on('xcursorgen', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
+
+ # `make install` copies the files to the libxcursor installation.
+ # Create a fake directory to convince Spack that we actually
+ # installed something.
+ mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/xcursorgen/package.py b/var/spack/repos/builtin/packages/xcursorgen/package.py
new file mode 100644
index 0000000000..4e43844646
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xcursorgen/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xcursorgen(Package):
+ """xcursorgen prepares X11 cursor sets for use with libXcursor."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xcursorgen"
+ url = "https://www.x.org/archive/individual/app/xcursorgen-1.0.6.tar.gz"
+
+ version('1.0.6', '669df84fc30d89c12ce64b95aba26677')
+
+ depends_on('libx11')
+ depends_on('libxcursor')
+ depends_on('libpng@1.2.0:')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xdbedizzy/package.py b/var/spack/repos/builtin/packages/xdbedizzy/package.py
new file mode 100644
index 0000000000..7a8f97401f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xdbedizzy/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xdbedizzy(Package):
+ """xdbedizzy is a demo of the X11 Double Buffer Extension (DBE)
+ creating a double buffered spinning scene."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xdbedizzy"
+ url = "https://www.x.org/archive/individual/app/xdbedizzy-1.1.0.tar.gz"
+
+ version('1.1.0', '969be2f6bc62455431ab027f99720dc3')
+
+ depends_on('libx11')
+ depends_on('libxext')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xditview/package.py b/var/spack/repos/builtin/packages/xditview/package.py
new file mode 100644
index 0000000000..3fececd12e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xditview/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xditview(Package):
+ """xditview displays ditroff output on an X display."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xditview"
+ url = "https://www.x.org/archive/individual/app/xditview-1.0.4.tar.gz"
+
+ version('1.0.4', '46dffbbc4de3039fdecabb73d10d6a4f')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xdm/package.py b/var/spack/repos/builtin/packages/xdm/package.py
new file mode 100644
index 0000000000..d42ced9a57
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xdm/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 Xdm(Package):
+ """X Display Manager / XDMCP server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xdm"
+ url = "https://www.x.org/archive/individual/app/xdm-1.1.11.tar.gz"
+
+ version('1.1.11', 'aaf8c3d05d4a1e689d2d789c99a6023c')
+
+ depends_on('libxmu')
+ depends_on('libx11')
+ depends_on('libxau')
+ depends_on('libxinerama')
+ depends_on('libxft')
+ depends_on('libxpm')
+ depends_on('libxaw')
+ depends_on('libxdmcp')
+ depends_on('libxt')
+ depends_on('libxext')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xdpyinfo/package.py b/var/spack/repos/builtin/packages/xdpyinfo/package.py
new file mode 100644
index 0000000000..c69af3b357
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xdpyinfo/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 Xdpyinfo(Package):
+ """xdpyinfo is a utility for displaying information about an X server.
+
+ It is used to examine the capabilities of a server, the predefined
+ values for various parameters used in communicating between clients
+ and the server, and the different types of screens, visuals, and X11
+ protocol extensions that are available."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xdpyinfo"
+ url = "https://www.x.org/archive/individual/app/xdpyinfo-1.3.2.tar.gz"
+
+ version('1.3.2', 'dab410719d36c9df690cf3a8cd7d117e')
+
+ depends_on('libxext')
+ depends_on('libx11')
+ depends_on('libxtst')
+ depends_on('libxcb')
+
+ depends_on('xproto@7.0.22:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xdriinfo/package.py b/var/spack/repos/builtin/packages/xdriinfo/package.py
new file mode 100644
index 0000000000..7548175f6f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xdriinfo/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Xdriinfo(Package):
+ """xdriinfo - query configuration information of X11 DRI drivers."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xdriinfo"
+ url = "https://www.x.org/archive/individual/app/xdriinfo-1.0.5.tar.gz"
+
+ version('1.0.5', '34a4a9ae69c60f4c2566bf9ea4bcf311')
+
+ depends_on('libx11')
+ depends_on('expat')
+ depends_on('libxshmfence')
+ depends_on('libxext')
+ depends_on('libxdamage')
+ depends_on('libxfixes')
+ depends_on('pcre')
+
+ depends_on('glproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xedit/package.py b/var/spack/repos/builtin/packages/xedit/package.py
new file mode 100644
index 0000000000..da5f28809f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xedit/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xedit(Package):
+ """Xedit is a simple text editor for X."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/app/xedit"
+ url = "https://www.x.org/archive/individual/app/xedit-1.2.2.tar.gz"
+
+ version('1.2.2', '9fb9d6f63b574e5a4937384fbe6579c1')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt@1.0:')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py
index d0c2d3d497..9f3ad8a4dc 100644
--- a/var/spack/repos/builtin/packages/xerces-c/package.py
+++ b/var/spack/repos/builtin/packages/xerces-c/package.py
@@ -26,9 +26,9 @@ from spack import *
class XercesC(Package):
- """ Xerces-C++ is a validating XML parser written in a portable subset of C++.
- Xerces-C++ makes it easy to give your application the ability to read and
- write XML data. A shared library is provided for parsing, generating,
+ """Xerces-C++ is a validating XML parser written in a portable subset of
+ C++. Xerces-C++ makes it easy to give your application the ability to read
+ and write XML data. A shared library is provided for parsing, generating,
manipulating, and validating XML documents using the DOM, SAX, and SAX2
APIs.
"""
diff --git a/var/spack/repos/builtin/packages/xev/package.py b/var/spack/repos/builtin/packages/xev/package.py
new file mode 100644
index 0000000000..5727d4e428
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xev/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 Xev(Package):
+ """xev creates a window and then asks the X server to send it X11 events
+ whenever anything happens to the window (such as it being moved,
+ resized, typed in, clicked in, etc.). You can also attach it to an
+ existing window. It is useful for seeing what causes events to occur
+ and to display the information that they contain; it is essentially a
+ debugging and development tool, and should not be needed in normal
+ usage."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xev"
+ url = "https://www.x.org/archive/individual/app/xev-1.2.2.tar.gz"
+
+ version('1.2.2', 'fdb374f77cdad8e104b989a0148c4c1f')
+
+ depends_on('libxrandr@1.2:')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xextproto/package.py b/var/spack/repos/builtin/packages/xextproto/package.py
new file mode 100644
index 0000000000..97e65ff17b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xextproto/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 Xextproto(Package):
+ """X Protocol Extensions."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/xextproto"
+ url = "https://www.x.org/archive/individual/proto/xextproto-7.3.0.tar.gz"
+
+ version('7.3.0', '37b700baa8c8ea7964702d948dd13821')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xeyes/package.py b/var/spack/repos/builtin/packages/xeyes/package.py
new file mode 100644
index 0000000000..cfea92fda3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xeyes/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xeyes(Package):
+ """xeyes - a follow the mouse X demo, using the X SHAPE extension"""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xeyes"
+ url = "https://www.x.org/archive/individual/app/xeyes-1.1.1.tar.gz"
+
+ version('1.1.1', '2c0522bce5c61bbe784d2b3491998d31')
+
+ depends_on('libx11')
+ depends_on('libxt')
+ depends_on('libxext')
+ depends_on('libxmu')
+ depends_on('libxrender@0.4:')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xf86bigfontproto/package.py b/var/spack/repos/builtin/packages/xf86bigfontproto/package.py
new file mode 100644
index 0000000000..6c1dc8f37d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xf86bigfontproto/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# 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 Xf86bigfontproto(Package):
+ """X.org XF86BigFontProto protocol headers."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/xf86bigfontproto"
+ url = "https://www.x.org/archive/individual/proto/xf86bigfontproto-1.2.0.tar.gz"
+
+ version('1.2.0', '91b0733ff4cbe55808d96073258aa3d1')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xf86dga/package.py b/var/spack/repos/builtin/packages/xf86dga/package.py
new file mode 100644
index 0000000000..8add6fbca7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xf86dga/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xf86dga(Package):
+ """dga is a simple test client for the XFree86-DGA extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xf86dga"
+ url = "https://www.x.org/archive/individual/app/xf86dga-1.0.3.tar.gz"
+
+ version('1.0.3', '3b87bb916c9df68cf5e4e969307b25b5')
+
+ depends_on('libx11')
+ depends_on('libxxf86dga@1.1:')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xf86dgaproto/package.py b/var/spack/repos/builtin/packages/xf86dgaproto/package.py
new file mode 100644
index 0000000000..05b64c9534
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xf86dgaproto/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# 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 Xf86dgaproto(Package):
+ """X.org XF86DGAProto protocol headers."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/xf86dgaproto"
+ url = "https://www.x.org/archive/individual/proto/xf86dgaproto-2.1.tar.gz"
+
+ version('2.1', '1fe79dc07857ad3e1fb8b8f2bdd70d1b')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xf86driproto/package.py b/var/spack/repos/builtin/packages/xf86driproto/package.py
new file mode 100644
index 0000000000..655d1bc60b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xf86driproto/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xf86driproto(Package):
+ """XFree86 Direct Rendering Infrastructure Extension.
+
+ This extension defines a protocol to allow user applications to access
+ the video hardware without requiring data to be passed through the X
+ server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/xf86driproto"
+ url = "https://www.x.org/archive/individual/proto/xf86driproto-2.1.1.tar.gz"
+
+ version('2.1.1', '3ba16a48d8d9f9f746f9bd281ba8fb3f')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xf86miscproto/package.py b/var/spack/repos/builtin/packages/xf86miscproto/package.py
new file mode 100644
index 0000000000..4b7e279077
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xf86miscproto/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 Xf86miscproto(Package):
+ """This package includes the protocol definitions of the "XFree86-Misc"
+ extension to the X11 protocol. The "XFree86-Misc" extension is
+ supported by the XFree86 X server and versions of the Xorg X server
+ prior to Xorg 1.6."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/xf86miscproto"
+ url = "https://www.x.org/archive/individual/proto/xf86miscproto-0.9.3.tar.gz"
+
+ version('0.9.3', 'c6432f04f84929c94fa05b3a466c489d')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xf86rushproto/package.py b/var/spack/repos/builtin/packages/xf86rushproto/package.py
new file mode 100644
index 0000000000..bdd192970b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xf86rushproto/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# 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 Xf86rushproto(Package):
+ """X.org XF86RushProto protocol headers."""
+
+ homepage = "https://cgit.freedesktop.org/xorg/proto/xf86rushproto"
+ url = "https://www.x.org/archive/individual/proto/xf86rushproto-1.1.2.tar.gz"
+
+ version('1.1.2', '6a6389473332ace01146cccfef228576')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py b/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py
new file mode 100644
index 0000000000..ece389f9e6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Xf86vidmodeproto(Package):
+ """XFree86 Video Mode Extension.
+
+ This extension defines a protocol for dynamically configuring modelines
+ and gamma."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/xf86vidmodeproto"
+ url = "https://www.x.org/archive/individual/proto/xf86vidmodeproto-2.3.1.tar.gz"
+
+ version('2.3.1', '99016d0fe355bae0bb23ce00fb4d4a2c')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xfd/package.py b/var/spack/repos/builtin/packages/xfd/package.py
new file mode 100644
index 0000000000..669cd83bf5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfd/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Xfd(Package):
+ """xfd - display all the characters in a font using either the
+ X11 core protocol or libXft2."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xfd"
+ url = "https://www.x.org/archive/individual/app/xfd-1.1.2.tar.gz"
+
+ version('1.1.2', '12fe8f7c3e71352bf22124ad56d4ceaf')
+
+ depends_on('libxaw')
+ depends_on('fontconfig')
+ depends_on('libxft')
+ depends_on('libxrender')
+ depends_on('libxmu')
+ depends_on('libxt')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xfindproxy/package.py b/var/spack/repos/builtin/packages/xfindproxy/package.py
new file mode 100644
index 0000000000..e4b83433c4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfindproxy/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 Xfindproxy(Package):
+ """xfindproxy is used to locate available X11 proxy services.
+
+ It utilizes the Proxy Management Protocol to communicate with a proxy
+ manager. The proxy manager keeps track of all available proxy
+ services, starts new proxies when necessary, and makes sure that
+ proxies are shared whenever possible."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xfindproxy"
+ url = "https://www.x.org/archive/individual/app/xfindproxy-1.0.4.tar.gz"
+
+ version('1.0.4', 'd0a7b53ae5827b342bccd3ebc7ec672f')
+
+ depends_on('libice')
+ depends_on('libxt')
+
+ depends_on('xproto', type='build')
+ depends_on('xproxymanagementprotocol', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xfontsel/package.py b/var/spack/repos/builtin/packages/xfontsel/package.py
new file mode 100644
index 0000000000..772ff8d570
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfontsel/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xfontsel(Package):
+ """xfontsel application provides a simple way to display the X11 core
+ protocol fonts known to your X server, examine samples of each, and
+ retrieve the X Logical Font Description ("XLFD") full name for a font."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xfontsel"
+ url = "https://www.x.org/archive/individual/app/xfontsel-1.0.5.tar.gz"
+
+ version('1.0.5', '72a35e7fa786eb2b0194d75eeb4a02e3')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xfs/package.py b/var/spack/repos/builtin/packages/xfs/package.py
new file mode 100644
index 0000000000..72429dee90
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfs/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xfs(Package):
+ """X Font Server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xfs"
+ url = "https://www.x.org/archive/individual/app/xfs-1.1.4.tar.gz"
+
+ version('1.1.4', '0818a2e0317e0f0a1e8a15ca811827e2')
+
+ depends_on('libxfont@1.4.5:')
+ depends_on('font-util')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('xtrans', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xfsinfo/package.py b/var/spack/repos/builtin/packages/xfsinfo/package.py
new file mode 100644
index 0000000000..b31ad1c1e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfsinfo/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xfsinfo(Package):
+ """xfsinfo is a utility for displaying information about an X font
+ server. It is used to examine the capabilities of a server, the
+ predefined values for various parameters used in communicating between
+ clients and the server, and the font catalogues and alternate servers
+ that are available."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xfsinfo"
+ url = "https://www.x.org/archive/individual/app/xfsinfo-1.0.5.tar.gz"
+
+ version('1.0.5', '36b64a3f37b87c759c5d17634e129fb9')
+
+ depends_on('libfs')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xfwp/package.py b/var/spack/repos/builtin/packages/xfwp/package.py
new file mode 100644
index 0000000000..5f073a8806
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfwp/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xfwp(Package):
+ """xfwp proxies X11 protocol connections, such as through a firewall."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xfwp"
+ url = "https://www.x.org/archive/individual/app/xfwp-1.0.3.tar.gz"
+
+ version('1.0.3', 'e23cc01894ae57e5959ca6a56d0f4f94')
+
+ depends_on('libice')
+
+ depends_on('xproto', type='build')
+ depends_on('xproxymanagementprotocol', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ # FIXME: fails with the error message:
+ # io.c:1039:7: error: implicit declaration of function 'swab'
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xgamma/package.py b/var/spack/repos/builtin/packages/xgamma/package.py
new file mode 100644
index 0000000000..b8abec293a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xgamma/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xgamma(Package):
+ """xgamma allows X users to query and alter the gamma correction of a
+ monitor via the X video mode extension (XFree86-VidModeExtension)."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xgamma"
+ url = "https://www.x.org/archive/individual/app/xgamma-1.0.6.tar.gz"
+
+ version('1.0.6', 'ac4f91bf1d9aa0433152ba6196288cc6')
+
+ depends_on('libx11')
+ depends_on('libxxf86vm')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xgc/package.py b/var/spack/repos/builtin/packages/xgc/package.py
new file mode 100644
index 0000000000..608e6e0360
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xgc/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xgc(Package):
+ """xgc is an X11 graphics demo that shows various features of the X11
+ core protocol graphics primitives."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xgc"
+ url = "https://www.x.org/archive/individual/app/xgc-1.0.5.tar.gz"
+
+ version('1.0.5', '605557a9c138f6dc848c87a21bc7c7fc')
+
+ depends_on('libxaw')
+ depends_on('libxt')
+
+ depends_on('flex', type='build')
+ depends_on('bison', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xhost/package.py b/var/spack/repos/builtin/packages/xhost/package.py
new file mode 100644
index 0000000000..f01c481ee7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xhost/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xhost(Package):
+ """xhost is used to manage the list of host names or user names
+ allowed to make connections to the X server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xhost"
+ url = "https://www.x.org/archive/individual/app/xhost-1.0.7.tar.gz"
+
+ version('1.0.7', 'de34b4ba5194634dbeb29a1f008f495a')
+
+ depends_on('libx11')
+ depends_on('libxmu')
+ depends_on('libxau')
+
+ depends_on('xproto@7.0.22:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xineramaproto/package.py b/var/spack/repos/builtin/packages/xineramaproto/package.py
new file mode 100644
index 0000000000..baededbb25
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xineramaproto/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Xineramaproto(Package):
+ """X Xinerama Extension.
+
+ This is an X extension that allows multiple physical screens controlled
+ by a single X server to appear as a single screen."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/xineramaproto"
+ url = "https://www.x.org/archive/individual/proto/xineramaproto-1.2.1.tar.gz"
+
+ version('1.2.1', 'e0e148b11739e144a546b8a051b17dde')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xinit/package.py b/var/spack/repos/builtin/packages/xinit/package.py
new file mode 100644
index 0000000000..9f3bc09229
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xinit/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xinit(Package):
+ """The xinit program is used to start the X Window System server and a
+ first client program on systems that are not using a display manager
+ such as xdm."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xinit"
+ url = "https://www.x.org/archive/individual/app/xinit-1.3.4.tar.gz"
+
+ version('1.3.4', '91c5697345016ec7841f5e5fccbe7a4c')
+
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xinput/package.py b/var/spack/repos/builtin/packages/xinput/package.py
new file mode 100644
index 0000000000..3c4fb35503
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xinput/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xinput(Package):
+ """xinput is a utility to configure and test XInput devices."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xinput"
+ url = "https://www.x.org/archive/individual/app/xinput-1.6.2.tar.gz"
+
+ version('1.6.2', '6684f6015298d22936438173be3b7ef5')
+
+ depends_on('libx11')
+ depends_on('libxext')
+ depends_on('libxi@1.5.99.1:')
+ depends_on('libxrandr')
+ depends_on('libxinerama')
+
+ depends_on('inputproto@2.1.99.1:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xkbcomp/package.py b/var/spack/repos/builtin/packages/xkbcomp/package.py
new file mode 100644
index 0000000000..e6e8875fa7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xkbcomp/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 Xkbcomp(Package):
+ """The X Keyboard (XKB) Extension essentially replaces the core protocol
+ definition of a keyboard. The extension makes it possible to specify
+ clearly and explicitly most aspects of keyboard behaviour on a per-key
+ basis, and to track more closely the logical and physical state of a
+ keyboard. It also includes a number of keyboard controls designed to
+ make keyboards more accessible to people with physical impairments."""
+
+ homepage = "https://www.x.org/wiki/XKB/"
+ url = "https://www.x.org/archive/individual/app/xkbcomp-1.3.1.tar.gz"
+
+ version('1.3.1', '9e8ca110ed40d4703f8f73d99bc81576')
+
+ depends_on('libx11')
+ depends_on('libxkbfile')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('bison', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xkbdata/package.py b/var/spack/repos/builtin/packages/xkbdata/package.py
new file mode 100644
index 0000000000..fc84631e36
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xkbdata/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 Xkbdata(Package):
+ """The XKB data files for the various keyboard models, layouts,
+ and locales."""
+
+ homepage = "https://www.x.org/wiki/XKB/"
+ url = "https://www.x.org/archive/individual/data/xkbdata-1.0.1.tar.gz"
+
+ version('1.0.1', 'a7e0fbc9cc84c621243c777694388064')
+
+ depends_on('xkbcomp', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xkbevd/package.py b/var/spack/repos/builtin/packages/xkbevd/package.py
new file mode 100644
index 0000000000..462d989db2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xkbevd/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xkbevd(Package):
+ """XKB event daemon demo."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xkbevd"
+ url = "https://www.x.org/archive/individual/app/xkbevd-1.1.4.tar.gz"
+
+ version('1.1.4', '0e9e05761551b1e58bd541231f90ae87')
+
+ depends_on('libxkbfile')
+ depends_on('libx11')
+
+ depends_on('bison', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xkbprint/package.py b/var/spack/repos/builtin/packages/xkbprint/package.py
new file mode 100644
index 0000000000..dc92ac4126
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xkbprint/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xkbprint(Package):
+ """xkbprint generates a printable or encapsulated PostScript description
+ of an XKB keyboard description."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xkbprint"
+ url = "https://www.x.org/archive/individual/app/xkbprint-1.0.4.tar.gz"
+
+ version('1.0.4', '4dd9d4fdbdc08f70dc402da149e4d5d8')
+
+ depends_on('libxkbfile')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xkbutils/package.py b/var/spack/repos/builtin/packages/xkbutils/package.py
new file mode 100644
index 0000000000..a4c6c97578
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xkbutils/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xkbutils(Package):
+ """xkbutils is a collection of small utilities utilizing the XKeyboard
+ (XKB) extension to the X11 protocol."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xkbutils"
+ url = "https://www.x.org/archive/individual/app/xkbutils-1.0.4.tar.gz"
+
+ version('1.0.4', '6b898346b84e07c2f13b097193ca0413')
+
+ depends_on('libxaw')
+ depends_on('libxt')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('inputproto', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xkeyboard-config/package.py b/var/spack/repos/builtin/packages/xkeyboard-config/package.py
new file mode 100644
index 0000000000..3ad7ea197c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xkeyboard-config/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# 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 XkeyboardConfig(Package):
+ """This project provides a consistent, well-structured, frequently
+ released, open source database of keyboard configuration data. The
+ project is targeted to XKB-based systems."""
+
+ homepage = "https://www.freedesktop.org/wiki/Software/XKeyboardConfig/"
+ url = "https://www.x.org/archive/individual/data/xkeyboard-config/xkeyboard-config-2.18.tar.gz"
+
+ version('2.18', '96c43e04dbfbb1e6e6abd4678292062c')
+
+ depends_on('libx11@1.4.3:')
+
+ depends_on('libxslt', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('intltool@0.30:', type='build')
+ depends_on('xproto@7.0.20:', type='build')
+
+ # TODO: missing dependencies
+ # xgettext
+ # msgmerge
+ # msgfmt
+ # gmsgfmt
+ # perl@5.8.1:
+ # perl XML::Parser
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xkill/package.py b/var/spack/repos/builtin/packages/xkill/package.py
new file mode 100644
index 0000000000..061d756eec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xkill/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xkill(Package):
+ """xkill is a utility for forcing the X server to close connections to
+ clients. This program is very dangerous, but is useful for aborting
+ programs that have displayed undesired windows on a user's screen."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xkill"
+ url = "https://www.x.org/archive/individual/app/xkill-1.0.4.tar.gz"
+
+ version('1.0.4', 'b04c15bfd0b619f1e4ff3e44607e738d')
+
+ depends_on('libx11')
+ depends_on('libxmu')
+
+ depends_on('xproto@7.0.22:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xload/package.py b/var/spack/repos/builtin/packages/xload/package.py
new file mode 100644
index 0000000000..2fc91043b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xload/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xload(Package):
+ """xload displays a periodically updating histogram of the
+ system load average."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xload"
+ url = "https://www.x.org/archive/individual/app/xload-1.1.2.tar.gz"
+
+ version('1.1.2', '0af9a68193849b16f8168f096682efb4')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xlogo/package.py b/var/spack/repos/builtin/packages/xlogo/package.py
new file mode 100644
index 0000000000..77f5bd3639
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xlogo/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# 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 Xlogo(Package):
+ """The xlogo program simply displays the X Window System logo."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xlogo"
+ url = "https://www.x.org/archive/individual/app/xlogo-1.0.4.tar.gz"
+
+ version('1.0.4', '4c4f82c196a55a90800a77906f4353fb')
+
+ depends_on('libsm')
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt@1.0:')
+ depends_on('libxext')
+ depends_on('libx11')
+ depends_on('libxft')
+ depends_on('libxrender')
+ depends_on('libxt')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xlsatoms/package.py b/var/spack/repos/builtin/packages/xlsatoms/package.py
new file mode 100644
index 0000000000..8722b57c8c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xlsatoms/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xlsatoms(Package):
+ """xlsatoms lists the interned atoms defined on an X11 server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xlsatoms"
+ url = "https://www.x.org/archive/individual/app/xlsatoms-1.1.2.tar.gz"
+
+ version('1.1.2', '1f32e2b8c2135b5867291517848cb396')
+
+ depends_on('libxcb', when='@1.1:')
+ depends_on('libx11', when='@:1.0')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xlsclients/package.py b/var/spack/repos/builtin/packages/xlsclients/package.py
new file mode 100644
index 0000000000..3714de2706
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xlsclients/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xlsclients(Package):
+ """xlsclients is a utility for listing information about the client
+ applications running on a X11 server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xlsclients"
+ url = "https://www.x.org/archive/individual/app/xlsclients-1.1.3.tar.gz"
+
+ version('1.1.3', '093c748d98b61dbddcaf3de1740fbd26')
+
+ depends_on('libxcb@1.6:', when='@1.1:')
+ depends_on('libx11', when='@:1.0')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xlsfonts/package.py b/var/spack/repos/builtin/packages/xlsfonts/package.py
new file mode 100644
index 0000000000..011ca5aa0e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xlsfonts/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xlsfonts(Package):
+ """xlsfonts lists fonts available from an X server via the X11
+ core protocol."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xlsfonts"
+ url = "https://www.x.org/archive/individual/app/xlsfonts-1.0.5.tar.gz"
+
+ version('1.0.5', '074cc44e5238c6a501523ef06caba517')
+
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xmag/package.py b/var/spack/repos/builtin/packages/xmag/package.py
new file mode 100644
index 0000000000..27843299c8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xmag/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xmag(Package):
+ """xmag displays a magnified snapshot of a portion of an X11 screen."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xmag"
+ url = "https://www.x.org/archive/individual/app/xmag-1.0.6.tar.gz"
+
+ version('1.0.6', '2827ae4b293535623b9f7b659c506dcd')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xman/package.py b/var/spack/repos/builtin/packages/xman/package.py
new file mode 100644
index 0000000000..629a457edc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xman/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xman(Package):
+ """xman is a graphical manual page browser using the Athena Widgets (Xaw)
+ toolkit."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xman"
+ url = "https://www.x.org/archive/individual/app/xman-1.1.4.tar.gz"
+
+ version('1.1.4', 'f4238c79ee7227ea193898fc159f31e5')
+
+ depends_on('libxaw')
+ depends_on('libxt')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xmessage/package.py b/var/spack/repos/builtin/packages/xmessage/package.py
new file mode 100644
index 0000000000..9b2ee5102e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xmessage/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xmessage(Package):
+ """xmessage displays a message or query in a window. The user can click
+ on an "okay" button to dismiss it or can select one of several buttons
+ to answer a question. xmessage can also exit after a specified time."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xmessage"
+ url = "https://www.x.org/archive/individual/app/xmessage-1.0.4.tar.gz"
+
+ version('1.0.4', '69df5761fbec14c782948065a6f36028')
+
+ depends_on('libxaw')
+ depends_on('libxt')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xmh/package.py b/var/spack/repos/builtin/packages/xmh/package.py
new file mode 100644
index 0000000000..cdde63e149
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xmh/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 Xmh(Package):
+ """The xmh program provides a graphical user interface to the
+ MH Message Handling System. To actually do things with your
+ mail, it makes calls to the MH package."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xmh"
+ url = "https://www.x.org/archive/individual/app/xmh-1.0.3.tar.gz"
+
+ version('1.0.3', '7547c5a5ab7309a1b10e8ecf48e60105')
+
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libxt')
+ depends_on('libx11')
+
+ depends_on('xbitmaps@1.1.0:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xmlto/package.py b/var/spack/repos/builtin/packages/xmlto/package.py
new file mode 100644
index 0000000000..0dbc81de32
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xmlto/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xmlto(Package):
+ """Utility xmlto is a simple shell script for converting XML files to various
+ formats. It serves as easy to use command line frontend to make fine output
+ without remembering many long options and searching for the syntax of the
+ backends."""
+
+ homepage = "http://cyberelk.net/tim/software/xmlto/"
+ url = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-0.0.28.tar.gz"
+
+ version('0.0.28', 'a1fefad9d83499a15576768f60f847c6')
+
+ # FIXME: missing a lot of dependencies
+ depends_on('libxslt')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xmodmap/package.py b/var/spack/repos/builtin/packages/xmodmap/package.py
new file mode 100644
index 0000000000..abe40dbb43
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xmodmap/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xmodmap(Package):
+ """The xmodmap program is used to edit and display the keyboard modifier
+ map and keymap table that are used by client applications to convert
+ event keycodes into keysyms. It is usually run from the user's
+ session startup script to configure the keyboard according to personal
+ tastes."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xmodmap"
+ url = "https://www.x.org/archive/individual/app/xmodmap-1.0.9.tar.gz"
+
+ version('1.0.9', '771cf86bcdc3589e7add2e761f675099')
+
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.25:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xmore/package.py b/var/spack/repos/builtin/packages/xmore/package.py
new file mode 100644
index 0000000000..8f8ccd7138
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xmore/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xmore(Package):
+ """xmore - plain text display program for the X Window System."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xmore"
+ url = "https://www.x.org/archive/individual/app/xmore-1.0.2.tar.gz"
+
+ version('1.0.2', '40b1850494f8af0939a1989c399efa11')
+
+ depends_on('libxaw')
+ depends_on('libxt')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xorg-cf-files/package.py b/var/spack/repos/builtin/packages/xorg-cf-files/package.py
new file mode 100644
index 0000000000..c7b22d904f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorg-cf-files/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 XorgCfFiles(Package):
+ """The xorg-cf-files package contains the data files for the imake utility,
+ defining the known settings for a wide variety of platforms (many of which
+ have not been verified or tested in over a decade), and for many of the
+ libraries formerly delivered in the X.Org monolithic releases."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/util/cf"
+ url = "https://www.x.org/archive/individual/util/xorg-cf-files-1.0.6.tar.gz"
+
+ version('1.0.6', 'c0ce98377c70d95fb48e1bd856109bf8')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xorg-docs/package.py b/var/spack/repos/builtin/packages/xorg-docs/package.py
new file mode 100644
index 0000000000..5c320bba7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorg-docs/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 XorgDocs(Package):
+ """This package provides miscellaneous documentation for the X Window
+ System that doesn't better fit into other packages.
+
+ The preferred documentation format for these documents is DocBook XML."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/doc/xorg-docs"
+ url = "https://www.x.org/archive/individual/doc/xorg-docs-1.7.1.tar.gz"
+
+ version('1.7.1', 'ca689ccbf8ebc362afbe5cc5792a4abd')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+ depends_on('xorg-sgml-doctools@1.8:', type='build')
+ depends_on('xmlto', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xorg-gtest/package.py b/var/spack/repos/builtin/packages/xorg-gtest/package.py
new file mode 100644
index 0000000000..6978d610d3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorg-gtest/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 XorgGtest(Package):
+ """Provides a Google Test environment for starting and stopping
+ a X server for testing purposes."""
+
+ homepage = "https://people.freedesktop.org/~cndougla/xorg-gtest/"
+ url = "https://www.x.org/archive/individual/test/xorg-gtest-0.7.1.tar.bz2"
+
+ version('0.7.1', '31beb4d7d2b4eba7f9265fa0cb4c6428')
+
+ depends_on('libx11')
+ depends_on('libxi')
+ depends_on('xorg-server')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ # TODO: may be missing evemu package?
+ # TODO: what is the difference between xorg-gtest and googletest packages?
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xorg-server/package.py b/var/spack/repos/builtin/packages/xorg-server/package.py
new file mode 100644
index 0000000000..9d9b49f9c2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorg-server/package.py
@@ -0,0 +1,108 @@
+##############################################################################
+# 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 XorgServer(Package):
+ """X.Org Server is the free and open source implementation of the display
+ server for the X Window System stewarded by the X.Org Foundation."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/xserver"
+ url = "https://www.x.org/archive/individual/xserver/xorg-server-1.18.99.901.tar.gz"
+
+ version('1.18.99.901', 'd0242b95991c221c4fcc0d283aba7a42')
+
+ depends_on('pixman@0.27.2:')
+ depends_on('font-util')
+ depends_on('libxshmfence@1.1:')
+ depends_on('libdrm@2.3.0:')
+ depends_on('libx11')
+ # depends_on('gl@9.2.0:')
+
+ depends_on('dri2proto@2.8:', type='build')
+ depends_on('dri3proto@1.0:', type='build')
+ depends_on('glproto@1.4.17:', type='build')
+
+ depends_on('flex', type='build')
+ depends_on('bison', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ # TODO: add missing dependencies
+ # $LIBSELINUX $REQUIRED_MODULES $REQUIRED_LIBS
+ # $LIBPCIACCESS $DGAPROTO $XORG_MODULES epoxy xdmcp xau xfixes x11-xcb
+ # xcb-aux xcb-image xcb-ewmh xcb-icccm $WINDOWSWMPROTO windowsdriproto
+ # khronos-opengl-registry
+ # $APPLEWMPROTO $LIBAPPLEWM xfixes $LIBDMX $LIBXEXT $LIBDMX xmu $LIBXEXT
+ # $LIBDMX $LIBXI $LIBXEXT $LIBXTST $LIBXEXT xres $LIBXEXT $LIBXEXT
+ # $XEPHYR_REQUIRED_LIBS
+
+ # VIDEOPROTO="videoproto"
+ # COMPOSITEPROTO="compositeproto >= 0.4"
+ # RECORDPROTO="recordproto >= 1.13.99.1"
+ # SCRNSAVERPROTO="scrnsaverproto >= 1.1"
+ # RESOURCEPROTO="resourceproto >= 1.2.0"
+ # DRIPROTO="xf86driproto >= 2.1.0"
+ # XINERAMAPROTO="xineramaproto"
+ # BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
+ # DGAPROTO="xf86dgaproto >= 2.0.99.1"
+ # DMXPROTO="dmxproto >= 2.2.99.1"
+ # VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
+ # WINDOWSWMPROTO="windowswmproto"
+ # APPLEWMPROTO="applewmproto >= 1.4"
+
+ # XPROTO="xproto >= 7.0.28"
+ # RANDRPROTO="randrproto >= 1.5.0"
+ # RENDERPROTO="renderproto >= 0.11"
+ # XEXTPROTO="xextproto >= 7.2.99.901"
+ # INPUTPROTO="inputproto >= 2.3"
+ # KBPROTO="kbproto >= 1.0.3"
+ # FONTSPROTO="fontsproto >= 2.1.3"
+ # FIXESPROTO="fixesproto >= 5.0"
+ # DAMAGEPROTO="damageproto >= 1.1"
+ # XCMISCPROTO="xcmiscproto >= 1.2.0"
+ # BIGREQSPROTO="bigreqsproto >= 1.1.0"
+ # XTRANS="xtrans >= 1.3.5"
+ # PRESENTPROTO="presentproto >= 1.0"
+
+ # LIBAPPLEWM="applewm >= 1.4"
+ # LIBDMX="dmx >= 1.0.99.1"
+ # LIBDRI="dri >= 7.8.0"
+ # LIBEGL="egl"
+ # LIBGBM="gbm >= 10.2.0"
+ # LIBXEXT="xext >= 1.0.99.4"
+ # LIBXFONT="xfont2 >= 2.0.0"
+ # LIBXI="xi >= 1.2.99.1"
+ # LIBXTST="xtst >= 1.0.99.2"
+ # LIBPCIACCESS="pciaccess >= 0.12.901"
+ # LIBUDEV="libudev >= 143"
+ # LIBSELINUX="libselinux >= 2.0.86"
+ # LIBDBUS="dbus-1 >= 1.0"
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py b/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py
new file mode 100644
index 0000000000..c2e5797efa
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 XorgSgmlDoctools(Package):
+ """This package provides a common set of SGML entities and XML/CSS style
+ sheets used in building/formatting the documentation provided in other
+ X.Org packages."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/doc/xorg-sgml-doctools"
+ url = "https://www.x.org/archive/individual/doc/xorg-sgml-doctools-1.11.tar.gz"
+
+ version('1.11', '51cf4c6b476e2b98a068fea6975b9b21')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xphelloworld/package.py b/var/spack/repos/builtin/packages/xphelloworld/package.py
new file mode 100644
index 0000000000..6d445d69be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xphelloworld/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 Xphelloworld(Package):
+ """Xprint sample applications."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xphelloworld"
+ url = "https://www.x.org/archive/individual/app/xphelloworld-1.0.1.tar.gz"
+
+ version('1.0.1', 'b1851337a8e850d5c8e5a5ca5e3033da')
+
+ depends_on('libx11')
+ depends_on('libxaw')
+ depends_on('libxprintapputil')
+ depends_on('libxprintutil')
+ depends_on('libxp')
+ depends_on('libxt')
+
+ # FIXME: xphelloworld requires libxaw8, but libxaw only provides 6 and 7.
+ # It looks like xprint support was removed from libxaw at some point.
+ # But even the oldest version of libxaw doesn't build libxaw8.
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xplsprinters/package.py b/var/spack/repos/builtin/packages/xplsprinters/package.py
new file mode 100644
index 0000000000..55de272a33
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xplsprinters/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xplsprinters(Package):
+ """List Xprint printers."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xplsprinters"
+ url = "https://www.x.org/archive/individual/app/xplsprinters-1.0.1.tar.gz"
+
+ version('1.0.1', '8e5698b5a2a2a0fc78caeb23909dd284')
+
+ depends_on('libxp')
+ depends_on('libxprintutil')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xpr/package.py b/var/spack/repos/builtin/packages/xpr/package.py
new file mode 100644
index 0000000000..669693e084
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xpr/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xpr(Package):
+ """xpr takes as input a window dump file produced by xwd
+ and formats it for output on various types of printers."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xpr"
+ url = "https://www.x.org/archive/individual/app/xpr-1.0.4.tar.gz"
+
+ version('1.0.4', '6adfa60f458474c0c226454c233fc32f')
+
+ depends_on('libxmu')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xprehashprinterlist/package.py b/var/spack/repos/builtin/packages/xprehashprinterlist/package.py
new file mode 100644
index 0000000000..4578c3c191
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xprehashprinterlist/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xprehashprinterlist(Package):
+ """Rehash list of Xprint printers."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xprehashprinterlist"
+ url = "https://www.x.org/archive/individual/app/xprehashprinterlist-1.0.1.tar.gz"
+
+ version('1.0.1', '395578955634e4b2daa5b78f6fa9222c')
+
+ depends_on('libxp')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xprop/package.py b/var/spack/repos/builtin/packages/xprop/package.py
new file mode 100644
index 0000000000..0e1a591bcb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xprop/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xprop(Package):
+ """xprop is a command line tool to display and/or set window and font
+ properties of an X server."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xprop"
+ url = "https://www.x.org/archive/individual/app/xprop-1.2.2.tar.gz"
+
+ version('1.2.2', 'db03a6bcf7b0d0c2e691ea3083277cbc')
+
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py
index dbceaa1575..67074a6993 100644
--- a/var/spack/repos/builtin/packages/xproto/package.py
+++ b/var/spack/repos/builtin/packages/xproto/package.py
@@ -26,17 +26,24 @@ from spack import *
class Xproto(Package):
- """The Xorg protocol headers provide the header files required to
- build the system, and to allow other applications to build against
- the installed X Window system."""
- homepage = "http://www.x.org/"
- url = "https://www.x.org/archive//individual/proto/xproto-7.0.29.tar.gz"
+ """X Window System Core Protocol.
+
+ This package provides the headers and specification documents defining
+ the X Window System Core Protocol, Version 11.
+
+ It also includes a number of headers that aren't purely protocol related,
+ but are depended upon by many other X Window System packages to provide
+ common definitions and porting layer."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/x11proto"
+ url = "https://www.x.org/archive/individual/proto/xproto-7.0.29.tar.gz"
version('7.0.29', '16a78dd2c5ad73011105c96235f6a0af')
- depends_on("xorg-util-macros")
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
- make()
- make("install")
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py b/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py
new file mode 100644
index 0000000000..e5bfcb8cbc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 Xproxymanagementprotocol(Package):
+ """The Proxy Management Protocol is an ICE based protocol that provides a
+ way for application servers to easily locate proxy services available to
+ them."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/proto/pmproto"
+ url = "https://www.x.org/archive/individual/proto/xproxymanagementprotocol-1.0.3.tar.gz"
+
+ version('1.0.3', 'c4ab05a6174b4e9b6ae5b7cfbb6d718e')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xrandr/package.py b/var/spack/repos/builtin/packages/xrandr/package.py
new file mode 100644
index 0000000000..35e21c6047
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xrandr/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xrandr(Package):
+ """xrandr - primitive command line interface to X11 Resize, Rotate, and
+ Reflect (RandR) extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xrandr"
+ url = "https://www.x.org/archive/individual/app/xrandr-1.5.0.tar.gz"
+
+ version('1.5.0', 'fe9cf76033fe5d973131eac67b6a3118')
+
+ depends_on('libxrandr@1.5:')
+ depends_on('libxrender')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xrdb/package.py b/var/spack/repos/builtin/packages/xrdb/package.py
new file mode 100644
index 0000000000..93847a19a0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xrdb/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xrdb(Package):
+ """xrdb - X server resource database utility."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xrdb"
+ url = "https://www.x.org/archive/individual/app/xrdb-1.1.0.tar.gz"
+
+ version('1.1.0', 'd48983e561ef8b4b2e245feb584c11ce')
+
+ depends_on('libxmu')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xrefresh/package.py b/var/spack/repos/builtin/packages/xrefresh/package.py
new file mode 100644
index 0000000000..f99810beea
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xrefresh/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xrefresh(Package):
+ """xrefresh - refresh all or part of an X screen."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xrefresh"
+ url = "https://www.x.org/archive/individual/app/xrefresh-1.0.5.tar.gz"
+
+ version('1.0.5', 'e41c5148d894406484af59887257c465')
+
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py
new file mode 100644
index 0000000000..db076dbc56
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xrootd/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 Xrootd(Package):
+ """The XROOTD project aims at giving high performance, scalable fault
+ tolerant access to data repositories of many kinds."""
+ homepage = "http://xrootd.org"
+ url = "http://xrootd.org/download/v4.3.0/xrootd-4.3.0.tar.gz"
+
+ version('4.3.0', '39c2fab9f632f35e12ff607ccaf9e16c')
+
+ depends_on('cmake', type='build')
+
+ def install(self, spec, prefix):
+ options = []
+ options.extend(std_cmake_args)
+
+ build_directory = join_path(self.stage.path, 'spack-build')
+ source_directory = self.stage.source_path
+
+ if '+debug' in spec:
+ options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
+
+ with working_dir(build_directory, create=True):
+ cmake(source_directory, *options)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/xrx/package.py b/var/spack/repos/builtin/packages/xrx/package.py
new file mode 100644
index 0000000000..4457c2f164
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xrx/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# 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 Xrx(Package):
+ """The remote execution (RX) service specifies a MIME format for invoking
+ applications remotely, for example via a World Wide Web browser. This
+ RX format specifies a syntax for listing network services required by
+ the application, for example an X display server. The requesting Web
+ browser must identify specific instances of the services in the request
+ to invoke the application."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xrx"
+ url = "https://www.x.org/archive/individual/app/xrx-1.0.4.tar.gz"
+
+ version('1.0.4', 'dd4b8bf6eca5fc5be5df30c14050074c')
+
+ depends_on('libx11')
+ depends_on('libxt')
+ depends_on('libxext')
+ depends_on('libxau')
+ depends_on('libice')
+ depends_on('libxaw')
+
+ depends_on('xtrans', type='build')
+ depends_on('xproxymanagementprotocol', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xscope/package.py b/var/spack/repos/builtin/packages/xscope/package.py
new file mode 100644
index 0000000000..cf33c9767e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xscope/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Xscope(Package):
+ """XSCOPE -- a program to monitor X11/Client conversations."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xscope"
+ url = "https://www.x.org/archive/individual/app/xscope-1.4.1.tar.gz"
+
+ version('1.4.1', 'c476fb73b354f4a5c388f3814052ce0d')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('xtrans', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xset/package.py b/var/spack/repos/builtin/packages/xset/package.py
new file mode 100644
index 0000000000..462bea8cfe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xset/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xset(Package):
+ """User preference utility for X."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xset"
+ url = "https://www.x.org/archive/individual/app/xset-1.2.3.tar.gz"
+
+ version('1.2.3', '1a76965ed0e8cb51d3fa04d458cb3d8f')
+
+ depends_on('libxmu')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xsetmode/package.py b/var/spack/repos/builtin/packages/xsetmode/package.py
new file mode 100644
index 0000000000..f05fd0f123
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xsetmode/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xsetmode(Package):
+ """Set the mode for an X Input device."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xsetmode"
+ url = "https://www.x.org/archive/individual/app/xsetmode-1.0.0.tar.gz"
+
+ version('1.0.0', '0dc2a917138d0345c00e016ac720e085')
+
+ depends_on('libxi')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xsetpointer/package.py b/var/spack/repos/builtin/packages/xsetpointer/package.py
new file mode 100644
index 0000000000..e9bf2fc9fe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xsetpointer/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xsetpointer(Package):
+ """Set an X Input device as the main pointer."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xsetpointer"
+ url = "https://www.x.org/archive/individual/app/xsetpointer-1.0.1.tar.gz"
+
+ version('1.0.1', 'bb206b6875f2428c2281e1165b6c7f88')
+
+ depends_on('libxi')
+ depends_on('libx11')
+
+ depends_on('inputproto@1.4:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xsetroot/package.py b/var/spack/repos/builtin/packages/xsetroot/package.py
new file mode 100644
index 0000000000..3e62d41e9b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xsetroot/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xsetroot(Package):
+ """xsetroot - root window parameter setting utility for X."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xsetroot"
+ url = "https://www.x.org/archive/individual/app/xsetroot-1.1.1.tar.gz"
+
+ version('1.1.1', '8c794914a2d0456317288c41451dbee3')
+
+ depends_on('libxmu')
+ depends_on('libx11')
+ depends_on('libxcursor')
+
+ depends_on('xbitmaps', type='build')
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xsm/package.py b/var/spack/repos/builtin/packages/xsm/package.py
new file mode 100644
index 0000000000..9d9c896365
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xsm/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Xsm(Package):
+ """X Session Manager."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xsm"
+ url = "https://www.x.org/archive/individual/app/xsm-1.0.3.tar.gz"
+
+ version('1.0.3', '60a2e5987d8e49a568599ba8fe59c8db')
+
+ depends_on('libx11')
+ depends_on('libxt@1.1.0:')
+ depends_on('libice')
+ depends_on('libsm')
+ depends_on('libxaw')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xstdcmap/package.py b/var/spack/repos/builtin/packages/xstdcmap/package.py
new file mode 100644
index 0000000000..bb19bdff1a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xstdcmap/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xstdcmap(Package):
+ """The xstdcmap utility can be used to selectively define standard colormap
+ properties. It is intended to be run from a user's X startup script to
+ create standard colormap definitions in order to facilitate sharing of
+ scarce colormap resources among clients using PseudoColor visuals."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xstdcmap"
+ url = "https://www.x.org/archive/individual/app/xstdcmap-1.0.3.tar.gz"
+
+ version('1.0.3', '70c1fd18b79c3ea1dae136e2eabe1c82')
+
+ depends_on('libxmu')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xtrans/package.py b/var/spack/repos/builtin/packages/xtrans/package.py
new file mode 100644
index 0000000000..ed46059d9d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xtrans/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# 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 Xtrans(Package):
+ """xtrans is a library of code that is shared among various X packages to
+ handle network protocol transport in a modular fashion, allowing a
+ single place to add new transport types. It is used by the X server,
+ libX11, libICE, the X font server, and related components."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/lib/libxtrans"
+ url = "https://www.x.org/archive//individual/lib/xtrans-1.3.5.tar.gz"
+
+ version('1.3.5', '6e4eac1b7c6591da0753052e1eccfb58')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xtrap/package.py b/var/spack/repos/builtin/packages/xtrap/package.py
new file mode 100644
index 0000000000..405ec2f848
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xtrap/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 Xtrap(Package):
+ """XTrap sample clients."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xtrap"
+ url = "https://www.x.org/archive/individual/app/xtrap-1.0.2.tar.gz"
+
+ version('1.0.2', '601e4945535d2d25eb1bc640332e2363')
+
+ depends_on('libx11')
+ depends_on('libxtrap')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xts/package.py b/var/spack/repos/builtin/packages/xts/package.py
new file mode 100644
index 0000000000..c3993cf391
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xts/package.py
@@ -0,0 +1,60 @@
+##############################################################################
+# 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 Xts(Package):
+ """This is a revamped version of X Test Suite (XTS) which removes some of
+ the ugliness of building and running the tests."""
+
+ homepage = "https://www.x.org/wiki/XorgTesting/"
+ url = "https://www.x.org/archive/individual/test/xts-0.99.1.tar.gz"
+
+ version('0.99.1', '1e5443fede389be606f3745a71483bac')
+
+ depends_on('libx11')
+ depends_on('libxext')
+ depends_on('libxi')
+ depends_on('libxtst')
+ depends_on('libxau')
+ depends_on('libxt')
+ depends_on('libxmu')
+ depends_on('libxaw')
+
+ depends_on('xtrans', type='build')
+ depends_on('bdftopcf', type='build')
+ depends_on('mkfontdir', type='build')
+ depends_on('perl', type='build')
+ depends_on('xset', type='build')
+ depends_on('xdpyinfo', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ # FIXME: Crashes during compilation
+ # error: redeclaration of enumerator 'XawChainTop'
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xvidtune/package.py b/var/spack/repos/builtin/packages/xvidtune/package.py
new file mode 100644
index 0000000000..ac5352df5f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xvidtune/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Xvidtune(Package):
+ """xvidtune is a client interface to the X server video mode
+ extension (XFree86-VidModeExtension)."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xvidtune"
+ url = "https://www.x.org/archive/individual/app/xvidtune-1.0.3.tar.gz"
+
+ version('1.0.3', 'e0c31d78741ae4aab2f4bfcc2abd4a3d')
+
+ depends_on('libxxf86vm')
+ depends_on('libxt')
+ depends_on('libxaw')
+ depends_on('libxmu')
+ depends_on('libx11')
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xvinfo/package.py b/var/spack/repos/builtin/packages/xvinfo/package.py
new file mode 100644
index 0000000000..359f1f23de
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xvinfo/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xvinfo(Package):
+ """xvinfo prints out the capabilities of any video adaptors associated
+ with the display that are accessible through the X-Video extension."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xvinfo"
+ url = "https://www.x.org/archive/individual/app/xvinfo-1.1.3.tar.gz"
+
+ version('1.1.3', '6890a19226c07344ae12e7a2ef12f2c6')
+
+ depends_on('libxv')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.25:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xwd/package.py b/var/spack/repos/builtin/packages/xwd/package.py
new file mode 100644
index 0000000000..d1f9ee1dfb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xwd/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xwd(Package):
+ """xwd - dump an image of an X window."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xwd"
+ url = "https://www.x.org/archive/individual/app/xwd-1.0.6.tar.gz"
+
+ version('1.0.6', 'd6c132f5f00188ce2a1393f12bd34ad4')
+
+ depends_on('libx11')
+ depends_on('libxkbfile')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xwininfo/package.py b/var/spack/repos/builtin/packages/xwininfo/package.py
new file mode 100644
index 0000000000..bba97ca671
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xwininfo/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# 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 Xwininfo(Package):
+ """xwininfo prints information about windows on an X server. Various
+ information is displayed depending on which options are selected."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xwininfo"
+ url = "https://www.x.org/archive/individual/app/xwininfo-1.1.3.tar.gz"
+
+ version('1.1.3', 'd26623fe240659a320367bc453f1d301')
+
+ depends_on('libxcb@1.6:')
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xwud/package.py b/var/spack/repos/builtin/packages/xwud/package.py
new file mode 100644
index 0000000000..a30d55b7c6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xwud/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 Xwud(Package):
+ """xwud allows X users to display in a window an image saved in a
+ specially formatted dump file, such as produced by xwd."""
+
+ homepage = "http://cgit.freedesktop.org/xorg/app/xwud"
+ url = "https://www.x.org/archive/individual/app/xwud-1.0.4.tar.gz"
+
+ version('1.0.4', 'bb44485a37496f0121e5843bcf5bb01b')
+
+ depends_on('libx11')
+
+ depends_on('xproto@7.0.17:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ configure('--prefix={0}'.format(prefix))
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/xz/package.py b/var/spack/repos/builtin/packages/xz/package.py
index a8ab959a62..8b0609f50e 100644
--- a/var/spack/repos/builtin/packages/xz/package.py
+++ b/var/spack/repos/builtin/packages/xz/package.py
@@ -37,6 +37,9 @@ class Xz(Package):
version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure('--prefix={0}'.format(prefix))
+
make()
- make("install")
+ if self.run_tests:
+ make('check')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/zeromq/package.py b/var/spack/repos/builtin/packages/zeromq/package.py
index 6a657dc39c..cafd3c2125 100644
--- a/var/spack/repos/builtin/packages/zeromq/package.py
+++ b/var/spack/repos/builtin/packages/zeromq/package.py
@@ -30,6 +30,7 @@ class Zeromq(Package):
homepage = "http://zguide.zeromq.org/"
url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz"
+ version('4.1.4', 'a611ecc93fffeb6d058c0e6edf4ad4fb')
version('4.1.2', '159c0c56a895472f02668e692d122685')
version('4.1.1', '0a4b44aa085644f25c177f79dc13f253')
version('4.0.7', '9b46f7e7b0704b83638ef0d461fd59ab')
@@ -37,6 +38,7 @@ class Zeromq(Package):
version('4.0.5', '73c39f5eb01b9d7eaf74a5d899f1d03d')
depends_on("libsodium")
+ depends_on("libsodium@:1.0.3", when='@:4.1.2')
def install(self, spec, prefix):
configure("--with-libsodium", "--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py
index 6d799fb05a..dfe7b4fdc1 100644
--- a/var/spack/repos/builtin/packages/zlib/package.py
+++ b/var/spack/repos/builtin/packages/zlib/package.py
@@ -25,17 +25,11 @@
from spack import *
-class Zlib(Package):
+class Zlib(AutotoolsPackage):
"""A free, general-purpose, legally unencumbered lossless
data-compression library."""
homepage = "http://zlib.net"
- url = "http://zlib.net/zlib-1.2.8.tar.gz"
+ url = "http://zlib.net/zlib-1.2.8.tar.gz"
version('1.2.8', '44d667c142d7cda120332623eab69f40')
-
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
-
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
index 0094395968..8d4dd321b0 100644
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -22,10 +22,11 @@
# 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 re
import os
import glob
-from spack import *
class Zoltan(Package):
@@ -47,23 +48,28 @@ class Zoltan(Package):
version('3.6', '9cce794f7241ecd8dbea36c3d7a880f9')
version('3.3', '5eb8f00bda634b25ceefa0122bd18d65')
- variant('debug', default=False,
- description='Builds a debug version of the library')
- variant('shared', default=True,
- description='Builds a shared version of the library')
+ variant('debug', default=False, description='Builds a debug version of the library.')
+ variant('shared', default=True, description='Builds a shared version of the library.')
- variant('fortran', default=True, description='Enable Fortran support')
- variant('mpi', default=False, description='Enable MPI support')
+ variant('fortran', default=True, description='Enable Fortran support.')
+ variant('mpi', default=True, description='Enable MPI support.')
depends_on('mpi', when='+mpi')
+ def url_for_version(self, version):
+ return '%s/zoltan_distrib_v%s.tar.gz' % (Zoltan.base_url, version)
+
def install(self, spec, prefix):
- config_args = [
- '--enable-f90interface'
- if '+fortan' in spec else '--disable-f90interface',
+ # FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers
+ # because of some complicated generic type problem.
+ if spec.satisfies('@:3.6+fortran+mpi'):
+ raise RuntimeError(('Cannot build Zoltan v{0} with +fortran and '
+ '+mpi; please disable one of these features '
+ 'or upgrade versions.').format(self.version))
- '--enable-mpi'
- if '+mpi' in spec else '--disable-mpi',
+ config_args = [
+ self.get_config_flag('f90interface', 'fortran'),
+ self.get_config_flag('mpi', 'mpi'),
]
config_cflags = [
'-O0' if '+debug' in spec else '-O3',
@@ -71,49 +77,70 @@ class Zoltan(Package):
]
if '+shared' in spec:
- config_args.append('--with-ar=$(CXX) -shared $(LDFLAGS) -o')
config_args.append('RANLIB=echo')
+ config_args.append('--with-ar=$(CXX) -shared $(LDFLAGS) -o')
config_cflags.append('-fPIC')
+ if spec.satisfies('%gcc'):
+ config_args.append('--with-libs={0}'.format('-lgfortran'))
if '+mpi' in spec:
- config_args.append('CC=%s/mpicc' % spec['mpi'].prefix.bin)
- config_args.append('CXX=%s/mpicxx' % spec['mpi'].prefix.bin)
- config_args.append('--with-mpi=%s' % spec['mpi'].prefix)
- config_args.append('--with-mpi-compilers=%s' %
- spec['mpi'].prefix.bin)
+ config_args.append('CC={0}'.format(spec['mpi'].mpicc))
+ config_args.append('CXX={0}'.format(spec['mpi'].mpicxx))
+ config_args.append('FC={0}'.format(spec['mpi'].mpifc))
+
+ mpi_libs = ' -l'.join(self.get_mpi_libs())
+ config_args.append('--with-mpi={0}'.format(spec['mpi'].prefix))
+ config_args.append('--with-mpi-libs=-l{0}'.format(mpi_libs))
# NOTE: Early versions of Zoltan come packaged with a few embedded
# library packages (e.g. ParMETIS, Scotch), which messes with Spack's
# ability to descend directly into the package's source directory.
+ source_directory = self.stage.source_path
if spec.satisfies('@:3.6'):
- cd('Zoltan_v%s' % self.version)
-
- mkdirp('build')
- cd('build')
-
- config_zoltan = Executable('../configure')
- config_zoltan(
- '--prefix=%s' % pwd(),
- '--with-cflags=%s' % ' '.join(config_cflags),
- '--with-cxxflags=%s' % ' '.join(config_cflags),
- *config_args)
-
- make()
- make('install')
+ zoltan_directory = 'Zoltan_v{0}'.format(self.version)
+ source_directory = join_path(source_directory, zoltan_directory)
+
+ build_directory = join_path(source_directory, 'build')
+ with working_dir(build_directory, create=True):
+ config = Executable(join_path(source_directory, 'configure'))
+ config(
+ '--prefix={0}'.format(prefix),
+ '--with-cflags={0}'.format(' '.join(config_cflags)),
+ '--with-cxxflags={0}'.format(' '.join(config_cflags)),
+ '--with-fcflags={0}'.format(' '.join(config_cflags)),
+ *config_args
+ )
+
+ # NOTE: Earlier versions of Zoltan cannot be built in parallel
+ # because they contain nested Makefile dependency bugs.
+ make(parallel=not spec.satisfies('@:3.6+fortran'))
+ make('install')
# NOTE: Unfortunately, Zoltan doesn't provide any configuration
# options for the extension of the output library files, so this
# script must change these extensions as a post-processing step.
if '+shared' in spec:
- for libpath in glob.glob('lib/*.a'):
- libdir, libname = (os.path.dirname(libpath),
- os.path.basename(libpath))
- move(libpath, os.path.join(
- libdir, re.sub(r'\.a$', '.so', libname)))
-
- mkdirp(prefix)
- move('include', prefix)
- move('lib', prefix)
-
- def url_for_version(self, version):
- return '%s/zoltan_distrib_v%s.tar.gz' % (Zoltan.base_url, version)
+ for lib_path in glob.glob(join_path(prefix, 'lib', '*.a')):
+ lib_static_name = os.path.basename(lib_path)
+ lib_shared_name = re.sub(r'\.a$', '.{0}'.format(dso_suffix),
+ lib_static_name)
+ move(lib_path, join_path(prefix, 'lib', lib_shared_name))
+
+ def get_config_flag(self, flag_name, flag_variant):
+ flag_pre = 'en' if '+{0}'.format(flag_variant) in self.spec else 'dis'
+ return '--{0}able-{1}'.format(flag_pre, flag_name)
+
+ # NOTE: Zoltan assumes that it's linking against an MPI library that can
+ # be found with '-lmpi,' which isn't the case for many MPI packages. This
+ # function finds the names of the actual libraries for Zoltan's MPI dep.
+ def get_mpi_libs(self):
+ mpi_libs = set()
+
+ for lib_path in glob.glob(join_path(self.spec['mpi'].prefix.lib, '*')):
+ mpi_lib_match = re.match(
+ r'^(lib)((\w*)mpi(\w*))\.((a)|({0}))$'.format(dso_suffix),
+ os.path.basename(lib_path))
+ if mpi_lib_match:
+ mpi_libs.add(mpi_lib_match.group(2))
+
+ return list(mpi_libs)
diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py
index 4c27cd3ec2..a70d307be9 100644
--- a/var/spack/repos/builtin/packages/zsh/package.py
+++ b/var/spack/repos/builtin/packages/zsh/package.py
@@ -26,11 +26,11 @@ from spack import *
class Zsh(Package):
+ """Zsh is a shell designed for interactive use, although it is also a
+ powerful scripting language. Many of the useful features of bash, ksh, and
+ tcsh were incorporated into zsh; many original features were added.
"""
- Zsh is a shell designed for interactive use, although it is also a powerful
- scripting language. Many of the useful features of bash, ksh, and tcsh were
- incorporated into zsh; many original features were added.
- """
+
homepage = "http://www.zsh.org"
url = "http://downloads.sourceforge.net/project/zsh/zsh/5.1.1/zsh-5.1.1.tar.gz"