All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Smith <brad@comstyle.com>
To: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH] meson.build: Support ncurses on MacOS
Date: Sat, 12 Jun 2021 21:40:29 -0400	[thread overview]
Message-ID: <202eedd1-eb24-5463-c17a-64e146b95421@comstyle.com> (raw)
In-Reply-To: <20210612080358.61176-1-sw@weilnetz.de>

This same problem also applies to OpenBSD as we have the same
version of ncurses with support for wide characters. I have a similar
patch in our QEMU port.

On 6/12/2021 4:03 AM, Stefan Weil wrote:
> MacOS provides header files for curses 5.7 with support
> for wide characters, but requires _XOPEN_SOURCE_EXTENDED=1
> to activate that.
>
> By default those old header files are used even if there
> is a newer Homebrew installation of ncurses 6.2 available.
>
> Change also the old macro definition of NCURSES_WIDECHAR
> and set it to 1 like it is done in newer versions of
> curses.h when _XOPEN_SOURCE_EXTENDED=1 is defined.
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>   meson.build | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index d2a9ce91f5..3ca8faa264 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -606,7 +606,11 @@ 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 host_machine.system() == 'darwin'
> +    curses_compile_args = [ '-D_XOPEN_SOURCE_EXTENDED=1']
> +  else
> +    curses_compile_args = ['-DNCURSES_WIDECHAR=1']
> +  endif
>     if curses.found()
>       if cc.links(curses_test, args: curses_compile_args, dependencies: [curses])
>         curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses])


  reply	other threads:[~2021-06-13  1:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  8:03 [PATCH] meson.build: Support ncurses on MacOS Stefan Weil
2021-06-13  1:40 ` Brad Smith [this message]
2021-06-13  6:33   ` Stefan Weil
2021-06-14  5:45     ` Philippe Mathieu-Daudé
2021-06-15  1:53       ` Brad Smith
2021-11-09 17:49         ` Stefan Weil
2021-11-09 18:30           ` Daniel P. Berrangé
2021-06-12  8:51 Stefan Weil

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=202eedd1-eb24-5463-c17a-64e146b95421@comstyle.com \
    --to=brad@comstyle.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.