All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] procps-ng: fix/patch wrong ncursesw headers assumption
@ 2015-04-07 22:50 Gustavo Zacarias
  2015-04-08  7:26 ` Baruch Siach
  2015-04-08 20:48 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2015-04-07 22:50 UTC (permalink / raw)
  To: buildroot

The configure script/code assumes ncursesw headers live in
/usr/include/ncursesw.
That's a distribution-ism where they want to have both versions for
ABI/API compatibility, but not the case for embedded where that's not a
concern.
Hence kill the hard-coding and use pkg-config to find this out instead
of the half-made effort about it.
Fixes:
http://autobuild.buildroot.net/results/97d/97dc7f238457609c861c24f81b556973f5dec9c1/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 .../0002-use-pkgconfig-for-ncursesw-cflags.patch   | 56 ++++++++++++++++++++++
 package/procps-ng/procps-ng.mk                     |  3 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch

diff --git a/package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch b/package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch
new file mode 100644
index 0000000..973c4e5
--- /dev/null
+++ b/package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch
@@ -0,0 +1,56 @@
+Don't assume ncursesw headers are in ../usr/include/ncursesw/..
+On a pure build/system without legacy ncurses that may not be true.
+Since we're using pkg-config let it provide the correct include path.
+
+Status: contacted one of the maintainers on sf.net
+(ticket submission closed to the public, no other way of contacting them).
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura procps-ng-3.3.10.orig/configure.ac procps-ng-3.3.10/configure.ac
+--- procps-ng-3.3.10.orig/configure.ac	2015-04-07 19:21:55.729819952 -0300
++++ procps-ng-3.3.10/configure.ac	2015-04-07 19:32:09.511706653 -0300
+@@ -138,7 +138,8 @@
+   ])
+   AM_CONDITIONAL(WITH_NCURSES, true)
+   if test "$enable_watch8bit" = yes; then
+-    PKG_CHECK_MODULES([NCURSESW], [ncursesw], [WATCH_NCURSES_LIBS="$NCURSESW_LIBS"], [
++    PKG_CHECK_MODULES([NCURSESW], [ncursesw], [WATCH_NCURSES_LIBS="$NCURSESW_LIBS"]
++    [WATCH_NCURSES_CFLAGS="$NCURSESW_CFLAGS"], [
+       AC_CHECK_LIB([ncursesw], [addwstr], [WATCH_NCURSES_LIBS=-lncursesw],
+                    [AC_MSG_ERROR([Cannot find ncurses wide library ncursesw with --enable-watch8bit])])
+     ])
+@@ -148,6 +149,7 @@
+ fi
+ AC_SUBST([NCURSES_LIBS])
+ AC_SUBST([WATCH_NCURSES_LIBS])
++AC_SUBST([WATCH_NCURSES_CFLAGS])
+ 
+ AC_ARG_WITH([systemd],
+   [AS_HELP_STRING([--with-systemd], [enable systemd support])],
+diff -Nura procps-ng-3.3.10.orig/Makefile.am procps-ng-3.3.10/Makefile.am
+--- procps-ng-3.3.10.orig/Makefile.am	2015-04-07 19:21:55.655817434 -0300
++++ procps-ng-3.3.10/Makefile.am	2015-04-07 19:32:54.516238136 -0300
+@@ -83,6 +83,7 @@
+ slabtop_LDADD = @NCURSES_LIBS@
+ watch_SOURCES = watch.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c
+ watch_LDADD = @WATCH_NCURSES_LIBS@
++watch_CFLAGS = @WATCH_NCURSES_CFLAGS@
+ endif
+ 
+ if BUILD_SKILL
+diff -Nura procps-ng-3.3.10.orig/watch.c procps-ng-3.3.10/watch.c
+--- procps-ng-3.3.10.orig/watch.c	2015-04-07 19:21:55.707819203 -0300
++++ procps-ng-3.3.10/watch.c	2015-04-07 19:22:27.323895083 -0300
+@@ -51,10 +51,8 @@
+ #ifdef WITH_WATCH8BIT
+ # include <wchar.h>
+ # include <wctype.h>
+-# include <ncursesw/ncurses.h>
+-#else
+-# include <ncurses.h>
+ #endif	/* WITH_WATCH8BIT */
++#include <ncurses.h>
+ 
+ #ifdef FORCE_8BIT
+ # undef isprint
diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk
index f9c1082..4ee60f3 100644
--- a/package/procps-ng/procps-ng.mk
+++ b/package/procps-ng/procps-ng.mk
@@ -10,8 +10,9 @@ PROCPS_NG_SITE = http://downloads.sourceforge.net/project/procps-ng/Production
 PROCPS_NG_LICENSE = GPLv2+, libproc and libps LGPLv2+
 PROCPS_NG_LICENSE_FILES = COPYING COPYING.LIB
 PROCPS_NG_INSTALL_STAGING = YES
-
 PROCPS_NG_DEPENDENCIES = ncurses host-pkgconf
+# For 0002-use-pkgconfig-for-ncursesw-cflags.patch
+PROCPS_NG_AUTORECONF = YES
 
 # If both procps-ng and busybox are selected, make certain procps-ng
 # wins the fight over who gets to have their utils actually installed.
-- 
2.0.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] procps-ng: fix/patch wrong ncursesw headers assumption
  2015-04-07 22:50 [Buildroot] [PATCH] procps-ng: fix/patch wrong ncursesw headers assumption Gustavo Zacarias
@ 2015-04-08  7:26 ` Baruch Siach
  2015-04-08 20:48 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2015-04-08  7:26 UTC (permalink / raw)
  To: buildroot

Hi Gustavo,

On Tue, Apr 07, 2015 at 07:50:06PM -0300, Gustavo Zacarias wrote:
> The configure script/code assumes ncursesw headers live in
> /usr/include/ncursesw.
> That's a distribution-ism where they want to have both versions for
> ABI/API compatibility, but not the case for embedded where that's not a
> concern.
> Hence kill the hard-coding and use pkg-config to find this out instead
> of the half-made effort about it.
> Fixes:
> http://autobuild.buildroot.net/results/97d/97dc7f238457609c861c24f81b556973f5dec9c1/
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Thanks. This supersedes my patch http://patchwork.ozlabs.org/patch/458254/.

Tested-by: Baruch Siach <baruch@tkos.co.il>
[build only]

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] procps-ng: fix/patch wrong ncursesw headers assumption
  2015-04-07 22:50 [Buildroot] [PATCH] procps-ng: fix/patch wrong ncursesw headers assumption Gustavo Zacarias
  2015-04-08  7:26 ` Baruch Siach
@ 2015-04-08 20:48 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2015-04-08 20:48 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Tue,  7 Apr 2015 19:50:06 -0300, Gustavo Zacarias wrote:
> The configure script/code assumes ncursesw headers live in
> /usr/include/ncursesw.
> That's a distribution-ism where they want to have both versions for
> ABI/API compatibility, but not the case for embedded where that's not a
> concern.
> Hence kill the hard-coding and use pkg-config to find this out instead
> of the half-made effort about it.
> Fixes:
> http://autobuild.buildroot.net/results/97d/97dc7f238457609c861c24f81b556973f5dec9c1/
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Applied, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-08 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07 22:50 [Buildroot] [PATCH] procps-ng: fix/patch wrong ncursesw headers assumption Gustavo Zacarias
2015-04-08  7:26 ` Baruch Siach
2015-04-08 20:48 ` Thomas Petazzoni

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.