meson: fix ncurses detection on macOS
PATCH v2 1/1 meson: fix ncurses detection on macOS
Without this, meson fails with "curses package not usable" when using ncurses 6.2. Apparently the wide functions (addwstr, etc) are hidden behind the extra define, and meson does not define it at that detection stage.
Regression from b01a4fd3bd7d6f2 ("configure: Define NCURSES_WIDECHAR if we're using curses"). The meson conversion has seen many iterations of the curses check, so pinpointing the exact commit breaking this is not so easy.
--- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meson.build +3 -3
@@ -500,16 +500,16 @@ if have_system and not get_option('curses').disabled() endif endforeach msg = get_option('curses').enabled() ? 'curses library not found' : '' + curses_compile_args = ['-DNCURSES_WIDECHAR'] if curses.found() - if cc.links(curses_test, dependencies: [curses]) - curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses]) + if cc.links(curses_test, args: curses_compile_args, dependencies: [curses]) + curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses]) else msg = 'curses package not usable' curses = not_found endif endif if not curses.found() - curses_compile_args = ['-DNCURSES_WIDECHAR'] has_curses_h = cc.has_header('curses.h', args: curses_compile_args) if targetos != 'windows' and not has_curses_h message('Trying with /usr/include/ncursesw')
Signature · 1 line
2.29.2
Chris Hofstaedtler, le mer. 30 déc. 2020 23:17:27 +0100, a ecrit:
Quoted 8 lines
Without this, meson fails with "curses package not usable" when using ncurses 6.2. Apparently the wide functions (addwstr, etc) are hidden behind the extra define, and meson does not define it at that detection stage.
Regression from
b01a4fd3bd7d6f2("configure: DefineNCURSES_WIDECHARif we're using curses"). The meson conversion has seen many iterations of the curses check, so pinpointing the exact commit breaking this is not so easy.
Quoted 5 lines
Signed-off-by Chris Hofstaedtler <[email protected]>Cc Peter Maydell <[email protected]>Cc Philippe Mathieu-Daudé <[email protected]>Cc Samuel Thibault <[email protected]>Cc Yonggang Luo <[email protected]>
Quoted 31 lines
--- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)meson.build +3
-3@@ -500,16 +500,16 @@ if have_system and not get_option('curses').disabled() endif endforeach msg = get_option('curses').enabled() ? 'curses library not found' : '' + curses_compile_args = ['-DNCURSES_WIDECHAR'] if curses.found() - if cc.links(curses_test, dependencies: [curses]) - curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses]) + if cc.links(curses_test, args: curses_compile_args, dependencies: [curses]) + curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses]) else msg = 'curses package not usable' curses = not_found endif endif if not curses.found() - curses_compile_args = ['-DNCURSES_WIDECHAR'] has_curses_h = cc.has_header('curses.h', args: curses_compile_args) if targetos != 'windows' and not has_curses_h message('Trying with /usr/include/ncursesw')Signature · 1 line
2.29.2
Quoted 2 lines · Chris Hofstaedtler
Without this, meson fails with "curses package not usable" when using
ncurses
Quoted 1 line
6.2. Apparently the wide functions (addwstr, etc) are hidden behind the
extra
Quoted 3 lines
define, and meson does not define it at that detection stage.
Regression from
b01a4fd3bd7d6f2("configure: DefineNCURSES_WIDECHARif
we're
Quoted 1 line
using curses"). The meson conversion has seen many iterations of the
curses
meson.build if have_system and not
Quoted 16 lines
check, so pinpointing the exact commit breaking this is not so easy.
Signed-off-by Chris Hofstaedtler <[email protected]>Cc Peter Maydell <[email protected]>Cc Philippe Mathieu-Daudé <[email protected]>Cc Samuel Thibault <[email protected]>Cc Yonggang Luo <[email protected]>--- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)meson.build +0
-0@@ -500,16 +500,16 @@ if have_system and not
get_option('curses').disabled()
meson.build if have_system and not get_option('curses').disabled()
Quoted 7 lines
meson.build +1
-2endif endforeach msg = get_option('curses').enabled() ? 'curses library not found' : '' + curses_compile_args = ['-DNCURSES_WIDECHAR'] if curses.found() - if cc.links(curses_test, dependencies: [curses]) - curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR',
dependencies: [curses])
meson.build if have_system and not · line 505
Quoted 1 line
meson.build +1
-0+ if cc.links(curses_test, args: curses_compile_args, dependencies:
[curses])
meson.build if have_system and not · line 506
Quoted 1 line
meson.build +1
-0+ curses = declare_dependency(compile_args: curses_compile_args,
dependencies: [curses])
Quoted 11 lines
meson.build +0
-2else msg = 'curses package not usable' curses = not_found endif endif if not curses.found() - curses_compile_args = ['-DNCURSES_WIDECHAR'] has_curses_h = cc.has_header('curses.h', args: curses_compile_args) if targetos != 'windows' and not has_curses_h message('Trying with /usr/include/ncursesw') --
Quoted 2 lines
2.29.2
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Quoted 8 lines · Chris Hofstaedtler
Without this, meson fails with "curses package not usable" when using ncurses 6.2. Apparently the wide functions (addwstr, etc) are hidden behind the extra define, and meson does not define it at that detection stage.
Regression from
b01a4fd3bd7d6f2("configure: DefineNCURSES_WIDECHARif we're using curses"). The meson conversion has seen many iterations of the curses check, so pinpointing the exact commit breaking this is not so easy.
Quoted 8 lines
Signed-off-by Chris Hofstaedtler <[email protected]>Cc Peter Maydell <[email protected]>Cc Philippe Mathieu-Daudé <[email protected]>Cc Samuel Thibault <[email protected]>Cc Yonggang Luo <[email protected]>--- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)