diff options
author | Wouter Deconinck <wdconinc@gmail.com> | 2024-11-16 09:09:41 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-16 09:09:41 -0600 |
commit | 448049ccfcd1c841cedd11dd38473e61a8108c34 (patch) | |
tree | 986f9b63f881a43f0a60ba5fd4906023dc34d51f | |
parent | e56057fd795d30146d58934840fe5b6e96f71e65 (diff) | |
download | spack-448049ccfcd1c841cedd11dd38473e61a8108c34.tar.gz spack-448049ccfcd1c841cedd11dd38473e61a8108c34.tar.bz2 spack-448049ccfcd1c841cedd11dd38473e61a8108c34.tar.xz spack-448049ccfcd1c841cedd11dd38473e61a8108c34.zip |
qt-tools: new package (#45602)
* qt-tools: new pkg with +designer to build Qt Designer for QWT
* qt-tools: fix style
* qt-tools: fix unused variable
* qt-tools: rm setup_run_environments (now in qt-base)
* qt-tools: add myself as maintainer
* qt-tools: add variant assistant; use commits with submodule
* qt-base: define QtPackage.get_git
-rw-r--r-- | var/spack/repos/builtin/packages/qt-base/package.py | 5 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/qt-tools/package.py | 60 |
2 files changed, 65 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py index ca3acad654..ff1d8f5a46 100644 --- a/var/spack/repos/builtin/packages/qt-base/package.py +++ b/var/spack/repos/builtin/packages/qt-base/package.py @@ -28,6 +28,11 @@ class QtPackage(CMakePackage): return _url.format(qualname.lower()) @staticmethod + def get_git(qualname): + _git = "https://github.com/qt/{}.git" + return _git.format(qualname.lower()) + + @staticmethod def get_list_url(qualname): _list_url = "https://github.com/qt/{}/tags" return _list_url.format(qualname.lower()) diff --git a/var/spack/repos/builtin/packages/qt-tools/package.py b/var/spack/repos/builtin/packages/qt-tools/package.py new file mode 100644 index 0000000000..afb28b8a76 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt-tools/package.py @@ -0,0 +1,60 @@ +# Copyright 2013-2024 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 * +from spack.pkg.builtin.qt_base import QtBase, QtPackage + + +class QtTools(QtPackage): + """Qt Tools contains tools like Qt Designer.""" + + url = QtPackage.get_url(__qualname__) + git = QtPackage.get_git(__qualname__) + list_url = QtPackage.get_list_url(__qualname__) + + maintainers("wdconinc") + + license("BSD-3-Clause") + + # src/assistant/qlitehtml is a submodule that is not in the git archive + version("6.7.3", commit="ec4747e62a837a0262212a5f4fb03734660c7360", submodules=True) + version("6.7.2", commit="46ffaed90df8c14d67b4b16fdf5e0b87ab227c88", submodules=True) + + variant( + "assistant", + default=False, + description="Qt Assistant for viewing on-line documentation in Qt help file format.", + ) + variant( + "designer", + default=False, + description="Qt Widgets Designer for designing and building GUIs with Qt Widgets.", + ) + + depends_on("llvm +clang") + + depends_on("qt-base +network") + depends_on("qt-base +widgets", when="+designer") + + for _v in QtBase.versions: + v = str(_v) + depends_on("qt-base@" + v, when="@" + v) + + def cmake_args(self): + spec = self.spec + + args = super().cmake_args() + [] + + def define(cmake_var, value): + args.append(self.define(cmake_var, value)) + + if spec.satisfies("+assistant"): + define("FEATURE_assistant", True) + + if spec.satisfies("+designer"): + define("FEATURE_designer", True) + + return args |