meson: optionalize terminfo dependency

ncurses on FreeBSD still uses termcap(5) while foot works fine with
xterm-256color sans status line and visible bell. Having more than
one ncurses version installed may break other applications.

Document -Dterminfo=false uses --term=xterm-256color by default
This commit is contained in:
Jan Beich 2021-01-19 14:22:41 +00:00 committed by Daniel Eklöf
parent e3a1dfcf5a
commit 15f2bebdcb
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 22 additions and 10 deletions

View file

@ -2042,7 +2042,11 @@ config_load(struct config *conf, const char *conf_path,
bool ret = false;
*conf = (struct config) {
#ifdef HAVE_TERMINFO
.term = xstrdup("foot"),
#else
.term = xstrdup("xterm-256color"),
#endif
.shell = get_shell(),
.title = xstrdup("foot"),
.app_id = xstrdup("foot"),

View file

@ -29,7 +29,8 @@ in this order:
by prepending a '-' to argv[0]. Default: _no_.
*term*
Value to set the environment variable *TERM* to. Default: _foot_.
Value to set the environment variable *TERM* to. Default: _foot_
or _xterm-256color_ if built with _-Dterminfo=false_
*font*, *font-bold*, *font-italic*, *font-bold-italic*
Comma separated list of fonts to use, in fontconfig format. That

View file

@ -1,7 +1,7 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot
# term=foot (or xterm-256color if built with -Dterminfo=false)
# login-shell=no
# font=monospace:size=8

View file

@ -72,6 +72,11 @@ fontconfig = dependency('fontconfig')
tllist = dependency('tllist', version: '>=1.0.4', fallback: 'tllist')
fcft = dependency('fcft', version: ['>=2.3.0', '<3.0.0'], fallback: 'fcft')
tic = find_program('tic', native: true, required: get_option('terminfo'))
if tic.found()
add_project_arguments('-DHAVE_TERMINFO', language: 'c')
endif
wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
wscanner = dependency('wayland-scanner', native: true)
@ -194,14 +199,15 @@ executable(
version,
install: true)
tic = find_program('tic', native: true)
custom_target(
'terminfo',
output: 'f',
input: 'foot.info',
command: [tic, '-x', '-o', '@OUTDIR@', '-e', 'foot,foot-direct', '@INPUT@'],
install: true,
install_dir: join_paths(get_option('datadir'), 'terminfo'))
if tic.found()
custom_target(
'terminfo',
output: 'f',
input: 'foot.info',
command: [tic, '-x', '-o', '@OUTDIR@', '-e', 'foot,foot-direct', '@INPUT@'],
install: true,
install_dir: join_paths(get_option('datadir'), 'terminfo'))
endif
install_data(
'LICENSE', 'README.md', 'CHANGELOG.md',

View file

@ -1 +1,2 @@
option('ime', type: 'boolean', value: true, description: 'IME (Input Method Editor) support')
option('terminfo', type: 'boolean', value: true, description: 'Install terminfo')