1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

libgimp: Improve .gir and .vapi dependencies by using unified list

To avoid bugs like: #14902
This commit is contained in:
Bruno Lopes
2025-09-25 10:09:42 -03:00
parent daf23e1a50
commit 0edf615333

View File

@@ -361,6 +361,32 @@ libgimpui_introspectable = [
] ]
if glib.version().version_compare('>=2.86')
if not platform_windows
gio_specific_gir = 'GioUnix-2.0'
gio_specific_vapi = 'gio-unix-2.0'
else
gio_specific_gir = 'GioWin32-2.0'
gio_specific_vapi = 'gio-windows-2.0'
endif
else
gio_specific_gir = ''
gio_specific_vapi = ''
endif
libgimp_deps_table = [
{ 'gir': 'Babl-0.1', 'vapi': 'babl-0.1', },
{ 'gir': 'cairo-1.0', 'vapi': 'cairo-1.0', },
{ 'gir': 'GdkPixbuf-2.0', 'vapi': 'gdk-pixbuf-2.0', },
{ 'gir': 'Gegl-0.4', 'vapi': 'gegl-0.4', },
{ 'gir': 'Gio-2.0', 'vapi': 'gio-2.0', },
{ 'gir': gio_specific_gir, 'vapi': gio_specific_vapi, },
{ 'gir': 'GLib-2.0', 'vapi': 'glib-2.0', },
{ 'gir': 'GObject-2.0', 'vapi': 'gobject-2.0', },
{ 'gir': 'Pango-1.0', 'vapi': 'gtk+-3.0', },
]
libgimp = library('gimp-'+ gimp_api_version, libgimp = library('gimp-'+ gimp_api_version,
libgimp_sources, libgimp_sources,
include_directories: rootInclude, include_directories: rootInclude,
@@ -489,23 +515,12 @@ elif get_option('b_sanitize') != 'none'
warnings += gobject_introspection_warning warnings += gobject_introspection_warning
else else
have_gobject_introspection = true have_gobject_introspection = true
libgimp_gir_includes = [ libgimp_gir_includes = []
'Babl-0.1', foreach dep : libgimp_deps_table
'cairo-1.0', if dep['gir'] != ''
'GdkPixbuf-2.0', libgimp_gir_includes += [dep['gir']]
'Gegl-0.4',
'Gio-2.0',
'GLib-2.0',
'GObject-2.0',
'Pango-1.0',
]
if glib.version().version_compare('>=2.86')
if not platform_windows
libgimp_gir_includes += [ 'GioUnix-2.0' ]
else
libgimp_gir_includes += [ 'GioWin32-2.0' ]
endif endif
endif endforeach
gir_args = [ gir_args = [
'-DGIMP_COMPILATION', '-DGIMP_COMPILATION',
@@ -569,23 +584,12 @@ else
endif endif
if have_vala if have_vala
vapi_deps = [ vapi_deps = []
'babl-0.1', foreach dep : libgimp_deps_table
'cairo-1.0', if dep['vapi'] != ''
'gdk-pixbuf-2.0', vapi_deps += [dep['vapi']]
'gegl-0.4',
'gio-2.0',
'glib-2.0',
'gobject-2.0',
'gtk+-3.0',
]
if glib.version().version_compare('>=2.86')
if not platform_windows
vapi_deps += [ 'gio-unix-2.0' ]
else
vapi_deps += [ 'gio-windows-2.0' ]
endif endif
endif endforeach
libgimp_vapi = gnome.generate_vapi('gimp-' + gimp_api_version, libgimp_vapi = gnome.generate_vapi('gimp-' + gimp_api_version,
sources: libgimp_gir[0], sources: libgimp_gir[0],