Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-process/htop/files: htop-1.0.3-tinfo.patch
Date: Tue, 30 Sep 2014 19:40:50
Message-Id: 20140930194046.CA6A869B9@oystercatcher.gentoo.org
1 idl0r 14/09/30 19:40:46
2
3 Added: htop-1.0.3-tinfo.patch
4 Log:
5 Fix ncurses linking, bug 509452
6
7 (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key B427ABC8)
8
9 Revision Changes Path
10 1.1 sys-process/htop/files/htop-1.0.3-tinfo.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/htop/files/htop-1.0.3-tinfo.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/htop/files/htop-1.0.3-tinfo.patch?rev=1.1&content-type=text/plain
14
15 Index: htop-1.0.3-tinfo.patch
16 ===================================================================
17 diff --git a/Makefile.am b/Makefile.am
18 index 820e2e5..85f49e9 100644
19 --- a/Makefile.am
20 +++ b/Makefile.am
21 @@ -36,6 +36,8 @@ SUFFIXES = .h
22 BUILT_SOURCES = $(myhtopheaders)
23 htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h
24
25 +htop_LDADD = $(NCURSES_LIBS)
26 +
27 profile:
28 $(MAKE) all CFLAGS="-pg" AM_CPPFLAGS="-pg -O2 -DNDEBUG"
29
30 diff --git a/configure.ac b/configure.ac
31 index 2b934e8..3593885 100644
32 --- a/configure.ac
33 +++ b/configure.ac
34 @@ -20,6 +20,7 @@ AM_PROG_CC_C_O
35 AC_DISABLE_SHARED
36 AC_ENABLE_STATIC
37 AC_PROG_LIBTOOL
38 +PKG_PROG_PKG_CONFIG
39
40 # Checks for libraries.
41 AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"])
42 @@ -89,20 +90,24 @@ fi
43
44 AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="yes")
45 if test "x$enable_unicode" = xyes; then
46 - AC_CHECK_LIB([ncursesw], [refresh], [], [
47 - missing_libraries="$missing_libraries libncursesw"
48 - AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.])
49 + PKG_CHECK_MODULES([NCURSES], [ncursesw],[
50 + AC_CHECK_LIB([ncursesw], [refresh], [], [
51 + missing_libraries="$missing_libraries libncursesw"
52 + AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.])
53 + ])
54 + AC_CHECK_HEADERS([ncursesw/curses.h],[:],
55 + [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
56 + [AC_CHECK_HEADERS([ncurses/curses.h],[:],
57 + [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
58 ])
59 - AC_CHECK_HEADERS([ncursesw/curses.h],[:],
60 - [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
61 - [AC_CHECK_HEADERS([ncurses/curses.h],[:],
62 - [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
63 else
64 - AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"])
65 - AC_CHECK_HEADERS([curses.h],[:],
66 - [AC_CHECK_HEADERS([ncurses/curses.h],[:],
67 - [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
68 - [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
69 + PKG_CHECK_MODULES([NCURSES], [ncurses],[
70 + AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"])
71 + AC_CHECK_HEADERS([curses.h],[:],
72 + [AC_CHECK_HEADERS([ncurses/curses.h],[:],
73 + [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
74 + [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
75 + ])
76 fi
77
78 if test ! -z "$missing_libraries"; then