<commit_before># Copyright 2013-2021 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)
import itertools
import os
import platform
import sys

import llnl.util.tty as tty

from spack import *
from spack.operating_systems.mac_os import macos_version

MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None
LINUX_VERSION = Version(platform.release()) if platform.system() == 'Linux' else None


class Qt(Package):
    """Qt is a comprehensive cross-platform C++ application framework."""
    homepage = 'https://qt.io'

    # Supported releases: 'https://download.qt.io/official_releases/qt/'
    # Older archives: 'https://download.qt.io/new_archive/qt/'
    url      = 'https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz'
    list_url = 'https://download.qt.io/archive/qt/'
    list_depth = 3
    maintainers = ['sethrj']

    phases = ['configure', 'build', 'install']

    version('5.15.2', sha256='3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240')
    version('5.14.2', sha256='c6fcd53c744df89e7d3223c02838a33309bd1c291fcb6f9341505fe99f7f19fa')
    version('5.14.1', sha256='6f17f488f512b39c2feb57d83a5e0a13dcef32999bea2e2a8f832f54a29badb8', deprecated=True)
    version('5.14.0', sha256='be9a77cd4e1f9d70b58621d0753be19ea498e6b0da0398753e5038426f76a8ba', deprecated=True)
    version('5.13.1', sha256='adf00266dc38352a166a9739f1a24a1e36f1be9c04bf72e16e142a256436974e', deprecated=True)
    version('5.12.10', sha256='3e0ee1e57f5cf3eeb038d0b4b22c7eb442285c62639290756b39dc93a1d0e14f')
    version('5.12.7', sha256='873783a0302129d98a8f63de9afe4520fb5f8d5316be8ad7b760c59875cd8a8d', deprecated=True)
    version('5.12.5', sha256='a2299e21db7767caf98242767bffb18a2a88a42fee2d6a393bedd234f8c91298', deprecated=True)
    version('5.12.2', sha256='59b8cb4e728450b21224dcaaa40eb25bafc5196b6988f2225c394c6b7f881ff5', deprecated=True)
    version('5.11.3', sha256='859417642713cee2493ee3646a7fee782c9f1db39e41d7bb1322bba0c5f0ff4d', deprecated=True)
    version('5.11.2', sha256='c6104b840b6caee596fa9a35bc5f57f67ed5a99d6a36497b6fe66f990a53ca81', deprecated=True)
    version('5.10.0', sha256='936d4cf5d577298f4f9fdb220e85b008ae321554a5fcd38072dc327a7296230e', deprecated=True)
    version('5.9.9',  sha256='5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642')
    version('5.9.1',  sha256='7b41a37d4fe5e120cdb7114862c0153f86c07abbec8db71500443d2ce0c89795', deprecated=True)
    version('5.9.0',  sha256='f70b5c66161191489fc13c7b7eb69bf9df3881596b183e7f6d94305a39837517', deprecated=True)
    version('5.8.0', sha256='0f4c54386d3dbac0606a936a7145cebb7b94b0ca2d29bc001ea49642984824b6', deprecated=True)
    version('5.7.1', sha256='46ebca977deb629c5e69c2545bc5fe13f7e40012e5e2e451695c583bd33502fa', deprecated=True)
    version('5.7.0', sha256='a6a2632de7e44bbb790bc3b563f143702c610464a7f537d02036749041fd1800', deprecated=True)
    version('5.6.3',  sha256='2fa0cf2e5e8841b29a4be62062c1a65c4f6f2cf1beaf61a5fd661f520cd776d0')
    version('5.5.1',  sha256='c7fad41a009af1996b62ec494e438aedcb072b3234b2ad3eeea6e6b1f64be3b3', deprecated=True)
    version('5.4.2',  sha256='cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd', deprecated=True)
    version('5.4.0',  sha256='1739633424bde3d89164ae6ff1c5c913be38b9997e451558ef873aac4bbc408a', deprecated=True)
    version('5.3.2',  sha256='c8d3fd2ead30705c6673c5e4af6c6f3973346b4fb2bd6079c7be0943a5b0282d')
    version('5.2.1',  sha256='84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1')
    version('4.8.7',  sha256='e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0')
    version('4.8.6',  sha256='8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c')
    version('4.8.5',  sha256='eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138')
    version('3.3.8b', sha256='1b7a1ff62ec5a9cb7a388e2ba28fda6f960b27f27999482ebeceeadb72ac9f6e')

    variant('debug',      default=False,
            description="Build debug version.")
    variant('dbus',       default=False,
            description="Build with D-Bus support.")
    variant('doc',      default=False,
            description="Build QDoc and documentation.")
    variant('examples',   default=False,
            description="Build examples.")
    variant('framework',   default=bool(MACOS_VERSION),
            description="Build as a macOS Framework package.")
    variant('gtk',        default=False,
            description="Build with gtkplus.")
    variant('gui', default=True,
            description='Build the Qt GUI module and dependencies')
    variant('opengl',     default=False,
            description="Build with OpenGL support.")
    variant('phonon',     default=False,
            description="Build with phonon support.")
    variant('shared',     default=True,
            description='Build shared libraries.')
    variant('sql',        default=True,
            description="Build with SQL support.")
    variant('ssl',    default=True,
            description="Build with OpenSSL support.")
    variant('tools',      default=True,
            description="Build tools, including Qt Designer.")
    variant('webkit',     default=False,
            description="Build the Webkit extension")

    # Patches for qt@3
    patch('qt3-accept.patch', when='@3')
    patch('qt3-headers.patch', when='@3')

    # Patches for qt@4
    patch('qt4-configure-gcc.patch', when='@4:4.8.6 %gcc')
    patch('qt4-87-configure-gcc.patch', when='@4.8.7 %gcc')
    patch('qt4-tools.patch', when='@4+tools')
    patch('qt4-mac.patch', when='@4.8.7 platform=darwin')
    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925811
    patch("qt4-qforeach.patch", when="@4 %gcc@9:")

    # Patches for qt@4:
    # https://github.com/spack/spack/issues/1517
    patch('qt4-pcre.patch', when='@4')
    patch('qt5-pcre.patch', when='@5:')
    # https://bugreports.qt.io/browse/QTBUG-74196
    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89585
    patch('qt4-asm-volatile.patch', when='@4')
    patch('qt5-asm-volatile.patch', when='@5.0.0:5.12.1')

    # Patches for qt@5
    # https://bugreports.qt.io/browse/QTBUG-74219
    patch('qt5-btn_trigger_happy.patch', when='@5.7:5.12')
    # https://bugreports.qt.io/browse/QTBUG-57656
    patch('qt5-8-framework.patch', when='@5.8.0 +framework')
    # https://bugreports.qt.io/browse/QTBUG-58038
    patch('qt5-8-freetype.patch', when='@5.8.0 +gui')
    # https://codereview.qt-project.org/c/qt/qtbase/+/245425
    patch('https://github.com/qt/qtbase/commit/a52d7861edfb5956de38ba80015c4dd0b596259b.patch',
          sha256='c49b228c27e3ad46ec3af4bac0e9985af5b5b28760f238422d32e14f98e49b1e',
          working_dir='qtbase',
          when='@5.10:5.12.0 %gcc@9:')
    # https://github.com/Homebrew/homebrew-core/pull/5951
    patch('qt5-restore-pc-files.patch', when='@5.9:5.11 platform=darwin')
    # https://github.com/spack/spack/issues/14400
    patch('qt5-11-intel-overflow.patch', when='@5.11 %intel')
    patch('qt5-12-intel-overflow.patch', when='@5.12:5.14.0 %intel')
    # https://bugreports.qt.io/browse/QTBUG-78937
    patch('qt5-12-configure.patch', when='@5.12.7')
    # https://bugreports.qt.io/browse/QTBUG-93402
    patch('qt5-15-gcc-10.patch', when='@5.12.7:5.15 %gcc@8:')
    patch('qt514.patch', when='@5.14')
    patch('qt514-isystem.patch', when='@5.14.2')
    # https://bugreports.qt.io/browse/QTBUG-90395
    patch('https://src.fedoraproject.org/rpms/qt5-qtbase/raw/6ae41be8260f0f5403367eb01f7cd8319779674a/f/qt5-qtbase-gcc11.patch',
          sha256='9378afd071ad5c0ec8f7aef48421e4b9fab02f24c856bee9c0951143941913c5',
          working_dir='qtbase',
          when='@5.14: %gcc@11:')
    patch('https://src.fedoraproject.org/rpms/qt5-qtdeclarative/raw/593481a2541d3218f285dd7b46bdc5f4c76075ab/f/qt5-qtdeclarative-gcc11.patch',
          sha256='2081e9cb85f6712be9b63c70204efa3da954c07d857283eeae16d1b0409704bd',
          working_dir='qtdeclarative',
          when='@5.14: %gcc@11:')
    patch('https://src.fedoraproject.org/rpms/qt5-qtwebsockets/raw/f54f4ce6fa27941e9e6d606103d32056078edc74/f/qt5-qtwebsockets-gcc11.patch',
          sha256='84b099109d08adf177adf9d3542b6215ec3e42138041d523860dbfdcb59fdaae',
          working_dir='qtwebsockets',
          when='@5.14: %gcc@11:')
    conflicts('%gcc@10:', when='@5.9:5.12.6 +opengl')
    conflicts('%gcc@11:', when='@5.8')

    # Build-only dependencies
    depends_on("pkgconfig", type='build')
    depends_on("python", when='@5.7.0:', type='build')

    # Dependencies, then variant- and version-specific dependencies
    depends_on("icu4c")
    depends_on("jpeg")
    depends_on("libmng")
    depends_on("libtiff")
    depends_on("libxml2")
    depends_on("zlib")
    depends_on("freetype", when='+gui')
    depends_on("gtkplus", when='+gtk')
    depends_on("openssl", when='+ssl')
    depends_on("sqlite+column_metadata", when='+sql', type=('build', 'run'))

    depends_on("libpng@1.2.57", when='@3')
    depends_on("libsm", when='@3')
    depends_on("pcre+multibyte", when='@5.0:5.8')
    depends_on("inputproto", when='@:5.8')
    depends_on("openssl@:1.0", when='@4:5.9+ssl')

    depends_on("glib", when='@4:')
    depends_on("libpng", when='@4:')
    depends_on("dbus", when='@4:+dbus')
    depends_on("gl", when='@4:+opengl')

    depends_on("harfbuzz", when='@5:')
    depends_on("double-conversion", when='@5.7:')
    depends_on("pcre2+multibyte", when='@5.9:')
    depends_on("llvm", when='@5.11: +doc')

    with when('+webkit'):
        patch(
            'https://src.fedoraproject.org/rpms/qt5-qtwebengine/raw/32062243e895612823b47c2ae9eeb873a98a3542/f/qtwebengine-gcc11.patch',
            sha256='14e2d6baff0d09a528ee3e2b5a14de160859880360100af75ea17f3e0f672787',
            working_dir='qtwebengine',
            when='@5.15.2: %gcc@11:'
        )
        # the gl headers and dbus are needed to build webkit
        conflicts('~opengl')
        conflicts('~dbus')

        depends_on("flex", type='build')
        depends_on("bison", type='build')
        depends_on("gperf")

        # qtwebengine@5.7:5.15 are based on Google Chromium versions which depend on Py2
        with when('@5.7:5.15'):
            depends_on('python@2.7.5:2', type='build')
            # mesa inherits MesonPackage (since October 2020) which depends on Py@3.
            # The conflicts('mesa') enables a regular build of `qt@5.7:5.15+webkit`
            # without having to specify the exact version by causing the concretizer
            # to select mesa18 which does not depend on python@3.
            conflicts('mesa')

        with when('@5.10:'):
            depends_on('nss@3.62:')
<commit_msg>[qt] depends_on zstd@1.3 when @5.13: (#28193)<commit_after># Copyright 2013-2021 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)
import itertools
import os
import platform
import sys

import llnl.util.tty as tty

from spack import *
from spack.operating_systems.mac_os import macos_version

MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None
LINUX_VERSION = Version(platform.release()) if platform.system() == 'Linux' else None


class Qt(Package):
    """Qt is a comprehensive cross-platform C++ application framework."""
    homepage = 'https://qt.io'

    # Supported releases: 'https://download.qt.io/official_releases/qt/'
    # Older archives: 'https://download.qt.io/new_archive/qt/'
    url      = 'https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz'
    list_url = 'https://download.qt.io/archive/qt/'
    list_depth = 3
    maintainers = ['sethrj']

    phases = ['configure', 'build', 'install']

    version('5.15.2', sha256='3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240')
    version('5.14.2', sha256='c6fcd53c744df89e7d3223c02838a33309bd1c291fcb6f9341505fe99f7f19fa')
    version('5.14.1', sha256='6f17f488f512b39c2feb57d83a5e0a13dcef32999bea2e2a8f832f54a29badb8', deprecated=True)
    version('5.14.0', sha256='be9a77cd4e1f9d70b58621d0753be19ea498e6b0da0398753e5038426f76a8ba', deprecated=True)
    version('5.13.1', sha256='adf00266dc38352a166a9739f1a24a1e36f1be9c04bf72e16e142a256436974e', deprecated=True)
    version('5.12.10', sha256='3e0ee1e57f5cf3eeb038d0b4b22c7eb442285c62639290756b39dc93a1d0e14f')
    version('5.12.7', sha256='873783a0302129d98a8f63de9afe4520fb5f8d5316be8ad7b760c59875cd8a8d', deprecated=True)
    version('5.12.5', sha256='a2299e21db7767caf98242767bffb18a2a88a42fee2d6a393bedd234f8c91298', deprecated=True)
    version('5.12.2', sha256='59b8cb4e728450b21224dcaaa40eb25bafc5196b6988f2225c394c6b7f881ff5', deprecated=True)
    version('5.11.3', sha256='859417642713cee2493ee3646a7fee782c9f1db39e41d7bb1322bba0c5f0ff4d', deprecated=True)
    version('5.11.2', sha256='c6104b840b6caee596fa9a35bc5f57f67ed5a99d6a36497b6fe66f990a53ca81', deprecated=True)
    version('5.10.0', sha256='936d4cf5d577298f4f9fdb220e85b008ae321554a5fcd38072dc327a7296230e', deprecated=True)
    version('5.9.9',  sha256='5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642')
    version('5.9.1',  sha256='7b41a37d4fe5e120cdb7114862c0153f86c07abbec8db71500443d2ce0c89795', deprecated=True)
    version('5.9.0',  sha256='f70b5c66161191489fc13c7b7eb69bf9df3881596b183e7f6d94305a39837517', deprecated=True)
    version('5.8.0', sha256='0f4c54386d3dbac0606a936a7145cebb7b94b0ca2d29bc001ea49642984824b6', deprecated=True)
    version('5.7.1', sha256='46ebca977deb629c5e69c2545bc5fe13f7e40012e5e2e451695c583bd33502fa', deprecated=True)
    version('5.7.0', sha256='a6a2632de7e44bbb790bc3b563f143702c610464a7f537d02036749041fd1800', deprecated=True)
    version('5.6.3',  sha256='2fa0cf2e5e8841b29a4be62062c1a65c4f6f2cf1beaf61a5fd661f520cd776d0')
    version('5.5.1',  sha256='c7fad41a009af1996b62ec494e438aedcb072b3234b2ad3eeea6e6b1f64be3b3', deprecated=True)
    version('5.4.2',  sha256='cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd', deprecated=True)
    version('5.4.0',  sha256='1739633424bde3d89164ae6ff1c5c913be38b9997e451558ef873aac4bbc408a', deprecated=True)
    version('5.3.2',  sha256='c8d3fd2ead30705c6673c5e4af6c6f3973346b4fb2bd6079c7be0943a5b0282d')
    version('5.2.1',  sha256='84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1')
    version('4.8.7',  sha256='e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0')
    version('4.8.6',  sha256='8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c')
    version('4.8.5',  sha256='eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138')
    version('3.3.8b', sha256='1b7a1ff62ec5a9cb7a388e2ba28fda6f960b27f27999482ebeceeadb72ac9f6e')

    variant('debug',      default=False,
            description="Build debug version.")
    variant('dbus',       default=False,
            description="Build with D-Bus support.")
    variant('doc',      default=False,
            description="Build QDoc and documentation.")
    variant('examples',   default=False,
            description="Build examples.")
    variant('framework',   default=bool(MACOS_VERSION),
            description="Build as a macOS Framework package.")
    variant('gtk',        default=False,
            description="Build with gtkplus.")
    variant('gui', default=True,
            description='Build the Qt GUI module and dependencies')
    variant('opengl',     default=False,
            description="Build with OpenGL support.")
    variant('phonon',     default=False,
            description="Build with phonon support.")
    variant('shared',     default=True,
            description='Build shared libraries.')
    variant('sql',        default=True,
            description="Build with SQL support.")
    variant('ssl',    default=True,
            description="Build with OpenSSL support.")
    variant('tools',      default=True,
            description="Build tools, including Qt Designer.")
    variant('webkit',     default=False,
            description="Build the Webkit extension")

    # Patches for qt@3
    patch('qt3-accept.patch', when='@3')
    patch('qt3-headers.patch', when='@3')

    # Patches for qt@4
    patch('qt4-configure-gcc.patch', when='@4:4.8.6 %gcc')
    patch('qt4-87-configure-gcc.patch', when='@4.8.7 %gcc')
    patch('qt4-tools.patch', when='@4+tools')
    patch('qt4-mac.patch', when='@4.8.7 platform=darwin')
    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925811
    patch("qt4-qforeach.patch", when="@4 %gcc@9:")

    # Patches for qt@4:
    # https://github.com/spack/spack/issues/1517
    patch('qt4-pcre.patch', when='@4')
    patch('qt5-pcre.patch', when='@5:')
    # https://bugreports.qt.io/browse/QTBUG-74196
    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89585
    patch('qt4-asm-volatile.patch', when='@4')
    patch('qt5-asm-volatile.patch', when='@5.0.0:5.12.1')

    # Patches for qt@5
    # https://bugreports.qt.io/browse/QTBUG-74219
    patch('qt5-btn_trigger_happy.patch', when='@5.7:5.12')
    # https://bugreports.qt.io/browse/QTBUG-57656
    patch('qt5-8-framework.patch', when='@5.8.0 +framework')
    # https://bugreports.qt.io/browse/QTBUG-58038
    patch('qt5-8-freetype.patch', when='@5.8.0 +gui')
    # https://codereview.qt-project.org/c/qt/qtbase/+/245425
    patch('https://github.com/qt/qtbase/commit/a52d7861edfb5956de38ba80015c4dd0b596259b.patch',
          sha256='c49b228c27e3ad46ec3af4bac0e9985af5b5b28760f238422d32e14f98e49b1e',
          working_dir='qtbase',
          when='@5.10:5.12.0 %gcc@9:')
    # https://github.com/Homebrew/homebrew-core/pull/5951
    patch('qt5-restore-pc-files.patch', when='@5.9:5.11 platform=darwin')
    # https://github.com/spack/spack/issues/14400
    patch('qt5-11-intel-overflow.patch', when='@5.11 %intel')
    patch('qt5-12-intel-overflow.patch', when='@5.12:5.14.0 %intel')
    # https://bugreports.qt.io/browse/QTBUG-78937
    patch('qt5-12-configure.patch', when='@5.12.7')
    # https://bugreports.qt.io/browse/QTBUG-93402
    patch('qt5-15-gcc-10.patch', when='@5.12.7:5.15 %gcc@8:')
    patch('qt514.patch', when='@5.14')
    patch('qt514-isystem.patch', when='@5.14.2')
    # https://bugreports.qt.io/browse/QTBUG-90395
    patch('https://src.fedoraproject.org/rpms/qt5-qtbase/raw/6ae41be8260f0f5403367eb01f7cd8319779674a/f/qt5-qtbase-gcc11.patch',
          sha256='9378afd071ad5c0ec8f7aef48421e4b9fab02f24c856bee9c0951143941913c5',
          working_dir='qtbase',
          when='@5.14: %gcc@11:')
    patch('https://src.fedoraproject.org/rpms/qt5-qtdeclarative/raw/593481a2541d3218f285dd7b46bdc5f4c76075ab/f/qt5-qtdeclarative-gcc11.patch',
          sha256='2081e9cb85f6712be9b63c70204efa3da954c07d857283eeae16d1b0409704bd',
          working_dir='qtdeclarative',
          when='@5.14: %gcc@11:')
    patch('https://src.fedoraproject.org/rpms/qt5-qtwebsockets/raw/f54f4ce6fa27941e9e6d606103d32056078edc74/f/qt5-qtwebsockets-gcc11.patch',
          sha256='84b099109d08adf177adf9d3542b6215ec3e42138041d523860dbfdcb59fdaae',
          working_dir='qtwebsockets',
          when='@5.14: %gcc@11:')
    conflicts('%gcc@10:', when='@5.9:5.12.6 +opengl')
    conflicts('%gcc@11:', when='@5.8')

    # Build-only dependencies
    depends_on("pkgconfig", type='build')
    depends_on("python", when='@5.7.0:', type='build')

    # Dependencies, then variant- and version-specific dependencies
    depends_on("icu4c")
    depends_on("jpeg")
    depends_on("libmng")
    depends_on("libtiff")
    depends_on("libxml2")
    depends_on("zlib")
    depends_on("freetype", when='+gui')
    depends_on("gtkplus", when='+gtk')
    depends_on("openssl", when='+ssl')
    depends_on("sqlite+column_metadata", when='+sql', type=('build', 'run'))

    depends_on("libpng@1.2.57", when='@3')
    depends_on("libsm", when='@3')
    depends_on("pcre+multibyte", when='@5.0:5.8')
    depends_on("inputproto", when='@:5.8')
    depends_on("openssl@:1.0", when='@4:5.9+ssl')

    depends_on("glib", when='@4:')
    depends_on("libpng", when='@4:')
    depends_on("dbus", when='@4:+dbus')
    depends_on("gl", when='@4:+opengl')

    depends_on("harfbuzz", when='@5:')
    depends_on("double-conversion", when='@5.7:')
    depends_on("pcre2+multibyte", when='@5.9:')
    depends_on("llvm", when='@5.11: +doc')
    depends_on("zstd@1.3:", when='@5.13:')

    with when('+webkit'):
        patch(
            'https://src.fedoraproject.org/rpms/qt5-qtwebengine/raw/32062243e895612823b47c2ae9eeb873a98a3542/f/qtwebengine-gcc11.patch',
            sha256='14e2d6baff0d09a528ee3e2b5a14de160859880360100af75ea17f3e0f672787',
            working_dir='qtwebengine',
            when='@5.15.2: %gcc@11:'
        )
        # the gl headers and dbus are needed to build webkit
        conflicts('~opengl')
        conflicts('~dbus')

        depends_on("flex", type='build')
        depends_on("bison", type='build')
        depends_on("gperf")

        # qtwebengine@5.7:5.15 are based on Google Chromium versions which depend on Py2
        with when('@5.7:5.15'):
            depends_on('python@2.7.5:2', type='build')
            # mesa inherits MesonPackage (since October 2020) which depends on Py@3.
            # The conflicts('mesa') enables a regular build of `qt@5.7:5.15+webkit`
            # without having to specify the exact version by causing the concretizer
            # to select mesa18 which does not depend on python@3.
            conflicts('mesa')

        with when('@5.10:'):
            depends_on('nss@3.62:')

{'fraction_non_alphanumeric': 0.14949905351124243, 'fraction_numerical': 0.18352647860012003, 'mean_word_length': 4.2880859375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 46, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3099027', 'n_tokens_mistral': 10729, 'n_tokens_neox': 8825, 'n_words': 977}