mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/3] htop: fix configure to discover ncurses6
Date: Wed, 28 Feb 2018 08:00:16 +0100	[thread overview]
Message-ID: <20180228070016.GB7737@lenoch> (raw)
In-Reply-To: <20180228065715.GA7737@lenoch>

htop's configure tries to link ncurses test agains both supplied
library and the one returned from ncurses-config --libs which
obviously fails for certain combinations. While it deserves
proper fix in htop, let's make patch minimal here for sake
of simplicity.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 Notes: Needed to build against non-widechar ncurses. Perhaps is it
        worth to --enable-unicode wih widechar version?

 ...gure-check-for-ncurses-with-ncurses6-config.patch | 20 ++++++++++++++++++++
 patches/htop-2.1.0/autogen.sh                        |  1 +
 patches/htop-2.1.0/series                            |  1 +
 3 files changed, 22 insertions(+)

diff --git a/patches/htop-2.1.0/0002-configure-check-for-ncurses-with-ncurses6-config.patch b/patches/htop-2.1.0/0002-configure-check-for-ncurses-with-ncurses6-config.patch
new file mode 100644
index 000000000..04714a4bb
--- /dev/null
+++ b/patches/htop-2.1.0/0002-configure-check-for-ncurses-with-ncurses6-config.patch
@@ -0,0 +1,20 @@
+--- htop-2.1.0/configure.ac.orig	2018-02-27 11:23:08.615702344 +0100
++++ htop-2.1.0/configure.ac	2018-02-27 11:24:21.287425809 +0100
+@@ -202,11 +202,12 @@
+             [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
+ else
+    HTOP_CHECK_SCRIPT([ncurses6], [refresh], [HAVE_LIBNCURSES], "ncurses6-config",
+-    HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "ncurses5-config",
+-     HTOP_CHECK_LIB([ncurses6],  [refresh], [HAVE_LIBNCURSES],
+-      HTOP_CHECK_LIB([ncurses],  [refresh], [HAVE_LIBNCURSES],
+-      missing_libraries="$missing_libraries libncurses"
+-   ))))
++    HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "ncurses6-config",
++     HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "ncurses5-config",
++      HTOP_CHECK_LIB([ncurses6],  [refresh], [HAVE_LIBNCURSES],
++       HTOP_CHECK_LIB([ncurses],  [refresh], [HAVE_LIBNCURSES],
++       missing_libraries="$missing_libraries libncurses"
++   )))))
+    
+    AC_CHECK_HEADERS([curses.h],[:],
+       [AC_CHECK_HEADERS([ncurses/curses.h],[:],
diff --git a/patches/htop-2.1.0/autogen.sh b/patches/htop-2.1.0/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/htop-2.1.0/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/htop-2.1.0/series b/patches/htop-2.1.0/series
index 81ca0ba6e..87b59abe7 100644
--- a/patches/htop-2.1.0/series
+++ b/patches/htop-2.1.0/series
@@ -1,4 +1,5 @@
 # generated by git-ptx-patches
 #tag:base --start-number 1
 0001-linux-LinuxProcessList-fix-reading-of-number-of-read.patch
+0002-configure-check-for-ncurses-with-ncurses6-config.patch
 # f87a037f960f427f6ab7ebcbb54e5e4e  - git-ptx-patches magic
-- 
2.16.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2018-02-28  7:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  6:57 [ptxdist] [PATCH v2 1/3] ncurses: version bump 5.9 -> 6.1 Ladislav Michl
2018-02-28  7:00 ` Ladislav Michl [this message]
2018-02-28  7:02 ` [ptxdist] [PATCH v2 3/3] atop: version bump 1.24 -> 2.3.0 Ladislav Michl

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=20180228070016.GB7737@lenoch \
    --to=ladis@linux-mips.org \
    --cc=ptxdist@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox