diff options
author | Chris Green <greenc@fnal.gov> | 2019-03-25 20:04:33 -0500 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-03-25 20:04:33 -0500 |
commit | a4bf8de09bfeb4d265369a0b8d7613aeea76e004 (patch) | |
tree | ff398c09f3482c0d294e9b9183f2699e81d832ed | |
parent | 4c68d2e14e29705d426c803a9f0ce16a22473dd3 (diff) | |
download | spack-a4bf8de09bfeb4d265369a0b8d7613aeea76e004.tar.gz spack-a4bf8de09bfeb4d265369a0b8d7613aeea76e004.tar.bz2 spack-a4bf8de09bfeb4d265369a0b8d7613aeea76e004.tar.xz spack-a4bf8de09bfeb4d265369a0b8d7613aeea76e004.zip |
gl2ps: add missing dependencies and doc variant. (#10886)
Makes building of documentation optional.
-rw-r--r-- | var/spack/repos/builtin/packages/gl2ps/package.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/gl2ps/package.py b/var/spack/repos/builtin/packages/gl2ps/package.py index 4104c70561..823c34c7a4 100644 --- a/var/spack/repos/builtin/packages/gl2ps/package.py +++ b/var/spack/repos/builtin/packages/gl2ps/package.py @@ -17,12 +17,14 @@ class Gl2ps(CMakePackage): variant('png', default=True, description='Enable PNG support') variant('zlib', default=True, description='Enable compression using ZLIB') + variant('doc', default=False, + description='Generate documentation using pdflatex') depends_on('cmake@2.4:', type='build') - # TODO: Add missing dependencies on OpenGL/Mesa and LaTeX - # X11 libraries: + depends_on('freeglut') + depends_on('gl') depends_on('libice') depends_on('libsm') depends_on('libxau') @@ -40,12 +42,18 @@ class Gl2ps(CMakePackage): depends_on('libpng', when='+png') depends_on('zlib', when='+zlib') + depends_on('texlive', type='build', when='+doc') def variant_to_bool(self, variant): return 'ON' if variant in self.spec else 'OFF' def cmake_args(self): - return [ + options = [ '-DENABLE_PNG={0}'.format(self.variant_to_bool('+png')), '-DENABLE_ZLIB={0}'.format(self.variant_to_bool('+zlib')), ] + if '~doc' in self.spec: + # Make sure we don't look. + options.append('-DCMAKE_DISABLE_FIND_PACKAGE_LATEX:BOOL=ON') + + return options |