|
|
@ -195,6 +195,8 @@ class GnomeModule: |
|
|
|
def generate_gir(self, state, args, kwargs): |
|
|
|
def generate_gir(self, state, args, kwargs): |
|
|
|
if len(args) != 1: |
|
|
|
if len(args) != 1: |
|
|
|
raise MesonException('Gir takes one argument') |
|
|
|
raise MesonException('Gir takes one argument') |
|
|
|
|
|
|
|
if kwargs.get('install_dir'): |
|
|
|
|
|
|
|
raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"') |
|
|
|
girtarget = args[0] |
|
|
|
girtarget = args[0] |
|
|
|
while hasattr(girtarget, 'held_object'): |
|
|
|
while hasattr(girtarget, 'held_object'): |
|
|
|
girtarget = girtarget.held_object |
|
|
|
girtarget = girtarget.held_object |
|
|
@ -311,7 +313,8 @@ class GnomeModule: |
|
|
|
} |
|
|
|
} |
|
|
|
if kwargs.get('install'): |
|
|
|
if kwargs.get('install'): |
|
|
|
scankwargs['install'] = kwargs['install'] |
|
|
|
scankwargs['install'] = kwargs['install'] |
|
|
|
scankwargs['install_dir'] = os.path.join(state.environment.get_datadir(), 'gir-1.0') |
|
|
|
scankwargs['install_dir'] = kwargs.get('install_dir_gir', |
|
|
|
|
|
|
|
os.path.join(state.environment.get_datadir(), 'gir-1.0')) |
|
|
|
scan_target = GirTarget(girfile, state.subdir, scankwargs) |
|
|
|
scan_target = GirTarget(girfile, state.subdir, scankwargs) |
|
|
|
|
|
|
|
|
|
|
|
typelib_output = '%s-%s.typelib' % (ns, nsversion) |
|
|
|
typelib_output = '%s-%s.typelib' % (ns, nsversion) |
|
|
@ -335,10 +338,15 @@ class GnomeModule: |
|
|
|
if girdir: |
|
|
|
if girdir: |
|
|
|
typelib_cmd += ["--includedir=%s" % (girdir, )] |
|
|
|
typelib_cmd += ["--includedir=%s" % (girdir, )] |
|
|
|
|
|
|
|
|
|
|
|
kwargs['output'] = typelib_output |
|
|
|
typelib_kwargs = { |
|
|
|
kwargs['command'] = typelib_cmd |
|
|
|
'output': typelib_output, |
|
|
|
kwargs['install_dir'] = os.path.join(state.environment.get_libdir(), 'girepository-1.0') |
|
|
|
'command': typelib_cmd, |
|
|
|
typelib_target = TypelibTarget(typelib_output, state.subdir, kwargs) |
|
|
|
} |
|
|
|
|
|
|
|
if kwargs.get('install'): |
|
|
|
|
|
|
|
typelib_kwargs['install'] = kwargs['install'] |
|
|
|
|
|
|
|
typelib_kwargs['install_dir'] = kwargs.get('install_dir_typelib', |
|
|
|
|
|
|
|
os.path.join(state.environment.get_libdir(), 'girepository-1.0')) |
|
|
|
|
|
|
|
typelib_target = TypelibTarget(typelib_output, state.subdir, typelib_kwargs) |
|
|
|
return [scan_target, typelib_target] |
|
|
|
return [scan_target, typelib_target] |
|
|
|
|
|
|
|
|
|
|
|
def compile_schemas(self, state, args, kwargs): |
|
|
|
def compile_schemas(self, state, args, kwargs): |
|
|
|