summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2016-08-18 11:12:04 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2016-08-18 11:12:04 +0200
commitb06b7b916d77be2f2d574101817285ca6c493caa (patch)
tree43a595d285f920c67d5a57785ea87219262cabef
parente02cb674ceb3470e938100514825edfafa6e03de (diff)
downloadmpv-rpi_test.tar.bz2
mpv-rpi_test.tar.xz
use the same use flag for every rpi checkrpi_test
-rw-r--r--waftools/checks/custom.py21
-rw-r--r--wscript16
2 files changed, 21 insertions, 16 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index b570b4b836..a320eb5425 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -4,7 +4,7 @@ from waflib import Utils
import os
__all__ = ["check_pthreads", "check_iconv", "check_lua", "check_oss_4front",
- "check_cocoa"]
+ "check_cocoa", "check_rpi"]
pthreads_program = load_fragment('pthreads.c')
@@ -116,3 +116,22 @@ def check_cocoa(ctx, dependency_identifier):
linkflags = '-fobjc-arc')
return fn(ctx, dependency_identifier)
+
+def check_rpi(ctx, dependency_identifier):
+ kw = { 'use': inflector.storage_key(dependency_identifier) }
+ return compose_checks(
+ check_cc(cflags="-isystem/opt/vc/include/ "+
+ "-isystem/opt/vc/include/interface/vcos/pthreads " +
+ "-isystem/opt/vc/include/interface/vmcs_host/linux " +
+ "-fgnu89-inline",
+ linkflags="-L/opt/vc/lib",
+ header_name="bcm_host.h",
+ lib=['mmal_core', 'mmal_util', 'mmal_vc_client', 'bcm_host']),
+ # We still need all OpenGL symbols, because the vo_opengl code is
+ # generic and supports anything from GLES2/OpenGL 2.1 to OpenGL 4 core.
+ check_cc(lib="EGL", **kw),
+ check_cc(lib="GLESv2", **kw),
+ # arbitrary OpenGL 3.0 symbol
+ check_statement('GL/gl.h', '(void)GL_RGB32F', **kw),
+ # arbitrary OpenGL legacy-only symbol
+ check_statement('GL/gl.h', '(void)GL_LUMINANCE16', **kw))
diff --git a/wscript b/wscript
index 4c49caf4b2..959236c123 100644
--- a/wscript
+++ b/wscript
@@ -780,21 +780,7 @@ video_output_features = [
# including them (compensate with -isystem and -fgnu89-inline).
'name': '--rpi',
'desc': 'Raspberry Pi support',
- 'func': compose_checks(
- check_cc(cflags="-isystem/opt/vc/include/ "+
- "-isystem/opt/vc/include/interface/vcos/pthreads " +
- "-isystem/opt/vc/include/interface/vmcs_host/linux " +
- "-fgnu89-inline",
- linkflags="-L/opt/vc/lib",
- header_name="bcm_host.h",
- lib=['mmal_core', 'mmal_util', 'mmal_vc_client', 'bcm_host']),
- # We still need all OpenGL symbols, because the vo_opengl code is
- # generic and supports anything from GLES2/OpenGL 2.1 to OpenGL 4 core.
- check_cc(lib="EGL"),
- check_cc(lib="GLESv2"),
- check_statement('GL/gl.h', '(void)GL_RGB32F'), # arbitrary OpenGL 3.0 symbol
- check_statement('GL/gl.h', '(void)GL_LUMINANCE16') # arbitrary OpenGL legacy-only symbol
- ),
+ 'func': check_rpi,
}, {
'name': '--standard-gl',
'desc': 'Desktop standard OpengGL support',