summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2019-07-11 22:21:17 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2019-07-11 22:21:17 -0500
commit909c5f5019648d39e94a82a1a6fdb6bca5a4e606 (patch)
treecad935e126d9e709477f52dfc9a69803154123e4
parent4288dac35bebffe4f576f448389a382f053b17b5 (diff)
downloadspack-909c5f5019648d39e94a82a1a6fdb6bca5a4e606.tar.gz
spack-909c5f5019648d39e94a82a1a6fdb6bca5a4e606.tar.bz2
spack-909c5f5019648d39e94a82a1a6fdb6bca5a4e606.tar.xz
spack-909c5f5019648d39e94a82a1a6fdb6bca5a4e606.zip
Add variants for tk package (#11956)
TK can be built with support for libXft and X Screensaver. Both of these are turned on in the Tk configure script. That means the system libraries will get picked up if they are on the system and nothing is specified in the package. Since the default for both of them is 'True' I set the default value for the variants to 'True'.
-rw-r--r--var/spack/repos/builtin/packages/tk/package.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py
index c9bc2ce3e6..2a09333740 100644
--- a/var/spack/repos/builtin/packages/tk/package.py
+++ b/var/spack/repos/builtin/packages/tk/package.py
@@ -23,10 +23,17 @@ class Tk(AutotoolsPackage):
version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221')
version('8.5.19', 'e89df710447cce0fc0bde65667c12f85')
+ variant('xft', default=True,
+ description='Enable X FreeType')
+ variant('xss', default=True,
+ description='Enable X Screen Saver')
+
extends('tcl')
depends_on('tcl@8.6:', when='@8.6:')
depends_on('libx11')
+ depends_on('libxft', when='+xft')
+ depends_on('libxscrnsaver', when='+xss')
configure_directory = 'unix'
@@ -65,9 +72,15 @@ class Tk(AutotoolsPackage):
def configure_args(self):
spec = self.spec
- return ['--with-tcl={0}'.format(spec['tcl'].prefix.lib),
- '--x-includes={0}'.format(spec['libx11'].prefix.include),
- '--x-libraries={0}'.format(spec['libx11'].prefix.lib)]
+ config_args = [
+ '--with-tcl={0}'.format(spec['tcl'].prefix.lib),
+ '--x-includes={0}'.format(spec['libx11'].prefix.include),
+ '--x-libraries={0}'.format(spec['libx11'].prefix.lib)
+ ]
+ config_args += self.enable_or_disable('xft')
+ config_args += self.enable_or_disable('xss')
+
+ return config_args
@run_after('install')
def symlink_wish(self):