From 65fd6c8ae9b131445bf9bfd99c8600661d93d73c Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 18 Apr 2020 14:57:43 +0200 Subject: build: fallback to default pc file locations on rpi --- waftools/checks/generic.py | 7 ++++++- wscript | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/waftools/checks/generic.py b/waftools/checks/generic.py index cecbeabdd1..4e27f5114a 100644 --- a/waftools/checks/generic.py +++ b/waftools/checks/generic.py @@ -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) diff --git a/wscript b/wscript index 2ef1c6b7da..5132a763ed 100644 --- a/wscript +++ b/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')), } ] -- cgit v1.2.3