summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorVeselin Dobrev <v-dobrev@users.noreply.github.com>2022-11-07 07:31:59 -0800
committerGitHub <noreply@github.com>2022-11-07 16:31:59 +0100
commit476e647c942add4d2cbb7700fecf0f3f5b75fcd8 (patch)
treec70d5704a0d0f08bbeca14058228d5660bdcf19b /var
parentc3851704a205b87244fe157ade895cfc16380377 (diff)
downloadspack-476e647c942add4d2cbb7700fecf0f3f5b75fcd8.tar.gz
spack-476e647c942add4d2cbb7700fecf0f3f5b75fcd8.tar.bz2
spack-476e647c942add4d2cbb7700fecf0f3f5b75fcd8.tar.xz
spack-476e647c942add4d2cbb7700fecf0f3f5b75fcd8.zip
GLVis: new versions: v4.1, v4.2 (#33728)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/glvis/package.py62
-rw-r--r--var/spack/repos/builtin/packages/sdl2/package.py5
2 files changed, 50 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/glvis/package.py b/var/spack/repos/builtin/packages/glvis/package.py
index 4f99698123..3425991a2f 100644
--- a/var/spack/repos/builtin/packages/glvis/package.py
+++ b/var/spack/repos/builtin/packages/glvis/package.py
@@ -2,6 +2,9 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+import sys
+
import spack.build_systems.makefile
from spack.package import *
@@ -13,7 +16,7 @@ class Glvis(MakefilePackage):
git = "https://github.com/glvis/glvis.git"
tags = ["radiuss"]
- maintainers = ["goxberry", "v-dobrev", "tzanio", "tomstitt"]
+ maintainers = ["v-dobrev", "tzanio", "tomstitt", "goxberry"]
# glvis (like mfem) is downloaded from a URL shortener at request
# of upstream author Tzanio Kolev <tzanio@llnl.gov>. See here:
@@ -40,6 +43,20 @@ class Glvis(MakefilePackage):
version("develop", branch="master")
version(
+ "4.2",
+ sha256="314fb04040cd0a8128d6dac62ba67d7067c2c097364e5747182ee8371049b42a",
+ url="https://bit.ly/glvis-4-2",
+ extension=".tar.gz",
+ )
+
+ version(
+ "4.1",
+ sha256="7542c2942167533eec10d59b8331d18241798bbd86a7efbe51dc479db4127407",
+ url="https://bit.ly/glvis-4-1",
+ extension=".tar.gz",
+ )
+
+ version(
"4.0",
sha256="68331eaea8b93968ed6bf395388c2730b27bbcb4b7809ce44277726edccd9f08",
url="https://bit.ly/glvis-4-0",
@@ -83,22 +100,31 @@ class Glvis(MakefilePackage):
variant("fonts", default=True, description="Use antialiased fonts via freetype & fontconfig")
depends_on("mfem@develop", when="@develop")
+ depends_on("mfem@4.4.0:", when="@4.2")
+ depends_on("mfem@4.3.0:", when="@4.1")
depends_on("mfem@4.0.0:", when="@4.0")
depends_on("mfem@3.4.0", when="@3.4")
depends_on("mfem@3.3", when="@3.3")
depends_on("mfem@3.2", when="@3.2")
depends_on("mfem@3.1", when="@3.1")
- depends_on("gl")
- depends_on("glu")
- depends_on("libx11", when="@:3.5")
+ with when("@:3"):
+ depends_on("gl")
+ depends_on("glu")
+ depends_on("libx11")
- with when("@4.0:,develop"):
+ with when("@4.0:"):
+ # On Mac, we use the OpenGL framework
+ if sys.platform.startswith("linux"):
+ depends_on("gl")
depends_on("sdl2")
depends_on("glm")
+ # On Mac, use external glew, e.g. from Homebrew
depends_on("glew")
+ # On Mac, use external freetype and fontconfig, e.g. from /opt/X11
depends_on("freetype")
depends_on("fontconfig")
+ depends_on("xxd", type="build")
with when("+fonts"):
depends_on("freetype")
@@ -106,7 +132,6 @@ class Glvis(MakefilePackage):
depends_on("libpng", when="screenshots=png")
depends_on("libtiff", when="screenshots=tiff")
- depends_on("uuid", when="platform=linux")
class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
@@ -127,15 +152,20 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
"CONFIG_MK={0}".format(self.spec["mfem"].package.config_mk),
]
- if self.spec.satisfies("@4.0:") or self.spec.satisfies("@develop"):
- # TODO: glu and fontconfig dirs
+ if self.spec.satisfies("@4.0:"):
+ # Spack will inject the necessary include dirs and link paths via
+ # its compiler wrapper, so we can skip them:
result += [
- "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"].home),
+ "GLM_DIR=",
+ "SDL_DIR=",
+ "GLEW_DIR=",
+ "FREETYPE_DIR=",
+ "OPENGL_DIR=",
]
+ # Spack will not inject include dirs like /usr/include/freetype2,
+ # so we need to do it ourselves:
+ if spec["freetype"].external:
+ result += ["GL_OPTS={0}".format(spec["freetype"].headers.cpp_flags)]
else:
gl_libs = spec["glu"].libs + spec["gl"].libs + spec["libx11"].libs
@@ -174,13 +204,13 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
]
def xwd_args(self):
- if self.spec.satisfies("@4.0:") or self.spec.satisfies("@develop"):
+ if self.spec.satisfies("@4.0:"):
return ["GLVIS_USE_LIBPNG=NO", "GLVIS_USE_LIBTIFF=NO"]
return ["USE_LIBPNG=NO", "USE_LIBTIFF=NO"]
def png_args(self):
prefix_args = ["USE_LIBPNG=YES", "USE_LIBTIFF=NO"]
- if self.spec.satisfies("@4.0:") or self.spec.satisfies("@develop"):
+ if self.spec.satisfies("@4.0:"):
prefix_args = ["GLVIS_USE_LIBPNG=YES", "GLVIS_USE_LIBTIFF=NO"]
libpng = self.spec["libpng"]
@@ -191,7 +221,7 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
def tiff_args(self):
prefix_args = ["USE_LIBPNG=NO", "USE_LIBTIFF=YES"]
- if self.spec.satisfies("@4.0:") or self.spec.satisfies("@develop"):
+ if self.spec.satisfies("@4.0:"):
prefix_args = ["GLVIS_USE_LIBPNG=NO", "GLVIS_USE_LIBTIFF=YES"]
libtiff = self.spec["libtiff"]
diff --git a/var/spack/repos/builtin/packages/sdl2/package.py b/var/spack/repos/builtin/packages/sdl2/package.py
index 459fdf178f..2d01bf8901 100644
--- a/var/spack/repos/builtin/packages/sdl2/package.py
+++ b/var/spack/repos/builtin/packages/sdl2/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
@@ -22,7 +24,8 @@ class Sdl2(CMakePackage):
version("2.0.5", sha256="442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785")
depends_on("cmake@2.8.5:", type="build")
- depends_on("libxext", type="link")
+ if sys.platform.startswith("linux"):
+ depends_on("libxext", type="link")
def cmake_args(self):
return ["-DSSEMATH={0}".format("OFF" if self.spec.target.family == "aarch64" else "ON")]