From 89775e32c06be67c770f1d25028838306825f1e1 Mon Sep 17 00:00:00 2001 From: Ryan Marcellino <67644978+myan-rarcellino-nnl@users.noreply.github.com> Date: Sat, 7 May 2022 19:49:33 -0400 Subject: vim: add +gtk variant to pair with +gui (#30520) * vim: add +gtk3 variant to pair with +gui * address review comments --- var/spack/repos/builtin/packages/vim/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py index 3a455ed760..bdc1858ae9 100644 --- a/var/spack/repos/builtin/packages/vim/package.py +++ b/var/spack/repos/builtin/packages/vim/package.py @@ -42,6 +42,7 @@ class Vim(AutotoolsPackage): variant('python', default=False, description="build with Python") variant('ruby', default=False, description="build with Ruby") variant('x', default=False, description="use the X Window System") + variant('gtk', default=False, when='+gui', description="use the GTKv3 gui.") for _f in _features[1:]: conflicts('+gui', when='features=' + _f, @@ -61,6 +62,7 @@ class Vim(AutotoolsPackage): depends_on('libxpm', when="+x") depends_on('libxt', when="+x") depends_on('libxtst', when="+x") + depends_on('gtkplus@3:', when="+gtk") provides('xxd') @@ -88,8 +90,12 @@ class Vim(AutotoolsPackage): else: args.append("--enable-python3interp=no") + if '+gui' in spec: + args.append("--enable-gui={}".format('gtk3' if '+gtk' in spec else 'auto')) + else: + args.append("--enable-gui=no") + args.extend([ - "--enable-gui=" + ('auto' if '+gui' in spec else 'no'), "--enable-luainterp=" + yes_or_no('lua'), "--enable-perlinterp=" + yes_or_no('perl'), "--enable-rubyinterp=" + yes_or_no('ruby'), -- cgit v1.2.3-70-g09d2