summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Aumüller <aumuell@reserv.at>2023-07-17 17:53:47 +0200
committerGitHub <noreply@github.com>2023-07-17 08:53:47 -0700
commit193e6e767854432b4e21478284ed7935364576e5 (patch)
tree676b8c0113f6f66dead67b1f804105c2904d25d3
parentdc216adde2d190fffba6306620f5159848f6e17c (diff)
downloadspack-193e6e767854432b4e21478284ed7935364576e5.tar.gz
spack-193e6e767854432b4e21478284ed7935364576e5.tar.bz2
spack-193e6e767854432b4e21478284ed7935364576e5.tar.xz
spack-193e6e767854432b4e21478284ed7935364576e5.zip
qt-base: fix build on macos, when +network (#38519)
* qt-base: always link to GSS framework on macOS On macos, the code in src/network/kernel/qauthenticator.cpp unconditionally includes the header from the GSS framework, so we should link against it. This applies two patches from the dev branch. They are to be cherry-picked into the 6.5 (probably released with 6.5.2) and 6.6 branches, but they apply against 6.3.2 as well. * qt-base: disable libproxy on macOS src/network/CMakeLists.txt disables it on MACOS anyway. And as it is not found without pkg-config, building with +network would break because of the feature being explicitly enabled. * qt-base: don't depend on pkgconfig on macOS On macOS, usage of pkg-config is disabled by unsetting PKG_CONFIG_EXECUTABLE, unless the feature pkg-config is requested explicitly. * qt-base: don't depend on at-spi2-core on macOS Does not build on macOS and seems to be targeted at linux. Qt6 on homebrew does not depend on it, either. * qt-base: fix long lines * qt-base: restrict use of pkgconfig to linux yes, probably not needed on windows, either Co-authored-by: Alec Scott <alec@bcs.sh> * qt-base: disable libproxy on Windows as well according to src/network/CMakeLists.txt it's only used on Unix * qt-base: improvements based on reviewer suggestions --------- Co-authored-by: Alec Scott <alec@bcs.sh>
-rw-r--r--var/spack/repos/builtin/packages/qt-base/package.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py
index ebc8762992..81123bcdcf 100644
--- a/var/spack/repos/builtin/packages/qt-base/package.py
+++ b/var/spack/repos/builtin/packages/qt-base/package.py
@@ -36,7 +36,7 @@ class QtPackage(CMakePackage):
# Default dependencies for all qt-* components
generator("ninja")
depends_on("cmake@3.16:", type="build")
- depends_on("pkgconfig", type="build")
+ depends_on("pkgconfig", type="build", when="platform=linux")
depends_on("python", type="build")
# List of unnecessary directories in src/3rdparty
@@ -130,8 +130,7 @@ class QtBase(QtPackage):
depends_on("zstd")
with when("platform=linux"):
depends_on("libdrm")
-
- depends_on("at-spi2-core", when="+accessibility")
+ depends_on("at-spi2-core", when="+accessibility")
depends_on("dbus", when="+dbus")
depends_on("gl", when="+opengl")
depends_on("sqlite", when="+sql")
@@ -148,12 +147,24 @@ class QtBase(QtPackage):
depends_on("libxrender")
with when("+network"):
- depends_on("libproxy")
depends_on("openssl")
+ with when("platform=linux"):
+ depends_on("libproxy")
# Qt6 requires newer compilers: see https://github.com/spack/spack/issues/34418
conflicts("%gcc@:7")
+ # ensure that Qt links against GSS framework on macOS: https://bugreports.qt.io/browse/QTBUG-114537
+ with when("@6.3.2:6.5.1"):
+ patch(
+ "https://github.com/qt/qtbase/commit/c3d3e7312499189dde2ff9c0cb14bd608d6fd1cd.patch?full_index=1",
+ sha256="85c16db15406b0094831bb57016dab7e0c0fd0978b082a1dc103c87334db7915",
+ )
+ patch(
+ "https://github.com/qt/qtbase/commit/1bf144ba78ff10d712b4de55d2797b9256948a1d.patch?full_index=1",
+ sha256="e4d9f1aee0566558e77eef5609b63c1fde3f3986bea1b9d5d7930b297f916a5e",
+ )
+
@property
def archive_files(self):
"""Save both the CMakeCache and the config summary."""
@@ -211,7 +222,9 @@ class QtBase(QtPackage):
if "+dbus" in spec:
features.append("dbus_linked")
if "+network" in spec:
- features += ["openssl_linked", "openssl", "libproxy"]
+ features.extend(["openssl_linked", "openssl"])
+ if sys.platform == "linux":
+ features.append("libproxy")
for k in features:
define("FEATURE_" + k, True)