summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/recipes-graphics/wayland/libva_%.bbappend
blob: eda8de38a9b85293b58b69f1aed322f023da9087 (plain)
1
2
3
4
# This patch correct a bug in libva1_1.7.0.bb 1.8 inmeta-intel (no clue when it will be fixed)
# libva.bb calls for an x11 runtime dependency even if wayland is selected
#
RDEPENDS_${PN}-egl_remove = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "${PN}-x11", d)}"
lass="kn">from ..mesonlib import typeslistify from ..interpreterbase import FeatureNew, noKwargs, InvalidCode import os class KeyvalModule(ExtensionModule): @FeatureNew('Keyval Module', '0.55.0') def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.methods.update({ 'load': self.load, }) def _load_file(self, path_to_config): result = dict() try: with open(path_to_config, encoding='utf-8') as f: for line in f: if '#' in line: comment_idx = line.index('#') line = line[:comment_idx] line = line.strip() try: name, val = line.split('=', 1) except ValueError: continue result[name.strip()] = val.strip() except OSError as e: raise mesonlib.MesonException(f'Failed to load {path_to_config}: {e}') return result @noKwargs def load(self, state, args, kwargs): sources = typeslistify(args, (str, mesonlib.File)) if len(sources) != 1: raise InvalidCode('load takes only one file input.') s = sources[0] is_built = False if isinstance(s, mesonlib.File): is_built = is_built or s.is_built s = s.absolute_path(self.interpreter.environment.source_dir, self.interpreter.environment.build_dir) else: s = os.path.join(self.interpreter.environment.source_dir, s) if s not in self.interpreter.build_def_files and not is_built: self.interpreter.build_def_files.append(s) return self._load_file(s) def initialize(*args, **kwargs): return KeyvalModule(*args, **kwargs)