summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/tk/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/tk/package.py')
-rw-r--r--var/spack/repos/builtin/packages/tk/package.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py
index 1abcd26a24..071db04e63 100644
--- a/var/spack/repos/builtin/packages/tk/package.py
+++ b/var/spack/repos/builtin/packages/tk/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Tk(Package):
+class Tk(AutotoolsPackage):
"""Tk is a graphical user interface toolkit that takes developing
desktop applications to a higher level than conventional
approaches. Tk is the standard GUI not only for Tcl, but for
@@ -46,15 +46,15 @@ class Tk(Package):
base_url = "http://prdownloads.sourceforge.net/tcl"
return "{0}/tk{1}-src.tar.gz".format(base_url, version)
- def setup_environment(self, spack_env, env):
+ def setup_environment(self, spack_env, run_env):
# When using Tkinter from within spack provided python+tk, python
# will not be able to find Tcl/Tk unless TK_LIBRARY is set.
- env.set('TK_LIBRARY', join_path(self.prefix.lib, 'tk{0}'.format(
- self.spec.version.up_to(2))))
-
- def install(self, spec, prefix):
- with working_dir('unix'):
- configure("--prefix={0}".format(prefix),
- "--with-tcl={0}".format(spec['tcl'].prefix.lib))
- make()
- make("install")
+ run_env.set('TK_LIBRARY', join_path(self.prefix.lib, 'tk{0}'.format(
+ self.spec.version.up_to(2))))
+
+ def build_directory(self):
+ return 'unix'
+
+ def configure_args(self):
+ spec = self.spec
+ return ['--with-tcl={0}'.format(spec['tcl'].prefix.lib)]