<commit_before># Copyright 2013-2020 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 sys

from spack import *


class Opengl(Package):
    """Placeholder for external OpenGL libraries from hardware vendors"""

    homepage = "https://www.opengl.org/"

    provides('gl')
    provides('gl@:4.5', when='@4.5:')
    provides('gl@:4.4', when='@4.4:')
    provides('gl@:4.3', when='@4.3:')
    provides('gl@:4.2', when='@4.2:')
    provides('gl@:4.1', when='@4.1:')
    provides('gl@:3.3', when='@3.3:')

    if sys.platform != 'darwin':
        provides('glx@1.4')

    # Override the fetcher method to throw a useful error message;
    # fixes GitHub issue (#7061) in which this package threw a
    # generic, uninformative error during the `fetch` step,
    @property
    def fetcher(self):
        msg = """This package is intended to be a placeholder for
        system-provided OpenGL libraries from hardware vendors.  Please
        download and install OpenGL drivers/libraries for your graphics
        hardware separately, and then set that up as an external package.
        An example of a working packages.yaml:

        packages:
          opengl:<commit_msg>Updated the 'opengl' package to include all older versions of the library. (#16219)<commit_after># Copyright 2013-2020 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 sys

from spack import *


class Opengl(Package):
    """Placeholder for external OpenGL libraries from hardware vendors"""

    homepage = "https://www.opengl.org/"

    provides('gl')
    provides('gl@:4.5', when='@4.5:')
    provides('gl@:4.4', when='@4.4:')
    provides('gl@:4.3', when='@4.3:')
    provides('gl@:4.2', when='@4.2:')
    provides('gl@:4.1', when='@4.1:')
    provides('gl@:3.3', when='@3.3:')
    provides('gl@:3.2', when='@3.2:')
    provides('gl@:3.1', when='@3.1:')
    provides('gl@:3.0', when='@3.0:')
    provides('gl@:2.1', when='@2.1:')
    provides('gl@:2.0', when='@2.0:')
    provides('gl@:1.5', when='@1.5:')
    provides('gl@:1.4', when='@1.4:')
    provides('gl@:1.3', when='@1.3:')
    provides('gl@:1.2', when='@1.2:')
    provides('gl@:1.1', when='@1.1:')
    provides('gl@:1.0', when='@1.0:')

    if sys.platform != 'darwin':
        provides('glx@1.4')

    # Override the fetcher method to throw a useful error message;
    # fixes GitHub issue (#7061) in which this package threw a
    # generic, uninformative error during the `fetch` step,
    @property
    def fetcher(self):
        msg = """This package is intended to be a placeholder for
        system-provided OpenGL libraries from hardware vendors.  Please
        download and install OpenGL drivers/libraries for your graphics
        hardware separately, and then set that up as an external package.
        An example of a working packages.yaml:

        packages:
          opengl:
{'fraction_non_alphanumeric': 0.15901745313510018, 'fraction_numerical': 0.041693600517129926, 'mean_word_length': 3.298611111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3132917', 'n_tokens_mistral': 1056, 'n_tokens_neox': 1039, 'n_words': 297}