diff options
author | Brian Vanderwende <vanderwb@ucar.edu> | 2024-03-02 11:26:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 10:26:36 -0800 |
commit | 4af9ec3d8a30090541a322988b78262723ffe45b (patch) | |
tree | 01840b5120db6577b5126434e7dda2140dbbd65c | |
parent | eb90e2c8943ce10795fc19380e53c5f825d493ae (diff) | |
download | spack-4af9ec3d8a30090541a322988b78262723ffe45b.tar.gz spack-4af9ec3d8a30090541a322988b78262723ffe45b.tar.bz2 spack-4af9ec3d8a30090541a322988b78262723ffe45b.tar.xz spack-4af9ec3d8a30090541a322988b78262723ffe45b.zip |
Add ncvis package and add option to wxwidgets (#38204)
* Add ncvis and opengl option for wxwidgets
* Style fixes for ncvis
* Replace in with satisfies for opengl constraint
Co-authored-by: Alec Scott <alec@bcs.sh>
---------
Co-authored-by: Alec Scott <alec@bcs.sh>
-rw-r--r-- | var/spack/repos/builtin/packages/ncvis/package.py | 32 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/wxwidgets/package.py | 6 |
2 files changed, 38 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ncvis/package.py b/var/spack/repos/builtin/packages/ncvis/package.py new file mode 100644 index 0000000000..aa56e4e342 --- /dev/null +++ b/var/spack/repos/builtin/packages/ncvis/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Ncvis(CMakePackage): + """A NetCDF file viewer. ncvis is inspired by David Pierce's + most excellent ncview utility.""" + + homepage = "https://github.com/SEATStandards/ncvis" + url = "https://github.com/SEATStandards/ncvis/archive/refs/tags/2022.08.28.tar.gz" + git = "https://github.com/SEATStandards/ncvis.git" + + maintainers("vanderwb") + + version( + "2022.08.28", sha256="a522926739b2a05ef0b436fe67a2014557f9e5fecf3b7d7700964e9006a4bf3e" + ) + + depends_on("cmake", type="build") + depends_on("netcdf-c", type="link") + depends_on("wxwidgets+opengl", type="link") + + @run_after("install") + def install_resources(self): + install_tree("resources", self.prefix.resources) + + def setup_run_environment(self, env): + env.set("NCVIS_RESOURCE_DIR", self.prefix.resources) diff --git a/var/spack/repos/builtin/packages/wxwidgets/package.py b/var/spack/repos/builtin/packages/wxwidgets/package.py index ea4dfac626..de62cbb39a 100644 --- a/var/spack/repos/builtin/packages/wxwidgets/package.py +++ b/var/spack/repos/builtin/packages/wxwidgets/package.py @@ -29,10 +29,13 @@ class Wxwidgets(AutotoolsPackage): version("3.0.2", sha256="346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d") version("3.0.1", sha256="bd671b79ec56af8fb3844e11cafceac1a4276fb02c79404d06b91b6c19d2c5f5") + variant("opengl", default=False, description="Enable OpenGL support") + patch("math_include.patch", when="@3.0.1:3.0.2") depends_on("pkgconfig", type="build") depends_on("gtkplus") + depends_on("mesa-glu", when="+opengl") @when("@:3.0.2") def build(self, spec, prefix): @@ -42,6 +45,9 @@ class Wxwidgets(AutotoolsPackage): spec = self.spec options = ["--enable-unicode", "--disable-precomp-headers"] + if self.spec.satisfies("+opengl"): + options.append("--with-opengl") + # see https://trac.wxwidgets.org/ticket/17639 if spec.satisfies("@:3.1.0") and sys.platform == "darwin": options.extend(["--disable-qtkit", "--disable-mediactrl"]) |