summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAmiya Maji <amaji@purdue.edu>2021-04-06 03:45:00 -0400
committerGitHub <noreply@github.com>2021-04-06 09:45:00 +0200
commit7e6386803e1f43c9541b20e8fdda358b90dc0e82 (patch)
tree583cbfae24414baede0b7c0d571642fb5d59b1b2 /var
parent8dab9f0a81a8cfa686160e7bef947400506f38f5 (diff)
downloadspack-7e6386803e1f43c9541b20e8fdda358b90dc0e82.tar.gz
spack-7e6386803e1f43c9541b20e8fdda358b90dc0e82.tar.bz2
spack-7e6386803e1f43c9541b20e8fdda358b90dc0e82.tar.xz
spack-7e6386803e1f43c9541b20e8fdda358b90dc0e82.zip
fltk: add explicit dependency on gl and a variant to activate it (#22761)
* The fltk package can build libraries with opengl support. By default, the configure script looks for opengl headers in the sytem include paths. If 'devel' packages have not been installed on the system it omits the 'ftlk_gl.so' library. This can break packages like 'octave' which expects 'fltk' to have opengl support and looks for the library 'fltk_gl'. Make opengl support explicit in fltk by adding a dependency on 'gl' and adding a new variant of the same name 'gl' (default On). With these modifications 'fltk_gl' and 'octave' build successfully on CentOS8. The default behavior is to always enable opengl. https://www.fltk.org/doc-1.3/intro.html
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/fltk/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fltk/package.py b/var/spack/repos/builtin/packages/fltk/package.py
index 2c1f93578d..99509b6308 100644
--- a/var/spack/repos/builtin/packages/fltk/package.py
+++ b/var/spack/repos/builtin/packages/fltk/package.py
@@ -38,6 +38,12 @@ class Fltk(Package):
variant('shared', default=True,
description='Enables the build of shared libraries')
+ variant('gl', default=True,
+ description='Enables opengl support')
+
+ # variant dependencies
+ depends_on('gl', when='+gl')
+
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix,
'--enable-localjpeg',
@@ -47,6 +53,9 @@ class Fltk(Package):
if '+shared' in spec:
options.append('--enable-shared')
+ if '~gl' in spec:
+ options.append('--disable-gl')
+
# FLTK needs to be built in-source
configure(*options)
make()