mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 09:46:17 +01:00
meson: Use Python port of glib-mkenums
This reduces the build-time dependencies of glib to only Python 3, Meson, and git. Git is also optional if you provide a tarball in which the subproject directories already exist. The Python port was done by Jussi Pakkanen on bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=779332 This version contains some fixes from that and also changes all instances of `@` to `\u0040` because Meson does not yet provide a configure_file() mode that ignores unknown @MACRO@ values.
This commit is contained in:
parent
ee94ad776e
commit
dd8ff54736
@ -7,7 +7,7 @@
|
||||
|
||||
import sys, os, shutil, subprocess
|
||||
|
||||
perl = sys.argv[1]
|
||||
python = sys.argv[1]
|
||||
glib_mkenums = sys.argv[2]
|
||||
ofilename = sys.argv[3]
|
||||
ofile_rel = os.path.basename(ofilename)
|
||||
@ -17,7 +17,7 @@ headers = sys.argv[5:]
|
||||
|
||||
arg_array = ['--template', template_file_path]
|
||||
|
||||
cmd = [perl, glib_mkenums]
|
||||
cmd = [python, glib_mkenums]
|
||||
pc = subprocess.Popen(cmd + arg_array + headers, stdout=subprocess.PIPE)
|
||||
(stdo, _) = pc.communicate()
|
||||
if pc.returncode != 0:
|
||||
|
@ -640,7 +640,7 @@ gioenumtypes_h = custom_target('gioenumtypes_h',
|
||||
input : gio_headers,
|
||||
install : true,
|
||||
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
|
||||
command : [gio_build_mkenum, perl, glib_mkenums,
|
||||
command : [gio_build_mkenum, python, glib_mkenums,
|
||||
'@OUTPUT@', meson.current_source_dir(),
|
||||
'@INPUT@', gnetworking_h])
|
||||
|
||||
@ -648,7 +648,7 @@ gioenumtypes_c = custom_target('gioenumtypes_c',
|
||||
output : 'gioenumtypes.c',
|
||||
input : gio_headers,
|
||||
depends : [gioenumtypes_h],
|
||||
command : [gio_build_mkenum, perl, glib_mkenums,
|
||||
command : [gio_build_mkenum, python, glib_mkenums,
|
||||
'@OUTPUT@', meson.current_source_dir(),
|
||||
'@INPUT@', gnetworking_h])
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,6 @@ libgobject_dep = declare_dependency(link_with : libgobject,
|
||||
|
||||
glib_mkenums_conf = configuration_data()
|
||||
glib_mkenums_conf.set('GLIB_VERSION', glib_version)
|
||||
glib_mkenums_conf.set('PERL_PATH', perl.path())
|
||||
|
||||
# FIXME: Set permissions
|
||||
glib_mkenums = configure_file(input : 'glib-mkenums.in',
|
||||
|
@ -1304,9 +1304,6 @@ if host_system == 'windows'
|
||||
winsock2 = cc.find_library('ws2_32')
|
||||
endif
|
||||
|
||||
# Needed for glib-mkenums
|
||||
perl = find_program('perl')
|
||||
|
||||
python = import('python3').find_python()
|
||||
|
||||
# FIXME: defines in config.h that are not actually used anywhere
|
||||
|
Loading…
Reference in New Issue
Block a user