[Notes] [Git][BuildStream/jhbuild2bst][master] 2 commits: Merge branch 'sam/canonical-push-urls' into 'master'



Title: GitLab

Agustin Benito Bethencourt pushed to branch master at BuildStream / jhbuild2bst

Commits:

4 changed files:

Changes:

  • jhbuild/commands/bst.py
    ... ... @@ -389,6 +389,14 @@ class cmd_bst(Command):
    389 389
                                 for cmd in conf_cmds
    
    390 390
                             ]
    
    391 391
     
    
    392
    +                # Same as above, but for the conf-local variable
    
    393
    +                if 'variables' in element:
    
    394
    +                    element_vars = element['variables']
    
    395
    +                    if 'conf-local' in element_vars:
    
    396
    +                        element_vars['conf-local'] = element_vars['conf-local'] \
    
    397
    +                            .replace('--with-systemdsystemunitdir=no', '') \
    
    398
    +                            .replace('--with-log-dir=/usr/var/log/gdm', '') \
    
    399
    +                            .rstrip()
    
    392 400
     
    
    393 401
                     # The mm-common module wants to download something at build time
    
    394 402
                     # (which is a no-no, not allowed in buildstream) and this cant be easily
    
    ... ... @@ -401,15 +409,15 @@ class cmd_bst(Command):
    401 409
                         # have to download it (cause we cant anyway), may need to make this
    
    402 410
                         # command more robust when building against a multitude of different
    
    403 411
                         # base rootfs variations.
    
    404
    -                    pre_configure_command = 'cp /usr/share/doc/*/libstdc++/user/libstdc++.tag doctags/'
    
    405
    -
    
    406
    -                    # Append --disable-network so that it doesnt try (and fail) to wget it
    
    407
    -                    configure_command = element['config']['configure-commands'][0]
    
    408
    -                    configure_command += ' --disable-network'
    
    409
    -                    element['config']['configure-commands'] = [
    
    410
    -                        pre_configure_command,
    
    411
    -                        configure_command
    
    412
    -                    ]
    
    412
    +                    element_config = get_dict(element, 'config')
    
    413
    +                    element_config['configure-commands'] = {
    
    414
    +                        '(<)': [
    
    415
    +                            'cp /usr/share/doc/*/libstdc++/user/libstdc++.tag doctags/'
    
    416
    +                        ]
    
    417
    +                    }
    
    418
    +
    
    419
    +                    variables = get_dict(element, 'variables')
    
    420
    +                    variables['conf-local'] = '--disable-network'
    
    413 421
     
    
    414 422
                     # depending on the compiler, libgtop will fail if not given the -std=c99
    
    415 423
                     # option, as it has code which declares variables not at the beginning
    
    ... ... @@ -485,12 +493,11 @@ class cmd_bst(Command):
    485 493
                     # Enable tests in the libosinfo build, otherwise it leaves HAVE_CURL
    
    486 494
                     # undefined and that breaks with newer autotools
    
    487 495
                     elif module.name == 'libosinfo':
    
    488
    -                    element_config = element['config']
    
    489
    -                    conf_cmds = element_config['configure-commands']
    
    490
    -                    element_config['configure-commands'] = [
    
    491
    -                        cmd.replace('--enable-tests=no', '--enable-tests').rstrip()
    
    492
    -                        for cmd in conf_cmds
    
    493
    -                    ]
    
    496
    +                    if 'variables' in element:
    
    497
    +                        variables = element['variables']
    
    498
    +                        if 'conf-extra' in variables:
    
    499
    +                            variables['conf-extra'] = variables['conf-extra'] \
    
    500
    +                                .replace('--enable-tests=no', '--enable-tests').rstrip()
    
    494 501
     
    
    495 502
                     # librsvg is rusty, as such it needs some heavy special casing to
    
    496 503
                     # build with the vendored crates
    
    ... ... @@ -503,19 +510,43 @@ class cmd_bst(Command):
    503 510
                         })
    
    504 511
     
    
    505 512
                         # Prepend some things to configure-commands
    
    506
    -                    element_config = element['config']
    
    507
    -                    conf_cmds = element_config['configure-commands']
    
    508
    -                    element_config['configure-commands'] = [
    
    513
    +                    element_config = get_dict(element, 'config')
    
    514
    +                    element_config['configure-commands'] = {
    
    515
    +                        '(<)': [
    
    516
    +
    
    517
    +                            # Copy the vendor directory into the source tree, because:
    
    518
    +                            #   https://github.com/nikomatsakis/lalrpop/issues/272
    
    519
    +                            'cp -a "%{datadir}/crates" "%{build-root}/cargo-crates"',
    
    509 520
     
    
    510
    -                        # Copy the vendor directory into the source tree, because:
    
    511
    -                        #   https://github.com/nikomatsakis/lalrpop/issues/272
    
    512
    -                        'cp -a "%{datadir}/crates" "%{build-root}/cargo-crates"',
    
    521
    +                            # Remove Cargo.toml, we're building from git and I think we
    
    522
    +                            # prefer to always try to build against the latest things which
    
    523
    +                            # have been added to the vendored crates
    
    524
    +                            'rm rust/Cargo.lock || true'
    
    525
    +                        ]
    
    526
    +                    }
    
    527
    +                elif module.name == 'upower':
    
    528
    +
    
    529
    +                    # This module was a bit touchy when using a tarball
    
    530
    +                    #
    
    531
    +                    element_config = get_dict(element, 'config')
    
    532
    +                    element_config['configure-commands'] = [
    
    533
    +                        'if [ ! -x autogen.sh ]; then\n' + \
    
    534
    +                        '  configure="./configure"\n'
    
    535
    +                        'else\n' + \
    
    536
    +                        '  configure="./autogen.sh"\n' + \
    
    537
    +                        'fi\n' + \
    
    538
    +                        '${configure} %{conf-args}'
    
    539
    +                    ]
    
    513 540
     
    
    514
    -                        # Remove Cargo.toml, we're building from git and I think we
    
    515
    -                        # prefer to always try to build against the latest things which
    
    516
    -                        # have been added to the vendored crates
    
    517
    -                        'rm rust/Cargo.lock || true'
    
    518
    -                    ] + conf_cmds
    
    541
    +                # When running ./autogen.sh with NOCONFIGURE, we dont get
    
    542
    +                # the implied maintainer mode option normally used with the "mm" C++ family
    
    543
    +                # of libs
    
    544
    +                elif module.name in ['atkmm', 'atkmm-1.6',
    
    545
    +                                     'glibmm', 'glibmm-2.4',
    
    546
    +                                     'gtkmm', 'gtkmm-3',
    
    547
    +                                     'pangomm', 'pangomm-1.4']:
    
    548
    +                    element_vars = get_dict(element, 'variables')
    
    549
    +                    element_vars['conf-local'] = '--enable-maintainer-mode'
    
    519 550
     
    
    520 551
                     element_file = os.path.join(config.directory, 'elements', element_name(module))
    
    521 552
                     bst_dump(element, element_file)
    

  • jhbuild/modtypes/autotools.py
    ... ... @@ -80,38 +80,33 @@ class AutogenModule(MakeModule, DownloadableModule):
    80 80
             element_config = {}
    
    81 81
             element_vars = {}
    
    82 82
     
    
    83
    +        #
    
    84
    +        # Just uniformize all automake stuff, disregard the `self.autogen.sh` value entirely
    
    85
    +        #
    
    86
    +        if self.autogenargs:
    
    87
    +            element_vars['conf-local'] = self.autogenargs
    
    88
    +
    
    89
    +
    
    83 90
             # For the modules we care about, 'skip-autogen' need not be handled
    
    84 91
     
    
    85 92
             # Customize configure to a jhbuild style
    
    86 93
             if self.autogen_sh == 'configure':
    
    87 94
                 element_config['configure-commands'] = [
    
    88
    -                '%{configure} ' + (self.autogenargs or '')
    
    95
    +                '%{configure} %{conf-args}'
    
    89 96
                 ]
    
    90 97
             elif self.autogen_sh.endswith('/configure'):
    
    91 98
                 # configure in subdirectory
    
    92 99
                 element_config['configure-commands'] = [
    
    93
    -                '%{build-root}/' + self.autogen_sh + ' %{conf-args} ' + (self.autogenargs or '')
    
    100
    +                '%{build-root}/' + self.autogen_sh + ' %{conf-args}'
    
    94 101
                 ]
    
    95 102
     
    
    96 103
                 # In this case, lets trick it to do srcdir != builddir
    
    97 104
                 element_vars['command-subdir'] = '_build'
    
    98 105
     
    
    99 106
             elif self.autogen_sh == 'autogen.sh':
    
    100
    -            # The default is to try autogen.sh and fallback to configure
    
    101
    -            # if autogen.sh doesnt exist
    
    102
    -            element_config['configure-commands'] = [
    
    103
    -                'if [ ! -x autogen.sh ]; then\n' + \
    
    104
    -                '  configure="./configure"\n'
    
    105
    -                'else\n' + \
    
    106
    -                '  configure="./autogen.sh"\n' + \
    
    107
    -                'fi\n' + \
    
    108
    -                '${{configure}} %{{conf-args}} {}'.format((self.autogenargs or ''))
    
    109
    -            ]
    
    107
    +            pass
    
    110 108
             elif self.autogen_sh == 'autoreconf':
    
    111
    -            element_config['configure-commands'] = [
    
    112
    -                '%{autogen}',
    
    113
    -                '%{configure} ' + (self.autogenargs or '')
    
    114
    -            ]
    
    109
    +            pass
    
    115 110
             else:
    
    116 111
                 raise Exception('Unrecognized value for autogen_sh in module {} !'.format(self.name))
    
    117 112
     
    

  • jhbuild/modtypes/cmake.py
    ... ... @@ -54,21 +54,13 @@ class CMakeModule(MakeModule, DownloadableModule):
    54 54
             self.cmakedir = None
    
    55 55
     
    
    56 56
         def convert_bst_config(self, config, element):
    
    57
    -        element_config = {}
    
    58
    -
    
    59
    -        #
    
    60
    -        # Ignoring the use_ninja parameter here, no modules in the modulesets
    
    61
    -        # are explicitly demanding ninja, it seems to be only used for the
    
    62
    -        # purpose of testing out ninja as a drop in replacement for make when
    
    63
    -        # used in cmake contexts.
    
    64
    -        #
    
    57
    +        element_vars = {}
    
    58
    +
    
    65 59
             if self.cmakeargs:
    
    66
    -            element_config['configure-commands'] = [
    
    67
    -                '%{cmake} ' + self.cmakeargs
    
    68
    -            ]
    
    60
    +            element_vars['cmake-local'] = self.cmakeargs
    
    69 61
     
    
    70
    -        if element_config:
    
    71
    -            element['config'] = element_config
    
    62
    +        if element_vars:
    
    63
    +            element['variables'] = element_vars
    
    72 64
     
    
    73 65
             return 'cmake'
    
    74 66
     
    

  • jhbuild/modtypes/meson.py
    ... ... @@ -54,15 +54,13 @@ class MesonModule(MakeModule, DownloadableModule):
    54 54
             self.supports_install_destdir = True
    
    55 55
     
    
    56 56
         def convert_bst_config(self, config, element):
    
    57
    -        element_config = {}
    
    57
    +        element_vars = {}
    
    58 58
     
    
    59 59
             if self.mesonargs:
    
    60
    -            element_config['configure-commands'] = [
    
    61
    -                '%{meson} ' + self.mesonargs
    
    62
    -            ]
    
    60
    +            element_vars['meson-local'] = self.mesonargs
    
    63 61
     
    
    64
    -        if element_config:
    
    65
    -            element['config'] = element_config
    
    62
    +        if element_vars:
    
    63
    +            element['variables'] = element_vars
    
    66 64
     
    
    67 65
             return 'meson'
    
    68 66
     
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]