summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-08-02 13:35:55 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2019-08-02 18:19:03 +0100
commit1bdadfe1aae158fb406e10f81f3ae0533dea1602 (patch)
tree2d88779a9119fa5e31abd975beb2dcba86099565 /pango
parentdb47a5166acd16c87b1cb60711b42492093a06dd (diff)
downloadpango-1bdadfe1aae158fb406e10f81f3ae0533dea1602.tar.gz
Decouple PangoOT and PangoFc from PangoFT2
The PangoFT2 introspection namespace contains symbols from two other namespaces on top of its own PangoFT2 symbols: - PangoOT, the deprecated wrapper for FreeType's OpenType API - PangoFc, the wrapper for FontConfig's API We can only have one namespace per GIR/typelib, so we need to decouple the GIR and typelib introspection data from PangoFT2 into three separate namespaces. These are just new introspection namespaces mapping to their corresponding C symbols; there are no new shared libraries: if you're using PangoFc and PangOT API then you must be linking against libpangoft2 anyway.
Diffstat (limited to 'pango')
-rw-r--r--pango/meson.build71
1 files changed, 58 insertions, 13 deletions
diff --git a/pango/meson.build b/pango/meson.build
index be7e1300..b43cd7f9 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -164,30 +164,42 @@ pkgconfig.generate(libpango,
# FreeType
if build_pangoft2
- pangoft2_headers = [
- 'pango-ot.h',
+ pangofc_headers = [
'pangofc-font.h',
'pangofc-fontmap.h',
'pangofc-decoder.h',
- 'pangoft2.h',
]
- pangoft2_public_sources = [
+ pangofc_public_sources = [
'pangofc-font.c',
'pangofc-fontmap.c',
'pangofc-decoder.c',
- 'pangoft2.c',
]
- pangoft2_sources = pangoft2_public_sources + [
- 'pangoft2-fontmap.c',
- 'pangoft2-render.c',
+ pangoot_headers = [
+ 'pango-ot.h',
+ ]
+
+ pangoot_public_sources = [
'pango-ot-buffer.c',
'pango-ot-info.c',
'pango-ot-ruleset.c',
'pango-ot-tag.c',
]
+ pangoft2_headers = [
+ 'pangoft2.h',
+ ]
+
+ pangoft2_public_sources = [
+ 'pangoft2.c',
+ ]
+
+ pangoft2_sources = pangofc_public_sources + pangoot_public_sources + pangoft2_public_sources + [
+ 'pangoft2-fontmap.c',
+ 'pangoft2-render.c',
+ ]
+
if host_system == 'windows'
pangoft2_rc = configure_file(
input: 'pangoft2.rc.in',
@@ -198,7 +210,7 @@ if build_pangoft2
pangoft2_sources += pangoft2_res
endif
- install_headers(pangoft2_headers, subdir: pango_api_path)
+ install_headers(pangoft2_headers + pangofc_headers, subdir: pango_api_path)
libpangoft2 = library(
'pangoft2-@0@'.format(pango_api_version),
@@ -218,16 +230,49 @@ if build_pangoft2
pangoft2_dep_sources = []
if build_gir
+ pangofc_gir = gnome.generate_gir(
+ libpangoft2,
+ sources: pangofc_headers + pangofc_public_sources,
+ dependencies: [ libpango_dep, pango_gir_dep ],
+ namespace: 'PangoFc',
+ nsversion: pango_api_version,
+ identifier_prefix: 'PangoFc',
+ symbol_prefix: 'pango_fc',
+ export_packages: 'pangoft2',
+ includes: [ pango_gir[0], 'fontconfig-2.0', ],
+ header: 'pango/pangoft2.h',
+ extra_args: gir_args,
+ )
+ pangofc_gir_dep = declare_dependency(sources: pangofc_gir)
+ pangoft2_dep_sources += pangofc_gir
+
+ # Deprecated API, still needed for PangoXft
+ pangoot_gir = gnome.generate_gir(
+ libpangoft2,
+ sources: pangoot_headers + pangoot_public_sources,
+ dependencies: [ libpango_dep, pango_gir_dep, pangofc_gir_dep ],
+ namespace: 'PangoOT',
+ nsversion: pango_api_version,
+ identifier_prefix: 'PangoOT',
+ symbol_prefix: 'pango_ot',
+ export_packages: 'pangoft2',
+ includes: [ pangofc_gir[0], 'freetype2-2.0', ],
+ header: 'pango/pangoft2.h',
+ extra_args: gir_args,
+ )
+ pangoot_gir_dep = declare_dependency(sources: pangoot_gir)
+ pangoft2_dep_sources += pangoot_gir
+
pangoft2_gir = gnome.generate_gir(
libpangoft2,
sources: pangoft2_headers + pangoft2_public_sources,
- dependencies: [ libpango_dep, pango_gir_dep ],
+ dependencies: [ libpango_dep, pango_gir_dep, pangofc_gir_dep, pangoot_gir_dep ],
namespace: 'PangoFT2',
nsversion: pango_api_version,
identifier_prefix: 'PangoFT2',
symbol_prefix: 'pango_ft2',
export_packages: 'pangoft2',
- includes: [ pango_gir[0], 'GObject-2.0', 'cairo-1.0', 'freetype2-2.0', 'fontconfig-2.0', ],
+ includes: [ pangofc_gir[0], 'freetype2-2.0', ],
header: 'pango/pangoft2.h',
install: true,
extra_args: gir_args,
@@ -295,13 +340,13 @@ if xft_dep.found() and fontconfig_dep.found()
pangoxft_gir = gnome.generate_gir(
libpangoxft,
sources: pangoxft_headers + pangoxft_sources,
- dependencies: [ libpango_dep, libpangoft2_dep, pango_gir_dep, pangoft2_gir_dep ],
+ dependencies: [ libpango_dep, libpangoft2_dep, pango_gir_dep, pangoot_gir_dep, pangoft2_gir_dep ],
namespace: 'PangoXft',
nsversion: pango_api_version,
identifier_prefix: 'PangoXft',
symbol_prefix: 'pango_xft',
export_packages: 'pangoxft',
- includes: [ pango_gir[0], pangoft2_gir[0], 'GObject-2.0', 'xft-2.0', 'xlib-2.0' ],
+ includes: [ pango_gir[0], pangoot_gir[0], pangoft2_gir[0], 'GObject-2.0', 'xft-2.0', 'xlib-2.0' ],
header: 'pango/pangoxft.h',
install: true,
extra_args: gir_args,