GLVis: new versions: v4.1, v4.2 (#33728)
This commit is contained in:
		| @@ -2,6 +2,9 @@ | |||||||
| # Spack Project Developers. See the top-level COPYRIGHT file for details. | # Spack Project Developers. See the top-level COPYRIGHT file for details. | ||||||
| # | # | ||||||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||||
|  | 
 | ||||||
|  | import sys | ||||||
|  | 
 | ||||||
| import spack.build_systems.makefile | import spack.build_systems.makefile | ||||||
| from spack.package import * | from spack.package import * | ||||||
| 
 | 
 | ||||||
| @@ -13,7 +16,7 @@ class Glvis(MakefilePackage): | |||||||
|     git = "https://github.com/glvis/glvis.git" |     git = "https://github.com/glvis/glvis.git" | ||||||
|     tags = ["radiuss"] |     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 |     # 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: | ||||||
| @@ -39,6 +42,20 @@ class Glvis(MakefilePackage): | |||||||
| 
 | 
 | ||||||
|     version("develop", branch="master") |     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( |     version( | ||||||
|         "4.0", |         "4.0", | ||||||
|         sha256="68331eaea8b93968ed6bf395388c2730b27bbcb4b7809ce44277726edccd9f08", |         sha256="68331eaea8b93968ed6bf395388c2730b27bbcb4b7809ce44277726edccd9f08", | ||||||
| @@ -83,22 +100,31 @@ class Glvis(MakefilePackage): | |||||||
|     variant("fonts", default=True, description="Use antialiased fonts via freetype & fontconfig") |     variant("fonts", default=True, description="Use antialiased fonts via freetype & fontconfig") | ||||||
| 
 | 
 | ||||||
|     depends_on("mfem@develop", when="@develop") |     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@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") | ||||||
|     depends_on("mfem@3.1", when="@3.1") |     depends_on("mfem@3.1", when="@3.1") | ||||||
| 
 | 
 | ||||||
|  |     with when("@:3"): | ||||||
|         depends_on("gl") |         depends_on("gl") | ||||||
|         depends_on("glu") |         depends_on("glu") | ||||||
|     depends_on("libx11", when="@:3.5") |         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("sdl2") | ||||||
|         depends_on("glm") |         depends_on("glm") | ||||||
|  |         # On Mac, use external glew, e.g. from Homebrew | ||||||
|         depends_on("glew") |         depends_on("glew") | ||||||
|  |         # On Mac, use external freetype and fontconfig, e.g. from /opt/X11 | ||||||
|         depends_on("freetype") |         depends_on("freetype") | ||||||
|         depends_on("fontconfig") |         depends_on("fontconfig") | ||||||
|  |         depends_on("xxd", type="build") | ||||||
| 
 | 
 | ||||||
|     with when("+fonts"): |     with when("+fonts"): | ||||||
|         depends_on("freetype") |         depends_on("freetype") | ||||||
| @@ -106,7 +132,6 @@ class Glvis(MakefilePackage): | |||||||
| 
 | 
 | ||||||
|     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("uuid", when="platform=linux") |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder): | class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder): | ||||||
| @@ -127,15 +152,20 @@ def common_args(self): | |||||||
|             "CONFIG_MK={0}".format(self.spec["mfem"].package.config_mk), |             "CONFIG_MK={0}".format(self.spec["mfem"].package.config_mk), | ||||||
|         ] |         ] | ||||||
| 
 | 
 | ||||||
|         if self.spec.satisfies("@4.0:") or self.spec.satisfies("@develop"): |         if self.spec.satisfies("@4.0:"): | ||||||
|             # TODO: glu and fontconfig dirs |             # Spack will inject the necessary include dirs and link paths via | ||||||
|  |             # its compiler wrapper, so we can skip them: | ||||||
|             result += [ |             result += [ | ||||||
|                 "GLM_DIR={0}".format(spec["glm"].prefix), |                 "GLM_DIR=", | ||||||
|                 "SDL_DIR={0}".format(spec["sdl2"].prefix), |                 "SDL_DIR=", | ||||||
|                 "GLEW_DIR={0}".format(spec["glew"].prefix), |                 "GLEW_DIR=", | ||||||
|                 "FREETYPE_DIR={0}".format(spec["freetype"].prefix), |                 "FREETYPE_DIR=", | ||||||
|                 "OPENGL_DIR={0}".format(spec["gl"].home), |                 "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: |         else: | ||||||
|             gl_libs = spec["glu"].libs + spec["gl"].libs + spec["libx11"].libs |             gl_libs = spec["glu"].libs + spec["gl"].libs + spec["libx11"].libs | ||||||
| @@ -174,13 +204,13 @@ def fonts_args(self): | |||||||
|         ] |         ] | ||||||
| 
 | 
 | ||||||
|     def xwd_args(self): |     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 ["GLVIS_USE_LIBPNG=NO", "GLVIS_USE_LIBTIFF=NO"] | ||||||
|         return ["USE_LIBPNG=NO", "USE_LIBTIFF=NO"] |         return ["USE_LIBPNG=NO", "USE_LIBTIFF=NO"] | ||||||
| 
 | 
 | ||||||
|     def png_args(self): |     def png_args(self): | ||||||
|         prefix_args = ["USE_LIBPNG=YES", "USE_LIBTIFF=NO"] |         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"] |             prefix_args = ["GLVIS_USE_LIBPNG=YES", "GLVIS_USE_LIBTIFF=NO"] | ||||||
| 
 | 
 | ||||||
|         libpng = self.spec["libpng"] |         libpng = self.spec["libpng"] | ||||||
| @@ -191,7 +221,7 @@ def png_args(self): | |||||||
| 
 | 
 | ||||||
|     def tiff_args(self): |     def tiff_args(self): | ||||||
|         prefix_args = ["USE_LIBPNG=NO", "USE_LIBTIFF=YES"] |         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"] |             prefix_args = ["GLVIS_USE_LIBPNG=NO", "GLVIS_USE_LIBTIFF=YES"] | ||||||
| 
 | 
 | ||||||
|         libtiff = self.spec["libtiff"] |         libtiff = self.spec["libtiff"] | ||||||
|   | |||||||
| @@ -3,6 +3,8 @@ | |||||||
| # | # | ||||||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||||
| 
 | 
 | ||||||
|  | import sys | ||||||
|  | 
 | ||||||
| from spack.package import * | from spack.package import * | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @@ -22,6 +24,7 @@ class Sdl2(CMakePackage): | |||||||
|     version("2.0.5", sha256="442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785") |     version("2.0.5", sha256="442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785") | ||||||
| 
 | 
 | ||||||
|     depends_on("cmake@2.8.5:", type="build") |     depends_on("cmake@2.8.5:", type="build") | ||||||
|  |     if sys.platform.startswith("linux"): | ||||||
|         depends_on("libxext", type="link") |         depends_on("libxext", type="link") | ||||||
| 
 | 
 | ||||||
|     def cmake_args(self): |     def cmake_args(self): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Veselin Dobrev
					Veselin Dobrev