@@ -35,6 +35,7 @@ class _Component:
35
35
submodules_shallow = None ,
36
36
python2_pkgs = None ,
37
37
python3_pkgs = None ,
38
+ ruby_pkgs = None ,
38
39
):
39
40
self .build_callback = build_callback
40
41
self .supported_archs = supported_archs
@@ -45,6 +46,7 @@ class _Component:
45
46
self .submodules_shallow = submodules_shallow or set ()
46
47
self .python2_pkgs = python2_pkgs or set ()
47
48
self .python3_pkgs = python3_pkgs or set ()
49
+ self .ruby_pkgs = ruby_pkgs or set ()
48
50
49
51
def build (self , arch ):
50
52
if (
@@ -233,6 +235,9 @@ so looping over all of them would waste time.
233
235
),
234
236
'doc' : _Component (
235
237
self ._build_file ('build-doc' ),
238
+ ruby_pkgs = {
239
+ 'asciidoctor' ,
240
+ },
236
241
),
237
242
'gem5' : _Component (
238
243
self ._build_file ('build-gem5' ),
@@ -457,13 +462,18 @@ Which components to build. Default: qemu-buildroot
457
462
python3_pkgs = {
458
463
'pexpect==4.6.0' ,
459
464
}
465
+ ruby_pkgs = set ()
460
466
for component in selected_components :
461
467
apt_get_pkgs .update (component .apt_get_pkgs )
462
468
apt_build_deps .update (component .apt_build_deps )
463
469
submodules .update (component .submodules )
464
470
submodules_shallow .update (component .submodules_shallow )
465
471
python2_pkgs .update (component .python2_pkgs )
466
472
python3_pkgs .update (component .python3_pkgs )
473
+ python3_pkgs .update (component .python3_pkgs )
474
+ ruby_pkgs .update (component .ruby_pkgs )
475
+ if ruby_pkgs :
476
+ apt_get_pkgs .add ('ruby' )
467
477
if apt_get_pkgs or apt_build_deps :
468
478
if self .env ['travis' ]:
469
479
interacive_pkgs = {
@@ -514,6 +524,10 @@ Which components to build. Default: qemu-buildroot
514
524
['python3' , '-m' , 'pip' , 'install' , '--user' , LF ] +
515
525
self .sh .add_newlines (sorted (python3_pkgs ))
516
526
)
527
+ if ruby_pkgs :
528
+ # TODO fails without sudo and with --local on Ubuntu 18.04.
529
+ self .sh .run_cmd (['sudo' , 'gem' , 'install' , 'bundler' , LF ])
530
+ self .sh .run_cmd (['bundle' , 'install' , LF ])
517
531
git_cmd_common = [
518
532
'git' , LF ,
519
533
'submodule' , LF ,
0 commit comments