1 |
vapier 10/07/01 17:48:14 |
2 |
|
3 |
Modified: util-linux-2.18-ncursesw.patch |
4 |
Log: |
5 |
Tweak patch to handle non-unicode ncurses #326481 by Wilbur Pan. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.2 sys-apps/util-linux/files/util-linux-2.18-ncursesw.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.18-ncursesw.patch?rev=1.2&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.18-ncursesw.patch?rev=1.2&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.18-ncursesw.patch?r1=1.1&r2=1.2 |
14 |
|
15 |
Index: util-linux-2.18-ncursesw.patch |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/util-linux/files/util-linux-2.18-ncursesw.patch,v |
18 |
retrieving revision 1.1 |
19 |
retrieving revision 1.2 |
20 |
diff -u -r1.1 -r1.2 |
21 |
--- util-linux-2.18-ncursesw.patch 30 Jun 2010 18:21:32 -0000 1.1 |
22 |
+++ util-linux-2.18-ncursesw.patch 1 Jul 2010 17:48:14 -0000 1.2 |
23 |
@@ -1,14 +1,66 @@ |
24 |
+From 01f6b78145dbb46ed9205613daf7d06956a5795f Mon Sep 17 00:00:00 2001 |
25 |
+From: Mike Frysinger <vapier@g.o> |
26 |
+Date: Thu, 1 Jul 2010 13:40:33 -0400 |
27 |
+Subject: [PATCH] cfdisk: search for ncursesw/ncurses.h |
28 |
+ |
29 |
+Some distros install the wide version of ncurses side by side with the |
30 |
+non-wide version and place the wide headers in an ncursesw/ subdir. So |
31 |
+detect that behavior and include the right header with cfdisk. |
32 |
+ |
33 |
+Signed-off-by: Mike Frysinger <vapier@g.o> |
34 |
+--- |
35 |
+ configure.ac | 1 + |
36 |
+ fdisk/cfdisk.c | 2 ++ |
37 |
+ 2 files changed, 3 insertions(+), 0 deletions(-) |
38 |
+ |
39 |
+# ATM we avoid regenerating autotools |
40 |
+#diff --git a/configure.ac b/configure.ac |
41 |
+#index 8c5f92f..e4f8884 100644 |
42 |
+#--- a/configure.ac |
43 |
+#+++ b/configure.ac |
44 |
+#@@ -442,6 +442,7 @@ if test "x$with_ncurses" != xno; then |
45 |
+ if test "x$with_ncurses" = xauto; then |
46 |
+ UTIL_CHECK_LIB(ncursesw, initscr, ncurses) |
47 |
+ if test "x$have_ncurses" = xyes; then |
48 |
++ AC_CHECK_HEADERS([ncursesw/ncurses.h]) |
49 |
+ NCURSES_LIBS="-lncursesw" |
50 |
+ fi |
51 |
+ fi |
52 |
+--- a/config.h.in |
53 |
++++ b/config.h.in |
54 |
+@@ -229,6 +229,9 @@ |
55 |
+ /* Define to 1 if you have the <ncurses/ncurses.h> header file. */ |
56 |
+ #undef HAVE_NCURSES_NCURSES_H |
57 |
+ |
58 |
++/* Define to 1 if you have the <ncursesw/ncurses.h> header file. */ |
59 |
++#undef HAVE_NCURSESW_NCURSES_H |
60 |
++ |
61 |
+ /* Define to 1 if you have the <netinet/in.h> header file. */ |
62 |
+ #undef HAVE_NETINET_IN_H |
63 |
+ |
64 |
+--- a/configure |
65 |
++++ b/configure |
66 |
+@@ -17784,7 +17784,7 @@ if test "x$with_ncurses" != xno; then |
67 |
+ have_ncurses=no |
68 |
+ |
69 |
+ |
70 |
+-for ac_header in ncurses.h ncurses/ncurses.h |
71 |
++for ac_header in ncurses.h ncurses/ncurses.h ncursesw/ncurses.h |
72 |
+ do |
73 |
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
74 |
+ if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then |
75 |
+diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c |
76 |
+index 552858b..7fa0b19 100644 |
77 |
--- a/fdisk/cfdisk.c |
78 |
+++ b/fdisk/cfdisk.c |
79 |
-@@ -69,7 +69,11 @@ |
80 |
+@@ -75,6 +75,8 @@ |
81 |
+ #include <slcurses.h> |
82 |
#elif defined(HAVE_SLANG_SLCURSES_H) |
83 |
#include <slang/slcurses.h> |
84 |
- #elif defined(HAVE_NCURSES_H) |
85 |
-+#ifdef HAVE_WIDECHAR |
86 |
++#elif defined(HAVE_NCURSESW_NCURSES_H) && defined(HAVE_WIDECHAR) |
87 |
+#include <ncursesw/ncurses.h> |
88 |
-+#else |
89 |
+ #elif defined(HAVE_NCURSES_H) |
90 |
#include <ncurses.h> |
91 |
-+#endif |
92 |
#elif defined(HAVE_NCURSES_NCURSES_H) |
93 |
- #include <ncurses/ncurses.h> |
94 |
- #endif |
95 |
+-- |
96 |
+1.7.1 |