[introspection] Enable hb-cairo

This commit is contained in:
Khaled Hosny 2023-03-09 22:30:13 +02:00
parent d444025870
commit 5595a7c82f
3 changed files with 24 additions and 7 deletions

View File

@ -628,6 +628,8 @@ if (HB_HAVE_INTROSPECTION)
--symbol-prefix=hb_gobject --symbol-prefix=hb_gobject
--identifier-prefix=hb_ --identifier-prefix=hb_
--include GObject-2.0 --include GObject-2.0
--include freetype2-2.0
--include cairo-1.0
--pkg-export=harfbuzz-gobject --pkg-export=harfbuzz-gobject
--c-include=hb-gobject.h --c-include=hb-gobject.h
--cflags-begin --cflags-begin
@ -646,6 +648,7 @@ if (HB_HAVE_INTROSPECTION)
-DHB_EXTERN= -DHB_EXTERN=
--cflags-end --cflags-end
--library=harfbuzz-gobject --library=harfbuzz-gobject
--library=harfbuzz-cairo
--library=harfbuzz --library=harfbuzz
-L${hb_libpath} -L${hb_libpath}
${extra_libs} ${extra_libs}

View File

@ -561,8 +561,8 @@ INTROSPECTION_SCANNER_ARGS = \
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
INTROSPECTION_SCANNER_ENV = CC="$(CC)" INTROSPECTION_SCANNER_ENV = CC="$(CC)"
HarfBuzz-0.0.gir: libharfbuzz.la libharfbuzz-gobject.la HarfBuzz-0.0.gir: libharfbuzz.la libharfbuzz-gobject.la libharfbuzz-cairo.la
HarfBuzz_0_0_gir_INCLUDES = GObject-2.0 freetype2-2.0 HarfBuzz_0_0_gir_INCLUDES = GObject-2.0 freetype2-2.0 cairo-1.0
HarfBuzz_0_0_gir_CFLAGS = \ HarfBuzz_0_0_gir_CFLAGS = \
$(INCLUDES) \ $(INCLUDES) \
$(HBCFLAGS) \ $(HBCFLAGS) \
@ -579,6 +579,8 @@ HarfBuzz_0_0_gir_FILES = \
$(HBSOURCES) \ $(HBSOURCES) \
$(HB_GOBJECT_sources) \ $(HB_GOBJECT_sources) \
$(HB_GOBJECT_headers) \ $(HB_GOBJECT_headers) \
$(HB_CAIRO_sources) \
$(HB_CAIRO_headers) \
$(NULL) $(NULL)
girdir = $(datadir)/gir-1.0 girdir = $(datadir)/gir-1.0

View File

@ -444,8 +444,10 @@ endif
# We set those here to not include the sources below that are of no use to # We set those here to not include the sources below that are of no use to
# GObject Introspection # GObject Introspection
gir_sources = hb_sources + hb_gobject_sources gir_sources = hb_sources
gir_headers = hb_headers + hb_gobject_headers gir_headers = hb_headers
gir_deps = []
gir_libs = []
if conf.get('HAVE_GDI', 0) == 1 if conf.get('HAVE_GDI', 0) == 1
hb_sources += hb_gdi_sources hb_sources += hb_gdi_sources
@ -654,6 +656,11 @@ if conf.get('HAVE_CAIRO', 0) == 1
subdirs: [meson.project_name()], subdirs: [meson.project_name()],
version: meson.project_version(), version: meson.project_version(),
) )
gir_sources += hb_cairo_sources
gir_headers += hb_cairo_headers
gir_deps += libharfbuzz_cairo_dep
gir_libs += libharfbuzz_cairo
endif endif
if get_option('tests').enabled() if get_option('tests').enabled()
@ -835,6 +842,11 @@ if have_gobject
link_language: 'c', link_language: 'c',
) )
gir_sources += hb_gobject_sources
gir_headers += hb_gobject_headers
gir_deps += libharfbuzz_gobject_dep
gir_libs += libharfbuzz_gobject
gir = find_program('g-ir-scanner', required: get_option('introspection')) gir = find_program('g-ir-scanner', required: get_option('introspection'))
build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
@ -845,14 +857,14 @@ if have_gobject
if build_gir if build_gir
conf.set('HAVE_INTROSPECTION', 1) conf.set('HAVE_INTROSPECTION', 1)
hb_gen_files_gir = gnome.generate_gir(libharfbuzz_gobject, hb_gen_files_gir = gnome.generate_gir(gir_libs,
sources: [gir_headers, gir_sources, gobject_enums_h], sources: [gir_headers, gir_sources, gobject_enums_h],
dependencies: libharfbuzz_dep, dependencies: gir_deps,
namespace: 'HarfBuzz', namespace: 'HarfBuzz',
nsversion: '0.0', nsversion: '0.0',
identifier_prefix: 'hb_', identifier_prefix: 'hb_',
symbol_prefix: ['hb', 'hb_gobject'], symbol_prefix: ['hb', 'hb_gobject'],
includes: ['GObject-2.0', 'freetype2-2.0'], includes: ['GObject-2.0', 'freetype2-2.0', 'cairo-1.0'],
export_packages: ['harfbuzz-gobject'], export_packages: ['harfbuzz-gobject'],
header: 'hb-gobject.h', header: 'hb-gobject.h',
install: true, install: true,