summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2022-11-23 14:13:55 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2022-11-28 22:57:56 +0000
commita60799aed6c99e6ac97c4b3a3ef9246b1b5425dd (patch)
treed0ee820c64eb2d2eecebcb5555916e7bc281bb65 /meson.build
parent9c0373366988cc0b909ba31e61c43cc46e054b40 (diff)
meson: add fontrootdir option to drop font-utils dependency
The only reason we still depend on xorg/font/utils is because we pull a pkgconfig variable from that .pc file. Let's drop that dependency by providing that option ourselves. And where the option isn't specified and font-utils isn't found, default to $datadir/fonts/X11, same path it's always been. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 9 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 546bb4e4b..0f0a4442a 100644
--- a/meson.build
+++ b/meson.build
@@ -141,8 +141,15 @@ endif
dfp = get_option('default_font_path')
if dfp == ''
- fontutil_dep = dependency('fontutil')
- fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
+ fontrootdir = get_option('fontrootdir')
+ if fontrootdir == ''
+ fontutil_dep = dependency('fontutil', required: false)
+ if fontutil_dep.found()
+ fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
+ else
+ fontrootdir = join_paths(get_option('prefix'), get_option('datadir'), 'fonts', 'X11')
+ endif
+ endif
dfp_elements = [
join_paths(fontrootdir, 'misc'),
join_paths(fontrootdir, 'TTF'),