Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | From: Otavio Salvador <otavio@ossystems.com.br> |
| 2 | Subject: [PATCH] build: Check packages to be used by the enabled flavors |
| 3 | Organization: O.S. Systems Software LTDA. |
| 4 | |
| 5 | The packages shouldn't be dynamically detected otherwise the build |
| 6 | predictability is lost. We now have all packages as mandatory but |
| 7 | dependent of the flavors which use them. |
| 8 | |
| 9 | Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/8] |
| 10 | |
| 11 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> |
| 12 | --- |
| 13 | wscript | 10 +++++++--- |
| 14 | 1 file changed, 7 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | diff --git a/wscript b/wscript |
| 17 | index cab62a3..e7eaed0 100644 |
| 18 | --- a/wscript |
| 19 | +++ b/wscript |
| 20 | @@ -121,13 +121,17 @@ def configure(ctx): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | ('mirclient','mirclient', '0.13', list_contains(ctx.options.flavors, 'mir')), |
| 22 | ('wayland-client','wayland-client', None, list_contains(ctx.options.flavors, 'wayland')), |
| 23 | ('wayland-egl','wayland-egl', None, list_contains(ctx.options.flavors, 'wayland'))] |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 24 | - for (pkg, uselib, atleast, mandatory) in opt_pkgs: |
| 25 | + for (pkg, uselib, atleast, check) in opt_pkgs: |
| 26 | + # Check packages required by the flavors |
| 27 | + if not check: |
| 28 | + continue |
| 29 | + |
| 30 | if atleast is None: |
| 31 | ctx.check_cfg(package = pkg, uselib_store = uselib, |
| 32 | - args = '--cflags --libs', mandatory = mandatory) |
| 33 | + args = '--cflags --libs', mandatory = True) |
| 34 | else: |
| 35 | ctx.check_cfg(package = pkg, uselib_store = uselib, atleast_version=atleast, |
| 36 | - args = '--cflags --libs', mandatory = mandatory) |
| 37 | + args = '--cflags --libs', mandatory = True) |
| 38 | |
| 39 | |
| 40 | # Prepend CXX flags so that they can be overriden by the |
| 41 | -- |
| 42 | 2.4.6 |
| 43 | |