mirror of https://github.com/mpv-player/mpv
build: fallback to default pc file locations on rpi
This commit is contained in:
parent
ac1634360b
commit
65fd6c8ae9
|
@ -7,7 +7,7 @@ from waflib import Utils
|
|||
__all__ = [
|
||||
"check_pkg_config", "check_pkg_config_mixed", "check_pkg_config_mixed_all",
|
||||
"check_pkg_config_cflags", "check_cc", "check_statement", "check_libs",
|
||||
"check_headers", "compose_checks", "check_true", "any_version",
|
||||
"check_headers", "compose_checks", "any_check", "check_true", "any_version",
|
||||
"load_fragment", "check_stub", "check_ctx_vars", "check_program",
|
||||
"check_pkg_config_datadir", "check_macos_sdk"]
|
||||
|
||||
|
@ -180,6 +180,11 @@ def compose_checks(*checks):
|
|||
return all([check(ctx, dependency_identifier) for check in checks])
|
||||
return fn
|
||||
|
||||
def any_check(*checks):
|
||||
def fn(ctx, dependency_identifier):
|
||||
return any(check(ctx, dependency_identifier) for check in checks)
|
||||
return fn
|
||||
|
||||
def load_fragment(fragment):
|
||||
file_path = os.path.join(os.path.dirname(__file__), '..', 'fragments',
|
||||
fragment)
|
||||
|
|
6
wscript
6
wscript
|
@ -711,7 +711,8 @@ video_output_features = [
|
|||
}, {
|
||||
'name': '--rpi',
|
||||
'desc': 'Raspberry Pi support',
|
||||
'func': check_pkg_config('brcmegl'),
|
||||
'func': any_check(check_pkg_config('brcmegl'),
|
||||
check_pkg_config('/opt/vc/lib/pkgconfig/brcmegl.pc')),
|
||||
'default': 'disable',
|
||||
} , {
|
||||
'name': '--ios-gl',
|
||||
|
@ -800,7 +801,8 @@ hwaccel_features = [
|
|||
'name': '--rpi-mmal',
|
||||
'desc': 'Raspberry Pi MMAL hwaccel',
|
||||
'deps': 'rpi',
|
||||
'func': check_pkg_config('mmal'),
|
||||
'func': any_check(check_pkg_config('mmal'),
|
||||
check_pkg_config('/opt/vc/lib/pkgconfig/mmal.pc')),
|
||||
}
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue