lkml.org 
[lkml]   [2018]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 4/5] kconfig: refactor ncurses package checks for building mconf
From
Date
On 05/17/18 21:52, Masahiro Yamada wrote:
> The mconf (or its infrastructure, lxdiaglog) depends on ncurses.
> check-lxdialog.sh has additional checks in case pkg-config is not
> available. However, qconf and gconf already rely on pkg-config to
> check necessary packages. For simplification, drop the fallback
> code from check-lxdialog.sh and move/rename to mconf-cfg.sh to
> make it work in the same way as the other GUI frontends.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Hi,

I began by testing "make menuconfig" first and immediately got this:

*
* Unable to find the ncurses.
* Install ncurses (ncurses-devel or libncurses-dev
* depending on your distribution)
*

I do have ncurses-devel installed. However, it seems that
pkg-config on openSUSE is not very reliable. zypper (package management
tool) says:

$ zypper info ncurses-devel
Loading repository data...
Reading installed packages...

Information for package ncurses-devel:
--------------------------------------
Repository : openSUSE-Leap-42.3-Update
Name : ncurses-devel
Version : 5.9-62.1
Arch : x86_64
Vendor : openSUSE
Installed Size : 25.0 MiB
Installed : Yes
Status : up-to-date
Source package : ncurses-5.9-62.1.src
Summary : Include Files and Libraries mandatory for Development
Description :
This package contains all necessary include files and libraries needed
to develop applications that require these.
<END>

but there doesn't seem to be a way to get cflags and libs (name).


> diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
> new file mode 100755
> index 0000000..7d5a4b2
> --- /dev/null
> +++ b/scripts/kconfig/mconf-cfg.sh
> @@ -0,0 +1,24 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +
> +PKG="ncursesw"
> +PKG2="ncurses"
> +
> +if pkg-config --exists $PKG; then
> + echo cflags=\"-DNCURSES_WIDECHAR=1 $(pkg-config --cflags $PKG)\"
> + echo libs=\"$(pkg-config --libs $PKG)\"
> + exit 0
> +fi
> +
> +if pkg-config --exists $PKG2; then
> + echo cflags=\"$(pkg-config --cflags $PKG2)\"
> + echo libs=\"$(pkg-config --libs $PKG2)\"
> + exit 0
> +fi
> +
> +echo >&2 "*"
> +echo >&2 "* Unable to find the ncurses."
the ncurses package."

> +echo >&2 "* Install ncurses (ncurses-devel or libncurses-dev"
> +echo >&2 "* depending on your distribution)"

distribution)."

> +echo >&2 "*"
> +exit 1
>

(more on the other patches later.)

thanks.
--
~Randy

\
 
 \ /
  Last update: 2018-05-19 20:03    [W:0.092 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site