Skip to content
Snippets Groups Projects
Unverified Commit 84a16e62 authored by Adam J. Stewart's avatar Adam J. Stewart Committed by GitHub
Browse files

OpenGL: add spack external find support (#18003)

parent 70419c75
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
import sys
from spack import *
class Opengl(Package):
"""Placeholder for external OpenGL libraries from hardware vendors"""
......@@ -35,6 +34,14 @@ class Opengl(Package):
if sys.platform != 'darwin':
provides('glx@1.4')
executables = ['^glxinfo$']
@classmethod
def determine_version(cls, exe):
output = Executable(exe)(output=str, error=str)
match = re.search(r'OpenGL version string: (\S+)', output)
return match.group(1) if match else None
# 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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment