Merge pull request #1156 from adamjstewart/features/py-meep

Add py-meep package and dependencies

Merging to add the gettext support, will submit a separate issue for the LD_LIBRARY_PATH issue with MPI and py-meep
This commit is contained in:
becker33 2016-08-03 10:07:05 -07:00 committed by GitHub
commit 353726f08f
16 changed files with 684 additions and 46 deletions

View file

@ -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 BdwGc(Package):
"""The Boehm-Demers-Weiser conservative garbage collector is a garbage
collecting replacement for C malloc or C++ new."""
homepage = "http://www.hboehm.info/gc/"
url = "http://www.hboehm.info/gc/gc_source/gc-7.4.4.tar.gz"
version('7.4.4', '96d18b0448a841c88d56e4ab3d180297')
variant('libatomic-ops', default=True, description='Use external libatomic-ops')
depends_on('libatomic-ops', when='+libatomic-ops')
def install(self, spec, prefix):
config_args = [
'--prefix={0}'.format(prefix),
'--with-libatomic-ops={0}'.format(
'yes' if '+libatomic-ops' in spec else 'no')
]
configure(*config_args)
make()
make('check')
make('install')

View file

@ -24,31 +24,84 @@
##############################################################################
from spack import *
class Gettext(Package):
"""GNU internationalization (i18n) and localization (l10n) library."""
homepage = "https://www.gnu.org/software/gettext/"
url = "http://ftpmirror.gnu.org/gettext/gettext-0.19.7.tar.xz"
version('0.19.7', 'f81e50556da41b44c1d59ac93474dca5')
version('0.19.8.1', 'df3f5690eaa30fd228537b00cb7b7590')
version('0.19.7', 'f81e50556da41b44c1d59ac93474dca5')
# Recommended variants
variant('curses', default=True, description='Use libncurses')
variant('libxml2', default=True, description='Use libxml2')
variant('git', default=True, description='Enable git support')
variant('tar', default=True, description='Enable tar support')
variant('bzip2', default=True, description='Enable bzip2 support')
variant('xz', default=True, description='Enable xz support')
# Optional variants
variant('libunistring', default=False, description='Use libunistring')
# Recommended dependencies
depends_on('ncurses', when='+curses')
depends_on('libxml2', when='+libxml2')
# Java runtime and compiler (e.g. GNU gcj or kaffe)
# C# runtime and compiler (e.g. pnet or mono)
depends_on('git@1.6:', when='+git')
depends_on('tar', when='+tar')
# depends_on('gzip', when='+gzip')
depends_on('bzip2', when='+bzip2')
depends_on('xz', when='+xz')
# Optional dependencies
# depends_on('glib') # circular dependency?
# depends_on('libcroco@0.6.1:')
depends_on('libunistring', when='+libunistring')
# depends_on('cvs')
def install(self, spec, prefix):
options = ['--disable-dependency-tracking',
'--disable-silent-rules',
'--disable-debug',
'--prefix=%s' % prefix,
'--with-included-gettext',
'--with-included-glib',
'--with-included-libcroco',
'--with-included-libunistring',
'--with-emacs',
'--with-lispdir=%s/emacs/site-lisp/gettext' % prefix.share,
'--disable-java',
'--disable-csharp',
'--without-git', # Don't use VCS systems to create these archives
'--without-cvs',
'--without-xz']
config_args = [
'--prefix={0}'.format(prefix),
'--disable-java',
'--disable-csharp',
'--with-included-glib',
'--with-included-gettext',
'--with-included-libcroco',
'--without-emacs',
'--with-lispdir=%s/emacs/site-lisp/gettext' % prefix.share,
'--without-cvs'
]
configure(*options)
if '+curses' in spec:
config_args.append('--with-ncurses-prefix={0}'.format(
spec['ncurses'].prefix))
else:
config_args.append('--disable-curses')
if '+libxml2' in spec:
config_args.append('--with-libxml2-prefix={0}'.format(
spec['libxml2'].prefix))
else:
config_args.append('--with-included-libxml')
if '+git' not in spec:
config_args.append('--without-git')
if '+bzip2' not in spec:
config_args.append('--without-bzip2')
if '+xz' not in spec:
config_args.append('--without-xz')
if '+libunistring' in spec:
config_args.append('--with-libunistring-prefix={0}'.format(
spec['libunistring'].prefix))
else:
config_args.append('--with-included-libunistring')
configure(*config_args)
make()
make("install")

View file

@ -24,6 +24,7 @@
##############################################################################
from spack import *
class Git(Package):
"""Git is a free and open source distributed version control
system designed to handle everything from small to very large
@ -36,31 +37,27 @@ class Git(Package):
version('2.7.3', 'fa1c008b56618c355a32ba4a678305f6')
version('2.7.1', 'bf0706b433a8dedd27a63a72f9a66060')
# See here for info on vulnerable Git versions:
# http://www.theregister.co.uk/2016/03/16/git_server_client_patch_now/
# All the following are vulnerable
#version('2.6.3', 'b711be7628a4a2c25f38d859ee81b423')
#version('2.6.2', 'da293290da69f45a86a311ad3cd43dc8')
#version('2.6.1', '4c62ee9c5991fe93d99cf2a6b68397fd')
#version('2.6.0', 'eb76a07148d94802a1745d759716a57e')
#version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b')
#version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c')
# version('2.6.3', 'b711be7628a4a2c25f38d859ee81b423')
# version('2.6.2', 'da293290da69f45a86a311ad3cd43dc8')
# version('2.6.1', '4c62ee9c5991fe93d99cf2a6b68397fd')
# version('2.6.0', 'eb76a07148d94802a1745d759716a57e')
# version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b')
# version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c')
depends_on("openssl")
depends_on("autoconf", type='build')
depends_on("curl")
depends_on("expat")
# Also depends_on gettext: apt-get install gettext (Ubuntu)
depends_on("gettext")
depends_on("zlib")
# Use system perl for now.
# depends_on("perl")
# depends_on("pcre")
depends_on("zlib")
def install(self, spec, prefix):
configure_args = [
"--prefix=%s" % prefix,
@ -68,8 +65,8 @@ def install(self, spec, prefix):
"--with-openssl=%s" % spec['openssl'].prefix,
"--with-zlib=%s" % spec['zlib'].prefix,
"--with-curl=%s" % spec['curl'].prefix,
"--with-expat=%s" % spec['expat'].prefix,
]
"--with-expat=%s" % spec['expat'].prefix
]
which('autoreconf')('-i')
configure(*configure_args)

View file

@ -24,16 +24,18 @@
##############################################################################
from spack import *
class Gmp(Package):
"""GMP is a free library for arbitrary precision arithmetic,
operating on signed integers, rational numbers, and
floating-point numbers."""
"""GMP is a free library for arbitrary precision arithmetic, operating
on signed integers, rational numbers, and floating-point numbers."""
homepage = "https://gmplib.org"
url = "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2"
version('6.1.0' , '86ee6e54ebfc4a90b643a65e402c4048')
version('6.1.1', '4c175f86e11eb32d8bf9872ca3a8e11d')
version('6.1.0', '86ee6e54ebfc4a90b643a65e402c4048')
version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470')
version('6.0.0' , '6ef5869ae735db9995619135bd856b84')
version('6.0.0', '6ef5869ae735db9995619135bd856b84')
depends_on("m4", type='build')

View file

@ -0,0 +1,68 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Guile(Package):
"""Guile is the GNU Ubiquitous Intelligent Language for Extensions,
the official extension language for the GNU operating system."""
homepage = "https://www.gnu.org/software/guile/"
url = "ftp://ftp.gnu.org/gnu/guile/guile-2.0.11.tar.gz"
version('2.0.11', 'e532c68c6f17822561e3001136635ddd')
variant('readline', default=True, description='Use the readline library')
depends_on('gmp@4.2:')
depends_on('gettext')
depends_on('libtool@1.5.6:')
depends_on('libunistring@0.9.3:')
depends_on('bdw-gc@7.0:')
depends_on('libffi')
depends_on('readline', when='+readline')
depends_on('pkg-config', type='build')
def install(self, spec, prefix):
config_args = [
'--prefix={0}'.format(prefix),
'--with-libunistring-prefix={0}'.format(
spec['libunistring'].prefix),
'--with-libltdl-prefix={0}'.format(spec['libtool'].prefix),
'--with-libgmp-prefix={0}'.format(spec['gmp'].prefix),
'--with-libintl-prefix={0}'.format(spec['gettext'].prefix)
]
if '+readline' in spec:
config_args.append('--with-libreadline-prefix={0}'.format(
spec['readline'].prefix))
else:
config_args.append('--without-libreadline-prefix')
configure(*config_args)
make()
make('check')
make('install')

View file

@ -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 Harminv(Package):
"""Harminv is a free program (and accompanying library) to solve the
problem of harmonic inversion - given a discrete-time, finite-length
signal that consists of a sum of finitely-many sinusoids (possibly
exponentially decaying) in a given bandwidth, it determines the
frequencies, decay constants, amplitudes, and phases of those sinusoids."""
homepage = "http://ab-initio.mit.edu/wiki/index.php/Harminv"
url = "http://ab-initio.mit.edu/harminv/harminv-1.4.tar.gz"
version('1.4', 'b95e24a9bc7e07d3d2202d1605e9e86f')
depends_on('blas')
depends_on('lapack')
def install(self, spec, prefix):
config_args = [
'--prefix={0}'.format(prefix),
'--with-blas={0}'.format(spec['blas'].prefix.lib),
'--with-lapack={0}'.format(spec['lapack'].prefix.lib),
'--enable-shared'
]
configure(*config_args)
make()
make('install')

View file

@ -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 LibatomicOps(Package):
"""This package provides semi-portable access to hardware-provided
atomic memory update operations on a number architectures."""
homepage = "https://github.com/ivmai/libatomic_ops"
url = "http://www.hboehm.info/gc/gc_source/libatomic_ops-7.4.4.tar.gz"
version('7.4.4', '426d804baae12c372967a6d183e25af2')
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix),
'--enable-shared')
make()
make('install')

View file

@ -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 Libctl(Package):
"""libctl is a free Guile-based library implementing flexible
control files for scientific simulations."""
homepage = "http://ab-initio.mit.edu/wiki/index.php/Libctl"
url = "http://ab-initio.mit.edu/libctl/libctl-3.2.2.tar.gz"
version('3.2.2', '5fd7634dc9ae8e7fa70a68473b9cbb68')
depends_on('guile')
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix),
'--enable-shared',
'GUILE={0}'.format(join_path(
spec['guile'].prefix.bin, 'guile')),
'GUILE_CONFIG={0}'.format(join_path(
spec['guile'].prefix.bin, 'guile-config')))
make()
make('install')

View file

@ -0,0 +1,43 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Libiconv(Package):
"""GNU libiconv provides an implementation of the iconv() function
and the iconv program for character set conversion."""
homepage = "https://www.gnu.org/software/libiconv/"
url = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz"
version('1.14', 'e34509b1623cec449dfeb73d7ce9c6c6')
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix),
'--enable-extra-encodings')
make()
make('check')
make('install')

View file

@ -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 Libunistring(Package):
"""This library provides functions for manipulating Unicode strings
and for manipulating C strings according to the Unicode standard."""
homepage = "https://www.gnu.org/software/libunistring/"
url = "http://ftp.gnu.org/gnu/libunistring/libunistring-0.9.6.tar.xz"
version('0.9.6', 'cb09c398020c27edac10ca590e9e9ef3')
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix))
make()
# make('check') # test-verify fails for me, contacted developers
make('install')

View file

@ -0,0 +1,109 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Meep(Package):
"""Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation
software package developed at MIT to model electromagnetic systems."""
homepage = "http://ab-initio.mit.edu/wiki/index.php/Meep"
version('1.3', '18a5b9e18008627a0411087e0bb60db5')
version('1.2.1', '9be2e743c3a832ae922de9d955d016c5')
version('1.1.1', '415e0cd312b6caa22b5dd612490e1ccf')
variant('blas', default=True, description='Enable BLAS support')
variant('lapack', default=True, description='Enable LAPACK support')
variant('harminv', default=True, description='Enable Harminv support')
variant('guile', default=True, description='Enable Guilde support')
variant('libctl', default=True, description='Enable libctl support')
variant('mpi', default=True, description='Enable MPI support')
variant('hdf5', default=True, description='Enable HDF5 support')
variant('gsl', default=True, description='Enable GSL support')
depends_on('blas', when='+blas')
depends_on('lapack', when='+lapack')
depends_on('harminv', when='+harminv')
depends_on('guile', when='+guile')
depends_on('libctl@3.2:', when='+libctl')
depends_on('mpi', when='+mpi')
depends_on('hdf5~mpi', when='+hdf5~mpi')
depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('gsl', when='+gsl')
def url_for_version(self, version):
base_url = "http://ab-initio.mit.edu/meep"
if version > Version('1.1.1'):
return "{0}/meep-{1}.tar.gz".format(base_url, version)
else:
return "{0}/old/meep-{1}.tar.gz".format(base_url, version)
def install(self, spec, prefix):
config_args = [
'--prefix={0}'.format(prefix),
'--enable-shared'
]
if '+blas' in spec:
config_args.append('--with-blas={0}'.format(
spec['blas'].prefix.lib))
else:
config_args.append('--without-blas')
if '+lapack' in spec:
config_args.append('--with-lapack={0}'.format(
spec['lapack'].prefix.lib))
else:
config_args.append('--without-lapack')
if '+libctl' in spec:
config_args.append('--with-libctl={0}'.format(
join_path(spec['libctl'].prefix.share, 'libctl')))
else:
config_args.append('--without-libctl')
if '+mpi' in spec:
config_args.append('--with-mpi')
else:
config_args.append('--without-mpi')
if '+hdf5' in spec:
config_args.append('--with-hdf5')
else:
config_args.append('--without-hdf5')
configure(*config_args)
make()
# aniso_disp test fails unless installed with harminv
# near2far test fails unless installed with gsl
if self.run_tests and '+harminv' in spec and '+gsl' in spec:
# Most tests fail when run in parallel
# 2D_convergence tests still fails to converge for unknown reasons
make('check', parallel=False)
make('install')

View file

@ -0,0 +1,33 @@
From 00148329967adb196138372771052a3f606a6ea3 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Wed, 2 Mar 2016 19:43:10 +0200
Subject: [PATCH 2/2] gdate: Suppress string format literal warning
Newer versions of GCC emit an error here, but we know it's safe.
https://bugzilla.gnome.org/761550
---
glib/glib/gdate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/glib/glib/gdate.c b/glib/glib/gdate.c
index 4aece02..92c34d2 100644
--- a/glib/glib/gdate.c
+++ b/glib/glib/gdate.c
@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
*
* Returns: number of characters written to the buffer, or 0 the buffer was too small
*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+
gsize
g_date_strftime (gchar *s,
gsize slen,
@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
return retval;
#endif
}
+
+#pragma GCC diagnostic pop
--
2.7.1

View file

@ -24,23 +24,29 @@
##############################################################################
from spack import *
class PkgConfig(Package):
"""pkg-config is a helper tool used when compiling applications and libraries"""
"""pkg-config is a helper tool used when compiling applications
and libraries"""
homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/"
url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz"
version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d')
version('0.29.1', 'f739a28cae4e0ca291f82d1d41ef107d')
version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d')
parallel = False
# The following patch is needed for gcc-6.1
patch('g_date_strftime.patch')
def install(self, spec, prefix):
configure("--prefix=%s" %prefix,
"--enable-shared",
"--with-internal-glib") # There's a bootstrapping problem here;
# glib uses pkg-config as well, so
# break the cycle by using the internal
# glib.
configure("--prefix={0}".format(prefix),
"--enable-shared",
# There's a bootstrapping problem here;
# glib uses pkg-config as well, so break
# the cycle by using the internal glib.
"--with-internal-glib")
make()
make("install")

View file

@ -0,0 +1,75 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class PyMeep(Package):
"""Python-meep is a wrapper around libmeep. It allows the scripting of
Meep-simulations with Python"""
homepage = "https://launchpad.net/python-meep"
url = "https://launchpad.net/python-meep/1.4/1.4/+download/python-meep-1.4.2.tar"
version('1.4.2', 'f8913542d18b0dda92ebc64f0a10ce56')
variant('mpi', default=True, description='Enable MPI support')
extends('python')
depends_on('py-numpy', type=nolink)
depends_on('py-scipy', type=nolink)
depends_on('py-matplotlib', type=nolink)
depends_on('mpi', when='+mpi')
depends_on('meep~mpi', when='~mpi')
depends_on('meep+mpi', when='+mpi')
# As of SWIG 3.0.3, Python-style comments are now treated as
# pre-processor directives. Use older SWIG. But not too old,
# or else it can't handle newer C++ compilers and flags.
depends_on('swig@1.3.39:3.0.2')
def install(self, spec, prefix):
setup = 'setup-mpi.py' if '+mpi' in spec else 'setup.py'
include_dirs = [
spec['meep'].prefix.include,
spec['py-numpy'].include
]
library_dirs = [
spec['meep'].prefix.lib
]
if '+mpi' in spec:
include_dirs.append(spec['mpi'].prefix.include)
library_dirs.append(spec['mpi'].prefix.lib)
include_flags = '-I{0}'.format(','.join(include_dirs))
library_flags = '-L{0}'.format(','.join(library_dirs))
python(setup, 'clean', '--all')
python(setup, 'build_ext', include_flags, library_flags)
python(setup, 'install', '--prefix={0}'.format(prefix))
python(setup, 'bdist', include_flags, library_flags)

View file

@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
import platform
class PyNumpy(Package):
@ -48,6 +49,18 @@ class PyNumpy(Package):
depends_on('blas', when='+blas')
depends_on('lapack', when='+lapack')
def setup_dependent_package(self, module, dep_spec):
python_version = self.spec['python'].version.up_to(2)
arch = '{0}-{1}'.format(platform.system().lower(), platform.machine())
self.spec.include = join_path(
self.prefix.lib,
'python{0}'.format(python_version),
'site-packages',
'numpy-{0}-py{1}-{2}.egg'.format(
self.spec.version, python_version, arch),
'numpy/core/include')
def install(self, spec, prefix):
libraries = []
library_dirs = []

View file

@ -22,9 +22,9 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Swig(Package):
"""SWIG is an interface compiler that connects programs written in
C and C++ with scripting languages such as Perl, Python, Ruby,
@ -38,6 +38,7 @@ class Swig(Package):
homepage = "http://www.swig.org"
url = "http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz"
version('3.0.10', 'bb4ab8047159469add7d00910e203124')
version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97')
version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41')
version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4')