summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/doxygen/package.py16
-rw-r--r--var/spack/repos/builtin/packages/ghostscript/package.py6
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py14
-rw-r--r--var/spack/repos/builtin/packages/turbomole/package.py76
4 files changed, 69 insertions, 43 deletions
diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py
index b8f15dee14..b2e9582b5a 100644
--- a/var/spack/repos/builtin/packages/doxygen/package.py
+++ b/var/spack/repos/builtin/packages/doxygen/package.py
@@ -22,12 +22,7 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-
-# Author: Justin Too <justin@doubleotoo.com>
-# Date: September 11, 2015
-
from spack import *
-import sys
class Doxygen(Package):
@@ -43,10 +38,15 @@ class Doxygen(Package):
version('1.8.11', 'f4697a444feaed739cfa2f0644abc19b')
version('1.8.10', '79767ccd986f12a0f949015efb5f058f')
+ # graphviz appears to be a run-time optional dependency
+ variant('graphviz', default=True, description='Build with dot command support from Graphviz.') # NOQA: ignore=E501
+
depends_on("cmake@2.8.12:")
- # flex does not build on OSX, but it's provided there anyway
- depends_on("flex", sys.platform != 'darwin')
- depends_on("bison", sys.platform != 'darwin')
+ depends_on("flex")
+ depends_on("bison")
+
+ # optional dependencies
+ depends_on("graphviz", when="+graphviz")
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py
index ba787f858f..707f65c902 100644
--- a/var/spack/repos/builtin/packages/ghostscript/package.py
+++ b/var/spack/repos/builtin/packages/ghostscript/package.py
@@ -24,18 +24,18 @@
##############################################################################
from spack import *
+
class Ghostscript(Package):
"""an interpreter for the PostScript language and for PDF. """
homepage = "http://ghostscript.com/"
- url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz"
+ url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.16.tar.gz"
version('9.16', '829319325bbdb83f5c81379a8f86f38f')
parallel = False
def install(self, spec, prefix):
- configure("--prefix=%s" %prefix, "--enable-shared")
+ configure("--prefix=%s" % prefix, "--enable-shared")
make()
make("install")
-
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index 203e7b7f3c..2f99015ba2 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -23,6 +23,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
+
class Graphviz(Package):
"""Graph Visualization Software"""
@@ -35,19 +37,27 @@ class Graphviz(Package):
# related to missing Perl packages. If spack begins support for Perl in the
# future, this package can be updated to depend_on('perl') and the
# ncecessary devel packages.
- variant('perl', default=False, description='Enable if you need the optional Perl language bindings.')
+ variant('perl', default=False, description='Enable if you need the optional Perl language bindings.') # NOQA: ignore=E501
parallel = False
depends_on("swig")
depends_on("python")
depends_on("ghostscript")
+ depends_on("pkg-config")
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix]
- if not '+perl' in spec:
+ if '+perl' not in spec:
options.append('--disable-perl')
+ # On OSX fix the compiler error:
+ # In file included from tkStubLib.c:15:
+ # /usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
+ # include <X11/Xlib.h>
+ if sys.platform == 'darwin':
+ options.append('CFLAGS=-I/opt/X11/include')
+
configure(*options)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/turbomole/package.py b/var/spack/repos/builtin/packages/turbomole/package.py
index 3362113d13..6ccce23f97 100644
--- a/var/spack/repos/builtin/packages/turbomole/package.py
+++ b/var/spack/repos/builtin/packages/turbomole/package.py
@@ -26,21 +26,22 @@ from spack import *
import os
import subprocess
+
class Turbomole(Package):
"""TURBOMOLE: Program Package for ab initio Electronic Structure
Calculations. NB: Requires a license to download."""
-
- # NOTE: Turbomole requires purchase of a license to download. Go to the
- # NOTE: Turbomole home page, http://www.turbomole-gmbh.com, for details.
- # NOTE: Spack will search the current directory for this file. It is
- # NOTE: probably best to add this file to a Spack mirror so that it can be
- # NOTE: found from anywhere. For information on setting up a Spack mirror
- # NOTE: see http://software.llnl.gov/spack/mirrors.html
+
+ # NOTE: Turbomole requires purchase of a license to download. Go to the
+ # NOTE: Turbomole home page, http://www.turbomole-gmbh.com, for details.
+ # NOTE: Spack will search the current directory for this file. It is
+ # NOTE: probably best to add this file to a Spack mirror so that it can be
+ # NOTE: found from anywhere. For information on setting up a Spack mirror
+ # NOTE: see http://software.llnl.gov/spack/mirrors.html
homepage = "http://www.turbomole-gmbh.com/"
version('7.0.2', '92b97e1e52e8dcf02a4d9ac0147c09d6',
- url="file://%s/turbolinux702.tar.gz" % os.getcwd())
+ url="file://%s/turbolinux702.tar.gz" % os.getcwd())
variant('mpi', default=False, description='Set up MPI environment')
variant('smp', default=False, description='Set up SMP environment')
@@ -56,33 +57,31 @@ class Turbomole(Package):
def do_fetch(self, mirror_only=True):
if '+mpi' in self.spec and '+smp' in self.spec:
- raise InstallError('Can not have both SMP and MPI enabled in the same build.')
+ raise InstallError('Can not have both SMP and MPI enabled in the '
+ 'same build.')
super(Turbomole, self).do_fetch(mirror_only)
def get_tm_arch(self):
- # For python-2.7 we could use `tm_arch = subprocess.check_output()`
- # Use the following for compatibility with python 2.6
if 'TURBOMOLE' in os.getcwd():
- tm_arch = subprocess.Popen(['sh', 'scripts/sysname'],
- stdout=subprocess.PIPE).communicate()[0]
+ tm_sysname = Executable('./scripts/sysname')
+ tm_arch = tm_sysname(output=str)
return tm_arch.rstrip('\n')
else:
return
-
+
def install(self, spec, prefix):
if spec.satisfies('@:7.0.2'):
calculate_version = 'calculate_2.4_linux64'
molecontrol_version = 'MoleControl_2.5'
- tm_arch=self.get_tm_arch()
+ tm_arch = self.get_tm_arch()
tar = which('tar')
dst = join_path(prefix, 'TURBOMOLE')
tar('-x', '-z', '-f', 'thermocalc.tar.gz')
with working_dir('thermocalc'):
- cmd = 'sh install <<<y'
- subprocess.call(cmd, shell=True)
+ subprocess.call('./install<<<y', shell=True)
install_tree('basen', join_path(dst, 'basen'))
install_tree('cabasen', join_path(dst, 'cabasen'))
@@ -108,13 +107,19 @@ class Turbomole(Package):
install('TURBOMOLE_702_LinuxPC', dst)
if '+mpi' in spec:
- install_tree('bin/%s_mpi' % tm_arch, join_path(dst, 'bin', '%s_mpi' % tm_arch))
- install_tree('libso/%s_mpi' % tm_arch, join_path(dst, 'libso', '%s_mpi' % tm_arch))
- install_tree('mpirun_scripts/%s_mpi' % tm_arch, join_path(dst, 'mpirun_scripts', '%s_mpi' % tm_arch))
+ install_tree('bin/%s_mpi' % tm_arch,
+ join_path(dst, 'bin', '%s_mpi' % tm_arch))
+ install_tree('libso/%s_mpi' % tm_arch,
+ join_path(dst, 'libso', '%s_mpi' % tm_arch))
+ install_tree('mpirun_scripts/%s_mpi' % tm_arch,
+ join_path(dst, 'mpirun_scripts', '%s_mpi' % tm_arch))
elif '+smp' in spec:
- install_tree('bin/%s_smp' % tm_arch, join_path(dst, 'bin', '%s_smp' % tm_arch))
- install_tree('libso/%s_smp' % tm_arch, join_path(dst, 'libso', '%s_smp' % tm_arch))
- install_tree('mpirun_scripts/%s_smp' % tm_arch, join_path(dst, 'mpirun_scripts', '%s_smp' % tm_arch))
+ install_tree('bin/%s_smp' % tm_arch,
+ join_path(dst, 'bin', '%s_smp' % tm_arch))
+ install_tree('libso/%s_smp' % tm_arch,
+ join_path(dst, 'libso', '%s_smp' % tm_arch))
+ install_tree('mpirun_scripts/%s_smp' % tm_arch,
+ join_path(dst, 'mpirun_scripts', '%s_smp' % tm_arch))
else:
install_tree('bin/%s' % tm_arch, join_path(dst, 'bin', tm_arch))
if '+mpi' in spec or '+smp' in spec:
@@ -131,18 +136,29 @@ class Turbomole(Package):
if self.spec.satisfies('@:7.0.2'):
molecontrol_version = 'MoleControl_2.5'
- tm_arch=self.get_tm_arch()
+ tm_arch = self.get_tm_arch()
run_env.set('TURBODIR', join_path(self.prefix, 'TURBOMOLE'))
- run_env.set('MOLE_CONTROL', join_path(self.prefix, 'TURBOMOLE', molecontrol_version))
+ run_env.set('MOLE_CONTROL',
+ join_path(self.prefix, 'TURBOMOLE', molecontrol_version))
- run_env.prepend_path('PATH', join_path(self.prefix, 'TURBOMOLE', 'thermocalc'))
- run_env.prepend_path('PATH', join_path(self.prefix, 'TURBOMOLE', 'scripts'))
+ run_env.prepend_path('PATH',
+ join_path(self.prefix, 'TURBOMOLE', 'thermocalc'))
+ run_env.prepend_path('PATH',
+ join_path(self.prefix, 'TURBOMOLE', 'scripts'))
if '+mpi' in self.spec:
run_env.set('PARA_ARCH', 'MPI')
- run_env.prepend_path('PATH', join_path(self.prefix, 'TURBOMOLE', 'bin', '%s_mpi' % tm_arch))
+ run_env.prepend_path('PATH',
+ join_path(self.prefix,
+ 'TURBOMOLE', 'bin', '%s_mpi'
+ % tm_arch))
elif '+smp' in self.spec:
run_env.set('PARA_ARCH', 'SMP')
- run_env.prepend_path('PATH', join_path(self.prefix, 'TURBOMOLE', 'bin', '%s_smp' % tm_arch))
+ run_env.prepend_path('PATH',
+ join_path(self.prefix,
+ 'TURBOMOLE', 'bin', '%s_smp'
+ % tm_arch))
else:
- run_env.prepend_path('PATH', join_path(self.prefix, 'TURBOMOLE', 'bin', tm_arch))
+ run_env.prepend_path('PATH',
+ join_path(self.prefix,
+ 'TURBOMOLE', 'bin', tm_arch))