Correctly install mustache in flatpak.
We need a simple buildsystem to "build" mustache" as we simply need to copy the header.
This commit is contained in:
parent
961076bb87
commit
c4a3da03c3
|
@ -263,6 +263,12 @@ class Builder:
|
||||||
self.command('configure', self._configure)
|
self.command('configure', self._configure)
|
||||||
self.command('make_dist', self._make_dist)
|
self.command('make_dist', self._make_dist)
|
||||||
|
|
||||||
|
def set_flatpak_buildsystem(self, module):
|
||||||
|
if getattr(self, 'flatpak_buildsystem', None):
|
||||||
|
module['buildsystem'] = self.flatpak_buildsystem
|
||||||
|
if getattr(self, 'configure_option', ''):
|
||||||
|
module['config-opts'] = self.configure_option.split(' ')
|
||||||
|
|
||||||
|
|
||||||
class NoopBuilder(Builder):
|
class NoopBuilder(Builder):
|
||||||
def build(self):
|
def build(self):
|
||||||
|
@ -283,6 +289,7 @@ class MakeBuilder(Builder):
|
||||||
configure_env = None
|
configure_env = None
|
||||||
make_target = ""
|
make_target = ""
|
||||||
make_install_target = "install"
|
make_install_target = "install"
|
||||||
|
flatpak_buildsystem = None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def all_configure_option(self):
|
def all_configure_option(self):
|
||||||
|
@ -337,6 +344,8 @@ class MakeBuilder(Builder):
|
||||||
|
|
||||||
|
|
||||||
class CMakeBuilder(MakeBuilder):
|
class CMakeBuilder(MakeBuilder):
|
||||||
|
flatpak_buildsystem = 'cmake'
|
||||||
|
|
||||||
def _configure(self, context):
|
def _configure(self, context):
|
||||||
context.try_skip(self.build_path)
|
context.try_skip(self.build_path)
|
||||||
cross_option = ""
|
cross_option = ""
|
||||||
|
@ -367,9 +376,14 @@ class CMakeBuilder(MakeBuilder):
|
||||||
env.update(self.configure_env)
|
env.update(self.configure_env)
|
||||||
run_command(command, self.build_path, context, env=env, buildEnv=self.buildEnv, cross_env_only=True)
|
run_command(command, self.build_path, context, env=env, buildEnv=self.buildEnv, cross_env_only=True)
|
||||||
|
|
||||||
|
def set_flatpak_buildsystem(self, module):
|
||||||
|
super().set_flatpak_buildsystem( module)
|
||||||
|
module['buildir'] = True
|
||||||
|
|
||||||
|
|
||||||
class QMakeBuilder(MakeBuilder):
|
class QMakeBuilder(MakeBuilder):
|
||||||
qmake_target = ""
|
qmake_target = ""
|
||||||
|
flatpak_buildsystem = 'qmake'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def env_option(self):
|
def env_option(self):
|
||||||
|
@ -416,6 +430,7 @@ class QMakeBuilder(MakeBuilder):
|
||||||
class MesonBuilder(Builder):
|
class MesonBuilder(Builder):
|
||||||
configure_option = ""
|
configure_option = ""
|
||||||
test_option = ""
|
test_option = ""
|
||||||
|
flatpak_buildsystem = 'meson'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def library_type(self):
|
def library_type(self):
|
||||||
|
|
|
@ -24,3 +24,6 @@ class Mustache(Dependency):
|
||||||
copy2(pj(self.source_path, 'mustache.hpp'),
|
copy2(pj(self.source_path, 'mustache.hpp'),
|
||||||
pj(self.buildEnv.install_dir, 'include'))
|
pj(self.buildEnv.install_dir, 'include'))
|
||||||
|
|
||||||
|
def set_flatpak_buildsystem(self, module):
|
||||||
|
module['buildsystem'] = 'simple'
|
||||||
|
module['build-commands'] = ['cp mustache.hpp /app/include']
|
||||||
|
|
|
@ -171,17 +171,8 @@ class FlatpakBuilder:
|
||||||
|
|
||||||
else:
|
else:
|
||||||
builder = get_target_step(stepDef)
|
builder = get_target_step(stepDef)
|
||||||
if isinstance(builder, MesonBuilder):
|
builder.set_flatpak_buildsystem(module)
|
||||||
module['buildsystem'] = 'meson'
|
|
||||||
elif isinstance(builder, CMakeBuilder):
|
|
||||||
module['buildsystem'] = 'cmake'
|
|
||||||
module['builddir'] = True
|
|
||||||
elif isinstance(builder, QMakeBuilder):
|
|
||||||
module['buildsystem'] = 'qmake'
|
|
||||||
# config-opts
|
|
||||||
print(module['name'])
|
print(module['name'])
|
||||||
if getattr(builder, 'configure_option', ''):
|
|
||||||
module['config-opts'] = builder.configure_option.split(' ')
|
|
||||||
|
|
||||||
manifest = MANIFEST.copy()
|
manifest = MANIFEST.copy()
|
||||||
modules = [m for m in modules.values() if m.get('sources')]
|
modules = [m for m in modules.values() if m.get('sources')]
|
||||||
|
|
Loading…
Reference in New Issue