rpms/iftop/F-13 iftop-0.17-ncursesw.patch, NONE, 1.1 iftop.spec, 1.19, 1.20

Robert Scheck robert at fedoraproject.org
Thu Apr 1 13:26:53 UTC 2010


Author: robert

Update of /cvs/pkgs/rpms/iftop/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv16287/F-13

Modified Files:
	iftop.spec 
Added Files:
	iftop-0.17-ncursesw.patch 
Log Message:
Link against ncursesw for lines with UTF-8 and PuTTY (#546032)


iftop-0.17-ncursesw.patch:
 configure.in |    2 +-
 iftop.c      |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

--- NEW FILE iftop-0.17-ncursesw.patch ---
Patch by Robert Scheck <robert at fedoraproject.org> for iftop >= 0.17, which works
around a PuTTY issue (doesn't honor vt100 line-drawing when in UTF-8 mode) to get
sane lines drawn instead of letters. When using PuTTY in UTF-8 mode, you have to
execute "NCURSES_NO_UTF8_ACS=1 iftop" in the future. Technically, relinking from
curses to ncursesw is just half of the solution, calling setlocale() is the rest.
For further information, please have a look to Red Hat Bugzilla, bug ID #546032:
https://bugzilla.redhat.com/show_bug.cgi?id=546032

--- iftop-0.17/configure.in			2006-02-12 19:34:24.000000000 +0100
+++ iftop-0.17/configure.in.ncursesw		2010-04-01 15:12:36.000000000 +0200
@@ -352,7 +352,7 @@
 
 AC_MSG_CHECKING([for a curses library containing mvchgat])
 oldLIBS=$LIBS
-for curseslib in curses ncurses ; do
+for curseslib in ncursesw curses ncurses ; do
     LIBS="$oldLIBS -l$curseslib"
     AC_TRY_LINK([
 #include <curses.h>
--- iftop-0.17/iftop.c				2005-03-31 14:08:05.000000000 +0200
+++ iftop-0.17/iftop.c.ncursesw			2010-04-01 15:11:50.000000000 +0200
@@ -25,6 +25,7 @@
 #include <signal.h>
 #include <string.h>
 #include <unistd.h>
+#include <locale.h>
 
 #include "iftop.h"
 #include "addr_hash.h"
@@ -563,6 +564,8 @@
     pthread_t thread;
     struct sigaction sa = {};
 
+    setlocale(LC_ALL, "");
+
     /* TODO: tidy this up */
     /* read command line options and config file */   
     config_init();


Index: iftop.spec
===================================================================
RCS file: /cvs/pkgs/rpms/iftop/F-13/iftop.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- iftop.spec	25 Jul 2009 03:14:42 -0000	1.19
+++ iftop.spec	1 Apr 2010 13:26:53 -0000	1.20
@@ -1,14 +1,15 @@
 Summary:	Command line tool that displays bandwidth usage on an interface
 Name:		iftop
 Version:	0.17
-Release:	9%{?dist}
+Release:	10%{?dist}
 License:	GPLv2+
 Group:		Applications/Internet
 URL:		http://www.ex-parrot.com/~pdw/%{name}/
 Source:		http://www.ex-parrot.com/~pdw/%{name}/download/%{name}-%{version}.tar.gz
 Patch0:		iftop-0.17-bandwidth.patch
 Patch1:		iftop-0.17-man-typos.patch
-BuildRequires:	ncurses-devel, %{_includedir}/pcap.h
+Patch2:		iftop-0.17-ncursesw.patch
+BuildRequires:	ncurses-devel, %{_includedir}/pcap.h, autoconf, automake
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -21,6 +22,8 @@ so slow?".
 %setup -q
 %patch0 -p1 -b .bandwidth
 %patch1 -p1 -b .man-typos
+%patch2 -p1 -b .ncursesw
+autoreconf -f
 
 %build
 %configure
@@ -34,12 +37,15 @@ make DESTDIR=$RPM_BUILD_ROOT install
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %doc ChangeLog COPYING README TODO
 %{_sbindir}/%{name}
 %{_mandir}/man8/%{name}.*
 
 %changelog
+* Thu Apr 01 2010 Robert Scheck <robert at fedoraproject.org> 0.17-10
+- Link against ncursesw for lines with UTF-8 and PuTTY (#546032)
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.17-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 



More information about the scm-commits mailing list