Skip to contentSkip to conversation

build: fix compatibility with meson 0.47

PATCH Applied Bruce Richardson 3 participants 3 messages Oct 24, 2019 – Oct 25, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: fix compatibility with meson 0.47

The "in" keyword was introduced in meson 0.49, which means we need to use an old-fashioned loop to check the array of disabled drivers.

Fixes 6f80f1cd2247 ("build: support disabling drivers with meson")
---
 drivers/meson.build | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/meson.build +9 -4
index 4a1cb8b5b..156d2dc71 100644
@@ -61,10 +61,15 @@ foreach class:dpdk_driver_classes
 		# pull in driver directory which should assign to each of the above
 		subdir(drv_path)
 
-		if drv_path in disabled_drivers
-			build = false
-			reason = 'Explicitly disabled via build config'
-		elif build
+		# skip disabled drivers. For meson 0.49 change this to use
+		# "in" keyword
+		foreach disable_path: disabled_drivers
+			if drv_path == disable_path
+				build = false
+				reason = 'Explicitly disabled via build config'
+			endif
+		endforeach
+		if build
 			# get dependency objs from strings
 			shared_deps = ext_deps
 			static_deps = ext_deps
Signature · 1 line
2.21.0
Acked-by on v1 1/1
#1 lore raw
Quoted 35 lines · Bruce Richardson

The "in" keyword was introduced in meson 0.49, which means we need to use
an old-fashioned loop to check the array of disabled drivers.

Fixes 6f80f1cd2247 ("build: support disabling drivers with meson")

Signed-off-by: Bruce Richardson <
[email protected]

Quoted 1 line
---
 drivers/meson.build | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/meson.build +0 -0
index 4a1cb8b5b..156d2dc71 100644
@@ -61,10 +61,15 @@ foreach class:dpdk_driver_classes
 		# pull in driver directory which should assign to each

of the above

drivers/meson.build +1 -4
 		subdir(drv_path)
 
-		if drv_path in disabled_drivers
-			build = false
-			reason = 'Explicitly disabled via build config'
-		elif build
+		# skip disabled drivers. For meson 0.49 change this to

use

drivers/meson.build +5 -0
+		# "in" keyword
+		foreach disable_path: disabled_drivers
+			if drv_path == disable_path
+				build = false
+				reason = 'Explicitly disabled via build

config'

drivers/meson.build foreach class:dpdk_driver_classes · line 75

Quoted 6 lines
drivers/meson.build +3 -0
+			endif
+		endforeach
+		if build
 			# get dependency objs from strings
 			shared_deps = ext_deps
 			static_deps = ext_deps
Signature · 2 lines
Kind regards,
Luca Boccassi