aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-08-29 09:06:45 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-08-30 17:09:13 +0000
commit9434066546a8409117083bd64ad43f97a3a236e2 (patch)
tree12e588b8d11a5b1cab93f2a2868e95619f302607 /meson.build
parentspawn: don’t error out if we fail to chdir() (diff)
meson: terminfo install location now defaults to $datadir/terminfo
The meson command line option -Dcustom-terminfo-install-location has been changed in the following ways: * If unset, $datadir/terminfo is used, and TERMINFO is *not* exported * If set, that value (relative to $prefix) is used, and TERMINFO *is* exported. * The special value ‘no’ is removed. -Ddefault-terminfo now also changes the terminfo names generated when -Dterminfo=enabled. Furthermore, the documentation for the TERMINFO environment variable has been removed from the foot.1 and footclient.1 man pages (but as mentioned above, foot *will* still set it if -Dcustom-terminfo-install-location has been used). INSTALL.md has been updated to now recommend using ncurses’ terminfo definitions, if available. But also to document the other alternatives; installing the terminfo definitions in a custom location, or installing them with a diferent name. It also describes the general problem, and the disadvantages of each alternative (but without going into too much depth).
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build32
1 files changed, 20 insertions, 12 deletions
diff --git a/meson.build b/meson.build
index d9762f91..81dc9006 100644
--- a/meson.build
+++ b/meson.build
@@ -35,17 +35,15 @@ add_project_arguments(
language: 'c',
)
-default_terminfo_install_location = join_paths(get_option('datadir'), 'foot', 'terminfo')
terminfo_install_location = get_option('custom-terminfo-install-location')
-if terminfo_install_location == ''
- terminfo_install_location = default_terminfo_install_location
-endif
-if terminfo_install_location != 'no'
+if terminfo_install_location != ''
add_project_arguments(
['-DFOOT_TERMINFO_PATH="@0@"'.format(
join_paths(get_option('prefix'), terminfo_install_location))],
language: 'c')
+else
+ terminfo_install_location = join_paths(get_option('datadir'), 'terminfo')
endif
# Compute the relative path used by compiler invocations.
@@ -246,15 +244,24 @@ endif
tic = find_program('tic', native: true, required: get_option('terminfo'))
if tic.found()
+ conf_data = configuration_data(
+ {
+ 'default_terminfo': get_option('default-terminfo'),
+ }
+ )
+
+ preprocessed = configure_file(
+ input: 'foot.info',
+ output: 'foot.info.preprocessed',
+ configuration: conf_data,
+ )
custom_target(
'terminfo',
- output: 'f',
- input: 'foot.info',
- command: [tic, '-x', '-o', '@OUTDIR@', '-e', 'foot,foot-direct', '@INPUT@'],
+ output: get_option('default-terminfo')[0],
+ input: preprocessed,
+ command: [tic, '-x', '-o', '@OUTDIR@', '-e', '@0@,@0@-direct'.format(get_option('default-terminfo')), '@INPUT@'],
install: true,
- install_dir: (terminfo_install_location != 'no'
- ? terminfo_install_location
- : default_terminfo_install_location)
+ install_dir: terminfo_install_location
)
endif
@@ -267,8 +274,9 @@ summary(
'IME': get_option('ime'),
'Grapheme clustering': utf8proc.found(),
'Build terminfo': tic.found(),
+ 'Terminfo install location': terminfo_install_location,
'Default TERM': get_option('default-terminfo'),
- 'Terminfo custom install location': terminfo_install_location,
+ 'Set TERMINFO': get_option('custom-terminfo-install-location') != '',
},
bool_yn: true
)