qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Chris Hofstaedtler <chris@hofstaedtler.name>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-level <qemu-devel@nongnu.org>,
	"Samuel Thibault" <samuel.thibault@gnu.org>
Subject: Re: [PATCH v2] meson: fix ncurses detection on macOS
Date: Thu, 31 Dec 2020 07:05:20 -0800	[thread overview]
Message-ID: <CAE2XoE8KfX3h8RRvcNS-Y-QhJqEJ+cyZB=uLPR5O7X4bhLSHHw@mail.gmail.com> (raw)
In-Reply-To: <20201230221727.60579-1-chris@hofstaedtler.name>

[-- Attachment #1: Type: text/plain, Size: 2154 bytes --]

On Wed, Dec 30, 2020 at 2:17 PM Chris Hofstaedtler <chris@hofstaedtler.name>
wrote:
>
> 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.
>
> Signed-off-by: Chris Hofstaedtler <chris@hofstaedtler.name>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Cc: Samuel Thibault <samuel.thibault@gnu.org>
> Cc: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  meson.build | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 372576f82c..fd74728674 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -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')
> --
> 2.29.2
>

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>

--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

[-- Attachment #2: Type: text/html, Size: 2952 bytes --]

  parent reply	other threads:[~2020-12-31 15:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 22:17 [PATCH v2] meson: fix ncurses detection on macOS Chris Hofstaedtler
2020-12-30 22:19 ` Samuel Thibault
2020-12-31 15:05 ` 罗勇刚(Yonggang Luo) [this message]
2021-01-01 11:02 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE2XoE8KfX3h8RRvcNS-Y-QhJqEJ+cyZB=uLPR5O7X4bhLSHHw@mail.gmail.com' \
    --to=luoyonggang@gmail.com \
    --cc=chris@hofstaedtler.name \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).