summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ape/package.py55
-rw-r--r--var/spack/repos/builtin/packages/hdf5-blosc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/octopus/package.py86
-rw-r--r--var/spack/repos/builtin/packages/py-cffi/package.py10
4 files changed, 154 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/ape/package.py b/var/spack/repos/builtin/packages/ape/package.py
new file mode 100644
index 0000000000..b1647798b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ape/package.py
@@ -0,0 +1,55 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Ape(Package):
+ """A tool for generating atomic pseudopotentials within a Density-Functional
+ Theory framework"""
+
+ homepage = "http://www.tddft.org/programs/APE/"
+ url = "http://www.tddft.org/programs/APE/sites/default/files/ape-2.2.1.tar.gz"
+
+ version('2.2.1', 'ab81da85bd749c0c136af088c7f9ad58')
+
+ depends_on('gsl')
+ depends_on('libxc')
+
+ def install(self, spec, prefix):
+ args = []
+ args.extend([
+ '--prefix=%s' % prefix,
+ '--with-gsl-prefix=%s' % spec['gsl'].prefix,
+ '--with-libxc-prefix=%s' % spec['libxc'].prefix
+ ])
+
+ if spec.satisfies('%clang') or spec.satisfies('%gcc'):
+ args.extend([
+ 'FCFLAGS=-O2 -ffree-line-length-none'
+ ])
+
+ configure(*args)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
index b9c19dff62..088c1e9d9b 100644
--- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
@@ -49,9 +49,10 @@ def _install_shlib(name, src, dst):
class Hdf5Blosc(Package):
"""Blosc filter for HDF5"""
homepage = "https://github.com/Blosc/hdf5-blosc"
- url = "https://github.com/Blosc/hdf5-blosc/archive/master.zip"
+ url = "https://github.com/Blosc/hdf5-blosc"
- version('master', '02c04acbf4bec66ec8a35bf157d1c9de')
+ version('master', git='https://github.com/Blosc/hdf5-blosc',
+ branch='master')
depends_on("c-blosc")
depends_on("hdf5")
diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py
new file mode 100644
index 0000000000..6fa2e0368f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/octopus/package.py
@@ -0,0 +1,86 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Octopus(Package):
+ """A real-space finite-difference (time-dependent) density-functional
+ theory code."""
+
+ homepage = "http://www.tddft.org/programs/octopus/"
+ url = "http://www.tddft.org/programs/octopus/down.php?file=5.0.1/octopus-5.0.1.tar.gz"
+
+ version('5.0.1', '2b6392ab67b843f9d4ca7413fc07e822')
+
+ depends_on('blas')
+ depends_on('gsl')
+ depends_on('lapack')
+ depends_on('libxc')
+ depends_on('mpi')
+ depends_on('fftw+mpi')
+
+ # optional dependencies:
+ # TODO: scalapack, metis, parmetis, netcdf, etsf_io, SPARSKIT, ARPACK,
+ # FEAST, Libfm, PFFT, ISF, PNFFT
+
+ def install(self, spec, prefix):
+ args = []
+ args.extend([
+ '--prefix=%s' % prefix,
+ '--with-blas=%s' % to_link_flags(
+ spec['blas'].blas_shared_lib),
+ '--with-lapack=%s' % to_link_flags(
+ spec['lapack'].lapack_shared_lib),
+ '--with-gsl-prefix=%s' % spec['gsl'].prefix,
+ '--with-libxc-prefix=%s' % spec['libxc'].prefix,
+ 'CC=%s' % spec['mpi'].mpicc,
+ 'FC=%s' % spec['mpi'].mpifc,
+ '--enable-mpi',
+ '--with-fft-lib=-L%s -lfftw3' % spec['fftw'].prefix.lib
+ # --with-blacs=${prefix}/lib/libscalapack.dylib
+ # --with-netcdf-prefix=netcdf-fortran
+ # --with-etsf-io-prefix=
+ # --with-sparskit=${prefix}/lib/libskit.a
+ # --with-pfft-prefix=${prefix} --with-mpifftw-prefix=${prefix}
+ # --with-arpack=${prefix}/lib/libarpack.dylib
+ # --with-parpack=${prefix}/lib/libparpack.dylib
+ # --with-metis-prefix=${prefix} --with-parmetis-prefix=${prefix}
+ # --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
+ if spec.satisfies('%clang') or spec.satisfies('%gcc'):
+ args.extend([
+ 'FCFLAGS=-O2 -ffree-line-length-none'
+ ])
+
+ configure(*args)
+ make()
+ # short tests take forever...
+ # make('check-short')
+ make('install')
diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py
index 3c1044783f..7c08e51de8 100644
--- a/var/spack/repos/builtin/packages/py-cffi/package.py
+++ b/var/spack/repos/builtin/packages/py-cffi/package.py
@@ -22,6 +22,8 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+import os
+
from spack import *
@@ -39,4 +41,12 @@ class PyCffi(Package):
depends_on('libffi')
def install(self, spec, prefix):
+ # This sets the compiler (and flags) that distutils will use
+ # to create the final shared library. It will use the
+ # compiler specified by the environment variable 'CC' for all
+ # other compilation. We are setting the 'LDSHARED" to the
+ # spack compiler wrapper plus a few extra flags necessary for
+ # building the shared library.
+ os.environ['LDSHARED'] = "{0} -shared -pthread".format(spack_cc)
+
python('setup.py', 'install', '--prefix=%s' % prefix)