summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Palus <atler@pld-linux.org>2020-04-18 14:57:43 +0200
committerwm4 <1387750+wm4@users.noreply.github.com>2020-05-14 15:08:33 +0200
commit65fd6c8ae9b131445bf9bfd99c8600661d93d73c (patch)
tree1b485c98b9f4098bb3e3542d03e74fefbf05bc32
parentac1634360bb2fd5e852b4664ece2fe1cb30d97da (diff)
downloadmpv-65fd6c8ae9b131445bf9bfd99c8600661d93d73c.tar.bz2
mpv-65fd6c8ae9b131445bf9bfd99c8600661d93d73c.tar.xz
build: fallback to default pc file locations on rpi
-rw-r--r--waftools/checks/generic.py7
-rw-r--r--wscript6
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')),
}
]