diff options
66 files changed, 1944 insertions, 334 deletions
@@ -58,7 +58,7 @@ 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). diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index a42d941791..a5478d10c2 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -6,6 +6,15 @@ 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 maintian this colorization. Eg:: + + spack find | less -R + +It is recommend that the following be put in your ``.bashrc`` file:: + + alias less='less -R' + Listing available packages ------------------------------ diff --git a/lib/spack/docs/case_studies.rst b/lib/spack/docs/case_studies.rst new file mode 100644 index 0000000000..bcd754fdcd --- /dev/null +++ b/lib/spack/docs/case_studies.rst @@ -0,0 +1,167 @@ +Using Spack for CMake-based Development +========================================== + +These are instructions on how to use Spack to aid in the development +of a CMake-based project. Spack is used to help find the dependencies +for the project, configure it at development time, and then package it +it in a way that others can install. Using Spack for CMake-based +development consists of three parts: + +1. Setting up the CMake build in your software +2. Writing the Spack Package +3. Using it from Spack. + + +Setting Up the CMake Build +--------------------------------------- + +You should follow standard CMake conventions in setting up your +software, your CMake build should NOT depend on or require Spack to +build. See here for an example: + https://github.com/citibeth/icebin + +Note that there's one exception here to the rule I mentioned above. +In ``CMakeLists.txt``, I have the following line:: + + include_directories($ENV{CMAKE_TRANSITIVE_INCLUDE_PATH}) + + +This is a hook into Spack, and it ensures that all transitive +dependencies are included in the include path. It's not needed if +everything is in one tree, but it is (sometimes) in the Spack world; +when running without Spack, it has no effect. + +Note that this "feature" is controversial, could break with future +versions of GNU ld, and probably not the best to use. The best +practice is that you make sure that anything you #include is listed as +a dependency in your CMakeLists.txt. + +To be more specific: if you #inlcude something from package A and an +installed HEADER FILE in A #includes something from package B, then +you should also list B as a dependency in your CMake build. If you +depend on A but header files exported by A do NOT #include things from +B, then you do NOT need to list B as a dependency --- even if linking +to A links in libB.so as well. + +I also recommend that you set up your CMake build to use RPATHs +correctly. Not only is this a good idea and nice, but it also ensures +that your package will build the same with or without ``spack +install``. + +Writing the Spack Package +--------------------------------------- + +Now that you have a CMake build, you want to tell Spack how to +configure it. This is done by writing a Spack package for your +software. See here for example: + https://github.com/citibeth/spack/blob/efischer/develop/var/spack/repos/builtin/packages/icebin/package.py + +You need to subclass ``CMakePackage``, as is done in this example. +This enables advanced features of Spack for helping you in configuring +your software (keep reading...). Instead of an ``install()`` method +used when subclassing ``Package``, you write ``configure_args()``. +See here for more info on how this works: + https://github.com/LLNL/spack/pull/543/files + +NOTE: if your software is not publicly available, you do not need to +set the URL or version. Or you can set up bogus URLs and +versions... whatever causes Spack to not crash. + + +Using it from Spack +-------------------------------- + +Now that you have a Spack package, you can get Spack to setup your +CMake project for you. Use the following to setup, configure and +build your project:: + + cd myproject + spack spconfig myproject@local + mkdir build; cd build + ../spconfig.py .. + make + make install + + +Everything here should look pretty familiar here from a CMake +perspective, except that ``spack spconfig`` creates the file +``spconfig.py``, which calls CMake with arguments appropriate for your +Spack configuration. Think of it as the equivalent to running a bunch +of ``spack location -i`` commands. You will run ``spconfig.py`` +instead of running CMake directly. + +If your project is publicly available (eg on GitHub), then you can +ALSO use this setup to "just install" a release version without going +through the manual configuration/build step. Just do: + +1. Put tag(s) on the version(s) in your GitHub repo you want to be release versions. + +2. Set the ``url`` in your ``package.py`` to download a tarball for + the appropriate version. (GitHub will give you a tarball for any + version in the repo, if you tickle it the right way). For example:: + + https://github.com/citibeth/icebin/tarball/v0.1.0 + + Set up versions as appropriate in your ``package.py``. (Manually + download the tarball and run ``md5sum`` to determine the + appropriate checksum for it). + +3. Now you should be able to say ``spack install myproject@version`` + and things "just work." + +NOTE... in order to use the features outlined in this post, you +currently need to use the following branch of Spack: + https://github.com/citibeth/spack/tree/efischer/develop + +There is a pull request open on this branch ( +https://github.com/LLNL/spack/pull/543 ) and we are working to get it +integrated into the main ``develop`` branch. + + +Activating your Software +------------------------------------- + +Once you've built your software, you will want to load it up. You can +use ``spack load mypackage@local`` for that in your ``.bashrc``, but +that is slow. Try stuff like the following instead: + +The following command will load the Spack-installed packages needed +for basic Python use of IceBin:: + + module load `spack module find tcl icebin netcdf cmake@3.5.1` + module load `spack module find --dependencies tcl py-basemap py-giss` + + +You can speed up shell startup by turning these into ``module load`` commands. + +1. Cut-n-paste the script ``make_spackenv``:: + + #!/bin/sh + # + # Generate commands to load the Spack environment + + SPACKENV=$HOME/spackenv.sh + + spack module find --shell tcl git icebin@local ibmisc netcdf cmake@3.5.1 >$SPACKENV + spack module find --dependencies --shell tcl py-basemap py-giss >>$SPACKENV + +2. Add the following to your ``.bashrc`` file:: + + source $HOME/spackenv.sh + # Preferentially use your checked-out Python source + export PYTHONPATH=$HOME/icebin/pylib:$PYTHONPATH + +3. Run ``sh make_spackenv`` whenever your Spack installation changes (including right now). + + +Giving Back +------------------- + +If your software is publicly available, you should submit the +``package.py`` for it as a pull request to the main Spack GitHub +project. This will ensure that anyone can install your software +(almost) painlessly with a simple ``spack install`` command. See here +for how that has turned into detailed instructions that have +successfully enabled collaborators to install complex software: + + https://github.com/citibeth/icebin/blob/develop/README.rst diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst index 98ed9ff0fe..a5bbd4e23b 100644 --- a/lib/spack/docs/index.rst +++ b/lib/spack/docs/index.rst @@ -49,6 +49,7 @@ Table of Contents mirrors configuration developer_guide + case_studies command_index package_list API Docs <spack> diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index a082b85efa..879beb2476 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -401,10 +401,11 @@ the ``url`` declaration. For example: :linenos: class Foo(Package): + version('8.2.1', '4136d7b4c04df68b686570afa26988ac') + ... def url_for_version(self, version): return 'http://example.com/version_%s/foo-%s.tar.gz' \ % (version, version) - version('8.2.1', '4136d7b4c04df68b686570afa26988ac') ... If a URL cannot be derived systematically, you can add an explicit URL @@ -433,7 +434,7 @@ executables and other custom archive types), you can add .. code-block:: python version('8.2.1', '4136d7b4c04df68b686570afa26988ac', - url='http://example.com/foo-8.2.1-special-version.tar.gz', 'expand=False') + url='http://example.com/foo-8.2.1-special-version.tar.gz', expand=False) When ``expand`` is set to ``False``, Spack sets the current working directory to the directory containing the downloaded archive before it diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 498518057b..2fa3a07525 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -87,7 +87,7 @@ def print_text_info(pkg): 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: diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 4cf65222ae..36c91f6670 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -101,7 +101,7 @@ class Clang(Compiler): ver = match.group(1) + '-apple' else: # Normal clang compiler versions are left as-is - match = re.search(r'^clang version ([^ )]+)', output) + match = re.search(r'clang version ([^ )]+)', output) if match: ver = match.group(1) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index debc6752b4..70c3c35d8c 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -530,13 +530,6 @@ 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' - } autoload_format = ('if ![ is-loaded {module_file} ] {{\n' ' puts stderr "Autoloading {module_file}"\n' @@ -556,11 +549,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,6 +570,44 @@ 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 = command.args.get('name', '').format(**self.upper_tokens) + value = str(command.args.get('value', '')).format(**self.tokens) + 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 diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index ff8c8e96bc..8c1204402a 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -143,8 +143,10 @@ class Package(object): 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 diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py deleted file mode 100644 index 8723f7244d..0000000000 --- a/lib/spack/spack/test/operating_system.py +++ /dev/null @@ -1,75 +0,0 @@ -############################################################################## -# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License (as -# published by the Free Software Foundation) version 2.1, February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -""" Test checks if the operating_system class is created correctly and that -the functions are using the correct operating_system. Also checks whether -the operating_system correctly uses the compiler_strategy -""" -import unittest -from spack.platforms.cray_xc import CrayXc -from spack.platforms.linux import Linux -from spack.platforms.darwin import Darwin -from spack.operating_system.linux_distro import LinuxDistro -from spack.operating_system.cnl import ComputeNodeLinux - - -class TestOperatingSystem(unittest.TestCase): - - def setUp(self): - cray_xc = CrayXc() - linux = Linux() - darwin = Darwin() - self.cray_operating_sys = cray_xc.operating_system('front_os') - self.cray_default_os = cray_xc.operating_system('default_os') - self.cray_back_os = cray_xc.operating_system('back_os') - self.darwin_operating_sys = darwin.operating_system('default_os') - self.linux_operating_sys = linux.operating_system('default_os') - - def test_cray_front_end_operating_system(self): - self.assertIsInstance(self.cray_operating_sys, LinuxDistro) - - def test_cray_front_end_compiler_strategy(self): - self.assertEquals(self.cray_operating_sys.compiler_strategy, "PATH") - - def test_cray_back_end_operating_system(self): - self.assertIsInstance(self.cray_back_os, ComputeNodeLinux) - - def test_cray_back_end_compiler_strategy(self): - self.assertEquals(self.cray_back_os.compiler_strategy, "MODULES") - - def test_linux_operating_system(self): - self.assertIsInstance(self.linux_operating_sys, LinuxDistro) - - def test_linux_compiler_strategy(self): - self.assertEquals(self.linux_operating_sys.compiler_strategy, "PATH") - - def test_cray_front_end_compiler_list(self): - """ Operating systems will now be in charge of finding compilers. - So, depending on which operating system you want to build for - or which operating system you are on, then you could detect - compilers in a certain way. Cray linux environment on the front - end is just a regular linux distro whereas the Cray linux compute - node is a stripped down version which modules are important - """ - self.assertEquals(True, False) diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index e41cd0d471..ffc82313a5 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -21,6 +21,8 @@ changed=($(git diff --name-only --find-renames develop... -- '*.py')) changed+=($(git diff --name-only --find-renames --cached -- '*.py')) # Add changed files that are unstaged changed+=($(git diff --name-only --find-renames -- '*.py')) +# Add new files that are untracked +changed+=($(git ls-files --exclude-standard --other -- '*.py')) # Ensure that each file in the array is unique changed=($(printf '%s\n' "${changed[@]}" | sort -u)) diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py index b0ccba1009..61d4cc0cb4 100644 --- a/var/spack/repos/builtin/packages/ImageMagick/package.py +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -26,29 +26,14 @@ from spack import * class Imagemagick(Package): - """ImageMagick is a image processing library""" - homepage = "http://www.imagemagic.org" - - # ------------------------------------------------------------------------- - # ImageMagick does not keep around anything but *-10 versions, so - # this URL may change. If you want the bleeding edge, you can - # uncomment it and see if it works but you may need to try to - # fetch a newer version (-6, -7, -8, -9, etc.) or you can stick - # wtih the older, stable, archived -10 versions below. - # - # TODO: would be nice if spack had a way to recommend avoiding a - # TODO: bleeding edge version, but not comment it out. - # ------------------------------------------------------------------------- - # version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b', - # url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2") - - # ------------------------------------------------------------------------- - # *-10 versions are archived, so these versions should fetch reliably. - # ------------------------------------------------------------------------- - version( - '6.8.9-10', - 'aa050bf9785e571c956c111377bbf57c', - url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") + """ImageMagick is a software suite to create, edit, compose, + or convert bitmap images.""" + + homepage = "http://www.imagemagick.org" + url = "https://github.com/ImageMagick/ImageMagick/archive/7.0.2-7.tar.gz" + + version('7.0.2-7', 'c59cdc8df50e481b2bd1afe09ac24c08') + version('7.0.2-6', 'aa5689129c39a5146a3212bf5f26d478') depends_on('jpeg') depends_on('libtool', type='build') @@ -56,8 +41,14 @@ class Imagemagick(Package): depends_on('freetype') depends_on('fontconfig') depends_on('libtiff') + depends_on('ghostscript') + + def url_for_version(self, version): + return "https://github.com/ImageMagick/ImageMagick/archive/{0}.tar.gz".format(version) def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure('--prefix={0}'.format(prefix)) + make() - make("install") + make('check') + make('install') diff --git a/var/spack/repos/builtin/packages/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/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/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/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 690a05a150..0d4ccc7ea3 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import spack import sys import os @@ -114,7 +113,8 @@ class Boost(Package): 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") + variant('graph', default=False, + description="Build the Boost Graph library") depends_on('icu', when='+icu_support') depends_on('python', when='+python') @@ -138,11 +138,15 @@ class Boost(Package): def determine_toolset(self, spec): if spec.satisfies("platform=darwin"): return 'darwin' + else: + platform = 'linux' toolsets = {'g++': 'gcc', 'icpc': 'intel', 'clang++': 'clang'} + if spec.satisfies('@1.47:'): + toolsets['icpc'] += '-' + platform for cc, toolset in toolsets.iteritems(): if cc in self.compiler.cxx_names: return toolset @@ -160,16 +164,13 @@ 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)) 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, + (spec['python'].version.up_to(2), join_path(spec['python'].prefix.bin, 'python'))) def determine_b2_options(self, spec, options): @@ -202,7 +203,6 @@ class Boost(Package): multithreaded} must be enabled""") options.extend([ - 'toolset=%s' % self.determine_toolset(spec), 'link=%s' % ','.join(linkTypes), '--layout=tagged']) diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index ddb8d2fd03..b2911e126a 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -37,6 +37,7 @@ 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): 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..8896942bae --- /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" + + def url_for_version(self, version): + return ("ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cdd-%s.tar.gz" % + str(version.dotted()).replace('.', '')) + + version('0.61a', '22c24a7a9349dd7ec0e24531925a02d9') + + 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] + 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..a2f04e5b35 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -34,7 +34,11 @@ class Cdo(Package): version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2') + variant('mpi', default=True) + depends_on('netcdf') + depends_on('netcdf+mpi', when='+mpi') + depends_on('netcdf~mpi', when='~mpi') def install(self, spec, prefix): configure('--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 90c83bdc3a..3df7ca551d 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -28,10 +28,13 @@ 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.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,13 +44,25 @@ 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 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/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 72a5cb22f8..3be3948b59 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -10,14 +10,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 +36,9 @@ class Gcc(Package): variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") + variant('piclibs', + default=False, + description="Build PIC versions of libgfortran.a and libstdc++.a") depends_on("mpfr") depends_on("gmp") @@ -50,6 +56,8 @@ class Gcc(Package): else: provides('golang', when='@4.7.1:') + patch('piclibs.patch', when='+piclibs') + def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', diff --git a/var/spack/repos/builtin/packages/gcc/piclibs.patch b/var/spack/repos/builtin/packages/gcc/piclibs.patch new file mode 100644 index 0000000000..0ecb793067 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/piclibs.patch @@ -0,0 +1,62 @@ +diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in +index 62b9f7a..7666fdb 100644 +--- a/libgfortran/Makefile.in ++++ b/libgfortran/Makefile.in +@@ -357,11 +357,11 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CPP = @CPP@ +-CPPFLAGS = @CPPFLAGS@ ++CPPFLAGS = @CPPFLAGS@ -fPIC + CYGPATH_W = @CYGPATH_W@ +-DEFS = @DEFS@ ++DEFS = @DEFS@ -fPIC + DEPDIR = @DEPDIR@ + DSYMUTIL = @DSYMUTIL@ + DUMPBIN = @DUMPBIN@ +@@ -371,7 +371,7 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FC = @FC@ +-FCFLAGS = @FCFLAGS@ ++FCFLAGS = @FCFLAGS@ -fPIC + FGREP = @FGREP@ + FPU_HOST_HEADER = @FPU_HOST_HEADER@ + GREP = @GREP@ +diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in +index bede542..9b3e442 100644 +--- a/libstdc++-v3/Makefile.in ++++ b/libstdc++-v3/Makefile.in +@@ -115,7 +115,7 @@ CC = @CC@ + CCODECVT_CC = @CCODECVT_CC@ + CCOLLATE_CC = @CCOLLATE_CC@ + CCTYPE_CC = @CCTYPE_CC@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -fPIC + CLOCALE_CC = @CLOCALE_CC@ + CLOCALE_H = @CLOCALE_H@ + CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@ +@@ -124,7 +124,7 @@ CMESSAGES_H = @CMESSAGES_H@ + CMONEY_CC = @CMONEY_CC@ + CNUMERIC_CC = @CNUMERIC_CC@ + CPP = @CPP@ +-CPPFLAGS = @CPPFLAGS@ ++CPPFLAGS = @CPPFLAGS@ -fPIC + CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@ + CPU_OPT_BITS_RANDOM = @CPU_OPT_BITS_RANDOM@ + CPU_OPT_EXT_RANDOM = @CPU_OPT_EXT_RANDOM@ +@@ -139,7 +139,7 @@ CYGPATH_W = @CYGPATH_W@ + C_INCLUDE_DIR = @C_INCLUDE_DIR@ + DBLATEX = @DBLATEX@ + DEBUG_FLAGS = @DEBUG_FLAGS@ +-DEFS = @DEFS@ ++DEFS = @DEFS@ -fPIC + DOT = @DOT@ + DOXYGEN = @DOXYGEN@ + DSYMUTIL = @DSYMUTIL@ +-- +2.8.3 + diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index c22b90088e..f63ebac0c1 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -26,16 +26,20 @@ from spack import * class Ghostscript(Package): - """an interpreter for the PostScript language and for PDF. """ + """An interpreter for the PostScript language and for PDF.""" + homepage = "http://ghostscript.com/" - url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.18.tar.gz" + url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.18.tar.gz" version('9.18', '33a47567d7a591c00a253caddd12a88a') parallel = False + depends_on('libtiff') + def install(self, spec, prefix): - configure("--prefix=%s" % prefix, "--enable-shared") + configure('--prefix={0}'.format(prefix), + '--with-system-libtiff') make() - make("install") + make('install') diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 3cc879088d..ed058e0a68 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -32,6 +32,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') diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index 2720831e4f..94ef95e7ab 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -30,17 +30,19 @@ 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('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') 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..02ec87826d --- /dev/null +++ b/var/spack/repos/builtin/packages/gobject-introspection/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 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") + + 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/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/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 536ce69236..6ccaa11c90 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -24,6 +24,8 @@ ############################################################################## from spack import * +import os +import sys class Julia(Package): @@ -33,31 +35,42 @@ class Julia(Package): version('master', git='https://github.com/JuliaLang/julia.git', branch='master') + version('release-0.5', + git='https://github.com/JuliaLang/julia.git', branch='release-0.5') version('release-0.4', git='https://github.com/JuliaLang/julia.git', branch='release-0.4') version('0.4.6', 'd88db18c579049c23ab8ef427ccedf5d', preferred=True) version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') + # TODO: Split these out into jl-hdf5, jl-mpi packages etc. + variant("cxx", default=False, description="Prepare for Julia Cxx package") + variant("hdf5", default=False, description="Install Julia HDF5 package") + variant("mpi", default=False, description="Install Julia MPI package") + variant("plot", default=False, + description="Install Julia plotting packages") + variant("python", default=False, + description="Install Julia Python package") + patch('gc.patch', when='@0.4:0.4.5') - patch('gc.patch', when='@release-0.4') patch('openblas.patch', when='@0.4:0.4.5') + variant('binutils', default=sys.platform != 'darwin', + description="Build via binutils") + # Build-time dependencies: - # depends_on("awk", type='build') - # depends_on("m4", type='build') - # depends_on("pkg-config", type='build') + # depends_on("awk") + depends_on("m4", type="build") + # depends_on("pkg-config") # Combined build-time and run-time dependencies: - depends_on("binutils", type=nolink) - depends_on("cmake @2.8:", type=nolink) - depends_on("git", type=nolink) - depends_on("openssl", type=nolink) - depends_on("python @2.7:2.999", type=nolink) - - # I think that Julia requires the dependencies above, but it - # builds fine (on my system) without these. We should enable them - # as necessary. + # (Yes, these are run-time dependencies used by Julia's package manager.) + depends_on("binutils", when='+binutils') + depends_on("cmake @2.8:") + depends_on("curl") + depends_on("git") # I think Julia @0.5: doesn't use git any more + depends_on("openssl") + depends_on("python @2.7:2.999") # Run-time dependencies: # depends_on("arpack") @@ -93,10 +106,15 @@ class Julia(Package): # USE_SYSTEM_LIBGIT2=0 # Run-time dependencies for Julia packages: - depends_on("hdf5", type='run') - depends_on("mpi", type='run') + depends_on("hdf5", when="+hdf5", type="run") + depends_on("mpi", when="+mpi", type="run") + depends_on("py-matplotlib", when="+plot", type="run") def install(self, spec, prefix): + # Julia needs git tags + if os.path.isfile(".git/shallow"): + git = which("git") + git("fetch", "--unshallow") # Explicitly setting CC, CXX, or FC breaks building libuv, one # of Julia's dependencies. This might be a Darwin-specific # problem. Given how Spack sets up compilers, Julia should @@ -107,12 +125,109 @@ class Julia(Package): # "CXX=c++", # "FC=fc", # "USE_SYSTEM_ARPACK=1", + "override USE_SYSTEM_CURL=1", # "USE_SYSTEM_FFTW=1", # "USE_SYSTEM_GMP=1", # "USE_SYSTEM_MPFR=1", # "USE_SYSTEM_PCRE=1", "prefix=%s" % prefix] + if "+cxx" in spec: + if "@master" not in spec: + raise InstallError( + "Variant +cxx requires the @master version of Julia") + options += [ + "BUILD_LLVM_CLANG=1", + "LLVM_ASSERTIONS=1", + "USE_LLVM_SHLIB=1"] with open('Make.user', 'w') as f: f.write('\n'.join(options) + '\n') make() make("install") + + # Julia's package manager needs a certificate + curl = which("curl") + cacert_file = join_path(prefix, "etc", "curl", "cacert.pem") + curl("--create-dirs", + "--output", cacert_file, + "https://curl.haxx.se/ca/cacert.pem") + + # Put Julia's compiler cache into a private directory + cachedir = join_path(prefix, "var", "julia", "cache") + mkdirp(cachedir) + + # Store Julia packages in a private directory + pkgdir = join_path(prefix, "var", "julia", "pkg") + mkdirp(pkgdir) + + # Configure Julia + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + if "@master" in spec or "@release-0.5" in spec: + # This is required for versions @0.5: + juliarc.write( + '# Point package manager to working certificates\n') + juliarc.write('LibGit2.set_ssl_cert_locations("%s")\n' % + cacert_file) + juliarc.write('\n') + juliarc.write('# Put compiler cache into a private directory\n') + juliarc.write('empty!(Base.LOAD_CACHE_PATH)\n') + juliarc.write('unshift!(Base.LOAD_CACHE_PATH, "%s")\n' % cachedir) + juliarc.write('\n') + juliarc.write('# Put Julia packages into a private directory\n') + juliarc.write('ENV["JULIA_PKGDIR"] = "%s"\n' % pkgdir) + juliarc.write('\n') + + # Install some commonly used packages + julia = Executable(join_path(prefix.bin, "julia")) + julia("-e", 'Pkg.init(); Pkg.update()') + + # Install HDF5 + if "+hdf5" in spec: + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + juliarc.write('# HDF5\n') + juliarc.write('push!(Libdl.DL_LOAD_PATH, "%s")\n' % + spec["hdf5"].prefix.lib) + juliarc.write('\n') + julia("-e", 'Pkg.add("HDF5"); using HDF5') + julia("-e", 'Pkg.add("JLD"); using JLD') + + # Install MPI + if "+mpi" in spec: + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + juliarc.write('# MPI\n') + juliarc.write('ENV["JULIA_MPI_C_COMPILER"] = "%s"\n' % + join_path(spec["mpi"].prefix.bin, "mpicc")) + juliarc.write('ENV["JULIA_MPI_Fortran_COMPILER"] = "%s"\n' % + join_path(spec["mpi"].prefix.bin, "mpifort")) + juliarc.write('\n') + julia("-e", 'Pkg.add("MPI"); using MPI') + + # Install Python + if "+python" in spec or "+plot" in spec: + with open(join_path(prefix, "etc", "julia", "juliarc.jl"), + "a") as juliarc: + juliarc.write('# Python\n') + juliarc.write('ENV["PYTHON"] = "%s"\n' % spec["python"].prefix) + juliarc.write('\n') + # Python's OpenSSL package installer complains: + # Error: PREFIX too long: 166 characters, but only 128 allowed + # Error: post-link failed for: openssl-1.0.2g-0 + julia("-e", 'Pkg.add("PyCall"); using PyCall') + + if "+plot" in spec: + julia("-e", 'Pkg.add("PyPlot"); using PyPlot') + julia("-e", 'Pkg.add("Colors"); using Colors') + # These require maybe Gtk and ImageMagick + julia("-e", 'Pkg.add("Plots"); using Plots') + julia("-e", 'Pkg.add("PlotRecipes"); using PlotRecipes') + julia("-e", 'Pkg.add("UnicodePlots"); using UnicodePlots') + julia("-e", """\ +using Plots +using UnicodePlots +unicodeplots() +plot(x->sin(x)*cos(x), linspace(0, 2pi)) +""") + + julia("-e", 'Pkg.status()') diff --git a/var/spack/repos/builtin/packages/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/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..68a907ea59 --- /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" + + def url_for_version(self, version): + return ("http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-%s.tar.gz" % + ('0' + str(version).replace('.', ''))) + + 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 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/mercurial/package.py b/var/spack/repos/builtin/packages/mercurial/package.py new file mode 100644 index 0000000000..e51069662f --- /dev/null +++ b/var/spack/repos/builtin/packages/mercurial/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +from spack import * + + +class Mercurial(Package): + """Mercurial is a free, distributed source control management tool.""" + homepage = "https://www.mercurial-scm.org" + url = "https://www.mercurial-scm.org/release/mercurial-3.9.tar.gz" + + version('3.9' , 'e2b355da744e94747daae3a5339d28a0') + version('3.8.4', 'cec2c3db688cb87142809089c6ae13e9') + version('3.8.3', '97aced7018614eeccc9621a3dea35fda') + version('3.8.2', 'c38daa0cbe264fc621dc3bb05933b0b3') + version('3.8.1', '172a8c588adca12308c2aca16608d7f4') + + depends_on("python @2.6:2.7.999") + depends_on("py-docutils", type="build") + + def install(self, spec, prefix): + make('PREFIX=%s' % prefix, 'install') diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 17124a0572..54caf0e7e1 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -28,12 +28,14 @@ from spack import * class Mvapich2(Package): """MVAPICH2 is an MPI implementation for Infiniband networks.""" homepage = "http://mvapich.cse.ohio-state.edu/" - url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2b.tar.gz" - - version('2.2b', '5651e8b7a72d7c77ca68da48f3a5d108') - version('2.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2') - version('2.0', '9fbb68a4111a8b6338e476dc657388b4') - version('1.9', '5dc58ed08fd3142c260b70fe297e127c') + url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2rc2.tar.gz" + + version('2.2rc2', 'f9082ffc3b853ad1b908cf7f169aa878') + version('2.2b', '5651e8b7a72d7c77ca68da48f3a5d108') + version('2.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2') + version('2.1', '0095ceecb19bbb7fb262131cb9c2cdd6') + version('2.0', '9fbb68a4111a8b6338e476dc657388b4') + version('1.9', '5dc58ed08fd3142c260b70fe297e127c') patch('ad_lustre_rwcontig_open_source.patch', when='@1.9') diff --git a/var/spack/repos/builtin/packages/nauty/package.py b/var/spack/repos/builtin/packages/nauty/package.py new file mode 100644 index 0000000000..167edfe896 --- /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" + + def url_for_version(self, version): + return ("http://pallini.di.uniroma1.it/nauty%s.tar.gz" % + str(version).replace('.', '')) + + version('2.6r7', 'b2b18e03ea7698db3fbe06c5d76ad8fe') + version('2.6r5', '91b03a7b069962e94fc9aac8831ce8d2') + version('2.5r9', 'e8ecd08b0892a1fb13329c147f08de6d') + + 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/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py index 16d72b4593..a25d69d9f6 100644 --- a/var/spack/repos/builtin/packages/nco/package.py +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -36,8 +36,11 @@ class Nco(Package): # See "Compilation Requirements" at: # http://nco.sourceforge.net/#bld + variant('mpi', default=True) depends_on('netcdf') + depends_on('netcdf+mpi', when='+mpi') + depends_on('netcdf~mpi', when='~mpi') depends_on('antlr@2.7.7+cxx') # (required for ncap2) depends_on('gsl') # (desirable for ncap2) depends_on('udunits2') # (allows dimensional unit transformations) diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py index 6fa2e0368f..ff4a106940 100644 --- a/var/spack/repos/builtin/packages/octopus/package.py +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -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/opencoarrays/package.py b/var/spack/repos/builtin/packages/opencoarrays/package.py new file mode 100644 index 0000000000..0003157985 --- /dev/null +++ b/var/spack/repos/builtin/packages/opencoarrays/package.py @@ -0,0 +1,54 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Opencoarrays(CMakePackage): + """ + OpenCoarrays is an open-source software project that produces an + application binary interface (ABI) supporting coarray Fortran (CAF) + compilers, an application programming interface (API) that supports users + of non-CAF compilers, and an associated compiler wrapper and program + launcher. + """ + + homepage = "http://www.opencoarrays.org/" + url = "https://github.com/sourceryinstitute/opencoarrays/releases/download/1.6.2/OpenCoarrays-1.6.2.tar.gz" + + version('1.6.2', '5a4da993794f3e04ea7855a6678981ba') + + depends_on('cmake', type='build') + depends_on('mpi') + + provides('coarrays') + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + args = std_cmake_args + args.append("-DCMAKE_C_COMPILER=%s" % self.spec['mpi'].mpicc) + args.append("-DCMAKE_Fortran_COMPILER=%s" % self.spec['mpi'].mpifc) + cmake('..', *args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/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/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/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index 3d7e332a3f..39041587f5 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -34,6 +34,7 @@ class Pixman(Package): version('0.32.6', '3a30859719a41bd0f5cccffbfefdd4c2') + depends_on("pkg-config", type="build") depends_on("libpng") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py index b670b4c2b8..79632abf38 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') @@ -96,17 +106,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/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/py-cycler/package.py b/var/spack/repos/builtin/packages/py-cycler/package.py new file mode 100644 index 0000000000..16da057f21 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cycler/package.py @@ -0,0 +1,42 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class PyCycler(Package): + """Composable style cycles.""" + + homepage = "http://matplotlib.org/cycler/" + url = "https://github.com/matplotlib/cycler/archive/v0.10.0.tar.gz" + + version('0.10.0', '83dd0df7810e838b59e4dd9fa6e2d198') + + extends('python') + + depends_on('py-setuptools', type='build') + depends_on('py-six', type=nolink) + + def install(self, spec, prefix): + setup_py('install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index c454a47ec3..0b8ff4715d 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -27,55 +27,73 @@ import os class PyMatplotlib(Package): - """Python plotting package.""" + """matplotlib is a python 2D plotting library which produces publication + quality figures in a variety of hardcopy formats and interactive + environments across platforms.""" + homepage = "https://pypi.python.org/pypi/matplotlib" url = "https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.2.tar.gz" - version('1.4.2', '7d22efb6cce475025733c50487bd8898') + version('1.5.1', 'f51847d8692cb63df64cd0bd0304fd20') version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267') + version('1.4.2', '7d22efb6cce475025733c50487bd8898') - variant('gui', default=False, description='Enable GUI') + variant('gui', default=False, description='Enable GUI') variant('ipython', default=False, description='Enable ipython support') + # Python 2.7, 3.4, or 3.5 extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') - depends_on('py-setuptools', type='build') + # Required dependencies + depends_on('py-numpy@1.6:', type=nolink) + depends_on('py-setuptools', type='build') + depends_on('py-dateutil@1.1:', type=nolink) + depends_on('py-pyparsing', type=nolink) + depends_on('libpng@1.2:') + depends_on('py-pytz', type=nolink) + depends_on('freetype@2.3:') + depends_on('py-cycler@0.9:', type=nolink) + + # Optional GUI framework + depends_on('tk@8.3:', when='+gui') # not 8.6.0 or 8.6.1 + depends_on('qt', when='+gui') depends_on('py-pyside', when='+gui', type=nolink) - depends_on('py-ipython', when='+ipython', type=nolink) - depends_on('py-pyparsing', type=nolink) - depends_on('py-six', type=nolink) - depends_on('py-dateutil', type=nolink) - depends_on('py-pytz', type=nolink) - depends_on('py-nose', type=nolink) - depends_on('py-numpy', type=nolink) - depends_on('py-mock', type=nolink) - depends_on('py-pbr', type=nolink) - depends_on('py-funcsigs', type=nolink) + # TODO: Add more GUI dependencies + # Optional external programs + # ffmpeg/avconv or mencoder + depends_on('ImageMagick') + + # Optional dependencies + depends_on('py-pillow', type=nolink) depends_on('pkg-config', type='build') - depends_on('freetype') - depends_on('qt', when='+gui') - depends_on('bzip2') - depends_on('tcl', when='+gui') - depends_on('tk', when='+gui') - depends_on('qhull') + depends_on('py-ipython', when='+ipython') + + # Testing dependencies + depends_on('py-nose') # type='test' + depends_on('py-mock') # type='test' + + # Required libraries that ship with matplotlib + # depends_on('agg@2.4:') + depends_on('qhull@2012.1:') + # depends_on('ttconv') + depends_on('py-six@1.9.0:', type=nolink) def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) + setup_py('build') + setup_py('install', '--prefix={0}'.format(prefix)) - if str(self.version) in ['1.4.2', '1.4.3']: - # hack to fix configuration file + if '+gui' in spec: + # Set backend in matplotlib configuration file config_file = None for p, d, f in os.walk(prefix.lib): for file in f: if file.find('matplotlibrc') != -1: config_file = join_path(p, 'matplotlibrc') - print config_file - if config_file is None: - raise InstallError('could not find config file') - filter_file(r'backend : pyside', - 'backend : Qt4Agg', - config_file) - filter_file(r'#backend.qt4 : PyQt4', - 'backend.qt4 : PySide', - config_file) + if not config_file: + raise InstallError('Could not find matplotlibrc') + + kwargs = {'ignore_absent': False, 'backup': False, 'string': False} + rc = FileFilter(config_file) + rc.filter('^backend.*', 'backend : Qt4Agg', **kwargs) + rc.filter('^#backend.qt4.*', 'backend.qt4 : PySide', **kwargs) diff --git a/var/spack/repos/builtin/packages/py-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-pygobject/package.py b/var/spack/repos/builtin/packages/py-pygobject/package.py new file mode 100644 index 0000000000..3af849e758 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pygobject/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 PyPygobject(Package): + """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): + configure("--prefix=%s" % prefix) + make() + 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..ab0a139f02 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pygtk/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 PyPygtk(Package): + """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): + configure("--prefix=%s" % prefix) + make() + make("install", parallel=False) diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py index 1cb3e4745f..e575864fab 100644 --- a/var/spack/repos/builtin/packages/py-pyside/package.py +++ b/var/spack/repos/builtin/packages/py-pyside/package.py @@ -31,13 +31,16 @@ class PyPyside(Package): homepage = "https://pypi.python.org/pypi/pyside" url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz" - version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') + version('1.2.4', '3cb7174c13bd45e3e8f77638926cb8c0') # rpath problems + version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d', preferred=True) depends_on('cmake', type='build') extends('python') depends_on('py-setuptools', type='build') - depends_on('qt@:4') + depends_on('qt@4.5:4.9') + depends_on('libxml2@2.6.32:') + depends_on('libxslt@1.1.19:') def patch(self): """Undo PySide RPATH handling and add Spack RPATH.""" @@ -58,12 +61,23 @@ class PyPyside(Package): # PySide tries to patch ELF files to remove RPATHs # Disable this and go with the one we set. - filter_file( - r'^\s*rpath_cmd\(pyside_path, srcpath\)', - r'#rpath_cmd(pyside_path, srcpath)', - 'pyside_postinstall.py') + if self.spec.satisfies('@1.2.4:'): + rpath_file = 'setup.py' + else: + rpath_file = 'pyside_postinstall.py' + + filter_file(r'(^\s*)(rpath_cmd\(.*\))', r'\1#\2', rpath_file) + + # TODO: rpath handling for PySide 1.2.4 still doesn't work. + # PySide can't find the Shiboken library, even though it comes + # bundled with it and is installed in the same directory. + + # PySide does not provide official support for + # Python 3.5, but it should work fine + filter_file("'Programming Language :: Python :: 3.4'", + "'Programming Language :: Python :: 3.4',\r\n " + "'Programming Language :: Python :: 3.5'", + "setup.py") def install(self, spec, prefix): - python('setup.py', 'install', - '--prefix=%s' % prefix, - '--jobs=%s' % make_jobs) + setup_py('install', '--prefix=%s' % prefix, '--jobs=%s' % make_jobs) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index c4e6754969..57783b0542 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -133,6 +133,8 @@ class Python(Package): # TODO: Once better testing support is integrated, add the following tests # https://wiki.python.org/moin/TkInter # + # Note: Only works if ForwardX11Trusted is enabled, i.e. `ssh -Y` + # # if '+tk' in spec: # env['TK_LIBRARY'] = join_path(spec['tk'].prefix.lib, # 'tk{0}'.format(spec['tk'].version.up_to(2))) diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py index 2733d8b652..462a681ad9 100644 --- a/var/spack/repos/builtin/packages/qhull/package.py +++ b/var/spack/repos/builtin/packages/qhull/package.py @@ -37,16 +37,13 @@ class Qhull(Package): homepage = "http://www.qhull.org" - version('7.2.0', 'e6270733a826a6a7c32b796e005ec3dc', + version('2015.2', 'e6270733a826a6a7c32b796e005ec3dc', url="http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz") - version('1.0', 'd0f978c0d8dfb2e919caefa56ea2953c', + version('2012.1', 'd0f978c0d8dfb2e919caefa56ea2953c', url="http://www.qhull.org/download/qhull-2012.1-src.tgz") - # https://github.com/qhull/qhull/pull/5 - patch('qhull-iterator.patch', when='@1.0') - - depends_on('cmake', type='build') + depends_on('cmake@2.6:', type='build') def install(self, spec, prefix): with working_dir('spack-build', create=True): diff --git a/var/spack/repos/builtin/packages/qhull/qhull-iterator.patch b/var/spack/repos/builtin/packages/qhull/qhull-iterator.patch deleted file mode 100644 index 88e931d84f..0000000000 --- a/var/spack/repos/builtin/packages/qhull/qhull-iterator.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 93f4b306c54bb5be7724dcc19c6e747b62ac76dd Mon Sep 17 00:00:00 2001 -From: Ben Boeckel <mathstuf@gmail.com> -Date: Thu, 28 May 2015 11:12:25 -0400 -Subject: [PATCH] iterator: use the header - -Standard libraries are doing funky things with inline namespaces which -make these declarations impossible to get right. Just include the -header. ---- - src/libqhullcpp/QhullIterator.h | 3 +-- - src/libqhullcpp/QhullLinkedList.h | 5 +---- - 2 files changed, 2 insertions(+), 6 deletions(-) - -diff --git a/src/libqhullcpp/QhullIterator.h b/src/libqhullcpp/QhullIterator.h -index 9dde894..49f3a3b 100644 ---- a/src/libqhullcpp/QhullIterator.h -+++ b/src/libqhullcpp/QhullIterator.h -@@ -14,10 +14,9 @@ extern "C" { - } - - #include <assert.h> -+#include <iterator> - #include <string> - #include <vector> --//! Avoid dependence on <iterator> --namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; } - - namespace orgQhull { - -diff --git a/src/libqhullcpp/QhullLinkedList.h b/src/libqhullcpp/QhullLinkedList.h -index d828ac6..00b9008 100644 ---- a/src/libqhullcpp/QhullLinkedList.h -+++ b/src/libqhullcpp/QhullLinkedList.h -@@ -9,10 +9,7 @@ - #ifndef QHULLLINKEDLIST_H - #define QHULLLINKEDLIST_H - --namespace std { -- struct bidirectional_iterator_tag; -- struct random_access_iterator_tag; --}//std -+#include <iterator> - - #include "QhullError.h" - extern "C" { diff --git a/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch b/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch new file mode 100644 index 0000000000..e6a27d5fab --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/btn_trigger_happy.patch @@ -0,0 +1,17 @@ +--- a/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:34:44.517184658 -0500 ++++ b/qtgamepad/src/plugins/gamepads/evdev/qevdevgamepadbackend.cpp 2016-08-08 11:36:42.371995567 -0500 +@@ -262,10 +262,10 @@ + m_buttonsMap[BTN_TR2] = QGamepadManager::ButtonR2; + m_buttonsMap[BTN_THUMB] = m_buttonsMap[BTN_THUMBL] = QGamepadManager::ButtonL3; + m_buttonsMap[BTN_THUMBR] = QGamepadManager::ButtonR3; +- m_buttonsMap[BTN_TRIGGER_HAPPY1] = QGamepadManager::ButtonLeft; +- m_buttonsMap[BTN_TRIGGER_HAPPY2] = QGamepadManager::ButtonRight; +- m_buttonsMap[BTN_TRIGGER_HAPPY3] = QGamepadManager::ButtonUp; +- m_buttonsMap[BTN_TRIGGER_HAPPY4] = QGamepadManager::ButtonDown; ++ m_buttonsMap[0x2c0] = QGamepadManager::ButtonLeft; ++ m_buttonsMap[0x2c1] = QGamepadManager::ButtonRight; ++ m_buttonsMap[0x2c2] = QGamepadManager::ButtonUp; ++ m_buttonsMap[0x2c3] = QGamepadManager::ButtonDown; + + if (m_productId) + m_backend->saveSettings(m_productId, QVariant()); diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 4239fa292b..436702fa4e 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -29,7 +29,11 @@ import os class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" homepage = 'http://qt.io' + url = 'http://download.qt.io/archive/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz' + list_url = 'http://download.qt.io/archive/qt/' + list_depth = 4 + version('5.7.0', '9a46cce61fc64c20c3ac0a0e0fa41b42') version('5.5.1', '59f0216819152b77536cf660b015d784') version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5') version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6') @@ -40,17 +44,18 @@ class Qt(Package): # Add patch for compile issues with qt3 found with use in the # OpenSpeedShop project - variant('krellpatch', default=False, - description="Build with openspeedshop based patch.") + variant('krellpatch', default=False, description="Build with openspeedshop based patch.") variant('mesa', default=False, description="Depend on mesa.") variant('gtk', default=False, description="Build with gtkplus.") patch('qt3krell.patch', when='@3.3.8b+krellpatch') + # https://github.com/xboxdrv/xboxdrv/issues/188 + patch('btn_trigger_happy.patch', when='@5.7.0:') + # Use system openssl for security. # depends_on("openssl") - depends_on("glib") depends_on("gtkplus", when='+gtk') depends_on("libxml2") depends_on("zlib") @@ -73,29 +78,33 @@ class Qt(Package): depends_on("libxcb") def url_for_version(self, version): - url = "http://download.qt.io/archive/qt/" + # URL keeps getting more complicated with every release + url = self.list_url + + if version >= Version('4.0'): + url += version.up_to(2) + '/' + else: + url += version.up_to(1) + '/' + + if version >= Version('4.8'): + url += str(version) + '/' if version >= Version('5'): - url += "%s/%s/single/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version, version) - elif version >= Version('4.8'): - url += "%s/%s/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version, version) - elif version >= Version('4.6'): - url += "%s/qt-everywhere-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version) - elif version >= Version('4.0'): - url += "%s/qt-x11-opensource-src-%s.tar.gz" % \ - (version.up_to(2), version) - elif version >= Version('3'): - url += "%s/qt-x11-free-%s.tar.gz" % \ - (version.up_to(1), version) + url += 'single/' + + url += 'qt-' + + if version >= Version('4.6'): + url += 'everywhere-' elif version >= Version('2.1'): - url += "%s/qt-x11-%s.tar.gz" % \ - (version.up_to(1), version) - else: - url += "%s/qt-%s.tar.gz" % \ - (version.up_to(1), version) + url += 'x11-' + + if version >= Version('4.0'): + url += 'opensource-src-' + elif version >= Version('3'): + url += 'free-' + + url += str(version) + '.tar.gz' return url @@ -107,27 +116,34 @@ class Qt(Package): def patch(self): if self.spec.satisfies('@4'): - qmake_conf = 'mkspecs/common/g++-base.conf' - qmake_unix_conf = 'mkspecs/common/g++-unix.conf' - elif self.spec.satisfies('@5'): - qmake_conf = 'qtbase/mkspecs/common/g++-base.conf' - qmake_unix_conf = 'qtbase/mkspecs/common/g++-unix.conf' - else: - return - - # Fix qmake compilers in the default mkspec - filter_file(r'^QMAKE_COMPILER *=.*$', - 'QMAKE_COMPILER = cc', qmake_conf) - filter_file(r'^QMAKE_CC *=.*$', - 'QMAKE_CC = cc', qmake_conf) - filter_file(r'^QMAKE_CXX *=.*$', - 'QMAKE_CXX = c++', qmake_conf) - filter_file(r'^QMAKE_LFLAGS_NOUNDEF *\+?=.*$', - 'QMAKE_LFLAGS_NOUNDEF =', qmake_unix_conf) + # Fix qmake compilers in the default mkspec + filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', + 'mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', + 'mkspecs/common/g++-base.conf') + + # Necessary to build with GCC 6 and other modern compilers + # http://stackoverflow.com/questions/10354371/ + filter_file('(^QMAKE_CXXFLAGS .*)', r'\1 -std=gnu++98', + 'mkspecs/common/gcc-base.conf') + + filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', + 'mkspecs/common/g++-unix.conf') + elif self.spec.satisfies('@5:'): + # Fix qmake compilers in the default mkspec + filter_file('^QMAKE_COMPILER .*', 'QMAKE_COMPILER = cc', + 'qtbase/mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CC .*', 'QMAKE_CC = cc', + 'qtbase/mkspecs/common/g++-base.conf') + filter_file('^QMAKE_CXX .*', 'QMAKE_CXX = c++', + 'qtbase/mkspecs/common/g++-base.conf') + + filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', + 'qtbase/mkspecs/common/g++-unix.conf') @property def common_config_args(self): - config_args = [ + return [ '-prefix', self.prefix, '-v', '-opensource', @@ -144,19 +160,12 @@ class Qt(Package): '-no-nis' ] - if '+gtk' in self.spec: - config_args.append('-gtkstyle') - else: - config_args.append('-no-gtkstyle') - - return config_args - # Don't disable all the database drivers, but should # really get them into spack at some point. @when('@3') def configure(self): - # An user report that this was necessary to link Qt3 on ubuntu + # A user reported that this was necessary to link Qt3 on ubuntu os.environ['LD_LIBRARY_PATH'] = os.getcwd() + '/lib' configure('-prefix', self.prefix, '-v', @@ -169,18 +178,27 @@ class Qt(Package): def configure(self): configure('-fast', '-no-webkit', + '{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'), *self.common_config_args) - @when('@5') + @when('@5.0:5.6') def configure(self): configure('-no-eglfs', '-no-directfb', '-qt-xcb', - # If someone wants to get a webkit build working, be my - # guest! + '{0}-gtkstyle'.format('' if '+gtk' in self.spec else '-no'), '-skip', 'qtwebkit', *self.common_config_args) + @when('@5.7:') + def configure(self): + configure('-no-eglfs', + '-no-directfb', + '-qt-xcb', + '{0}-gtk'.format('' if '+gtk' in self.spec else '-no'), + '-skip', 'webengine', + *self.common_config_args) + def install(self, spec, prefix): self.configure() make() diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index 2eaff0a240..634d934938 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -37,16 +37,31 @@ class Qthreads(Package): either full or empty, and a thread can wait for any word to attain either state.""" homepage = "http://www.cs.sandia.gov/qthreads/" - url = "https://qthreads.googlecode.com/files/qthread-1.10.tar.bz2" - version('1.10', '5af8c8bbe88c2a6d45361643780d1671') + # Google Code has stopped serving tarballs + # We assume the tarballs will soon be available on Github instead + # url = "https://qthreads.googlecode.com/files/qthread-1.10.tar.bz2" + # version('1.10', '5af8c8bbe88c2a6d45361643780d1671') - patch("ldflags.patch") + # Temporarily install from a git branch + url = "https://github.com/Qthreads/qthreads" + version("1.10", + git="https://github.com/Qthreads/qthreads", + branch="release-1.10") + + # patch("ldflags.patch") patch("restrict.patch") patch("trap.patch") + depends_on("autoconf", type="build") + depends_on("hwloc") + def install(self, spec, prefix): + autogen = Executable("./autogen.sh") + autogen() configure("--prefix=%s" % prefix, - "--enable-guard-pages") + "--enable-guard-pages", + "--with-topology=hwloc", + "--with-hwloc=%s" % spec["hwloc"].prefix) make() make("install") diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py index ec2fae5e9b..8c4663c524 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.0b', '8851912ba40e31cf7be6dde3be8e702c', + url='https://github.com/LLNL/STAT/files/427762/STAT-3.0.0b.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/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/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index d39e45f054..3a88f67340 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -43,18 +43,22 @@ class Trilinos(Package): 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.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 +88,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 +109,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') |