glvis: add v4.0 (#25045)
This commit is contained in:
parent
737936d02c
commit
68f696af64
@ -12,7 +12,7 @@ class Glvis(MakefilePackage):
|
|||||||
homepage = "http://glvis.org"
|
homepage = "http://glvis.org"
|
||||||
git = "https://github.com/glvis/glvis.git"
|
git = "https://github.com/glvis/glvis.git"
|
||||||
|
|
||||||
maintainers = ['goxberry', 'v-dobrev', 'tzanio']
|
maintainers = ['goxberry', 'v-dobrev', 'tzanio', 'tomstitt']
|
||||||
|
|
||||||
# glvis (like mfem) is downloaded from a URL shortener at request
|
# glvis (like mfem) is downloaded from a URL shortener at request
|
||||||
# of upstream author Tzanio Kolev <tzanio@llnl.gov>. See here:
|
# of upstream author Tzanio Kolev <tzanio@llnl.gov>. See here:
|
||||||
@ -32,9 +32,17 @@ class Glvis(MakefilePackage):
|
|||||||
#
|
#
|
||||||
# If this quick verification procedure fails, additional discussion
|
# If this quick verification procedure fails, additional discussion
|
||||||
# will be required to verify the new version.
|
# will be required to verify the new version.
|
||||||
|
#
|
||||||
|
# glvis does not need mfem+mpi but will build that by default, to just build
|
||||||
|
# a serial mfem: `spack install glvis ^mfem~mpi~metis'
|
||||||
|
|
||||||
version('develop', branch='master')
|
version('develop', branch='master')
|
||||||
|
|
||||||
|
version('4.0',
|
||||||
|
sha256='68331eaea8b93968ed6bf395388c2730b27bbcb4b7809ce44277726edccd9f08',
|
||||||
|
url='https://bit.ly/glvis-4-0',
|
||||||
|
extension='.tar.gz')
|
||||||
|
|
||||||
version('3.4',
|
version('3.4',
|
||||||
sha256='289fbd2e09d4456e5fee6162bdc3e0b4c8c8d54625f3547ad2a69fef319279e7',
|
sha256='289fbd2e09d4456e5fee6162bdc3e0b4c8c8d54625f3547ad2a69fef319279e7',
|
||||||
url='https://bit.ly/glvis-3-4',
|
url='https://bit.ly/glvis-3-4',
|
||||||
@ -63,6 +71,7 @@ class Glvis(MakefilePackage):
|
|||||||
description='Use antialiased fonts via freetype & fontconfig')
|
description='Use antialiased fonts via freetype & fontconfig')
|
||||||
|
|
||||||
depends_on('mfem@develop', when='@develop')
|
depends_on('mfem@develop', when='@develop')
|
||||||
|
depends_on('mfem@4.0.0:', when='@4.0')
|
||||||
depends_on('mfem@3.4.0', when='@3.4')
|
depends_on('mfem@3.4.0', when='@3.4')
|
||||||
depends_on('mfem@3.3', when='@3.3')
|
depends_on('mfem@3.3', when='@3.3')
|
||||||
depends_on('mfem@3.2', when='@3.2')
|
depends_on('mfem@3.2', when='@3.2')
|
||||||
@ -70,12 +79,20 @@ class Glvis(MakefilePackage):
|
|||||||
|
|
||||||
depends_on('gl')
|
depends_on('gl')
|
||||||
depends_on('glu')
|
depends_on('glu')
|
||||||
depends_on('libx11')
|
depends_on('libx11', when='@:3.5')
|
||||||
|
|
||||||
|
depends_on('sdl2', when='@4.0:,develop')
|
||||||
|
depends_on('glm', when='@4.0:,develop')
|
||||||
|
depends_on('glew', when='@4.0:,develop')
|
||||||
|
|
||||||
depends_on('libpng', when='screenshots=png')
|
depends_on('libpng', when='screenshots=png')
|
||||||
depends_on('libtiff', when='screenshots=tiff')
|
depends_on('libtiff', when='screenshots=tiff')
|
||||||
depends_on('freetype', when='+fonts')
|
depends_on('freetype', when='+fonts')
|
||||||
|
depends_on('freetype', when='@4.0:,develop')
|
||||||
depends_on('fontconfig', when='+fonts')
|
depends_on('fontconfig', when='+fonts')
|
||||||
|
depends_on('fontconfig', when='@4.0:,develop')
|
||||||
|
|
||||||
|
depends_on('uuid', when='platform=linux')
|
||||||
|
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
|
|
||||||
@ -85,29 +102,53 @@ def yes_no(s):
|
|||||||
mfem = spec['mfem']
|
mfem = spec['mfem']
|
||||||
config_mk = mfem.package.config_mk
|
config_mk = mfem.package.config_mk
|
||||||
|
|
||||||
gl_libs = spec['glu'].libs + spec['gl'].libs + spec['libx11'].libs
|
|
||||||
args = ['CC={0}'.format(env['CC']),
|
args = ['CC={0}'.format(env['CC']),
|
||||||
'PREFIX={0}'.format(prefix.bin),
|
'PREFIX={0}'.format(prefix.bin),
|
||||||
'MFEM_DIR={0}'.format(mfem.prefix),
|
'MFEM_DIR={0}'.format(mfem.prefix),
|
||||||
'CONFIG_MK={0}'.format(config_mk),
|
'CONFIG_MK={0}'.format(config_mk)]
|
||||||
'GL_OPTS=-I{0} -I{1} -I{2}'.format(
|
|
||||||
|
png_args = ['PNG_OPTS=-DGLVIS_USE_LIBPNG -I{0}'.format(
|
||||||
|
spec['libpng'].prefix.include),
|
||||||
|
'PNG_LIBS={0}'.format(
|
||||||
|
spec['libpng'].libs.ld_flags)] if 'screenshots=png' in spec else []
|
||||||
|
|
||||||
|
tiff_args = ['TIFF_OPTS=-DGLVIS_USE_LIBTIFF -I{0}'.format(
|
||||||
|
spec['libtiff'].prefix.include),
|
||||||
|
'TIFF_LIBS={0}'.format(
|
||||||
|
spec['libtiff'].libs.ld_flags)] if 'screenshots=tiff' in spec else []
|
||||||
|
|
||||||
|
if "@4.0:" in spec or "@develop" in spec:
|
||||||
|
# TODO: glu and fontconfig dirs
|
||||||
|
args += ['GLM_DIR={0}'.format(spec['glm'].prefix),
|
||||||
|
'SDL_DIR={0}'.format(spec['sdl2'].prefix),
|
||||||
|
'GLEW_DIR={0}'.format(spec['glew'].prefix),
|
||||||
|
'FREETYPE_DIR={0}'.format(spec['freetype'].prefix),
|
||||||
|
'OPENGL_DIR={0}'.format(spec['gl'].prefix)]
|
||||||
|
|
||||||
|
if 'screenshots=png' in spec:
|
||||||
|
args += ['GLVIS_USE_LIBPNG=YES', 'GLVIS_USE_LIBTIFF=NO']
|
||||||
|
args.extend(png_args)
|
||||||
|
elif 'screenshots=tiff' in spec:
|
||||||
|
args += ['GLVIS_USE_LIBPNG=NO', 'GLVIS_USE_LIBTIFF=YES']
|
||||||
|
args.extend(tiff_args)
|
||||||
|
else:
|
||||||
|
args += ['GLVIS_USE_LIBPNG=NO', 'GLVIS_USE_LIBTIFF=NO']
|
||||||
|
|
||||||
|
else:
|
||||||
|
gl_libs = spec['glu'].libs + spec['gl'].libs + spec['libx11'].libs
|
||||||
|
|
||||||
|
args += ['GL_OPTS=-I{0} -I{1} -I{2}'.format(
|
||||||
spec['libx11'].prefix.include,
|
spec['libx11'].prefix.include,
|
||||||
spec['gl'].prefix.include,
|
spec['gl'].prefix.include,
|
||||||
spec['glu'].prefix.include),
|
spec['glu'].prefix.include),
|
||||||
'GL_LIBS={0}'.format(gl_libs.ld_flags)]
|
'GL_LIBS={0}'.format(gl_libs.ld_flags)]
|
||||||
|
|
||||||
if 'screenshots=png' in spec:
|
if 'screenshots=png' in spec:
|
||||||
args += [
|
args += ['USE_LIBPNG=YES', 'USE_LIBTIFF=NO']
|
||||||
'USE_LIBPNG=YES', 'USE_LIBTIFF=NO',
|
args.extend(png_args)
|
||||||
'PNG_OPTS=-DGLVIS_USE_LIBPNG -I{0}'.format(
|
|
||||||
spec['libpng'].prefix.include),
|
|
||||||
'PNG_LIBS={0}'.format(spec['libpng'].libs.ld_flags)]
|
|
||||||
elif 'screenshots=tiff' in spec:
|
elif 'screenshots=tiff' in spec:
|
||||||
args += [
|
args += ['USE_LIBPNG=NO', 'USE_LIBTIFF=YES']
|
||||||
'USE_LIBPNG=NO', 'USE_LIBTIFF=YES',
|
args.extend(tiff_args)
|
||||||
'TIFF_OPTS=-DGLVIS_USE_LIBTIFF -I{0}'.format(
|
|
||||||
spec['libtiff'].prefix.include),
|
|
||||||
'TIFF_LIBS={0}'.format(spec['libtiff'].libs.ld_flags)]
|
|
||||||
else:
|
else:
|
||||||
args += ['USE_LIBPNG=NO', 'USE_LIBTIFF=NO']
|
args += ['USE_LIBPNG=NO', 'USE_LIBTIFF=NO']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user