Correctly install io.qt.qtwebengine.BaseApp for flatpak build.

This commit is contained in:
Matthieu Gautier 2021-06-29 15:47:59 +02:00
parent d5e488333f
commit b8160de652
3 changed files with 33 additions and 1 deletions

View File

@ -35,3 +35,34 @@ class org_kde(Dependency):
self.command('setup_remote', self._setup_remote) self.command('setup_remote', self._setup_remote)
self.command('install_sdk', self._install_sdk) self.command('install_sdk', self._install_sdk)
class org_kde(Dependency):
neutral = False
name = 'io.qt.qtwebengine'
Source = NoopSource
class Builder(Builder):
def _setup_remote(self, context):
command = "flatpak --user remote-add --if-not-exists {remote_name} {remote_url}"
command = command.format(
remote_name = 'flathub',
remote_url = 'https://flathub.org/repo/flathub.flatpakrepo'
)
env = self.buildEnv.get_env(cross_comp_flags=False, cross_compilers=False, cross_path=False)
run_command(command, self.buildEnv.build_dir, context, env=env)
def _install_sdk(self, context):
command = "flatpak --user install -y {remote_name} {name}.BaseApp//{version}"
command = command.format(
remote_name = 'flathub',
name = self.target.name,
version = self.target.version()
)
env = self.buildEnv.get_env(cross_comp_flags=False, cross_compilers=False, cross_path=False)
run_command(command, self.buildEnv.build_dir, context, env=env)
def build(self):
self.command('setup_remote', self._setup_remote)
self.command('install_sdk', self._install_sdk)

View File

@ -5,7 +5,7 @@ class FlatpakPlatformInfo(PlatformInfo):
name = 'flatpak' name = 'flatpak'
build = 'flatpak' build = 'flatpak'
static = '' static = ''
toolchain_names = ['org.kde'] toolchain_names = ['org.kde', 'io.qt.qtwebengine']
compatible_hosts = ['debian', 'fedora'] compatible_hosts = ['debian', 'fedora']
def __str__(self): def __str__(self):

View File

@ -60,5 +60,6 @@ base_deps_versions = {
'qt' : '5.10.1', 'qt' : '5.10.1',
'qtwebengine' : '5.10.1', 'qtwebengine' : '5.10.1',
'org.kde' : '5.15', 'org.kde' : '5.15',
'io.qt.qtwebengine' : '5.15',
'zim-testing-suite': '0.3', 'zim-testing-suite': '0.3',
} }